@NotThreadSafe public class HoodieHeartbeatClient extends Object implements AutoCloseable, Serializable
| Constructor and Description |
|---|
HoodieHeartbeatClient(HoodieStorage storage,
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(HoodieStorage storage,
String basePath,
String instantTime) |
boolean |
isHeartbeatExpired(String instantTime) |
void |
start(String instantTime)
Start a new heartbeat for the specified instant.
|
org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat |
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 HoodieHeartbeatClient(HoodieStorage storage, String basePath, Long heartbeatIntervalInMs, Integer numTolerableHeartbeatMisses)
public void start(String instantTime)
instantTime - The instant time for the heartbeat.public org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat stop(String instantTime) throws HoodieException
instantTime - The instant time for the heartbeat.HoodieExceptionpublic void stopHeartbeatTimers()
throws HoodieException
HoodieExceptionpublic static Boolean heartbeatExists(HoodieStorage storage, 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 © 2024 The Apache Software Foundation. All rights reserved.