org.apache.hadoop.mapreduce.v2.util
Class MRApps

java.lang.Object
  extended by org.apache.hadoop.yarn.util.Apps
      extended by org.apache.hadoop.mapreduce.v2.util.MRApps

@InterfaceAudience.Private
@InterfaceStability.Unstable
public class MRApps
extends org.apache.hadoop.yarn.util.Apps

Helper class for MR applications


Nested Class Summary
static class MRApps.TaskAttemptStateUI
           
 
Field Summary
static String ATTEMPT
           
static String JOB
           
static String TASK
           
 
Fields inherited from class org.apache.hadoop.yarn.util.Apps
APP, ID
 
Constructor Summary
MRApps()
           
 
Method Summary
static void addLog4jSystemProperties(String logLevel, long logSize, List<String> vargs)
          Add the JVM system properties necessary to configure ContainerLogAppender.
static String getJobFile(org.apache.hadoop.conf.Configuration conf, String user, org.apache.hadoop.mapreduce.JobID jobId)
           
static org.apache.hadoop.fs.Path getStagingAreaDir(org.apache.hadoop.conf.Configuration conf, String user)
           
static void setClasspath(Map<String,String> environment, org.apache.hadoop.conf.Configuration conf)
           
static void setupDistributedCache(org.apache.hadoop.conf.Configuration conf, Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources)
           
static MRApps.TaskAttemptStateUI taskAttemptState(String attemptStateStr)
           
static String taskSymbol(TaskType type)
           
static TaskType taskType(String symbol)
           
static JobId toJobID(String jid)
           
static JobId toJobID(String prefix, String s, Iterator<String> it)
           
static String toString(JobId jid)
           
static String toString(TaskAttemptId taid)
           
static String toString(TaskId tid)
           
static TaskAttemptId toTaskAttemptID(String taid)
           
static TaskId toTaskID(String tid)
           
static TaskId toTaskID(String prefix, String s, Iterator<String> it)
           
 
Methods inherited from class org.apache.hadoop.yarn.util.Apps
addToEnvironment, setEnvFromInputString, shouldHaveNext, throwParseException, toAppID, toAppID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOB

public static final String JOB
See Also:
Constant Field Values

TASK

public static final String TASK
See Also:
Constant Field Values

ATTEMPT

public static final String ATTEMPT
See Also:
Constant Field Values
Constructor Detail

MRApps

public MRApps()
Method Detail

toString

public static String toString(JobId jid)

toJobID

public static JobId toJobID(String jid)

toJobID

public static JobId toJobID(String prefix,
                            String s,
                            Iterator<String> it)

toString

public static String toString(TaskId tid)

toTaskID

public static TaskId toTaskID(String tid)

toTaskID

public static TaskId toTaskID(String prefix,
                              String s,
                              Iterator<String> it)

toString

public static String toString(TaskAttemptId taid)

toTaskAttemptID

public static TaskAttemptId toTaskAttemptID(String taid)

taskSymbol

public static String taskSymbol(TaskType type)

taskType

public static TaskType taskType(String symbol)

taskAttemptState

public static MRApps.TaskAttemptStateUI taskAttemptState(String attemptStateStr)

setClasspath

public static void setClasspath(Map<String,String> environment,
                                org.apache.hadoop.conf.Configuration conf)
                         throws IOException
Throws:
IOException

getStagingAreaDir

public static org.apache.hadoop.fs.Path getStagingAreaDir(org.apache.hadoop.conf.Configuration conf,
                                                          String user)

getJobFile

public static String getJobFile(org.apache.hadoop.conf.Configuration conf,
                                String user,
                                org.apache.hadoop.mapreduce.JobID jobId)

setupDistributedCache

public static void setupDistributedCache(org.apache.hadoop.conf.Configuration conf,
                                         Map<String,org.apache.hadoop.yarn.api.records.LocalResource> localResources)
                                  throws IOException
Throws:
IOException

addLog4jSystemProperties

public static void addLog4jSystemProperties(String logLevel,
                                            long logSize,
                                            List<String> vargs)
Add the JVM system properties necessary to configure ContainerLogAppender.

Parameters:
logLevel - the desired log level (eg INFO/WARN/DEBUG)
logSize - See ContainerLogAppender.setTotalLogFileSize(long)
vargs - the argument list to append to


Copyright © 2012 Apache Software Foundation. All Rights Reserved.