Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public Set<ConfigOption<?>> optionalOptions() {
options.add(IcebergDataSinkOptions.PARTITION_KEY);
options.add(IcebergDataSinkOptions.SINK_COMPACTION_ENABLED);
options.add(IcebergDataSinkOptions.SINK_COMPACTION_COMMIT_INTERVAL);
options.add(IcebergDataSinkOptions.SINK_COMPACTION_PARALLELISM);
return options;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void addPostCommitTopology(
// Shuffle by different table id.
DataStream<CommittableMessage<WriteResultWrapper>> keyedStream =
committableMessageDataStream.partitionCustom(
(bucket, numPartitions) -> bucket % numPartitions,
Math::floorMod,
(committableMessage) -> {
if (committableMessage instanceof CommittableWithLineage) {
WriteResultWrapper multiTableCommittable =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void testCreateDataSink() {

Configuration conf = Configuration.fromMap(ImmutableMap.<String, String>builder().build());
conf.set(IcebergDataSinkOptions.WAREHOUSE, "/tmp/warehouse");
conf.set(IcebergDataSinkOptions.SINK_COMPACTION_PARALLELISM, 4);
DataSink dataSink =
sinkFactory.createDataSink(
new FactoryHelper.DefaultContext(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public void testCompationOperator() throws IOException, InterruptedException {
}
CompactionOperator compactionOperator =
new CompactionOperator(
catalogOptions, CompactionOptions.builder().commitInterval(1).build());
catalogOptions,
CompactionOptions.builder().commitInterval(1).parallelism(4).build());
compactionOperator.processElement(
new StreamRecord<>(
new CommittableWithLineage<>(
Expand Down
Loading