org.apache.hadoop.mapreduce.lib.map
Class WrappedMapper.Context
java.lang.Object
org.apache.hadoop.mapreduce.Mapper.Context
org.apache.hadoop.mapreduce.lib.map.WrappedMapper.Context
- All Implemented Interfaces:
- JobContext, MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>, MRJobConfig, TaskAttemptContext, TaskInputOutputContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT>, org.apache.hadoop.util.Progressable
- Enclosing class:
- WrappedMapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT>
@InterfaceStability.Evolving
public class WrappedMapper.Context
- extends Mapper.Context
Fields inherited from interface org.apache.hadoop.mapreduce.MRJobConfig |
APPLICATION_ATTEMPT_ID, APPLICATION_ATTEMPT_ID_ENV, APPLICATION_MASTER_CLASS, APPLICATION_TOKENS_FILE, CACHE_ARCHIVES, CACHE_ARCHIVES_SIZES, CACHE_ARCHIVES_TIMESTAMPS, CACHE_ARCHIVES_VISIBILITIES, CACHE_FILE_TIMESTAMPS, CACHE_FILE_VISIBILITIES, CACHE_FILES, CACHE_FILES_SIZES, CACHE_LOCALARCHIVES, CACHE_LOCALFILES, CACHE_SYMLINK, CLASSPATH_ARCHIVES, CLASSPATH_FILES, COMBINE_CLASS_ATTR, COMBINE_RECORDS_BEFORE_PROGRESS, COMPLETED_MAPS_FOR_REDUCE_SLOWSTART, COUNTER_GROUP_NAME_MAX_DEFAULT, COUNTER_GROUP_NAME_MAX_KEY, COUNTER_GROUPS_MAX_DEFAULT, COUNTER_GROUPS_MAX_KEY, COUNTER_NAME_MAX_DEFAULT, COUNTER_NAME_MAX_KEY, COUNTERS_MAX_DEFAULT, COUNTERS_MAX_KEY, DEFAULT_JOB_ACL_MODIFY_JOB, DEFAULT_JOB_ACL_VIEW_JOB, DEFAULT_JOB_AM_ACCESS_DISABLED, DEFAULT_LOG_LEVEL, DEFAULT_MAP_CPU_VCORES, DEFAULT_MAP_MEMORY_MB, DEFAULT_MAPRED_ADMIN_JAVA_OPTS, DEFAULT_MAPRED_ADMIN_USER_ENV, DEFAULT_MAPREDUCE_APPLICATION_CLASSPATH, DEFAULT_MAX_SHUFFLE_FETCH_RETRY_DELAY, DEFAULT_MR_AM_ADMIN_COMMAND_OPTS, DEFAULT_MR_AM_COMMAND_OPTS, DEFAULT_MR_AM_COMMIT_WINDOW_MS, DEFAULT_MR_AM_COMMITTER_CANCEL_TIMEOUT_MS, DEFAULT_MR_AM_CONTAINERLAUNCHER_THREAD_COUNT_LIMIT, DEFAULT_MR_AM_CPU_VCORES, DEFAULT_MR_AM_HISTORY_COMPLETE_EVENT_FLUSH_TIMEOUT_MS, DEFAULT_MR_AM_HISTORY_JOB_COMPLETE_UNFLUSHED_MULTIPLIER, DEFAULT_MR_AM_HISTORY_MAX_UNFLUSHED_COMPLETE_EVENTS, DEFAULT_MR_AM_HISTORY_USE_BATCHED_FLUSH_QUEUE_SIZE_THRESHOLD, DEFAULT_MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERCENT, DEFAULT_MR_AM_JOB_CLIENT_THREAD_COUNT, DEFAULT_MR_AM_JOB_REDUCE_PREEMPTION_LIMIT, DEFAULT_MR_AM_JOB_REDUCE_RAMP_UP_LIMIT, DEFAULT_MR_AM_LOG_LEVEL, DEFAULT_MR_AM_NUM_PROGRESS_SPLITS, DEFAULT_MR_AM_STAGING_DIR, DEFAULT_MR_AM_TASK_ESTIMATOR_SMOOTH_LAMBDA_MS, DEFAULT_MR_AM_TASK_LISTENER_THREAD_COUNT, DEFAULT_MR_AM_TO_RM_HEARTBEAT_INTERVAL_MS, DEFAULT_MR_AM_TO_RM_WAIT_INTERVAL_MS, DEFAULT_MR_AM_VMEM_MB, DEFAULT_MR_CLIENT_MAX_RETRIES, DEFAULT_MR_CLIENT_TO_AM_IPC_MAX_RETRIES, DEFAULT_REDUCE_CPU_VCORES, DEFAULT_REDUCE_MEMORY_MB, DEFAULT_SHELL, DEFAULT_SPLIT_METAINFO_MAXSIZE, GROUP_COMPARATOR_CLASS, HADOOP_WORK_DIR, ID, INDEX_CACHE_MEMORY_LIMIT, INPUT_FORMAT_CLASS_ATTR, IO_SORT_FACTOR, IO_SORT_MB, JAR, JAR_UNPACK_PATTERN, JOB_ACL_MODIFY_JOB, JOB_ACL_VIEW_JOB, JOB_AM_ACCESS_DISABLED, JOB_CANCEL_DELEGATION_TOKEN, JOB_CONF_FILE, JOB_JAR, JOB_JOBTRACKER_ID, JOB_LOCAL_DIR, JOB_NAME, JOB_NAMENODES, JOB_SPLIT, JOB_SPLIT_METAINFO, JOB_SUBMIT_DIR, JOB_SUBMITHOST, JOB_SUBMITHOSTADDR, JOB_UBERTASK_ENABLE, JOB_UBERTASK_MAXBYTES, JOB_UBERTASK_MAXMAPS, JOB_UBERTASK_MAXREDUCES, JVM_NUMTASKS_TORUN, KEY_COMPARATOR, MAP_CLASS_ATTR, MAP_COMBINE_MIN_SPILLS, MAP_CPU_VCORES, MAP_DEBUG_SCRIPT, MAP_ENV, MAP_FAILURES_MAX_PERCENT, MAP_INPUT_FILE, MAP_INPUT_PATH, MAP_INPUT_START, MAP_JAVA_OPTS, MAP_LOG_LEVEL, MAP_MAX_ATTEMPTS, MAP_MEMORY_MB, MAP_OUTPUT_COLLECTOR_CLASS_ATTR, MAP_OUTPUT_COMPRESS, MAP_OUTPUT_COMPRESS_CODEC, MAP_OUTPUT_KEY_CLASS, MAP_OUTPUT_KEY_FIELD_SEPERATOR, MAP_OUTPUT_VALUE_CLASS, MAP_SKIP_INCR_PROC_COUNT, MAP_SKIP_MAX_RECORDS, MAP_SORT_SPILL_PERCENT, MAP_SPECULATIVE, MAPRED_ADMIN_USER_ENV, MAPRED_ADMIN_USER_SHELL, MAPRED_MAP_ADMIN_JAVA_OPTS, MAPRED_REDUCE_ADMIN_JAVA_OPTS, MAPREDUCE_APPLICATION_CLASSPATH, MAPREDUCE_JOB_CLASSLOADER, MAPREDUCE_JOB_CLASSLOADER_SYSTEM_CLASSES, MAPREDUCE_JOB_CREDENTIALS_BINARY, MAPREDUCE_JOB_DIR, MAPREDUCE_JOB_USER_CLASSPATH_FIRST, MAPREDUCE_V2_CHILD_CLASS, MAX_SHUFFLE_FETCH_RETRY_DELAY, MAX_TASK_FAILURES_PER_TRACKER, MR_AM_ADMIN_COMMAND_OPTS, MR_AM_ADMIN_USER_ENV, MR_AM_COMMAND_OPTS, MR_AM_COMMIT_WINDOW_MS, MR_AM_COMMITTER_CANCEL_TIMEOUT_MS, MR_AM_CONTAINERLAUNCHER_THREAD_COUNT_LIMIT, MR_AM_CPU_VCORES, MR_AM_CREATE_JH_INTERMEDIATE_BASE_DIR, MR_AM_ENV, MR_AM_HISTORY_COMPLETE_EVENT_FLUSH_TIMEOUT_MS, MR_AM_HISTORY_JOB_COMPLETE_UNFLUSHED_MULTIPLIER, MR_AM_HISTORY_MAX_UNFLUSHED_COMPLETE_EVENTS, MR_AM_HISTORY_USE_BATCHED_FLUSH_QUEUE_SIZE_THRESHOLD, MR_AM_IGNORE_BLACKLISTING_BLACKLISTED_NODE_PERECENT, MR_AM_JOB_CLIENT_PORT_RANGE, MR_AM_JOB_CLIENT_THREAD_COUNT, MR_AM_JOB_NODE_BLACKLISTING_ENABLE, MR_AM_JOB_RECOVERY_ENABLE, MR_AM_JOB_REDUCE_PREEMPTION_LIMIT, MR_AM_JOB_REDUCE_RAMPUP_UP_LIMIT, MR_AM_JOB_SPECULATOR, MR_AM_LOG_LEVEL, MR_AM_NUM_PROGRESS_SPLITS, MR_AM_PREFIX, MR_AM_SECURITY_SERVICE_AUTHORIZATION_CLIENT, MR_AM_SECURITY_SERVICE_AUTHORIZATION_TASK_UMBILICAL, MR_AM_STAGING_DIR, MR_AM_TASK_ESTIMATOR, MR_AM_TASK_ESTIMATOR_EXPONENTIAL_RATE_ENABLE, MR_AM_TASK_ESTIMATOR_SMOOTH_LAMBDA_MS, MR_AM_TASK_LISTENER_THREAD_COUNT, MR_AM_TO_RM_HEARTBEAT_INTERVAL_MS, MR_AM_TO_RM_WAIT_INTERVAL_MS, MR_AM_VMEM_MB, MR_CLIENT_MAX_RETRIES, MR_CLIENT_TO_AM_IPC_MAX_RETRIES, MR_JOB_END_NOTIFICATION_MAX_ATTEMPTS, MR_JOB_END_NOTIFICATION_MAX_RETRY_INTERVAL, MR_JOB_END_NOTIFICATION_PROXY, MR_JOB_END_NOTIFICATION_URL, MR_JOB_END_RETRY_ATTEMPTS, MR_JOB_END_RETRY_INTERVAL, MR_PREFIX, NUM_MAP_PROFILES, NUM_MAPS, NUM_REDUCE_PROFILES, NUM_REDUCES, OUTPUT, OUTPUT_FORMAT_CLASS_ATTR, OUTPUT_KEY_CLASS, OUTPUT_VALUE_CLASS, PARTITIONER_CLASS_ATTR, PRESERVE_FAILED_TASK_FILES, PRESERVE_FILES_PATTERN, PRIORITY, QUEUE_NAME, RECORDS_BEFORE_PROGRESS, REDUCE_CLASS_ATTR, REDUCE_CPU_VCORES, REDUCE_DEBUG_SCRIPT, REDUCE_ENV, REDUCE_FAILURES_MAXPERCENT, REDUCE_INPUT_BUFFER_PERCENT, REDUCE_JAVA_OPTS, REDUCE_LOG_LEVEL, REDUCE_MARKRESET_BUFFER_PERCENT, REDUCE_MARKRESET_BUFFER_SIZE, REDUCE_MAX_ATTEMPTS, REDUCE_MEMORY_MB, REDUCE_MEMORY_TOTAL_BYTES, REDUCE_MEMTOMEM_ENABLED, REDUCE_MEMTOMEM_THRESHOLD, REDUCE_MERGE_INMEM_THRESHOLD, REDUCE_SKIP_INCR_PROC_COUNT, REDUCE_SKIP_MAXGROUPS, REDUCE_SPECULATIVE, SETUP_CLEANUP_NEEDED, SHUFFLE_CONNECT_TIMEOUT, SHUFFLE_FETCH_FAILURES, SHUFFLE_INPUT_BUFFER_PERCENT, SHUFFLE_MEMORY_LIMIT_PERCENT, SHUFFLE_MERGE_PERCENT, SHUFFLE_NOTIFY_READERROR, SHUFFLE_PARALLEL_COPIES, SHUFFLE_READ_TIMEOUT, SKIP_OUTDIR, SKIP_RECORDS, SKIP_START_ATTEMPTS, SPECULATIVE_SLOWNODE_THRESHOLD, SPECULATIVE_SLOWTASK_THRESHOLD, SPECULATIVECAP, SPLIT_FILE, SPLIT_METAINFO_MAXSIZE, STDERR_LOGFILE_ENV, STDOUT_LOGFILE_ENV, TASK_ATTEMPT_ID, TASK_CLEANUP_NEEDED, TASK_DEBUGOUT_LINES, TASK_ID, TASK_ISMAP, TASK_LOG_DIR, TASK_LOG_SIZE, TASK_MAP_PROFILE_PARAMS, TASK_OUTPUT_DIR, TASK_PARTITION, TASK_PROFILE, TASK_PROFILE_PARAMS, TASK_REDUCE_PROFILE_PARAMS, TASK_TEMP_DIR, TASK_TIMEOUT, TASK_TIMEOUT_CHECK_INTERVAL_MS, TASK_USERLOG_LIMIT, USER_LOG_RETAIN_HOURS, USER_NAME, WORKDIR, WORKFLOW_ADJACENCY_PREFIX_PATTERN, WORKFLOW_ADJACENCY_PREFIX_STRING, WORKFLOW_ID, WORKFLOW_NAME, WORKFLOW_NODE_NAME, WORKING_DIR |
Method Summary |
org.apache.hadoop.fs.Path[] |
getArchiveClassPaths()
Get the archive entries in classpath as an array of Path |
String[] |
getArchiveTimestamps()
Get the timestamps of the archives. |
URI[] |
getCacheArchives()
Get cache archives set in the Configuration |
URI[] |
getCacheFiles()
Get cache files set in the Configuration |
Class<? extends Reducer<?,?,?,?>> |
getCombinerClass()
Get the combiner class for the job. |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Return the configuration for the job. |
Counter |
getCounter(Enum<?> counterName)
Get the Counter for the given counterName . |
Counter |
getCounter(String groupName,
String counterName)
Get the Counter for the given groupName and
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 |
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. |
Class<? extends InputFormat<?,?>> |
getInputFormatClass()
Get the InputFormat class for the job. |
InputSplit |
getInputSplit()
Get the input split for this map. |
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. |
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 |
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 |
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. |
OutputCommitter |
getOutputCommitter()
Get the OutputCommitter for the task-attempt. |
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. |
boolean |
getProfileEnabled()
Get whether the task profiling is enabled. |
String |
getProfileParams()
Get the profiler configuration arguments. |
org.apache.hadoop.conf.Configuration.IntegerRanges |
getProfileTaskRange(boolean isMap)
Get the range of maps or reduces to profile. |
float |
getProgress()
The current progress of the task attempt. |
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. |
String |
getStatus()
Get the last set status message. |
boolean |
getSymlink()
Originally intended to check if symlinks should be used, but currently
symlinks cannot be disabled. |
TaskAttemptID |
getTaskAttemptID()
Get the unique name for this task attempt. |
boolean |
getTaskCleanupNeeded()
Get whether task-cleanup is needed for the job |
String |
getUser()
Get the reported username for this job. |
org.apache.hadoop.fs.Path |
getWorkingDirectory()
Get the current working directory for the default file system. |
boolean |
nextKeyValue()
Advance to the next key, value pair, returning null if at end. |
void |
progress()
|
void |
setStatus(String msg)
Set the current status of the task to the given string. |
void |
write(KEYOUT key,
VALUEOUT value)
Generate an output key/value pair. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mapContext
protected MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> mapContext
WrappedMapper.Context
public WrappedMapper.Context(MapContext<KEYIN,VALUEIN,KEYOUT,VALUEOUT> mapContext)
getInputSplit
public InputSplit getInputSplit()
- Get the input split for this map.
getCurrentKey
public KEYIN getCurrentKey()
throws IOException,
InterruptedException
- Description copied from interface:
TaskInputOutputContext
- Get the current key.
- Returns:
- the current key object or null if there isn't one
- Throws:
IOException
InterruptedException
getCurrentValue
public VALUEIN getCurrentValue()
throws IOException,
InterruptedException
- Description copied from interface:
TaskInputOutputContext
- Get the current value.
- Returns:
- the value object that was read into
- Throws:
IOException
InterruptedException
nextKeyValue
public boolean nextKeyValue()
throws IOException,
InterruptedException
- Description copied from interface:
TaskInputOutputContext
- Advance to the next key, value pair, returning null if at end.
- Returns:
- the key object that was read into, or null if no more
- Throws:
IOException
InterruptedException
getCounter
public Counter getCounter(Enum<?> counterName)
- Description copied from interface:
TaskAttemptContext
- Get the
Counter
for the given counterName
.
- Parameters:
counterName
- counter name
- Returns:
- the
Counter
for the given counterName
getCounter
public Counter getCounter(String groupName,
String counterName)
- Description copied from interface:
TaskAttemptContext
- Get the
Counter
for the given groupName
and
counterName
.
counterName
- counter name
- Returns:
- the
Counter
for the given groupName
and
counterName
getOutputCommitter
public OutputCommitter getOutputCommitter()
- Description copied from interface:
TaskInputOutputContext
- Get the
OutputCommitter
for the task-attempt.
- Returns:
- the
OutputCommitter
for the task-attempt
write
public void write(KEYOUT key,
VALUEOUT value)
throws IOException,
InterruptedException
- Description copied from interface:
TaskInputOutputContext
- Generate an output key/value pair.
- Throws:
IOException
InterruptedException
getStatus
public String getStatus()
- Description copied from interface:
TaskAttemptContext
- Get the last set status message.
- Returns:
- the current status message
getTaskAttemptID
public TaskAttemptID getTaskAttemptID()
- Description copied from interface:
TaskAttemptContext
- Get the unique name for this task attempt.
setStatus
public void setStatus(String msg)
- Description copied from interface:
TaskAttemptContext
- Set the current status of the task to the given string.
getArchiveClassPaths
public org.apache.hadoop.fs.Path[] getArchiveClassPaths()
- Description copied from interface:
JobContext
- Get the archive entries in classpath as an array of Path
getArchiveTimestamps
public String[] getArchiveTimestamps()
- Description copied from interface:
JobContext
- Get the timestamps of the archives. Used by internal
DistributedCache and MapReduce code.
- Returns:
- a string array of timestamps
getCacheArchives
public URI[] getCacheArchives()
throws IOException
- Description copied from interface:
JobContext
- Get cache archives set in the Configuration
- Returns:
- A URI array of the caches set in the Configuration
- Throws:
IOException
getCacheFiles
public URI[] getCacheFiles()
throws IOException
- Description copied from interface:
JobContext
- Get cache files set in the Configuration
- Returns:
- A URI array of the files set in the Configuration
- Throws:
IOException
getCombinerClass
public Class<? extends Reducer<?,?,?,?>> getCombinerClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the combiner class for the job.
- Returns:
- the combiner class for the job.
- Throws:
ClassNotFoundException
getConfiguration
public org.apache.hadoop.conf.Configuration getConfiguration()
- Description copied from interface:
JobContext
- Return the configuration for the job.
- Returns:
- the shared configuration object
getFileClassPaths
public org.apache.hadoop.fs.Path[] getFileClassPaths()
- Description copied from interface:
JobContext
- Get the file entries in classpath as an array of Path
getFileTimestamps
public String[] getFileTimestamps()
- Description copied from interface:
JobContext
- Get the timestamps of the files. Used by internal
DistributedCache and MapReduce code.
- Returns:
- a string array of timestamps
getGroupingComparator
public org.apache.hadoop.io.RawComparator<?> getGroupingComparator()
- Description copied from interface:
JobContext
- Get the user defined
RawComparator
comparator for
grouping keys of inputs to the reduce.
- Returns:
- comparator set by the user for grouping values.
- See Also:
for details.
getInputFormatClass
public Class<? extends InputFormat<?,?>> getInputFormatClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the
InputFormat
class for the job.
- Returns:
- the
InputFormat
class for the job.
- Throws:
ClassNotFoundException
getJar
public String getJar()
- Description copied from interface:
JobContext
- Get the pathname of the job's jar.
- Returns:
- the pathname
getJobID
public JobID getJobID()
- Description copied from interface:
JobContext
- Get the unique ID for the job.
- Returns:
- the object with the job id
getJobName
public String getJobName()
- Description copied from interface:
JobContext
- Get the user-specified job name. This is only used to identify the
job to the user.
- Returns:
- the job's name, defaulting to "".
getJobSetupCleanupNeeded
public boolean getJobSetupCleanupNeeded()
- Description copied from interface:
JobContext
- Get whether job-setup and job-cleanup is needed for the job
- Returns:
- boolean
getTaskCleanupNeeded
public boolean getTaskCleanupNeeded()
- Description copied from interface:
JobContext
- Get whether task-cleanup is needed for the job
- Returns:
- boolean
getLocalCacheArchives
public org.apache.hadoop.fs.Path[] getLocalCacheArchives()
throws IOException
- Description copied from interface:
JobContext
- Return the path array of the localized caches
- Returns:
- A path array of localized caches
- Throws:
IOException
getLocalCacheFiles
public org.apache.hadoop.fs.Path[] getLocalCacheFiles()
throws IOException
- Description copied from interface:
JobContext
- Return the path array of the localized files
- Returns:
- A path array of localized files
- Throws:
IOException
getMapOutputKeyClass
public Class<?> getMapOutputKeyClass()
- Description copied from interface:
JobContext
- Get the key class for the map output data. If it is not set, use the
(final) output key class. This allows the map output key class to be
different than the final output key class.
- Returns:
- the map output key class.
getMapOutputValueClass
public Class<?> getMapOutputValueClass()
- Description copied from interface:
JobContext
- Get the value class for the map output data. If it is not set, use the
(final) output value class This allows the map output value class to be
different than the final output value class.
- Returns:
- the map output value class.
getMapperClass
public Class<? extends Mapper<?,?,?,?>> getMapperClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the
Mapper
class for the job.
- Returns:
- the
Mapper
class for the job.
- Throws:
ClassNotFoundException
getMaxMapAttempts
public int getMaxMapAttempts()
- Description copied from interface:
JobContext
- 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. If this property is not already set, the default is 4 attempts.
- Returns:
- the max number of attempts per map task.
getMaxReduceAttempts
public int getMaxReduceAttempts()
- Description copied from interface:
JobContext
- 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. If this property is not already set, the default is 4 attempts.
- Returns:
- the max number of attempts per reduce task.
getNumReduceTasks
public int getNumReduceTasks()
- Description copied from interface:
JobContext
- Get configured the number of reduce tasks for this job. Defaults to
1
.
- Returns:
- the number of reduce tasks for this job.
getOutputFormatClass
public Class<? extends OutputFormat<?,?>> getOutputFormatClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the
OutputFormat
class for the job.
- Returns:
- the
OutputFormat
class for the job.
- Throws:
ClassNotFoundException
getOutputKeyClass
public Class<?> getOutputKeyClass()
- Description copied from interface:
JobContext
- Get the key class for the job output data.
- Returns:
- the key class for the job output data.
getOutputValueClass
public Class<?> getOutputValueClass()
- Description copied from interface:
JobContext
- Get the value class for job outputs.
- Returns:
- the value class for job outputs.
getPartitionerClass
public Class<? extends Partitioner<?,?>> getPartitionerClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the
Partitioner
class for the job.
- Returns:
- the
Partitioner
class for the job.
- Throws:
ClassNotFoundException
getReducerClass
public Class<? extends Reducer<?,?,?,?>> getReducerClass()
throws ClassNotFoundException
- Description copied from interface:
JobContext
- Get the
Reducer
class for the job.
- Returns:
- the
Reducer
class for the job.
- Throws:
ClassNotFoundException
getSortComparator
public org.apache.hadoop.io.RawComparator<?> getSortComparator()
- Description copied from interface:
JobContext
- Get the
RawComparator
comparator used to compare keys.
- Returns:
- the
RawComparator
comparator used to compare keys.
getSymlink
public boolean getSymlink()
- Description copied from interface:
JobContext
- Originally intended to check if symlinks should be used, but currently
symlinks cannot be disabled.
- Returns:
- true
getWorkingDirectory
public org.apache.hadoop.fs.Path getWorkingDirectory()
throws IOException
- Description copied from interface:
JobContext
- Get the current working directory for the default file system.
- Returns:
- the directory name.
- Throws:
IOException
progress
public void progress()
getProfileEnabled
public boolean getProfileEnabled()
- Description copied from interface:
JobContext
- Get whether the task profiling is enabled.
- Returns:
- true if some tasks will be profiled
getProfileParams
public String getProfileParams()
- Description copied from interface:
JobContext
- Get the profiler configuration arguments.
The default value for this property is
"-agentlib:hprof=cpu=samples,heap=sites,force=n,thread=y,verbose=n,file=%s"
- Returns:
- the parameters to pass to the task child to configure profiling
getProfileTaskRange
public org.apache.hadoop.conf.Configuration.IntegerRanges getProfileTaskRange(boolean isMap)
- Description copied from interface:
JobContext
- Get the range of maps or reduces to profile.
- Parameters:
isMap
- is the task a map?
- Returns:
- the task ranges
getUser
public String getUser()
- Description copied from interface:
JobContext
- Get the reported username for this job.
- Returns:
- the username
getCredentials
public org.apache.hadoop.security.Credentials getCredentials()
- Description copied from interface:
JobContext
- Get credentials for the job.
- Returns:
- credentials for the job
getProgress
public float getProgress()
- Description copied from interface:
TaskAttemptContext
- The current progress of the task attempt.
- Returns:
- a number between 0.0 and 1.0 (inclusive) indicating the attempt's
progress.
Copyright © 2013 Apache Software Foundation. All Rights Reserved.