@NotThreadSafe public class HoodieHeartbeatClient extends Object implements AutoCloseable, Serializable
| Constructor and Description |
|---|
HoodieHeartbeatClient(org.apache.hadoop.fs.FileSystem fs,
String basePath,
Long heartbeatIntervalInMs,
Integer numTolerableHeartbeatMisses) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat |
getHeartbeat(String instantTime) |
String |
getHeartbeatFolderPath() |
static Boolean |
heartbeatExists(org.apache.hadoop.fs.FileSystem fs,
String basePath,
String instantTime) |
boolean |
isHeartbeatExpired(String instantTime) |
void |
start(String instantTime)
Start a new heartbeat for the specified instant.
|
void |
stop(String instantTime)
Stops the heartbeat and deletes the heartbeat file for the specified instant.
|
void |
stopHeartbeatTimers()
Stops all timers of heartbeats started via this instance of the client.
|
public void start(String instantTime)
instantTime - The instant time for the heartbeat.public void stop(String instantTime) throws HoodieException
instantTime - The instant time for the heartbeat.HoodieExceptionpublic void stopHeartbeatTimers()
throws HoodieException
HoodieExceptionpublic static Boolean heartbeatExists(org.apache.hadoop.fs.FileSystem fs, String basePath, String instantTime) throws IOException
IOExceptionpublic boolean isHeartbeatExpired(String instantTime) throws IOException
IOExceptionpublic String getHeartbeatFolderPath()
public org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat getHeartbeat(String instantTime)
public void close()
close in interface AutoCloseableCopyright © 2023 The Apache Software Foundation. All rights reserved.