This is an automated email from the ASF dual-hosted git repository. abstractdog pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tez.git
The following commit(s) were added to refs/heads/master by this push: new 7a56e9bd9 TEZ-4432: Remove useless maybeAddDefaultLoggingJavaOpts from TezClientUtils. (#297) (Ayush Saxena reviewed by Laszlo Bodor) 7a56e9bd9 is described below commit 7a56e9bd9de0764f69854ca4d35e054bef70cc38 Author: Ayush Saxena <ayushsax...@apache.org> AuthorDate: Fri Jun 23 20:43:03 2023 +0530 TEZ-4432: Remove useless maybeAddDefaultLoggingJavaOpts from TezClientUtils. (#297) (Ayush Saxena reviewed by Laszlo Bodor) --- .../src/main/java/org/apache/tez/client/TezClientUtils.java | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java index cda38ea94..0ed0b6982 100644 --- a/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java +++ b/tez-api/src/main/java/org/apache/tez/client/TezClientUtils.java @@ -324,7 +324,7 @@ public final class TezClientUtils { /** * Verify or create the Staging area directory on the configured Filesystem * @param stagingArea Staging area directory path - * @return the FileSytem for the staging area directory + * @return the FileSystem for the staging area directory * @throws IOException */ public static FileSystem ensureStagingDirExists(Configuration conf, @@ -506,7 +506,7 @@ public final class TezClientUtils { String[] amLogParams = parseLogParams(amLogLevelString); String amLogLevel = amLogParams[0]; - maybeAddDefaultLoggingJavaOpts(amLogLevel, vargs); + TezClientUtils.addLog4jSystemProperties(amLogLevel, vargs); // FIX sun bug mentioned in TEZ-327 @@ -761,11 +761,6 @@ public final class TezClientUtils { amConfig.getBinaryConfLR(), tezLrsAsArchive, servicePluginsDescriptor, javaOptsChecker); } - static void maybeAddDefaultLoggingJavaOpts(String logLevel, List<String> vargs) { - Objects.requireNonNull(vargs); - TezClientUtils.addLog4jSystemProperties(logLevel, vargs); - } - @Private public static String maybeAddDefaultLoggingJavaOpts(String logLevel, String javaOpts) { List<String> vargs = new ArrayList<String>(5); @@ -774,7 +769,7 @@ public final class TezClientUtils { } else { vargs.add(""); } - maybeAddDefaultLoggingJavaOpts(logLevel, vargs); + TezClientUtils.addLog4jSystemProperties(logLevel, vargs); if (vargs.size() == 1) { return vargs.get(0); } @@ -820,6 +815,7 @@ public final class TezClientUtils { @VisibleForTesting public static void addLog4jSystemProperties(String logLevel, List<String> vargs) { + Objects.requireNonNull(vargs); vargs.add("-Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator"); vargs.add("-Dlog4j.configuration=" + TezConstants.TEZ_CONTAINER_LOG4J_PROPERTIES_FILE);