/** * @param shouldSaveChanges {@link AtomicBoolean} which {@link #saveChanges} will use to determine if * it should create new commit and save changes or not. It will save changes into new commit only if CAS operation * succeeds in setting it to true (from false). * @param hoodieConf {@link HoodieConfiguration} */ public HoodieBasedMetadataManager(@NonNull final HoodieConfiguration hoodieConf, @NonNull final AtomicBoolean shouldSaveChanges, @NonNull final JavaSparkContext jsc) throws IOException { this.hoodieConf = hoodieConf; this.saveChanges = shouldSaveChanges; this.jsc = Optional.of(jsc); this.metadataMap = readMetadataInfo(this.hoodieConf); }