Skip to content

Commit 42f9593

Browse files
committed
fix
1 parent 67167ee commit 42f9593

File tree

6 files changed

+2
-16
lines changed

6 files changed

+2
-16
lines changed

paimon-api/src/main/java/org/apache/paimon/CoreOptions.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,10 +2929,6 @@ public String consumerId() {
29292929
return consumerId;
29302930
}
29312931

2932-
public boolean bucketAppendOrdered() {
2933-
return options.get(BUCKET_APPEND_ORDERED);
2934-
}
2935-
29362932
@Nullable
29372933
public Integer fullCompactionDeltaCommits() {
29382934
return options.get(FULL_COMPACTION_DELTA_COMMITS);

paimon-core/src/main/java/org/apache/paimon/append/BucketedAppendCompactManager.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ public class BucketedAppendCompactManager extends CompactFutureManager {
5555

5656
private static final int FULL_COMPACT_MIN_FILE = 3;
5757

58-
private final Comparator<DataFileMeta> comparator;
5958
private final ExecutorService executor;
6059
private final BucketedDvMaintainer dvMaintainer;
6160
private final PriorityQueue<DataFileMeta> toCompact;
@@ -75,17 +74,11 @@ public BucketedAppendCompactManager(
7574
int minFileNum,
7675
long targetFileSize,
7776
boolean forceRewriteAllFiles,
78-
boolean ordered,
7977
CompactRewriter rewriter,
8078
@Nullable CompactionMetrics.Reporter metricsReporter) {
81-
this.comparator =
82-
ordered
83-
? Comparator.comparing(DataFileMeta::minSequenceNumber)
84-
: Comparator.comparing(DataFileMeta::creationTime)
85-
.thenComparing(DataFileMeta::fileName);
8679
this.executor = executor;
8780
this.dvMaintainer = dvMaintainer;
88-
this.toCompact = new PriorityQueue<>(comparator);
81+
this.toCompact = new PriorityQueue<>(Comparator.comparing(DataFileMeta::minSequenceNumber));
8982
this.toCompact.addAll(restored);
9083
this.minFileNum = minFileNum;
9184
this.targetFileSize = targetFileSize;

paimon-core/src/main/java/org/apache/paimon/operation/BucketedAppendFileStoreWrite.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ protected CompactManager getCompactManager(
106106
options.compactionMinFileNum(),
107107
options.targetFileSize(false),
108108
options.forceRewriteAllFiles(),
109-
options.bucketAppendOrdered(),
110109
files -> compactRewrite(partition, bucket, dvFactory, files),
111110
compactionMetrics == null
112111
? null

paimon-core/src/test/java/org/apache/paimon/append/AppendOnlyWriterTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ private Pair<AppendOnlyWriter, List<DataFileMeta>> createWriter(
676676
MIN_FILE_NUM,
677677
targetFileSize,
678678
false,
679-
true,
680679
compactBefore -> {
681680
latch.await();
682681
return compactBefore.isEmpty()

paimon-core/src/test/java/org/apache/paimon/append/BucketedAppendCompactManagerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ private void innerTest(
208208
minFileNum,
209209
targetFileSize,
210210
false,
211-
true,
212211
null, // not used
213212
null);
214213
Optional<List<DataFileMeta>> actual = manager.pickCompactBefore();

paimon-core/src/test/java/org/apache/paimon/format/FileFormatSuffixTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public void testFileSuffix(@TempDir java.nio.file.Path tempDir) throws Exception
9090
null,
9191
0,
9292
new BucketedAppendCompactManager(
93-
null, toCompact, null, 4, 10, false, true, null, null), // not used
93+
null, toCompact, null, 4, 10, false, null, null), // not used
9494
null,
9595
false,
9696
dataFilePathFactory,

0 commit comments

Comments
 (0)