Skip to content

Commit

Permalink
Fixing compaction write operation in commit metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
nsivabalan committed Apr 1, 2022
1 parent 98b4e97 commit 9c6eec6
Showing 1 changed file with 2 additions and 1 deletion.
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 @@ -81,7 +82,7 @@ public HoodieWriteMetadata<HoodieData<WriteStatus>> execute() {
metadata.addWriteStat(stat.getPartitionPath(), stat);
}
metadata.addMetadata(HoodieCommitMetadata.SCHEMA_KEY, config.getSchema());

metadata.setOperationType(WriteOperationType.COMPACT);
compactionMetadata.setWriteStatuses(statuses);
compactionMetadata.setCommitted(false);
compactionMetadata.setCommitMetadata(Option.of(metadata));
Expand Down

0 comments on commit 9c6eec6

Please sign in to comment.