Skip to content

Commit

Permalink
remove paimon catalog dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
hdygxsj committed Jan 12, 2025
1 parent f61a535 commit e419f08
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
1 change: 0 additions & 1 deletion flink-connector/flink/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ dependencies {
testImplementation(project(":clients:client-java"))
testImplementation(project(":core"))
testImplementation(project(":common"))
testImplementation(project(":catalogs:catalog-lakehouse-paimon"))
testImplementation(project(":integration-test-common", "testArtifacts"))
testImplementation(project(":server"))
testImplementation(project(":server-common"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@
import java.nio.file.Path;
import java.util.Map;
import org.apache.gravitino.Catalog;
import org.apache.gravitino.catalog.lakehouse.paimon.PaimonCatalogPropertiesMetadata;
import org.apache.gravitino.catalog.lakehouse.paimon.PaimonConstants;
import org.apache.gravitino.flink.connector.integration.test.FlinkCommonIT;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;

@Tag("gravitino-docker-test")
// @Tag("gravitino-docker-test")
public class FlinkPaimonCatalogIT extends FlinkCommonIT {

@TempDir private static Path warehouseDir;
Expand Down Expand Up @@ -81,7 +80,7 @@ private static void initPaimonCatalog() {
"lakehouse-paimon",
null,
ImmutableMap.of(
PaimonCatalogPropertiesMetadata.GRAVITINO_CATALOG_BACKEND,
PaimonConstants.CATALOG_BACKEND,
"filesystem",
"warehouse",
warehouseDir.toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import org.apache.flink.configuration.Configuration;
import org.apache.gravitino.catalog.lakehouse.paimon.PaimonCatalogPropertiesMetadata;
import org.apache.gravitino.catalog.lakehouse.paimon.PaimonConfig;
import org.apache.gravitino.catalog.lakehouse.paimon.PaimonConstants;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -51,15 +49,15 @@ public void testToPaimonJdbcCatalog() {
String testUri = "testUri";
Map<String, String> catalogProperties =
ImmutableMap.of(
PaimonConfig.CATALOG_WAREHOUSE.getKey(),
PaimonConstants.WAREHOUSE,
localWarehouse,
PaimonCatalogPropertiesMetadata.GRAVITINO_CATALOG_BACKEND,
PaimonConstants.CATALOG_BACKEND,
"jdbc",
PaimonConfig.CATALOG_JDBC_USER.getKey(),
PaimonConstants.GRAVITINO_JDBC_USER,
testUser,
PaimonConfig.CATALOG_JDBC_PASSWORD.getKey(),
PaimonConstants.GRAVITINO_JDBC_PASSWORD,
testPassword,
PaimonConfig.CATALOG_URI.getKey(),
PaimonConstants.URI,
testUri,
"flink.bypass.key",
"value");
Expand Down Expand Up @@ -96,12 +94,10 @@ public void testToGravitinoCatalogProperties() {
PaimonConstants.URI,
testUri));
Map<String, String> properties = CONVERTER.toGravitinoCatalogProperties(configuration);
Assertions.assertEquals(
localWarehouse, properties.get(PaimonConfig.CATALOG_WAREHOUSE.getKey()));
Assertions.assertEquals(testUser, properties.get(PaimonConfig.CATALOG_JDBC_USER.getKey()));
Assertions.assertEquals(
testPassword, properties.get(PaimonConfig.CATALOG_JDBC_PASSWORD.getKey()));
Assertions.assertEquals(testUri, properties.get(PaimonConfig.CATALOG_URI.getKey()));
Assertions.assertEquals(localWarehouse, properties.get(PaimonConstants.WAREHOUSE));
Assertions.assertEquals(testUser, properties.get(PaimonConstants.GRAVITINO_JDBC_USER));
Assertions.assertEquals(testPassword, properties.get(PaimonConstants.GRAVITINO_JDBC_PASSWORD));
Assertions.assertEquals(testUri, properties.get(PaimonConstants.URI));
Assertions.assertEquals(testBackend, properties.get(PaimonConstants.CATALOG_BACKEND));
}
}

0 comments on commit e419f08

Please sign in to comment.