Skip to content

Commit

Permalink
Improve hadoop-master-2 container configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo authored and losipiuk committed Sep 17, 2020
1 parent 2b3a1c3 commit 70e23db
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import io.prestosql.tests.product.launcher.env.common.Kerberos;
import io.prestosql.tests.product.launcher.env.common.Standard;
import io.prestosql.tests.product.launcher.env.common.TestsEnvironment;
import io.prestosql.tests.product.launcher.testcontainers.SelectedPortWaitStrategy;
import org.testcontainers.containers.startupcheck.IsRunningStartupCheckStrategy;

import javax.inject.Inject;
Expand Down Expand Up @@ -88,6 +89,8 @@ protected void extendEnvironment(Environment.Builder builder)
private DockerContainer createHadoopMaster2()
{
DockerContainer container = new DockerContainer(hadoopBaseImage + ":" + hadoopImagesVersion, HADOOP + "-2")
.withCopyFileToContainer(forHostPath(dockerFiles.getDockerFilesHostPath()), "/docker/presto-product-tests")
.withExposedLogPaths("/var/log/hadoop-yarn", "/var/log/hadoop-hdfs", "/var/log/hive")
.withCopyFileToContainer(
forHostPath(dockerFiles.getDockerFilesHostPath("conf/environment/two-mixed-hives/hadoop-master-2/core-site.xml")),
"/etc/hadoop/conf/core-site.xml")
Expand All @@ -98,7 +101,7 @@ private DockerContainer createHadoopMaster2()
forHostPath(dockerFiles.getDockerFilesHostPath("conf/environment/two-mixed-hives/hadoop-master-2/yarn-site.xml")),
"/etc/hadoop/conf/yarn-site.xml")
.withStartupCheckStrategy(new IsRunningStartupCheckStrategy())
// TODO .waitingFor(...)
.waitingFor(new SelectedPortWaitStrategy(10000)) // HiveServer2
.withStartupTimeout(Duration.ofMinutes(5));

return container;
Expand Down

0 comments on commit 70e23db

Please sign in to comment.