|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.mapreduce.JobContext
public class JobContext
A read-only view of the job that is provided to the tasks while they are running.
| Field Summary | |
|---|---|
static String |
CACHE_ARCHIVES_VISIBILITIES
|
static String |
CACHE_FILE_VISIBILITIES
|
protected static String |
COMBINE_CLASS_ATTR
|
protected JobConf |
conf
|
protected Credentials |
credentials
|
protected static String |
INPUT_FORMAT_CLASS_ATTR
|
static String |
JOB_ACL_MODIFY_JOB
|
static String |
JOB_ACL_VIEW_JOB
|
static String |
JOB_CANCEL_DELEGATION_TOKEN
|
static String |
JOB_NAMENODES
|
protected static String |
MAP_CLASS_ATTR
|
protected static String |
OUTPUT_FORMAT_CLASS_ATTR
|
protected static String |
PARTITIONER_CLASS_ATTR
|
protected static String |
REDUCE_CLASS_ATTR
|
protected UserGroupInformation |
ugi
The UserGroupInformation object that has a reference to the current user |
static String |
USER_LOG_RETAIN_HOURS
|
| Constructor Summary | |
|---|---|
JobContext(Configuration conf,
JobID jobId)
|
|
| Method Summary | |
|---|---|
Class<? extends Reducer<?,?,?,?>> |
getCombinerClass()
Get the combiner class for the job. |
Configuration |
getConfiguration()
Return the configuration for the job. |
Credentials |
getCredentials()
Get credentials for the job. |
RawComparator<?> |
getGroupingComparator()
Get the user defined RawComparator comparator for
grouping keys of inputs to the reduce. |
Class<? extends InputFormat<?,?>> |
getInputFormatClass()
Get the InputFormat class for the job. |
String |
getJar()
Get the pathname of the job's jar. |
JobID |
getJobID()
Get the unique ID for the job. |
String |
getJobName()
Get the user-specified job name. |
Class<?> |
getMapOutputKeyClass()
Get the key class for the map output data. |
Class<?> |
getMapOutputValueClass()
Get the value class for the map output data. |
Class<? extends Mapper<?,?,?,?>> |
getMapperClass()
Get the Mapper class for the job. |
int |
getNumReduceTasks()
Get configured the number of reduce tasks for this job. |
Class<? extends OutputFormat<?,?>> |
getOutputFormatClass()
Get the OutputFormat class for the job. |
Class<?> |
getOutputKeyClass()
Get the key class for the job output data. |
Class<?> |
getOutputValueClass()
Get the value class for job outputs. |
Class<? extends Partitioner<?,?>> |
getPartitionerClass()
Get the Partitioner class for the job. |
Class<? extends Reducer<?,?,?,?>> |
getReducerClass()
Get the Reducer class for the job. |
RawComparator<?> |
getSortComparator()
Get the RawComparator comparator used to compare keys. |
Path |
getWorkingDirectory()
Get the current working directory for the default file system. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String INPUT_FORMAT_CLASS_ATTR
protected static final String MAP_CLASS_ATTR
protected static final String COMBINE_CLASS_ATTR
protected static final String REDUCE_CLASS_ATTR
protected static final String OUTPUT_FORMAT_CLASS_ATTR
protected static final String PARTITIONER_CLASS_ATTR
protected final JobConf conf
protected final Credentials credentials
public static final String JOB_NAMENODES
public static final String JOB_ACL_VIEW_JOB
public static final String JOB_ACL_MODIFY_JOB
public static final String CACHE_FILE_VISIBILITIES
public static final String CACHE_ARCHIVES_VISIBILITIES
public static final String JOB_CANCEL_DELEGATION_TOKEN
public static final String USER_LOG_RETAIN_HOURS
protected UserGroupInformation ugi
| Constructor Detail |
|---|
public JobContext(Configuration conf,
JobID jobId)
| Method Detail |
|---|
public Configuration getConfiguration()
public Credentials getCredentials()
public JobID getJobID()
public int getNumReduceTasks()
1.
public Path getWorkingDirectory()
throws IOException
IOExceptionpublic Class<?> getOutputKeyClass()
public Class<?> getOutputValueClass()
public Class<?> getMapOutputKeyClass()
public Class<?> getMapOutputValueClass()
public String getJobName()
public Class<? extends InputFormat<?,?>> getInputFormatClass()
throws ClassNotFoundException
InputFormat class for the job.
InputFormat class for the job.
ClassNotFoundException
public Class<? extends Mapper<?,?,?,?>> getMapperClass()
throws ClassNotFoundException
Mapper class for the job.
Mapper class for the job.
ClassNotFoundException
public Class<? extends Reducer<?,?,?,?>> getCombinerClass()
throws ClassNotFoundException
ClassNotFoundException
public Class<? extends Reducer<?,?,?,?>> getReducerClass()
throws ClassNotFoundException
Reducer class for the job.
Reducer class for the job.
ClassNotFoundException
public Class<? extends OutputFormat<?,?>> getOutputFormatClass()
throws ClassNotFoundException
OutputFormat class for the job.
OutputFormat class for the job.
ClassNotFoundException
public Class<? extends Partitioner<?,?>> getPartitionerClass()
throws ClassNotFoundException
Partitioner class for the job.
Partitioner class for the job.
ClassNotFoundExceptionpublic RawComparator<?> getSortComparator()
RawComparator comparator used to compare keys.
RawComparator comparator used to compare keys.public String getJar()
public RawComparator<?> getGroupingComparator()
RawComparator comparator for
grouping keys of inputs to the reduce.
for details.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||