Skip to content
Merged
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 @@ -20,6 +20,7 @@
import org.apache.fluss.cluster.ServerNode;
import org.apache.fluss.config.ConfigOptions;
import org.apache.fluss.config.Configuration;
import org.apache.fluss.exception.FlussRuntimeException;
import org.apache.fluss.exception.InvalidAlterTableException;
import org.apache.fluss.exception.InvalidConfigException;
import org.apache.fluss.exception.InvalidTableException;
Expand Down Expand Up @@ -47,6 +48,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.nio.file.Files;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalDateTime;
Expand Down Expand Up @@ -76,11 +78,23 @@ abstract class FlinkCatalogITCase {
.setClusterConf(initClusterConf())
.build();

protected static String paimonWarehousePath;

static Configuration initClusterConf() {
Configuration clusterConf = new Configuration();
// use a small check interval to cleanup partitions quickly
clusterConf.set(ConfigOptions.AUTO_PARTITION_CHECK_INTERVAL, Duration.ofSeconds(3));
clusterConf.set(ConfigOptions.DATALAKE_FORMAT, DataLakeFormat.PAIMON);
try {
paimonWarehousePath =
Files.createTempDirectory("fluss-catalog-itcase")
.resolve("warehouse")
.toString();
} catch (Exception e) {
throw new FlussRuntimeException("Failed to create warehouse path");
}
clusterConf.setString("datalake.paimon.warehouse", paimonWarehousePath);

return clusterConf;
}

Expand Down Expand Up @@ -208,6 +222,7 @@ void testAlterTable() throws Exception {
expectedOptions.put("bucket.num", "5");
expectedOptions.put("table.datalake.enabled", "true");
expectedOptions.put("table.datalake.format", "paimon");
expectedOptions.put("table.datalake.paimon.warehouse", paimonWarehousePath);
assertOptionsEqual(table.getOptions(), expectedOptions);

// alter table
Expand Down