@Private
@Unstable
public class MRApps
extends org.apache.hadoop.yarn.util.Apps
| Modifier and Type | Class | Description |
|---|---|---|
static class |
MRApps.TaskAttemptStateUI |
|
static class |
MRApps.TaskStateUI |
| Modifier and Type | Field | Description |
|---|---|---|
static org.slf4j.Logger |
LOG |
| Constructor | Description |
|---|---|
MRApps() |
| Modifier and Type | Method | Description |
|---|---|---|
static void |
addLog4jSystemProperties(org.apache.hadoop.mapred.Task task,
java.util.List<java.lang.String> vargs,
org.apache.hadoop.conf.Configuration conf) |
Add the JVM system properties necessary to configure
ContainerLogAppender or
ContainerRollingLogAppender. |
static void |
addToEnvironment(java.util.Map<java.lang.String,java.lang.String> environment,
java.lang.String variable,
java.lang.String value,
org.apache.hadoop.conf.Configuration conf) |
|
static java.lang.ClassLoader |
createJobClassLoader(org.apache.hadoop.conf.Configuration conf) |
Creates a
ApplicationClassLoader if
MRJobConfig.MAPREDUCE_JOB_CLASSLOADER is set to true, and
the APP_CLASSPATH environment variable is set. |
static java.lang.String |
crossPlatformifyMREnv(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.ApplicationConstants.Environment env) |
|
static java.lang.String |
getChildLogLevel(org.apache.hadoop.conf.Configuration conf,
boolean isMap) |
|
static org.apache.hadoop.fs.Path |
getEndJobCommitFailureFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId) |
|
static org.apache.hadoop.fs.Path |
getEndJobCommitSuccessFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId) |
|
static java.lang.String |
getJobFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
org.apache.hadoop.mapreduce.JobID jobId) |
|
static org.apache.hadoop.fs.Path |
getStagingAreaDir(org.apache.hadoop.conf.Configuration conf,
java.lang.String user) |
|
static org.apache.hadoop.fs.Path |
getStartJobCommitFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId) |
|
static java.lang.String |
getSystemPropertiesToLog(org.apache.hadoop.conf.Configuration conf) |
Return lines for system property keys and values per configuration.
|
static void |
setClassLoader(java.lang.ClassLoader classLoader,
org.apache.hadoop.conf.Configuration conf) |
Sets the provided classloader on the given configuration and as the thread
context classloader if the classloader is not null.
|
static void |
setClasspath(java.util.Map<java.lang.String,java.lang.String> environment,
org.apache.hadoop.conf.Configuration conf) |
|
static void |
setEnvFromInputProperty(java.util.Map<java.lang.String,java.lang.String> env,
java.lang.String propName,
java.lang.String defaultPropValue,
org.apache.hadoop.conf.Configuration conf) |
|
static void |
setEnvFromInputString(java.util.Map<java.lang.String,java.lang.String> env,
java.lang.String envString,
org.apache.hadoop.conf.Configuration conf) |
|
static void |
setJobClassLoader(org.apache.hadoop.conf.Configuration conf) |
Creates and sets a
ApplicationClassLoader on the given
configuration and as the thread context classloader, if
MRJobConfig.MAPREDUCE_JOB_CLASSLOADER is set to true, and
the APP_CLASSPATH environment variable is set. |
static void |
setupDistributedCache(org.apache.hadoop.conf.Configuration conf,
java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.LocalResource> localResources) |
|
static void |
setupDistributedCacheLocal(org.apache.hadoop.conf.Configuration conf) |
Set up the DistributedCache related configs to make
JobContextImpl.getLocalCacheFiles(Configuration)
and
JobContextImpl.getLocalCacheArchives(Configuration)
working. |
static MRApps.TaskAttemptStateUI |
taskAttemptState(java.lang.String attemptStateStr) |
|
static MRApps.TaskStateUI |
taskState(java.lang.String taskStateStr) |
|
static java.lang.String |
taskSymbol(TaskType type) |
|
static TaskType |
taskType(java.lang.String symbol) |
|
static JobId |
toJobID(java.lang.String jid) |
|
static java.lang.String |
toString(JobId jid) |
|
static java.lang.String |
toString(TaskAttemptId taid) |
|
static java.lang.String |
toString(TaskId tid) |
|
static TaskAttemptId |
toTaskAttemptID(java.lang.String taid) |
|
static TaskId |
toTaskID(java.lang.String tid) |
addToEnvironment, addToEnvironment, crossPlatformify, getEnvVarsFromInputProperty, isApplicationFinalState, setEnvFromInputProperty, setEnvFromInputString, setEnvFromInputString, shouldCountTowardsNodeBlacklisting, shouldHaveNext, throwParseException, toAppID, toAppIDpublic static java.lang.String toString(JobId jid)
public static JobId toJobID(java.lang.String jid)
public static java.lang.String toString(TaskId tid)
public static TaskId toTaskID(java.lang.String tid)
public static java.lang.String toString(TaskAttemptId taid)
public static TaskAttemptId toTaskAttemptID(java.lang.String taid)
public static java.lang.String taskSymbol(TaskType type)
public static TaskType taskType(java.lang.String symbol)
public static MRApps.TaskAttemptStateUI taskAttemptState(java.lang.String attemptStateStr)
public static MRApps.TaskStateUI taskState(java.lang.String taskStateStr)
public static void setClasspath(java.util.Map<java.lang.String,java.lang.String> environment,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
java.io.IOExceptionpublic static void setJobClassLoader(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
ApplicationClassLoader on the given
configuration and as the thread context classloader, if
MRJobConfig.MAPREDUCE_JOB_CLASSLOADER is set to true, and
the APP_CLASSPATH environment variable is set.conf - java.io.IOExceptionpublic static java.lang.ClassLoader createJobClassLoader(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
ApplicationClassLoader if
MRJobConfig.MAPREDUCE_JOB_CLASSLOADER is set to true, and
the APP_CLASSPATH environment variable is set.conf - java.io.IOExceptionpublic static void setClassLoader(java.lang.ClassLoader classLoader,
org.apache.hadoop.conf.Configuration conf)
classLoader - conf - public static org.apache.hadoop.fs.Path getStagingAreaDir(org.apache.hadoop.conf.Configuration conf,
java.lang.String user)
public static java.lang.String getJobFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
org.apache.hadoop.mapreduce.JobID jobId)
public static org.apache.hadoop.fs.Path getEndJobCommitSuccessFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId)
public static org.apache.hadoop.fs.Path getEndJobCommitFailureFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId)
public static org.apache.hadoop.fs.Path getStartJobCommitFile(org.apache.hadoop.conf.Configuration conf,
java.lang.String user,
JobId jobId)
public static void setupDistributedCache(org.apache.hadoop.conf.Configuration conf,
java.util.Map<java.lang.String,org.apache.hadoop.yarn.api.records.LocalResource> localResources)
throws java.io.IOException
java.io.IOExceptionpublic static void setupDistributedCacheLocal(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
JobContextImpl.getLocalCacheFiles(Configuration)
and
JobContextImpl.getLocalCacheArchives(Configuration)
working.conf - java.io.IOExceptionpublic static java.lang.String getChildLogLevel(org.apache.hadoop.conf.Configuration conf,
boolean isMap)
public static void addLog4jSystemProperties(org.apache.hadoop.mapred.Task task,
java.util.List<java.lang.String> vargs,
org.apache.hadoop.conf.Configuration conf)
ContainerLogAppender or
ContainerRollingLogAppender.task - for map/reduce, or null for app mastervargs - the argument list to append toconf - configuration of MR jobpublic static java.lang.String getSystemPropertiesToLog(org.apache.hadoop.conf.Configuration conf)
public static void setEnvFromInputString(java.util.Map<java.lang.String,java.lang.String> env,
java.lang.String envString,
org.apache.hadoop.conf.Configuration conf)
public static void setEnvFromInputProperty(java.util.Map<java.lang.String,java.lang.String> env,
java.lang.String propName,
java.lang.String defaultPropValue,
org.apache.hadoop.conf.Configuration conf)
@Public
@Unstable
public static void addToEnvironment(java.util.Map<java.lang.String,java.lang.String> environment,
java.lang.String variable,
java.lang.String value,
org.apache.hadoop.conf.Configuration conf)
public static java.lang.String crossPlatformifyMREnv(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.yarn.api.ApplicationConstants.Environment env)
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.