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 191c5cb8560f..267addfe7e39 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 @@ -34,8 +34,8 @@ import static io.airlift.testing.Closeables.closeAllSuppress; import static io.airlift.units.Duration.nanosSince; import static io.trino.plugin.deltalake.DeltaLakeConnectorFactory.CONNECTOR_NAME; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.ACCESS_KEY; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.SECRET_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_ACCESS_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_SECRET_KEY; import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; @@ -163,8 +163,8 @@ public static DistributedQueryRunner createS3DeltaLakeQueryRunner( coordinatorProperties, extraProperties, ImmutableMap.builder() - .put("hive.s3.aws-access-key", ACCESS_KEY) - .put("hive.s3.aws-secret-key", SECRET_KEY) + .put("hive.s3.aws-access-key", MINIO_ACCESS_KEY) + .put("hive.s3.aws-secret-key", MINIO_SECRET_KEY) .put("hive.s3.endpoint", minioAddress) .put("hive.s3.path-style-access", "true") .putAll(connectorProperties) diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePerTransactionMetastoreCache.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePerTransactionMetastoreCache.java index f88f3556be28..947ec9f04d90 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePerTransactionMetastoreCache.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakePerTransactionMetastoreCache.java @@ -53,8 +53,8 @@ import static com.google.inject.multibindings.OptionalBinder.newOptionalBinder; import static io.airlift.configuration.ConfigBinder.configBinder; import static io.trino.plugin.deltalake.DeltaLakeQueryRunner.DELTA_CATALOG; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.ACCESS_KEY; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.SECRET_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_ACCESS_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_SECRET_KEY; import static io.trino.testing.TestingSession.testSessionBuilder; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; @@ -139,8 +139,8 @@ public HiveMetastore createMetastore(Optional identity) ImmutableMap.Builder deltaLakeProperties = ImmutableMap.builder(); deltaLakeProperties.put("hive.metastore.uri", "thrift://" + hiveMinioDataLake.getHiveHadoop().getHiveMetastoreEndpoint()); - deltaLakeProperties.put("hive.s3.aws-access-key", ACCESS_KEY); - deltaLakeProperties.put("hive.s3.aws-secret-key", SECRET_KEY); + deltaLakeProperties.put("hive.s3.aws-access-key", MINIO_ACCESS_KEY); + deltaLakeProperties.put("hive.s3.aws-secret-key", MINIO_SECRET_KEY); deltaLakeProperties.put("hive.s3.endpoint", hiveMinioDataLake.getMinioAddress()); deltaLakeProperties.put("hive.s3.path-style-access", "true"); deltaLakeProperties.put("hive.metastore", "test"); // use test value so we do not get clash with default bindings) diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSharedHiveMetastoreWithViews.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSharedHiveMetastoreWithViews.java index 47818a17e265..a7492d48c305 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSharedHiveMetastoreWithViews.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeSharedHiveMetastoreWithViews.java @@ -24,8 +24,8 @@ import java.util.Map; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.ACCESS_KEY; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.SECRET_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_ACCESS_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_SECRET_KEY; import static io.trino.testing.sql.TestTable.randomTableSuffix; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; @@ -57,8 +57,8 @@ protected QueryRunner createQueryRunner() queryRunner.installPlugin(new TestingHivePlugin()); Map s3Properties = ImmutableMap.builder() - .put("hive.s3.aws-access-key", ACCESS_KEY) - .put("hive.s3.aws-secret-key", SECRET_KEY) + .put("hive.s3.aws-access-key", MINIO_ACCESS_KEY) + .put("hive.s3.aws-secret-key", MINIO_SECRET_KEY) .put("hive.s3.endpoint", hiveMinioDataLake.getMinioAddress()) .put("hive.s3.path-style-access", "true") .buildOrThrow(); diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/containers/HiveMinioDataLake.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/containers/HiveMinioDataLake.java index be45b8dbe633..fba3ef1b55a4 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/containers/HiveMinioDataLake.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/containers/HiveMinioDataLake.java @@ -40,8 +40,8 @@ public class HiveMinioDataLake implements AutoCloseable { - public static final String ACCESS_KEY = "accesskey"; - public static final String SECRET_KEY = "secretkey"; + public static final String MINIO_ACCESS_KEY = "accesskey"; + public static final String MINIO_SECRET_KEY = "secretkey"; private final String bucketName; private final Minio minio; @@ -70,8 +70,8 @@ public HiveMinioDataLake(String bucketName, Map hiveHadoopFilesT Minio.builder() .withNetwork(network) .withEnvVars(ImmutableMap.builder() - .put("MINIO_ACCESS_KEY", ACCESS_KEY) - .put("MINIO_SECRET_KEY", SECRET_KEY) + .put("MINIO_ACCESS_KEY", MINIO_ACCESS_KEY) + .put("MINIO_SECRET_KEY", MINIO_SECRET_KEY) .buildOrThrow()) .build()); @@ -160,7 +160,7 @@ public void close() private MinioClient initMinioClient() { - MinioClient minioClient = new MinioClient(getMinioAddress(), ACCESS_KEY, SECRET_KEY); + MinioClient minioClient = new MinioClient(getMinioAddress(), MINIO_ACCESS_KEY, MINIO_SECRET_KEY); closer.register(minioClient); // use retry loop for minioClient.makeBucket as minio container tends to return "Server not initialized, please try again" error diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/S3HiveQueryRunner.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/S3HiveQueryRunner.java index d463d7e6d85a..80f5b974a26f 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/S3HiveQueryRunner.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/s3/S3HiveQueryRunner.java @@ -64,8 +64,8 @@ public static Builder builder(HiveMinioDataLake hiveMinioDataLake) return builder() .setHiveMetastoreEndpoint(hiveMinioDataLake.getHiveHadoop().getHiveMetastoreEndpoint()) .setS3Endpoint("http://" + hiveMinioDataLake.getMinio().getMinioApiEndpoint()) - .setS3AccessKey(HiveMinioDataLake.ACCESS_KEY) - .setS3SecretKey(HiveMinioDataLake.SECRET_KEY) + .setS3AccessKey(HiveMinioDataLake.MINIO_ACCESS_KEY) + .setS3SecretKey(HiveMinioDataLake.MINIO_SECRET_KEY) .setBucketName(hiveMinioDataLake.getBucketName()); } diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMinioConnectorSmokeTest.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMinioConnectorSmokeTest.java index 3ec12128d6af..b31c8067664a 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMinioConnectorSmokeTest.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMinioConnectorSmokeTest.java @@ -22,8 +22,8 @@ import java.util.Locale; import java.util.Map; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.ACCESS_KEY; -import static io.trino.plugin.hive.containers.HiveMinioDataLake.SECRET_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_ACCESS_KEY; +import static io.trino.plugin.hive.containers.HiveMinioDataLake.MINIO_SECRET_KEY; import static io.trino.testing.sql.TestTable.randomTableSuffix; import static java.lang.String.format; @@ -55,8 +55,8 @@ protected QueryRunner createQueryRunner() .put("iceberg.file-format", format.name()) .put("iceberg.catalog.type", "HIVE_METASTORE") .put("hive.metastore.uri", "thrift://" + hiveMinioDataLake.getHiveHadoop().getHiveMetastoreEndpoint()) - .put("hive.s3.aws-access-key", ACCESS_KEY) - .put("hive.s3.aws-secret-key", SECRET_KEY) + .put("hive.s3.aws-access-key", MINIO_ACCESS_KEY) + .put("hive.s3.aws-secret-key", MINIO_SECRET_KEY) .put("hive.s3.endpoint", "http://" + hiveMinioDataLake.getMinio().getMinioApiEndpoint()) .put("hive.s3.path-style-access", "true") .put("hive.s3.streaming.part-size", "5MB")