public class JobContext extends Object
限定符和类型 | 字段和说明 |
---|---|
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 |
构造器和说明 |
---|
JobContext(Configuration conf,
JobID jobId) |
限定符和类型 | 方法和说明 |
---|---|
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.
|
protected final JobConf conf
protected final Credentials credentials
protected UserGroupInformation ugi
public JobContext(Configuration conf, JobID jobId)
public Configuration getConfiguration()
public Credentials getCredentials()
public JobID getJobID()
public int getNumReduceTasks()
1
.public Path getWorkingDirectory() throws IOException
IOException
public 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.ClassNotFoundException
public 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.
Copyright © 2009 The Apache Software Foundation