Skip to content
Open
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 docs/src/site/markdown/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ or higher.
```

2. Build tez using `mvn clean package -DskipTests=true -Dmaven.javadoc.skip=true`
- This assumes that you have already installed JDK8 or later and Maven 3 or later.
- This assumes that you have already installed JDK 21 or later and Maven 3 or later.
- Tez also requires Protocol Buffers 3.19.4, including the protoc-compiler.
* This can be downloaded from https://github.com/google/protobuf/tags/.
* On Mac OS X with the homebrew package manager `brew install protobuf250`
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,6 @@
</profile>
</profiles>

<!-- TODO: TEZ-4597: IncludePublicAnnotationsStandardDoclet is not JDK9+ compatible -->
<reporting>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ static String constructAMLaunchOpts(TezConfiguration tezConf, Resource capabilit
amOpts = amOpts + tezConf.get(TezConfiguration.TEZ_AM_LAUNCH_CMD_OPTS,
TezConfiguration.TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT);

amOpts = amOpts + TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT;
amOpts = amOpts + TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT;
amOpts = maybeAddDefaultMemoryJavaOpts(amOpts, capability,
tezConf.getDouble(TezConfiguration.TEZ_CONTAINER_MAX_JAVA_HEAP_FRACTION,
TezConfiguration.TEZ_CONTAINER_MAX_JAVA_HEAP_FRACTION_DEFAULT));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,6 @@ public void checkOpts(String opts) throws TezException {
}

if (gcOpts.size() > 1) {
// Handle special case for " -XX:+UseParNewGC -XX:+UseConcMarkSweepGC "
// which can be specified together.
if (gcOpts.size() == 2) {
if (gcOpts.contains("UseParNewGC")
&& gcOpts.contains("UseConcMarkSweepGC")) {
return;
}
}

LOG.debug("Found clashing GC opts, conflicting GC Values={}", gcOpts);

throw new TezException("Invalid/conflicting GC options found,"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,8 +575,6 @@ public static long getDAGSessionTimeout(Configuration conf) {

public static int getJavaVersion() {
String javaVersionString = System.getProperty("java.version");
return javaVersionString.split("\\.")[0].equals("1")
? Integer.parseInt(javaVersionString.split("\\.")[1]) // "1.8" -> 8
: Integer.parseInt(javaVersionString.split("\\.")[0]); // "9.x" -> 9, "11.x" -> 11
return Integer.parseInt(javaVersionString.split("\\.")[0]); // "21.x" -> 21
}
}
26 changes: 5 additions & 21 deletions tez-api/src/main/java/org/apache/tez/dag/api/TezConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.Shell;
import org.apache.hadoop.yarn.api.records.LocalResource;
import org.apache.tez.common.TezCommonUtils;
import org.apache.tez.common.annotation.ConfigurationClass;
import org.apache.tez.common.annotation.ConfigurationProperty;
import org.apache.tez.dag.api.EdgeProperty.ConcurrentEdgeTriggerType;
Expand Down Expand Up @@ -400,7 +399,7 @@ public TezConfiguration(boolean loadDefaults) {
public static final String TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT =
"-server -Djava.net.preferIPv4Stack=true -Dhadoop.metrics.log.level=WARN";

public static final String TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT =
public static final String TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT =
" --add-opens java.base/java.lang=ALL-UNNAMED";
/**
* String value. Command line options provided during the launch of the Tez
Expand All @@ -410,11 +409,8 @@ public TezConfiguration(boolean loadDefaults) {
@ConfigurationScope(Scope.AM)
@ConfigurationProperty
public static final String TEZ_AM_LAUNCH_CMD_OPTS = TEZ_AM_PREFIX + "launch.cmd-opts";
public static final String TEZ_AM_LAUNCH_CMD_OPTS_JDK8_DEFAULT =
"-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC";
public static final String TEZ_AM_LAUNCH_CMD_OPTS_JDK9_DEFAULT =
"-verbose:gc -Xlog:gc*,safepoint::time,uptime -XX:+UseNUMA -XX:+UseParallelGC";
public static final String TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT;
public static final String TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT =
"-Xlog:gc*,safepoint::time,uptime -XX:+UseNUMA -XX:+UseParallelGC";

/**
* String value. Command line options which will be prepended to {@link
Expand All @@ -438,21 +434,9 @@ public TezConfiguration(boolean loadDefaults) {
@ConfigurationProperty
public static final String TEZ_TASK_LAUNCH_CMD_OPTS = TEZ_TASK_PREFIX
+ "launch.cmd-opts";
public static final String TEZ_TASK_LAUNCH_CMD_OPTS_JDK8_DEFAULT =
"-XX:+PrintGCDetails -verbose:gc -XX:+PrintGCTimeStamps -XX:+UseNUMA -XX:+UseParallelGC";
public static final String TEZ_TASK_LAUNCH_CMD_OPTS_JDK9_DEFAULT =
"-verbose:gc -Xlog:gc*,safepoint::time,uptime -XX:+UseNUMA -XX:+UseParallelGC";
public static final String TEZ_TASK_LAUNCH_CMD_OPTS_DEFAULT;
public static final String TEZ_TASK_LAUNCH_CMD_OPTS_DEFAULT =
"-Xlog:gc*,safepoint::time,uptime -XX:+UseNUMA -XX:+UseParallelGC";

static {
if (TezCommonUtils.getJavaVersion() >= 9) {
TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT = TEZ_AM_LAUNCH_CMD_OPTS_JDK9_DEFAULT;
TEZ_TASK_LAUNCH_CMD_OPTS_DEFAULT = TEZ_TASK_LAUNCH_CMD_OPTS_JDK9_DEFAULT;
} else {
TEZ_AM_LAUNCH_CMD_OPTS_DEFAULT = TEZ_AM_LAUNCH_CMD_OPTS_JDK8_DEFAULT;
TEZ_TASK_LAUNCH_CMD_OPTS_DEFAULT = TEZ_TASK_LAUNCH_CMD_OPTS_JDK8_DEFAULT;
}
}

/**
* Double value. Tez automatically determines the Xmx for the JVMs used to run
Expand Down
21 changes: 10 additions & 11 deletions tez-api/src/test/java/org/apache/tez/client/TestTezClientUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,17 +537,17 @@ public void testAMCommandOpts() {
assertEquals(tmpOpts + " "
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS_DEFAULT + " "
+ amCommandOpts
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT,
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT,
amOptsConstructed);

// Test2: Setup cluster-default command opts explicitly
String clusterDefaultCommandOpts =
"-server -Djava.net.preferIPv4Stack=true -XX:+PrintGCDetails -verbose:gc ";
"-server -Djava.net.preferIPv4Stack=true -Xlog:gc ";
tezConf.set(TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS, clusterDefaultCommandOpts);
amOptsConstructed =
TezClientUtils.constructAMLaunchOpts(tezConf, Resource.newInstance(1024, 1));
assertEquals(tmpOpts + " " + clusterDefaultCommandOpts + " " + amCommandOpts
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT, amOptsConstructed);
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT, amOptsConstructed);


// Test3: Don't setup Xmx explicitly
Expand All @@ -559,17 +559,17 @@ public void testAMCommandOpts() {
// It's OK for the Xmx value to show up before cluster default options, since Xmx will not be replaced if it already exists.
assertEquals(
" -Xmx" + ((int) (1024 * factor)) + "m" + " " + tmpOpts + " " + clusterDefaultCommandOpts + " " +
amCommandOpts + TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT,
amCommandOpts + TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT,
amOptsConstructed);

// Test4: Ensure admin options with Xmx does not cause them to be overridden. This should almost never be done though.
clusterDefaultCommandOpts =
"-server -Djava.net.preferIPv4Stack=true -XX:+PrintGCDetails -verbose:gc -Xmx200m";
"-server -Djava.net.preferIPv4Stack=true -Xlog:gc -Xmx200m";
tezConf.set(TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS, clusterDefaultCommandOpts);
amOptsConstructed =
TezClientUtils.constructAMLaunchOpts(tezConf, Resource.newInstance(1024, 1));
assertEquals(tmpOpts + " " + clusterDefaultCommandOpts + " " + amCommandOpts
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_JDK17_CMD_OPTS_DEFAULT, amOptsConstructed);
+ TezConfiguration.TEZ_AM_LAUNCH_CLUSTER_ADD_OPENS_DEFAULT, amOptsConstructed);
}

@Test(timeout = 5000)
Expand All @@ -589,11 +589,10 @@ public void testTaskCommandOpts() throws TezException {

// Test2: Setup cluster-default command opts explicitly
String taskClusterDefaultCommandOpts =
"-server -Djava.net.preferIPv4Stack=true -XX:+PrintGCDetails -verbose:gc ";
tezConf.set(TezConfiguration.TEZ_TASK_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS,
taskClusterDefaultCommandOpts);
taskOptsConstructed =
TezClientUtils.addDefaultsToTaskLaunchCmdOpts("", tezConf);
"-server -Djava.net.preferIPv4Stack=true -Xlog:gc ";
tezConf.set(
TezConfiguration.TEZ_TASK_LAUNCH_CLUSTER_DEFAULT_CMD_OPTS, taskClusterDefaultCommandOpts);
taskOptsConstructed = TezClientUtils.addDefaultsToTaskLaunchCmdOpts("", tezConf);
expected = taskClusterDefaultCommandOpts + " " + taskCommandOpts;
assertTrue(
"Did not find Expected prefix: [" + expected + "] in string [" + taskOptsConstructed +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void testBasicChecker() throws TezException {
@Test(timeout = 5000)
public void testMultipleGC() {
// Clashing GC values
String opts = "-XX:+UseConcMarkSweepGC -XX:+UseG1GC -XX:+UseParallelGC ";
String opts = "-XX:+UseSerialGC -XX:+UseG1GC -XX:+UseParallelGC ";
try {
javaOptsChecker.checkOpts(opts);
Assert.fail("Expected check to fail with opts=" + opts);
Expand All @@ -49,7 +49,7 @@ public void testMultipleGC() {
@Test(timeout = 5000)
public void testPositiveNegativeOpts() throws TezException {
// Multiple positive GC values
String opts = "-XX:+UseConcMarkSweepGC -XX:+UseG1GC -XX:+UseParallelGC -XX:-UseG1GC ";
String opts = "-XX:+UseSerialGC -XX:+UseG1GC -XX:+UseParallelGC -XX:-UseG1GC ";
try {
javaOptsChecker.checkOpts(opts);
Assert.fail("Expected check to fail with opts=" + opts);
Expand Down Expand Up @@ -83,32 +83,8 @@ public void testPositiveNegativeOpts() throws TezException {
javaOptsChecker.checkOpts(opts);

// Invalid negative can be ignored
opts = " -XX:+UseG1GC -XX:+UseParallelGC -XX:-UseG1GC -XX:-UseConcMarkSweepGC ";
opts = " -XX:+UseG1GC -XX:+UseParallelGC -XX:-UseG1GC -XX:-UseSerialGC ";
javaOptsChecker.checkOpts(opts);

}

@Test(timeout = 5000)
public void testSpecialCaseNonConflictingGCOptions() throws TezException {
String opts = " -XX:+UseParNewGC -XX:+UseConcMarkSweepGC ";
javaOptsChecker.checkOpts(opts);

opts += " -XX:+DisableExplicitGC ";
javaOptsChecker.checkOpts(opts);

opts += " -XX:-UseG1GC ";
javaOptsChecker.checkOpts(opts);

opts += " -XX:+UseG1GC ";
try {
javaOptsChecker.checkOpts(opts);
Assert.fail("Expected check to fail with opts=" + opts);
} catch (TezException e) {
Assert.assertTrue(e.getMessage(),
e.getMessage().contains("Invalid/conflicting GC options found"));
}


}

}
94 changes: 0 additions & 94 deletions tez-tools/tez-javadoc-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,100 +47,6 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>platform-macosx</id>
<activation>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../Classes/classes.jar</systemPath>
</dependency>
</dependencies>
</profile>
<profile>
<id>other-os</id>
<activation>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>

<profile>
<id>java8-16</id>
<activation>
<jdk>[1.8,16]</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java-8-16</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java-17</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


<build>
<plugins>
<plugin>
Expand Down
Loading