Skip to content
Merged
Show file tree
Hide file tree
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 @@ -21,6 +21,7 @@
import io.trino.tests.product.launcher.env.common.Hadoop;
import io.trino.tests.product.launcher.env.common.HadoopKerberos;
import io.trino.tests.product.launcher.env.common.HadoopKerberosKms;
import io.trino.tests.product.launcher.env.common.HadoopKerberosKmsWithImpersonation;
import io.trino.tests.product.launcher.env.common.HydraIdentityProvider;
import io.trino.tests.product.launcher.env.common.Kafka;
import io.trino.tests.product.launcher.env.common.KafkaSaslPlaintext;
Expand Down Expand Up @@ -68,6 +69,7 @@ public void configure(Binder binder)
binder.bind(Hadoop.class).in(SINGLETON);
binder.bind(HadoopKerberos.class).in(SINGLETON);
binder.bind(HadoopKerberosKms.class).in(SINGLETON);
binder.bind(HadoopKerberosKmsWithImpersonation.class).in(SINGLETON);
binder.bind(HydraIdentityProvider.class).in(SINGLETON);
binder.bind(Kafka.class).in(SINGLETON);
binder.bind(KafkaSsl.class).in(SINGLETON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ public void extendEnvironment(Environment.Builder builder)
.withCopyFileToContainer(forHostPath(configDir.getPath("kms-core-site.xml")), "/etc/hadoop-kms/conf/core-site.xml");
});

builder.configureContainer(COORDINATOR, container -> container.setDockerImageName(dockerImageName));
builder.configureContainer(COORDINATOR,
container -> container
.withCopyFileToContainer(forHostPath(configDir.getPath("hive-disable-key-provider-cache-site.xml")), "/etc/hadoop-kms/conf/hive-disable-key-provider-cache-site.xml")
.setDockerImageName(dockerImageName));

