private static void analyzeHadoopConfiguration(){
  JobConf job=ConfigurationManager.getCachedJobConf();
  _remoteMRSortMem=(1024 * 1024) * job.getLong(MRConfigurationNames.MR_TASK_IO_SORT_MB,100);
  String javaOpts1=job.get(MRConfigurationNames.MR_CHILD_JAVA_OPTS);
  String javaOpts2=job.get(MRConfigurationNames.MR_MAP_JAVA_OPTS,null);
  String javaOpts3=job.get(MRConfigurationNames.MR_REDUCE_JAVA_OPTS,null);
  if (javaOpts2 != null)   _remoteJVMMaxMemMap=extractMaxMemoryOpt(javaOpts2);
 else   _remoteJVMMaxMemMap=extractMaxMemoryOpt(javaOpts1);
  if (javaOpts3 != null)   _remoteJVMMaxMemReduce=extractMaxMemoryOpt(javaOpts3);
 else   _remoteJVMMaxMemReduce=extractMaxMemoryOpt(javaOpts1);
  String blocksize=job.get(MRConfigurationNames.DFS_BLOCKSIZE,"134217728");
  _blocksize=Long.parseLong(blocksize);
  String framework=job.get(MRConfigurationNames.MR_FRAMEWORK_NAME);
  _yarnEnabled=(framework != null && framework.equals("yarn"));
  _localJT=analyzeLocalMode(job);
}

private static void analyzeHadoopConfiguration ( ) { JobConf job = ConfigurationManager . getCachedJobConf ( ) ; _remoteMRSortMem = ( 1024 * 1024 ) * job . getLong ( MRConfigurationNames . MR_TASK_IO_SORT_MB , 100 ) ; String javaOpts1 = job . get ( MRConfigurationNames . MR_CHILD_JAVA_OPTS ) ; String javaOpts2 = job . get ( MRConfigurationNames . MR_MAP_JAVA_OPTS , null ) ; String javaOpts3 = job . get ( MRConfigurationNames . MR_REDUCE_JAVA_OPTS , null ) ; if ( javaOpts2 != null ) _remoteJVMMaxMemMap = extractMaxMemoryOpt ( javaOpts2 ) ; else _remoteJVMMaxMemMap = extractMaxMemoryOpt ( javaOpts1 ) ; if ( javaOpts3 != null ) _remoteJVMMaxMemReduce = extractMaxMemoryOpt ( javaOpts3 ) ; else _remoteJVMMaxMemReduce = extractMaxMemoryOpt ( javaOpts1 ) ; String blocksize = job . get ( MRConfigurationNames . DFS_BLOCKSIZE , "134217728" ) ; _blocksize = Long . parseLong ( blocksize ) ; String framework = job . get ( MRConfigurationNames . MR_FRAMEWORK_NAME ) ; _yarnEnabled = ( framework != null && framework . equals ( "yarn" ) ) ; _localJT = analyzeLocalMode ( job ) ; }
analyzes only properties of hadoop configuration in order to prevent expensive call to cluster status .
