@@ -324,7 +324,7 @@ static void processTezLocalCredentialsFile(Credentials credentials, Configuratio
324324 /**
325325 * Verify or create the Staging area directory on the configured Filesystem
326326 * @param stagingArea Staging area directory path
327- * @return the FileSytem for the staging area directory
327+ * @return the FileSystem for the staging area directory
328328 * @throws IOException
329329 */
330330 public static FileSystem ensureStagingDirExists (Configuration conf ,
@@ -506,7 +506,7 @@ public static ApplicationSubmissionContext createApplicationSubmissionContext(
506506 String [] amLogParams = parseLogParams (amLogLevelString );
507507
508508 String amLogLevel = amLogParams [0 ];
509- maybeAddDefaultLoggingJavaOpts (amLogLevel , vargs );
509+ TezClientUtils . addLog4jSystemProperties (amLogLevel , vargs );
510510
511511
512512 // FIX sun bug mentioned in TEZ-327
@@ -761,11 +761,6 @@ static DAGPlan prepareAndCreateDAGPlan(DAG dag, AMConfiguration amConfig,
761761 amConfig .getBinaryConfLR (), tezLrsAsArchive , servicePluginsDescriptor , javaOptsChecker );
762762 }
763763
764- static void maybeAddDefaultLoggingJavaOpts (String logLevel , List <String > vargs ) {
765- Objects .requireNonNull (vargs );
766- TezClientUtils .addLog4jSystemProperties (logLevel , vargs );
767- }
768-
769764 @ Private
770765 public static String maybeAddDefaultLoggingJavaOpts (String logLevel , String javaOpts ) {
771766 List <String > vargs = new ArrayList <String >(5 );
@@ -774,7 +769,7 @@ public static String maybeAddDefaultLoggingJavaOpts(String logLevel, String java
774769 } else {
775770 vargs .add ("" );
776771 }
777- maybeAddDefaultLoggingJavaOpts (logLevel , vargs );
772+ TezClientUtils . addLog4jSystemProperties (logLevel , vargs );
778773 if (vargs .size () == 1 ) {
779774 return vargs .get (0 );
780775 }
@@ -820,6 +815,7 @@ public static String addDefaultsToTaskLaunchCmdOpts(String vOpts, Configuration
820815 @ VisibleForTesting
821816 public static void addLog4jSystemProperties (String logLevel ,
822817 List <String > vargs ) {
818+ Objects .requireNonNull (vargs );
823819 vargs .add ("-Dlog4j.configuratorClass=org.apache.tez.common.TezLog4jConfigurator" );
824820 vargs .add ("-Dlog4j.configuration="
825821 + TezConstants .TEZ_CONTAINER_LOG4J_PROPERTIES_FILE );
0 commit comments