@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() |
List<String> |
getAllExistingHeartbeatInstants() |
org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat |
getHeartbeat(String instantTime) |
String |
getHeartbeatFolderPath() |
static Long |
getLastHeartbeatTime(org.apache.hadoop.fs.FileSystem fs,
String basePath,
String instantTime) |
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()
Stops all heartbeats started via this instance of the client.
|
void |
stop(String instantTime)
Stops the heartbeat for the specified instant.
|
public void start(String instantTime)
instantTime - public void stop(String instantTime) throws HoodieException
instantTime - HoodieExceptionpublic void stop()
throws HoodieException
HoodieExceptionpublic static Long getLastHeartbeatTime(org.apache.hadoop.fs.FileSystem fs, String basePath, String instantTime) throws IOException
IOExceptionpublic static Boolean heartbeatExists(org.apache.hadoop.fs.FileSystem fs, String basePath, String instantTime) throws IOException
IOExceptionpublic boolean isHeartbeatExpired(String instantTime) throws IOException
IOExceptionpublic List<String> getAllExistingHeartbeatInstants() throws IOException
IOExceptionpublic String getHeartbeatFolderPath()
public org.apache.hudi.client.heartbeat.HoodieHeartbeatClient.Heartbeat getHeartbeat(String instantTime)
public void close()
close in interface AutoCloseableCopyright © 2022 The Apache Software Foundation. All rights reserved.