Skip to content

Commit 172c054

Browse files
committed
nit
1 parent 9768f9e commit 172c054

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/maintenance/IcebergRewriteITCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void testCompaction() throws Exception {
5959
JobClient jobClient = buildTieringJob(execEnv);
6060
try {
6161
TablePath t1 = TablePath.of(DEFAULT_DB, "pkTable");
62-
long t1Id = createPkTable(t1);
62+
long t1Id = createPkTable(t1, true);
6363
TableBucket t1Bucket = new TableBucket(t1Id, 0);
6464

6565
writeFullTypeRows(t1, t1Bucket, 1, 3, 3);

fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/testutils/FlinkIcebergTieringTestBase.java

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ protected static Catalog getIcebergCatalog() {
188188
}
189189

190190
protected long createPkTable(TablePath tablePath) throws Exception {
191-
return createPkTable(tablePath, 1);
191+
return createPkTable(tablePath, false);
192+
}
193+
194+
protected long createPkTable(TablePath tablePath, boolean enableAutoCompaction)
195+
throws Exception {
196+
return createPkTable(tablePath, 1, enableAutoCompaction);
192197
}
193198

194199
protected long createLogTable(TablePath tablePath) throws Exception {
@@ -221,8 +226,9 @@ protected long createLogTable(TablePath tablePath, int bucketNum, boolean isPart
221226
return createTable(tablePath, tableBuilder.build());
222227
}
223228

224-
protected long createPkTable(TablePath tablePath, int bucketNum) throws Exception {
225-
TableDescriptor table1Descriptor =
229+
protected long createPkTable(TablePath tablePath, int bucketNum, boolean enableAutoCompaction)
230+
throws Exception {
231+
TableDescriptor.Builder pkTableBuilder =
226232
TableDescriptor.builder()
227233
.schema(
228234
Schema.newBuilder()
@@ -249,10 +255,12 @@ protected long createPkTable(TablePath tablePath, int bucketNum) throws Exceptio
249255
.build())
250256
.distributedBy(bucketNum)
251257
.property(ConfigOptions.TABLE_DATALAKE_ENABLED.key(), "true")
252-
.property(ConfigOptions.TABLE_DATALAKE_FRESHNESS, Duration.ofMillis(500))
253-
.property(ConfigOptions.TABLE_DATALAKE_AUTO_COMPACTION.key(), "true")
254-
.build();
255-
return createTable(tablePath, table1Descriptor);
258+
.property(ConfigOptions.TABLE_DATALAKE_FRESHNESS, Duration.ofMillis(500));
259+
260+
if (enableAutoCompaction) {
261+
pkTableBuilder.property(ConfigOptions.TABLE_DATALAKE_AUTO_COMPACTION.key(), "true");
262+
}
263+
return createTable(tablePath, pkTableBuilder.build());
256264
}
257265

258266
protected long createTable(TablePath tablePath, TableDescriptor tableDescriptor)

0 commit comments

Comments
 (0)