public class ImmutableWorkUnit extends WorkUnit
WorkUnit.| Constructor and Description |
|---|
ImmutableWorkUnit(WorkUnit workUnit) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAll(Properties properties)
Populates this instance with values of a
Properties instance. |
void |
addAll(State otherState)
Populates this instance with properties of the other instance.
|
void |
addAllIfNotExist(Properties properties)
Add properties in a
Properties instance that are not in the current instance. |
void |
addAllIfNotExist(State otherState)
Add properties in a
State instance that are not in the current instance. |
void |
appendToListProp(String key,
String value)
Appends the input value to a list property that can be retrieved with
State.getPropAsList(java.lang.String). |
void |
overrideWith(Properties properties)
Add properties in a
Properties instance that are in the current instance. |
void |
overrideWith(State otherState)
Add properties in a
State instance that are in the current instance. |
void |
readFields(DataInput in) |
void |
setHighWaterMark(long highWaterMark)
Deprecated.
|
void |
setId(String id)
Set the id used for state persistence and logging.
|
void |
setLowWaterMark(long lowWaterMark)
Deprecated.
|
void |
setProp(String key,
Object value)
Set a property.
|
contains, copyOf, create, create, createEmpty, equals, getExpectedHighWatermark, getExpectedHighWatermark, getExpectedHighWatermark, getExtract, getHighWaterMark, getLowWatermark, getLowWaterMark, getLowWatermark, getLowWatermark, getOutputFilePath, getProp, getProp, hashCode, setWatermarkInterval, skip, writeappendToSetProp, getId, getPropAsBoolean, getPropAsBoolean, getPropAsCaseInsensitiveSet, getPropAsCaseInsensitiveSet, getPropAsDouble, getPropAsDouble, getPropAsInt, getPropAsInt, getPropAsJsonArray, getPropAsList, getPropAsList, getPropAsLong, getPropAsLong, getPropAsSet, getPropAsSet, getPropAsShort, getPropAsShort, getPropAsShortWithRadix, getPropAsShortWithRadix, getProperties, getProperty, getProperty, getPropertyNames, removeProp, removePropsWithPrefix, setProps, toStringpublic ImmutableWorkUnit(WorkUnit workUnit)
public void setProp(String key, Object value)
StateBoth key and value are stored as strings.
@Deprecated public void setHighWaterMark(long highWaterMark)
WorkUnitWorkUnit.setHighWaterMark in class WorkUnithighWaterMark - high watermark@Deprecated public void setLowWaterMark(long lowWaterMark)
WorkUnitWorkUnit.setLowWaterMark in class WorkUnitlowWaterMark - low watermarkpublic void addAll(Properties properties)
StateProperties instance.addAll in class Stateproperties - a Properties instancepublic void addAll(State otherState)
Statepublic void addAllIfNotExist(Properties properties)
StateProperties instance that are not in the current instance.addAllIfNotExist in class Stateproperties - a Properties instancepublic void addAllIfNotExist(State otherState)
StateState instance that are not in the current instance.addAllIfNotExist in class StateotherState - a State instancepublic void overrideWith(Properties properties)
StateProperties instance that are in the current instance.overrideWith in class Stateproperties - a Properties instancepublic void overrideWith(State otherState)
StateState instance that are in the current instance.overrideWith in class StateotherState - a State instancepublic void setId(String id)
Statepublic void appendToListProp(String key, String value)
StateState.getPropAsList(java.lang.String).
List properties are internally stored as comma separated strings. Adding a value that contains commas (for
example "a,b,c") will essentially add multiple values to the property ("a", "b", and "c"). This is
similar to the way that Configuration works.
appendToListProp in class Statekey - property keyvalue - property value (if it includes commas, it will be split by the commas).public void readFields(DataInput in) throws IOException
readFields in interface WritableShimreadFields in class WorkUnitIOException