From dec5ca6207a2200a5ab7f33f6befbe81cc25086f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Thu, 24 Mar 2022 15:55:53 +0100 Subject: [PATCH] Allow passing coordinator properties for Delta query runner --- .../io/trino/plugin/deltalake/DeltaLakeQueryRunner.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java index 383e68ecaabe..752cfb9c0eb1 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/DeltaLakeQueryRunner.java @@ -88,13 +88,14 @@ public static DistributedQueryRunner createDeltaLakeQueryRunner(Map connectorProperties, String minioAddress, TestingHadoop testingHadoop) throws Exception { - return createS3DeltaLakeQueryRunner(catalogName, schemaName, ImmutableMap.of(), connectorProperties, minioAddress, testingHadoop, queryRunner -> {}); + return createS3DeltaLakeQueryRunner(catalogName, schemaName, ImmutableMap.of(), ImmutableMap.of(), connectorProperties, minioAddress, testingHadoop, queryRunner -> {}); } public static DistributedQueryRunner createS3DeltaLakeQueryRunner( String catalogName, String schemaName, Map extraProperties, + Map coordinatorProperties, Map connectorProperties, String minioAddress, TestingHadoop testingHadoop, @@ -104,6 +105,7 @@ public static DistributedQueryRunner createS3DeltaLakeQueryRunner( return createDockerizedDeltaLakeQueryRunner( catalogName, schemaName, + coordinatorProperties, extraProperties, ImmutableMap.builder() .put("hive.s3.aws-access-key", MINIO_ACCESS_KEY) @@ -166,6 +168,7 @@ public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner( return createDockerizedDeltaLakeQueryRunner( catalogName, schemaName, + ImmutableMap.of(), extraProperties, connectorProperties, testingHadoop, @@ -175,6 +178,7 @@ public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner( public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner( String catalogName, String schemaName, + Map coordinatorProperties, Map extraProperties, Map connectorProperties, TestingHadoop testingHadoop, @@ -188,6 +192,7 @@ public static DistributedQueryRunner createDockerizedDeltaLakeQueryRunner( DistributedQueryRunner.Builder builder = DistributedQueryRunner.builder(session); extraProperties.forEach(builder::addExtraProperty); + coordinatorProperties.forEach(builder::setSingleCoordinatorProperty); builder.setAdditionalSetup(additionalSetup); DistributedQueryRunner queryRunner = builder.build(); @@ -255,7 +260,7 @@ public static void main(String[] args) queryRunner = DeltaLakeQueryRunner.createS3DeltaLakeQueryRunner( DELTA_CATALOG, schema, - ImmutableMap.of("http-server.http.port", "8080"), + ImmutableMap.of("http-server.http.port", "8080"), ImmutableMap.of(), ImmutableMap.of(), dockerizedMinioDataLake.getMinioAddress(), dockerizedMinioDataLake.getTestingHadoop(),