Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
build:
strategy:
matrix:
java-version: [8, 11, 17]
java-version: [17]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
12 changes: 3 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ pipeline {
YETUS_ARGS+=("--proclimit=5500")
YETUS_ARGS+=("--dockermemlimit=20g")

# -1 findbugs issues that show up prior to the patch being applied
# YETUS_ARGS+=("--findbugs-strict-precheck")

# rsync these files back into the archive dir
YETUS_ARGS+=("--archive-list=checkstyle-errors.xml,findbugsXml.xml")

# URL for user-side presentation in reports and such to our artifacts
# (needs to match the archive bits below)
YETUS_ARGS+=("--build-url-artifacts=artifact/out")
Expand Down Expand Up @@ -152,9 +146,9 @@ pipeline {
# use emoji vote so it is easier to find the broken line
YETUS_ARGS+=("--github-use-emoji-vote")

# test with Java 8 and 11
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-8-openjdk-amd64")
YETUS_ARGS+=("--multijdkdirs=/usr/lib/jvm/java-11-openjdk-amd64")
# test with Java 17
YETUS_ARGS+=("--multijdkdirs=/usr/lib/jvm/java-17-openjdk-amd64")
YETUS_ARGS+=("--java-home=/usr/lib/jvm/java-17-openjdk-amd64")
YETUS_ARGS+=("--multijdktests=compile")
YETUS_ARGS+=("--debug")

Expand Down
32 changes: 10 additions & 22 deletions build-tools/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -165,29 +165,17 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
####

####
# OpenJDK 8
####
# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y openjdk-8-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# OpenJDK 17
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-17-jdk && \
apt-get clean && rm -rf /var/lib/apt/lists/*

####
# OpenJDK 11 (but keeps default to JDK8)
# NOTE: This default only works when Apache Yetus is launched
# _in_ the container and not outside of it!
####
# hadolint ignore=DL3008
RUN apt-get -q update && apt-get -q install --no-install-recommends -y default-jre-headless openjdk-11-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& update-java-alternatives -s java-1.8.0-openjdk-amd64 || :
# since update alternatives might fail on executables that we don't really need (e.g. appletviewer)
# and return with exit code <0 (actually: 2), we can simply do a sanity check if the version is
# as expected for "java" executable after the update and go on
RUN java -version 2>&1 | grep "1.8.0" && rm -f /usr/lib/jvm/default-java \
&& ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
# Set JAVA_HOME and PATH environment variables
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
ENV PATH="${JAVA_HOME}/bin:${PATH}"

# Set the default Java version using update-alternatives
RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-17-openjdk-amd64/bin/java 1

######
# Install findbugs
Expand Down
21 changes: 18 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

<properties>
<!-- Build Properties -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<surefire.version>3.0.0-M4</surefire.version>
<failIfNoTests>false</failIfNoTests>
Expand Down Expand Up @@ -101,6 +101,7 @@
<snappy-java.version>1.1.10.4</snappy-java.version>
<test.build.data>${project.build.directory}/tmp</test.build.data>
<wro4j-maven-plugin.version>1.7.9</wro4j-maven-plugin.version>
<nashorn.version>15.4</nashorn.version>

<maven.javadoc.skip>true</maven.javadoc.skip> <!-- enabled only in relevant modules separately -->
</properties>
Expand Down Expand Up @@ -156,6 +157,11 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tez</groupId>
<artifactId>hadoop-shim</artifactId>
Expand Down Expand Up @@ -926,7 +932,13 @@
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
<argLine>-Xmx1024m -XX:+HeapDumpOnOutOfMemoryError</argLine>
<argLine>-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError</argLine>
<argLine>
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidation of all "--add-opens" in a single variable and refer to it in other module pom would be better.

--add-opens java.base/java.io=ALL-UNNAMED
</argLine>
<testFailureIgnore>true</testFailureIgnore>
<environmentVariables>
<JAVA_HOME>${java.home}</JAVA_HOME>
<MALLOC_ARENA_MAX>4</MALLOC_ARENA_MAX>
Expand Down Expand Up @@ -1122,6 +1134,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
<excludeFilterFile>${basedir}/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
Expand Down Expand Up @@ -1237,6 +1250,7 @@
</execution>
</executions>
<configuration>
<skip>true</skip>
<excludeFilterFile>${basedir}/findbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
Expand All @@ -1248,6 +1262,7 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
<formats>
<format>xml</format>
<format>html</format>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,17 @@ public TezConfiguration(boolean loadDefaults) {
@ConfigurationProperty
public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS =
TEZ_AM_PREFIX + "launch.cluster-default.cmd-opts";
public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT;

static {
if (TezCommonUtils.getJavaVersion() >= 9) {
TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
"-server -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN --add-opens java.base/java.lang=ALL-UNNAMED";
} else {
TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
"-server -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN";
}
}

/**
* String value. Command line options provided during the launch of the Tez
Expand Down
10 changes: 10 additions & 0 deletions tez-dag/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<artifactId>tez-dag</artifactId>

<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tez</groupId>
<artifactId>hadoop-shim</artifactId>
Expand Down Expand Up @@ -205,6 +210,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
</argLine>
<environmentVariables>
<LOG_DIRS>${test.log.dir}</LOG_DIRS>
</environmentVariables>
Expand Down
10 changes: 9 additions & 1 deletion tez-ext-service-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
</properties>

<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
Expand Down Expand Up @@ -112,7 +116,6 @@
<artifactId>hadoop-mapreduce-client-shuffle</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -161,6 +164,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
</argLine>
<environmentVariables>
<LOG_DIRS>${test.log.dir}</LOG_DIRS>
</environmentVariables>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,17 @@ public ExternalTezServiceTestHelper(String testRootDir) throws
for (Map.Entry<String, String> entry : tezCluster.getConfig()) {
clusterConf.set(entry.getKey(), entry.getValue());
}

long jvmMax = Runtime.getRuntime().maxMemory();
long availableMemory;
if ((jvmMax * 0.5d) >= Integer.MAX_VALUE) {
availableMemory = Integer.MAX_VALUE;
} else {
availableMemory = (long) (jvmMax * 0.5d);
}

tezTestServiceCluster = MiniTezTestServiceCluster
.create(TestExternalTezServices.class.getSimpleName(), 3, ((long) (jvmMax * 0.5d)), 1);
.create(TestExternalTezServices.class.getSimpleName(), 3, availableMemory, 1);
tezTestServiceCluster.init(clusterConf);
tezTestServiceCluster.start();
LOG.info("MiniTezTestServer started");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ public static void setup() throws Exception {

localFs = FileSystem.getLocal(clusterConf).getRaw();
long jvmMax = Runtime.getRuntime().maxMemory();
long availableMemory;
if ((jvmMax * 0.5d) >= Integer.MAX_VALUE) {
availableMemory = Integer.MAX_VALUE;
} else {
availableMemory = (long) (jvmMax * 0.5d);
}
tezTestServiceCluster = MiniTezTestServiceCluster
.create(TestExternalTezServices.class.getSimpleName(), 3, ((long) (jvmMax * 0.5d)), 1);
.create(TestExternalTezServices.class.getSimpleName(), 3, availableMemory, 1);
tezTestServiceCluster.init(clusterConf);
tezTestServiceCluster.start();
LOG.info("MiniTezTestServer started");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void testInMemAllocation() throws IOException {


FetchedInput fi2 = inputManager.allocate(requestSize, compressedSize, new InputAttemptIdentifier(2, 1));
assertEquals(FetchedInput.Type.MEMORY, fi2.getType());
assertEquals(FetchedInput.Type.DISK, fi2.getType());


// Over limit by this point. Next reserve should give back a DISK allocation
Expand Down
9 changes: 9 additions & 0 deletions tez-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
</properties>

<dependencies>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tez</groupId>
<artifactId>tez-api</artifactId>
Expand Down Expand Up @@ -160,6 +164,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.io=ALL-UNNAMED
</argLine>
<environmentVariables>
<LOG_DIRS>${test.log.dir}</LOG_DIRS>
</environmentVariables>
Expand Down