MRApps extends Apps { public static String getSystemPropertiesToLog(Configuration conf) { String key = conf.get(MRJobConfig.MAPREDUCE_JVM_SYSTEM_PROPERTIES_TO_LOG, MRJobConfig.DEFAULT_MAPREDUCE_JVM_SYSTEM_PROPERTIES_TO_LOG); if (key != null) { key = key.trim(); if (!key.isEmpty()) { String[] props = key.split(","); if (props.length > 0) { StringBuilder sb = new StringBuilder(); sb.append("\n"); return sb.toString(); } } } return null; }  static String toString(JobId jid); static JobId toJobID(String jid); static String toString(TaskId tid); static TaskId toTaskID(String tid); static String toString(TaskAttemptId taid); static TaskAttemptId toTaskAttemptID(String taid); static String taskSymbol(TaskType type); static TaskType taskType(String symbol); static TaskAttemptStateUI taskAttemptState(String attemptStateStr); static TaskStateUI taskState(String taskStateStr); @SuppressWarnings("deprecation") static void setClasspath(Map<String, String> environment,
      Configuration conf); static void setJobClassLoader(Configuration conf); static ClassLoader createJobClassLoader(Configuration conf); static void setClassLoader(ClassLoader classLoader,
      Configuration conf); static Path getStagingAreaDir(Configuration conf, String user); static String getJobFile(Configuration conf, String user, 
      org.apache.hadoop.mapreduce.JobID jobId); static Path getEndJobCommitSuccessFile(Configuration conf, String user,
      JobId jobId); static Path getEndJobCommitFailureFile(Configuration conf, String user,
      JobId jobId); static Path getStartJobCommitFile(Configuration conf, String user,
      JobId jobId); @SuppressWarnings("deprecation") static void setupDistributedCache(Configuration conf,
      Map<String, LocalResource> localResources); static void setupDistributedCacheLocal(Configuration conf); static String getChildLogLevel(Configuration conf, boolean isMap); static void addLog4jSystemProperties(Task task,
      List<String> vargs, Configuration conf); static String getSystemPropertiesToLog(Configuration conf); static void setEnvFromInputString(Map<String, String> env,
      String envString, Configuration conf); static void setEnvFromInputProperty(Map<String, String> env,
      String propName, String defaultPropValue, Configuration conf); @Public @Unstable static void addToEnvironment(Map<String, String> environment,
      String variable, String value, Configuration conf); static String crossPlatformifyMREnv(Configuration conf, Environment env); static final Logger LOG; }
@Test public void testLogSystemProperties() throws Exception { Configuration conf = new Configuration(); conf.set(MRJobConfig.MAPREDUCE_JVM_SYSTEM_PROPERTIES_TO_LOG, " "); String value = MRApps.getSystemPropertiesToLog(conf); assertNull(value); String classpath = "java.class.path"; String os = "os.name"; String version = "java.version"; conf.set(MRJobConfig.MAPREDUCE_JVM_SYSTEM_PROPERTIES_TO_LOG, classpath + ", " + os); value = MRApps.getSystemPropertiesToLog(conf); assertNotNull(value); assertTrue(value.contains(classpath)); assertTrue(value.contains(os)); assertFalse(value.contains(version)); }