builder.configureContainer(TESTS, container -> {
container.setDockerImageName(dockerImageName);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.trino.tests.product.launcher.env.common;

import com.google.common.collect.ImmutableList;
import io.trino.tests.product.launcher.docker.DockerFiles;
import io.trino.tests.product.launcher.docker.DockerFiles.ResourceProvider;
import io.trino.tests.product.launcher.env.Environment;

import javax.inject.Inject;

import java.util.List;

import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.utility.MountableFile.forHostPath;

public class HadoopKerberosKmsWithImpersonation
implements EnvironmentExtender
{
private final ResourceProvider configDir;
private final HadoopKerberosKms hadoopKerberosKms;

@Inject
public HadoopKerberosKmsWithImpersonation(DockerFiles dockerFiles, HadoopKerberosKms hadoopKerberosKms)
{
configDir = requireNonNull(dockerFiles, "dockerFiles is null").getDockerFilesHostDirectory("common/hadoop-kerberos-kms-with-impersonation");
this.hadoopKerberosKms = requireNonNull(hadoopKerberosKms, "hadoopKerberosKms is null");
}

@Override
@SuppressWarnings("resource")
public void extendEnvironment(Environment.Builder builder)
{
builder.configureContainer(
HADOOP,
container ->
container
.withCopyFileToContainer(forHostPath(configDir.getPath("kms-acls.xml")), "/etc/hadoop-kms/conf/kms-acls.xml")
.withCopyFileToContainer(forHostPath(configDir.getPath("hiveserver2-site.xml")), "/etc/hive/conf/hiveserver2-site.xml"));
}

@Override
public List<EnvironmentExtender> getDependencies()
{
return ImmutableList.of(hadoopKerberosKms);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
import io.trino.tests.product.launcher.docker.DockerFiles.ResourceProvider;
import io.trino.tests.product.launcher.env.Environment;
import io.trino.tests.product.launcher.env.EnvironmentProvider;
import io.trino.tests.product.launcher.env.common.HadoopKerberosKms;
import io.trino.tests.product.launcher.env.common.HadoopKerberosKmsWithImpersonation;
import io.trino.tests.product.launcher.env.common.Standard;
import io.trino.tests.product.launcher.env.common.TestsEnvironment;

import javax.inject.Inject;

import static io.trino.tests.product.launcher.env.EnvironmentContainers.HADOOP;
import static java.util.Objects.requireNonNull;
import static org.testcontainers.utility.MountableFile.forHostPath;

Expand All @@ -35,21 +34,16 @@ public final class EnvSinglenodeKerberosKmsHdfsImpersonation
private final ResourceProvider configDir;

@Inject
public EnvSinglenodeKerberosKmsHdfsImpersonation(DockerFiles dockerFiles, Standard standard, HadoopKerberosKms hadoopKerberosKms)
public EnvSinglenodeKerberosKmsHdfsImpersonation(DockerFiles dockerFiles, Standard standard, HadoopKerberosKmsWithImpersonation hadoopKerberosKmsWithImpersonation)
{
super(ImmutableList.of(standard, hadoopKerberosKms));
super(ImmutableList.of(standard, hadoopKerberosKmsWithImpersonation));
configDir = requireNonNull(dockerFiles, "dockerFiles is null").getDockerFilesHostDirectory("conf/environment/singlenode-kerberos-kms-hdfs-impersonation");
}

@Override
@SuppressWarnings("resource")
public void extendEnvironment(Environment.Builder builder)
{
builder.configureContainer(HADOOP, container -> {
container
.withCopyFileToContainer(forHostPath(configDir.getPath("kms-acls.xml")), "/etc/hadoop-kms/conf/kms-acls.xml")
.withCopyFileToContainer(forHostPath(configDir.getPath("hiveserver2-site.xml")), "/etc/hive/conf/hiveserver2-site.xml");
});
builder.addConnector("hive", forHostPath(configDir.getPath("hive.properties")));
builder.addConnector("iceberg", forHostPath(configDir.getPath("iceberg.properties")));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ hive.hdfs.trino.principal=presto-server/_HOST@LABS.TERADATA.COM
hive.hdfs.trino.keytab=/etc/trino/conf/presto-server.keytab
hive.fs.cache.max-size=10
hive.max-partitions-per-scan=100
hive.config.resources=/etc/hadoop/conf/core-site.xml,/docker/presto-product-tests/conf/environment/singlenode-kerberos-kms-hdfs-impersonation/hive-disable-key-provider-cache-site.xml
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop-kms/conf/hive-disable-key-provider-cache-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ hive.hdfs.impersonation.enabled=true
hive.hdfs.trino.principal=presto-server/_HOST@LABS.TERADATA.COM
hive.hdfs.trino.keytab=/etc/trino/conf/presto-server.keytab
hive.fs.cache.max-size=10
hive.config.resources=/etc/hadoop/conf/core-site.xml,/docker/presto-product-tests/conf/environment/singlenode-kerberos-kms-hdfs-impersonation/hive-disable-key-provider-cache-site.xml
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop-kms/conf/hive-disable-key-provider-cache-site.xml

iceberg.file-format=PARQUET

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ hive.hdfs.trino.principal=presto-server/_HOST@LABS.TERADATA.COM
hive.hdfs.trino.keytab=/etc/trino/conf/presto-server.keytab
hive.fs.cache.max-size=10
hive.max-partitions-per-scan=100
hive.config.resources=/etc/hadoop/conf/core-site.xml,/docker/presto-product-tests/conf/environment/singlenode-kerberos-kms-hdfs-no-impersonation/hive-disable-key-provider-cache-site.xml
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop-kms/conf/hive-disable-key-provider-cache-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ hive.hdfs.impersonation.enabled=false
hive.hdfs.trino.principal=presto-server/_HOST@LABS.TERADATA.COM
hive.hdfs.trino.keytab=/etc/trino/conf/presto-server.keytab
hive.fs.cache.max-size=10
hive.config.resources=/etc/hadoop/conf/core-site.xml,/docker/presto-product-tests/conf/environment/singlenode-kerberos-kms-hdfs-no-impersonation/hive-disable-key-provider-cache-site.xml
hive.config.resources=/etc/hadoop/conf/core-site.xml,/etc/hadoop-kms/conf/hive-disable-key-provider-cache-site.xml

iceberg.file-format=PARQUET