Skip to content

Commit

Permalink
[HUDI-2473] Fixing compaction write operation in commit metadata (apa…
Browse files Browse the repository at this point in the history
  • Loading branch information
nsivabalan authored and yihua committed Jun 3, 2022
1 parent a55d2f0 commit efb97a2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.apache.hudi.common.model.HoodieRecord;
import org.apache.hudi.common.model.HoodieRecordPayload;
import org.apache.hudi.common.model.HoodieWriteStat;
import org.apache.hudi.common.model.WriteOperationType;
import org.apache.hudi.common.table.timeline.HoodieTimeline;
import org.apache.hudi.common.util.CompactionUtils;
import org.apache.hudi.common.util.Option;
Expand Down Expand Up @@ -99,6 +100,7 @@ public HoodieWriteMetadata<HoodieData<WriteStatus>> execute() {
metadata.addMetadata(SerDeHelper.LATEST_SCHEMA, schemaPair.getLeft().get());
metadata.addMetadata(HoodieCommitMetadata.SCHEMA_KEY, schemaPair.getRight().get());
}
metadata.setOperationType(WriteOperationType.COMPACT);
compactionMetadata.setWriteStatuses(statuses);
compactionMetadata.setCommitted(false);
compactionMetadata.setCommitMetadata(Option.of(metadata));
Expand Down

0 comments on commit efb97a2

Please sign in to comment.