|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2pMapReduce.mapreduceModule.JobContextImpl
public class JobContextImpl
A read-only view of the job that is provided to the tasks while they are running.
Field Summary | |
---|---|
protected JobConf |
conf
|
Constructor Summary | |
---|---|
JobContextImpl(Configuration conf,
JobID jobId)
|
Method Summary | |
---|---|
java.lang.Class<? extends Reducer<?,?,?,?>> |
getCombinerClass()
Get the combiner class for the job. |
Configuration |
getConfiguration()
Return the configuration for the job. |
RawComparator<?> |
getGroupingComparator()
Get the user defined RawComparator comparator for
grouping keys of inputs to the reduce. |
java.lang.Class<? extends InputFormat<?,?>> |
getInputFormatClass()
Get the InputFormat class for the job. |
java.lang.String |
getJar()
Get the pathname of the job's jar. |
JobID |
getJobID()
Get the unique ID for the job. |
java.lang.String |
getJobName()
Get the user-specified job name. |
boolean |
getJobSetupCleanupNeeded()
Get whether job-setup and job-cleanup is needed for the job |
java.lang.Class<?> |
getMapOutputKeyClass()
Get the key class for the map output data. |
java.lang.Class<?> |
getMapOutputValueClass()
Get the value class for the map output data. |
java.lang.Class<? extends Mapper<?,?,?,?>> |
getMapperClass()
Get the Mapper class for the job. |
int |
getMaxMapAttempts()
Get the configured number of maximum attempts that will be made to run a map task, as specified by the mapred.map.max.attempts
property. |
int |
getMaxReduceAttempts()
Get the configured number of maximum attempts that will be made to run a reduce task, as specified by the mapred.reduce.max.attempts
property. |
int |
getNumReduceTasks()
Get configured the number of reduce tasks for this job. |
java.lang.Class<? extends OutputFormat<?,?>> |
getOutputFormatClass()
Get the OutputFormat class for the job. |
java.lang.Class<?> |
getOutputKeyClass()
Get the key class for the job output data. |
java.lang.Class<?> |
getOutputValueClass()
Get the value class for job outputs. |
java.lang.Class<? extends Partitioner<?,?>> |
getPartitionerClass()
Get the Partitioner class for the job. |
boolean |
getProfileEnabled()
Get whether the task profiling is enabled. |
java.lang.String |
getProfileParams()
Get the profiler configuration arguments. |
Configuration.IntegerRanges |
getProfileTaskRange(boolean isMap)
Get the range of maps or reduces to profile. |
java.lang.Class<? extends Reducer<?,?,?,?>> |
getReducerClass()
Get the Reducer class for the job. |
RawComparator<?> |
getSortComparator()
Get the RawComparator comparator used to compare keys. |
java.lang.String |
getUser()
Get the reported username for this job. |
Path |
getWorkingDirectory()
Get the current working directory for the default file system. |
void |
setJobID(JobID jobId)
Set the JobID. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final JobConf conf
Constructor Detail |
---|
public JobContextImpl(Configuration conf, JobID jobId)
Method Detail |
---|
public Configuration getConfiguration()
getConfiguration
in interface JobContext
public JobID getJobID()
getJobID
in interface JobContext
public void setJobID(JobID jobId)
public int getNumReduceTasks()
1
.
getNumReduceTasks
in interface JobContext
public Path getWorkingDirectory() throws java.io.IOException
getWorkingDirectory
in interface JobContext
java.io.IOException
public java.lang.Class<?> getOutputKeyClass()
getOutputKeyClass
in interface JobContext
public java.lang.Class<?> getOutputValueClass()
getOutputValueClass
in interface JobContext
public java.lang.Class<?> getMapOutputKeyClass()
getMapOutputKeyClass
in interface JobContext
public java.lang.Class<?> getMapOutputValueClass()
getMapOutputValueClass
in interface JobContext
public java.lang.String getJobName()
getJobName
in interface JobContext
public java.lang.Class<? extends InputFormat<?,?>> getInputFormatClass() throws java.lang.ClassNotFoundException
InputFormat
class for the job.
getInputFormatClass
in interface JobContext
InputFormat
class for the job.
java.lang.ClassNotFoundException
public java.lang.Class<? extends Mapper<?,?,?,?>> getMapperClass() throws java.lang.ClassNotFoundException
Mapper
class for the job.
getMapperClass
in interface JobContext
Mapper
class for the job.
java.lang.ClassNotFoundException
public java.lang.Class<? extends Reducer<?,?,?,?>> getCombinerClass() throws java.lang.ClassNotFoundException
getCombinerClass
in interface JobContext
java.lang.ClassNotFoundException
public java.lang.Class<? extends Reducer<?,?,?,?>> getReducerClass() throws java.lang.ClassNotFoundException
Reducer
class for the job.
getReducerClass
in interface JobContext
Reducer
class for the job.
java.lang.ClassNotFoundException
public java.lang.Class<? extends OutputFormat<?,?>> getOutputFormatClass() throws java.lang.ClassNotFoundException
OutputFormat
class for the job.
getOutputFormatClass
in interface JobContext
OutputFormat
class for the job.
java.lang.ClassNotFoundException
public java.lang.Class<? extends Partitioner<?,?>> getPartitionerClass() throws java.lang.ClassNotFoundException
Partitioner
class for the job.
getPartitionerClass
in interface JobContext
Partitioner
class for the job.
java.lang.ClassNotFoundException
public RawComparator<?> getSortComparator()
RawComparator
comparator used to compare keys.
getSortComparator
in interface JobContext
RawComparator
comparator used to compare keys.public java.lang.String getJar()
getJar
in interface JobContext
public RawComparator<?> getGroupingComparator()
RawComparator
comparator for
grouping keys of inputs to the reduce.
for details.
public boolean getJobSetupCleanupNeeded()
getJobSetupCleanupNeeded
in interface JobContext
public int getMaxMapAttempts()
mapred.map.max.attempts
property. If this property is not already set, the default is 4 attempts.
getMaxMapAttempts
in interface JobContext
public int getMaxReduceAttempts()
mapred.reduce.max.attempts
property. If this property is not already set, the default is 4 attempts.
getMaxReduceAttempts
in interface JobContext
public boolean getProfileEnabled()
getProfileEnabled
in interface JobContext
public java.lang.String getProfileParams()
getProfileParams
in interface JobContext
public Configuration.IntegerRanges getProfileTaskRange(boolean isMap)
getProfileTaskRange
in interface JobContext
isMap
- is the task a map?
public java.lang.String getUser()
getUser
in interface JobContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |