Class Checkpoint
-
- All Implemented Interfaces:
-
java.io.Externalizable
,java.io.Serializable
,java.lang.Comparable
,org.apache.avro.generic.GenericContainer
,org.apache.avro.generic.GenericRecord
,org.apache.avro.generic.IndexedRecord
,org.apache.avro.specific.SpecificRecord
public class Checkpoint extends SpecificRecordBase implements SpecificRecord
Represents the current state of a flow, plus information required to operate the flow engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
Checkpoint.Builder
RecordBuilder for Checkpoint instances.
-
Field Summary
Fields Modifier and Type Field Description public final static Schema
SCHEMA$
public String
flowId
public int
initialPlatformVersion
public PipelineState
pipelineState
public FlowState
flowState
public String
flowMetricsState
public KeyValuePairList
customState
-
Constructor Summary
Constructors Constructor Description Checkpoint()
Default constructor. Checkpoint(String flowId, Integer initialPlatformVersion, PipelineState pipelineState, FlowState flowState, String flowMetricsState, KeyValuePairList customState)
All-args constructor.
-
Method Summary
Modifier and Type Method Description String
getFlowId()
Gets the value of the 'flowId' field. void
setFlowId(String value)
Sets the value of the 'flowId' field. int
getInitialPlatformVersion()
Gets the value of the 'initialPlatformVersion' field. void
setInitialPlatformVersion(int value)
Sets the value of the 'initialPlatformVersion' field. PipelineState
getPipelineState()
Gets the value of the 'pipelineState' field. void
setPipelineState(PipelineState value)
Sets the value of the 'pipelineState' field. FlowState
getFlowState()
Gets the value of the 'flowState' field. void
setFlowState(FlowState value)
Sets the value of the 'flowState' field. String
getFlowMetricsState()
Gets the value of the 'flowMetricsState' field. void
setFlowMetricsState(String value)
Sets the value of the 'flowMetricsState' field. KeyValuePairList
getCustomState()
Gets the value of the 'customState' field. void
setCustomState(KeyValuePairList value)
Sets the value of the 'customState' field. static Schema
getClassSchema()
static BinaryMessageEncoder<Checkpoint>
getEncoder()
Return the BinaryMessageEncoder instance used by this class. static BinaryMessageDecoder<Checkpoint>
getDecoder()
Return the BinaryMessageDecoder instance used by this class. static BinaryMessageDecoder<Checkpoint>
createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore. ByteBuffer
toByteBuffer()
Serializes this Checkpoint to a ByteBuffer. static Checkpoint
fromByteBuffer(ByteBuffer b)
Deserializes a Checkpoint from a ByteBuffer. SpecificData
getSpecificData()
Schema
getSchema()
Object
get(int field$)
void
put(int field$, Object value$)
static Checkpoint.Builder
newBuilder()
Creates a new Checkpoint RecordBuilder. static Checkpoint.Builder
newBuilder(Checkpoint.Builder other)
Creates a new Checkpoint RecordBuilder by copying an existing Builder. static Checkpoint.Builder
newBuilder(Checkpoint other)
Creates a new Checkpoint RecordBuilder by copying an existing Checkpoint instance. void
writeExternal(ObjectOutput out)
void
readExternal(ObjectInput in)
-
Methods inherited from class org.apache.avro.specific.SpecificRecordBase
compareTo, customDecode, customEncode, equals, getConversion, hashCode, toString
-
Methods inherited from class org.apache.avro.generic.GenericRecord
hasField
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
Checkpoint
Checkpoint()
Default constructor.
-
Checkpoint
Checkpoint(String flowId, Integer initialPlatformVersion, PipelineState pipelineState, FlowState flowState, String flowMetricsState, KeyValuePairList customState)
All-args constructor.- Parameters:
flowId
- Internal, globally unique key for a flow instance.initialPlatformVersion
- The platform version at the time the flow was started.pipelineState
- State required by the pipeline, e.g.flowState
- Current flow execution state.flowMetricsState
- Internal storage for recording flow metricscustomState
- Internal storage for pipeline extensions.
-
-
Method Detail
-
setFlowId
void setFlowId(String value)
Sets the value of the 'flowId' field. Internal, globally unique key for a flow instance.
- Parameters:
value
- the value to set.
-
getInitialPlatformVersion
int getInitialPlatformVersion()
Gets the value of the 'initialPlatformVersion' field.
-
setInitialPlatformVersion
void setInitialPlatformVersion(int value)
Sets the value of the 'initialPlatformVersion' field. The platform version at the time the flow was started.
- Parameters:
value
- the value to set.
-
getPipelineState
PipelineState getPipelineState()
Gets the value of the 'pipelineState' field.
-
setPipelineState
void setPipelineState(PipelineState value)
Sets the value of the 'pipelineState' field. State required by the pipeline, e.g. to support retries.
- Parameters:
value
- the value to set.
-
getFlowState
FlowState getFlowState()
Gets the value of the 'flowState' field.
-
setFlowState
void setFlowState(FlowState value)
Sets the value of the 'flowState' field. Current flow execution state. Null if the flow has not yet been started, for example in the face of a retry-able error.
- Parameters:
value
- the value to set.
-
getFlowMetricsState
String getFlowMetricsState()
Gets the value of the 'flowMetricsState' field.
-
setFlowMetricsState
void setFlowMetricsState(String value)
Sets the value of the 'flowMetricsState' field. Internal storage for recording flow metrics
- Parameters:
value
- the value to set.
-
getCustomState
KeyValuePairList getCustomState()
Gets the value of the 'customState' field.
-
setCustomState
void setCustomState(KeyValuePairList value)
Sets the value of the 'customState' field. Internal storage for pipeline extensions.
- Parameters:
value
- the value to set.
-
getClassSchema
static Schema getClassSchema()
-
getEncoder
static BinaryMessageEncoder<Checkpoint> getEncoder()
Return the BinaryMessageEncoder instance used by this class.
-
getDecoder
static BinaryMessageDecoder<Checkpoint> getDecoder()
Return the BinaryMessageDecoder instance used by this class.
-
createDecoder
static BinaryMessageDecoder<Checkpoint> createDecoder(SchemaStore resolver)
Create a new BinaryMessageDecoder instance for this class that uses the specified SchemaStore.
- Parameters:
resolver
- a SchemaStore used to find schemas by fingerprint
-
toByteBuffer
ByteBuffer toByteBuffer()
Serializes this Checkpoint to a ByteBuffer.
-
fromByteBuffer
static Checkpoint fromByteBuffer(ByteBuffer b)
Deserializes a Checkpoint from a ByteBuffer.
- Parameters:
b
- a byte buffer holding serialized data for an instance of this class
-
getSpecificData
SpecificData getSpecificData()
-
getSchema
Schema getSchema()
-
newBuilder
static Checkpoint.Builder newBuilder()
Creates a new Checkpoint RecordBuilder.
-
newBuilder
static Checkpoint.Builder newBuilder(Checkpoint.Builder other)
Creates a new Checkpoint RecordBuilder by copying an existing Builder.
- Parameters:
other
- The existing builder to copy.
-
newBuilder
static Checkpoint.Builder newBuilder(Checkpoint other)
Creates a new Checkpoint RecordBuilder by copying an existing Checkpoint instance.
- Parameters:
other
- The existing instance to copy.
-
writeExternal
void writeExternal(ObjectOutput out)
-
readExternal
void readExternal(ObjectInput in)
-
-
-
-