KEYOUT
- output key typeVALUEOUT
- output value type@Beta public interface MapReduceTaskContext<KEYOUT,VALUEOUT> extends SchedulableProgramContext, RuntimeContext, DatasetContext, ServiceDiscoverer, PluginContext, TaskLocalizationContext, SecureStore
Modifier and Type | Method and Description |
---|---|
<T> T |
getHadoopContext()
Returns the Hadoop context object for the task.
|
InputContext |
getInputContext()
Returns an
InputContext of the input configured for this task. |
long |
getLogicalStartTime()
Returns the logical start time of this MapReduce job.
|
MapReduceSpecification |
getSpecification() |
WorkflowInfo |
getWorkflowInfo() |
WorkflowToken |
getWorkflowToken() |
void |
write(KEYOUT key,
VALUEOUT value)
Write key and value to the Hadoop context.
|
<K,V> void |
write(String namedOutput,
K key,
V value)
Write key and value to the named output Dataset.
|
getTriggeringScheduleInfo
getAdmin, getApplicationSpecification, getClusterName, getDataTracer, getNamespace, getRunId, getRuntimeArguments
discardDataset, getDataset, getDataset, getDataset, getDataset, releaseDataset
getServiceURL, getServiceURL, getServiceURL, openConnection
getPluginProperties, getPluginProperties, loadPluginClass, newPluginInstance, newPluginInstance
isFeatureEnabled
getAllLocalFiles, getLocalFile
get, list
<K,V> void write(String namedOutput, K key, V value) throws IOException, InterruptedException
write(Object, Object)
must be used, or the
data may not be written correctly.namedOutput
- the name of the output Datasetkey
- the keyvalue
- the valueIOException
InterruptedException
void write(KEYOUT key, VALUEOUT value) throws IOException, InterruptedException
write(String, Object, Object)
must be used instead.key
- the keyvalue
- the valueIOException
InterruptedException
MapReduceSpecification getSpecification()
MapReduce
job instance.long getLogicalStartTime()
<T> T getHadoopContext()
@Nullable WorkflowToken getWorkflowToken()
WorkflowToken
associated with the current Workflow
,
if the MapReduce
program is executed as a part of the Workflow; returns null
otherwise.@Nullable WorkflowInfo getWorkflowInfo()
InputContext getInputContext()
InputContext
of the input configured for this task. The returned object will be a
PartitionedFileSetInputContext
if the input for this task was configured from the PartitionedFileSet APIs.
Returns null, if this task is a Reducer or no inputs were configured through CDAP APIs.Copyright © 2022 Cask Data, Inc. Licensed under the Apache License, Version 2.0.