public class WrappedReducer.Context extends Reducer.Context
ReduceContext.ValueIterator<VALUEIN>| Modifier and Type | Field and Description |
|---|---|
protected ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> |
reduceContext |
CACHE_ARCHIVES_VISIBILITIES, CACHE_FILE_VISIBILITIES, COMBINE_CLASS_ATTR, INPUT_FORMAT_CLASS_ATTR, JAR_UNPACK_PATTERN, JOB_ACL_MODIFY_JOB, JOB_ACL_VIEW_JOB, JOB_CANCEL_DELEGATION_TOKEN, JOB_NAMENODES, MAP_CLASS_ATTR, MAP_MEMORY_PHYSICAL_MB, MAP_OUTPUT_COLLECTOR_CLASS_ATTR, MAPREDUCE_TASK_CLASSPATH_PRECEDENCE, OUTPUT_FORMAT_CLASS_ATTR, PARTITIONER_CLASS_ATTR, REDUCE_CLASS_ATTR, REDUCE_MEMORY_PHYSICAL_MB, SHUFFLE_CONSUMER_PLUGIN_ATTR, USER_LOG_RETAIN_HOURS| Constructor and Description |
|---|
WrappedReducer.Context(ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> reduceContext) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.fs.Path[] |
getArchiveClassPaths()
Get the archive entries in classpath as an array of Path
|
java.lang.String[] |
getArchiveTimestamps()
Get the timestamps of the archives.
|
java.net.URI[] |
getCacheArchives()
Get cache archives set in the Configuration
|
java.net.URI[] |
getCacheFiles()
Get cache files set in the Configuration
|
java.lang.Class<? extends Reducer<?,?,?,?>> |
getCombinerClass()
Get the combiner class for the job.
|
org.apache.hadoop.io.RawComparator<?> |
getCombinerKeyGroupingComparator()
Get the user defined
RawComparator comparator for
grouping keys of inputs to the combiner. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Return the configuration for the job.
|
Counter |
getCounter(java.lang.Enum counterName)
Get the
Counter for the given counterName. |
Counter |
getCounter(java.lang.String groupName,
java.lang.String counterName)
|
org.apache.hadoop.security.Credentials |
getCredentials()
Get credentials for the job.
|
KEYIN |
getCurrentKey()
Get the current key.
|
VALUEIN |
getCurrentValue()
Get the current value.
|
org.apache.hadoop.fs.Path[] |
getFileClassPaths()
Get the file entries in classpath as an array of Path
|
java.lang.String[] |
getFileTimestamps()
Get the timestamps of the files.
|
org.apache.hadoop.io.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
|
org.apache.hadoop.fs.Path[] |
getLocalCacheArchives()
Return the path array of the localized caches
|
org.apache.hadoop.fs.Path[] |
getLocalCacheFiles()
Return the path array of the localized files
|
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
|
int |
getMaxReduceAttempts()
Get the configured number of maximum attempts that will be made to run a
|
int |
getNumReduceTasks()
Get configured the number of reduce tasks for this job.
|
OutputCommitter |
getOutputCommitter()
Get the
OutputCommitter for the task-attempt. |
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() |
java.lang.Class<? extends Reducer<?,?,?,?>> |
getReducerClass()
Get the
Reducer class for the job. |
org.apache.hadoop.io.RawComparator<?> |
getSortComparator()
Get the
RawComparator comparator used to compare keys. |
java.lang.String |
getStatus()
Get the last set status message.
|
boolean |
getSymlink()
This method checks to see if symlinks are to be create for the
localized cache files in the current working directory
|
TaskAttemptID |
getTaskAttemptID()
Get the unique name for this task attempt.
|
java.lang.String |
getUser()
Get the reported username for this job.
|
java.lang.Iterable<VALUEIN> |
getValues()
Iterate through the values for the current key, reusing the same value
object, which is stored in the context.
|
org.apache.hadoop.fs.Path |
getWorkingDirectory()
Get the current working directory for the default file system.
|
boolean |
nextKey()
Start processing next unique key.
|
boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end.
|
void |
progress() |
void |
setStatus(java.lang.String msg)
Set the current status of the task to the given string.
|
boolean |
userClassesTakesPrecedence()
Get the boolean value for the property that specifies which classpath
takes precedence when tasks are launched.
|
void |
write(KEYOUT key,
VALUEOUT value)
Generate an output key/value pair.
|
protected ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> reduceContext
public WrappedReducer.Context(ReduceContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> reduceContext)
public KEYIN getCurrentKey() throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic VALUEIN getCurrentValue() throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean nextKeyValue()
throws java.io.IOException,
java.lang.InterruptedException
TaskInputOutputContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic Counter getCounter(java.lang.Enum counterName)
TaskAttemptContextCounter for the given counterName.counterName - counter nameCounter for the given counterNamepublic Counter getCounter(java.lang.String groupName, java.lang.String counterName)
TaskAttemptContextcounterName - counter nameCounter for the given groupName and
counterNamepublic OutputCommitter getOutputCommitter()
TaskInputOutputContextOutputCommitter for the task-attempt.OutputCommitter for the task-attemptpublic void write(KEYOUT key, VALUEOUT value) throws java.io.IOException, java.lang.InterruptedException
TaskInputOutputContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic java.lang.String getStatus()
TaskAttemptContextpublic TaskAttemptID getTaskAttemptID()
TaskAttemptContextpublic void setStatus(java.lang.String msg)
TaskAttemptContextpublic org.apache.hadoop.fs.Path[] getArchiveClassPaths()
JobContextpublic java.lang.String[] getArchiveTimestamps()
JobContextpublic java.net.URI[] getCacheArchives()
throws java.io.IOException
JobContextjava.io.IOExceptionpublic java.net.URI[] getCacheFiles()
throws java.io.IOException
JobContextjava.io.IOExceptionpublic java.lang.Class<? extends Reducer<?,?,?,?>> getCombinerClass() throws java.lang.ClassNotFoundException
JobContextjava.lang.ClassNotFoundExceptionpublic org.apache.hadoop.conf.Configuration getConfiguration()
JobContextpublic org.apache.hadoop.fs.Path[] getFileClassPaths()
JobContextpublic java.lang.String[] getFileTimestamps()
JobContextpublic org.apache.hadoop.io.RawComparator<?> getCombinerKeyGroupingComparator()
JobContextRawComparator comparator for
grouping keys of inputs to the combiner.Job.setCombinerKeyGroupingComparatorClass(Class)public org.apache.hadoop.io.RawComparator<?> getGroupingComparator()
JobContextRawComparator comparator for
grouping keys of inputs to the reduce.for details.,
JobContext.getCombinerKeyGroupingComparator()public java.lang.Class<? extends InputFormat<?,?>> getInputFormatClass() throws java.lang.ClassNotFoundException
JobContextInputFormat class for the job.InputFormat class for the job.java.lang.ClassNotFoundExceptionpublic java.lang.String getJar()
JobContextpublic JobID getJobID()
JobContextpublic java.lang.String getJobName()
JobContextpublic boolean userClassesTakesPrecedence()
JobContextpublic boolean getJobSetupCleanupNeeded()
JobContextpublic org.apache.hadoop.fs.Path[] getLocalCacheArchives()
throws java.io.IOException
JobContextjava.io.IOExceptionpublic org.apache.hadoop.fs.Path[] getLocalCacheFiles()
throws java.io.IOException
JobContextjava.io.IOExceptionpublic java.lang.Class<?> getMapOutputKeyClass()
JobContextpublic java.lang.Class<?> getMapOutputValueClass()
JobContextpublic java.lang.Class<? extends Mapper<?,?,?,?>> getMapperClass() throws java.lang.ClassNotFoundException
JobContextMapper class for the job.Mapper class for the job.java.lang.ClassNotFoundExceptionpublic int getMaxMapAttempts()
JobContextpublic int getMaxReduceAttempts()
JobContextpublic int getNumReduceTasks()
JobContext1.public java.lang.Class<? extends OutputFormat<?,?>> getOutputFormatClass() throws java.lang.ClassNotFoundException
JobContextOutputFormat class for the job.OutputFormat class for the job.java.lang.ClassNotFoundExceptionpublic java.lang.Class<?> getOutputKeyClass()
JobContextpublic java.lang.Class<?> getOutputValueClass()
JobContextpublic java.lang.Class<? extends Partitioner<?,?>> getPartitionerClass() throws java.lang.ClassNotFoundException
JobContextPartitioner class for the job.Partitioner class for the job.java.lang.ClassNotFoundExceptionpublic java.lang.Class<? extends Reducer<?,?,?,?>> getReducerClass() throws java.lang.ClassNotFoundException
JobContextReducer class for the job.Reducer class for the job.java.lang.ClassNotFoundExceptionpublic org.apache.hadoop.io.RawComparator<?> getSortComparator()
JobContextRawComparator comparator used to compare keys.RawComparator comparator used to compare keys.public boolean getSymlink()
JobContextpublic org.apache.hadoop.fs.Path getWorkingDirectory()
throws java.io.IOException
JobContextjava.io.IOExceptionpublic void progress()
public java.lang.Iterable<VALUEIN> getValues() throws java.io.IOException, java.lang.InterruptedException
ReduceContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean nextKey()
throws java.io.IOException,
java.lang.InterruptedException
ReduceContextjava.io.IOExceptionjava.lang.InterruptedExceptionpublic boolean getProfileEnabled()
JobContextpublic java.lang.String getProfileParams()
public java.lang.String getUser()
JobContextpublic org.apache.hadoop.security.Credentials getCredentials()
JobContextCopyright © 2009 The Apache Software Foundation