public class MultiWorkUnit extends WorkUnit
WorkUnits so they can executed within a single task.
This class also extends the State object and thus it is possible to set and get
properties from this class. The setProp(String, Object) method will add the specified key, value pair to
this class as well as to every WorkUnit in workUnits. The WorkUnit.getProp(String) methods will
only return properties that have been explicitily set in this class (e.g. it will not retrieve properties from
workUnits.
| Constructor and Description |
|---|
MultiWorkUnit()
Deprecated.
Use
createEmpty() instead. |
| Modifier and Type | Method and Description |
|---|---|
void |
addWorkUnit(WorkUnit workUnit)
Add a single
WorkUnit. |
void |
addWorkUnits(Collection<WorkUnit> workUnits)
Add a collection of
WorkUnits. |
static MultiWorkUnit |
createEmpty()
Create a new empty
MultiWorkUnit instance. |
boolean |
equals(Object object) |
List<WorkUnit> |
getWorkUnits()
Get an immutable list of
WorkUnits wrapped by this MultiWorkUnit. |
int |
hashCode() |
void |
readFields(DataInput in) |
void |
setProp(String key,
Object value)
Set the specified key, value pair in this
MultiWorkUnit as well as in all the inner WorkUnits. |
void |
setPropExcludeInnerWorkUnits(String key,
Object value)
Set the specified key, value pair in this
MultiWorkUnit only, but do not propagate it to all the inner
WorkUnits. |
void |
write(DataOutput out) |
contains, copyOf, create, create, getExpectedHighWatermark, getExpectedHighWatermark, getExpectedHighWatermark, getExtract, getHighWaterMark, getLowWatermark, getLowWaterMark, getLowWatermark, getLowWatermark, getOutputFilePath, getProp, getProp, setHighWaterMark, setLowWaterMark, setWatermarkInterval, skipaddAll, addAll, addAllIfNotExist, addAllIfNotExist, appendToListProp, appendToSetProp, getId, getPropAsBoolean, getPropAsBoolean, getPropAsCaseInsensitiveSet, getPropAsCaseInsensitiveSet, getPropAsDouble, getPropAsDouble, getPropAsInt, getPropAsInt, getPropAsJsonArray, getPropAsList, getPropAsList, getPropAsLong, getPropAsLong, getPropAsSet, getPropAsSet, getPropAsShort, getPropAsShort, getPropAsShortWithRadix, getPropAsShortWithRadix, getProperties, getProperty, getProperty, getPropertyNames, overrideWith, overrideWith, removeProp, removePropsWithPrefix, setId, setProps, toString@Deprecated public MultiWorkUnit()
createEmpty() instead.public List<WorkUnit> getWorkUnits()
WorkUnits wrapped by this MultiWorkUnit.WorkUnits wrapped by this MultiWorkUnitpublic void addWorkUnit(WorkUnit workUnit)
WorkUnit.workUnit - WorkUnit to addpublic void addWorkUnits(Collection<WorkUnit> workUnits)
WorkUnits.workUnits - collection of WorkUnits to addpublic void setProp(String key, Object value)
MultiWorkUnit as well as in all the inner WorkUnits.
Set a property.
Both key and value are stored as strings.
setProp in class Statekey - property keyvalue - property valueState.setProp(java.lang.String, java.lang.Object)public void setPropExcludeInnerWorkUnits(String key, Object value)
MultiWorkUnit only, but do not propagate it to all the inner
WorkUnits.key - property keyvalue - property valuepublic void readFields(DataInput in) throws IOException
readFields in interface WritableShimreadFields in class WorkUnitIOExceptionpublic void write(DataOutput out) throws IOException
write in interface WritableShimwrite in class WorkUnitIOExceptionpublic static MultiWorkUnit createEmpty()
MultiWorkUnit instance.MultiWorkUnit instance