public class CkpMetadata extends Object implements Serializable
Each time the driver starts a new instant, it writes a commit message into the metadata, the write tasks then consume the message and unblock the data flushing.
Why we use the DFS based message queue instead of sending
the OperatorEvent ?
The write task handles the operator event using the main mailbox executor which has the lowest priority for mails,
it is also used to process the inputs. When the write task blocks and waits for the operator event to ack the valid instant to write,
it actually blocks all the subsequent events in the mailbox, the operator event would never be consumed then it causes deadlock.
The checkpoint metadata is also more lightweight than the active timeline.
NOTE: should be removed in the future if we have good manner to handle the async notifications from driver.
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_RETAIN_CKP_NUM |
protected org.apache.hadoop.fs.Path |
path |
| Modifier and Type | Method and Description |
|---|---|
void |
abortInstant(String instant)
Add an aborted checkpoint message.
|
void |
bootstrap(HoodieTableMetaClient metaClient)
Initialize the message bus, would clean all the messages and publish the last pending instant.
|
protected static String |
ckpMetaPath(String basePath) |
void |
close() |
void |
commitInstant(String instant)
Add a checkpoint commit message.
|
static CkpMetadata |
getInstance(org.apache.flink.configuration.Configuration config) |
static CkpMetadata |
getInstance(org.apache.hadoop.fs.FileSystem fs,
String basePath) |
List<CkpMessage> |
getMessages() |
boolean |
isAborted(String instant) |
String |
lastPendingInstant() |
void |
startInstant(String instant) |
protected static final int MAX_RETAIN_CKP_NUM
protected final org.apache.hadoop.fs.Path path
public void close()
public void bootstrap(HoodieTableMetaClient metaClient) throws IOException
This expects to be called by the driver.
IOExceptionpublic void startInstant(String instant)
public void commitInstant(String instant)
instant - The committed instantpublic void abortInstant(String instant)
public List<CkpMessage> getMessages()
public boolean isAborted(String instant)
public static CkpMetadata getInstance(org.apache.flink.configuration.Configuration config)
public static CkpMetadata getInstance(org.apache.hadoop.fs.FileSystem fs, String basePath)
Copyright © 2022 The Apache Software Foundation. All rights reserved.