@ThreadSafe public final class ClientMasterSync extends Object implements HeartbeatExecutor
MetricsMasterClient
.
If the task fails to heartbeat to the master, it will destroy its old master client and recreate
it before retrying.Constructor and Description |
---|
ClientMasterSync(MetricsMasterClient masterClient,
FileSystemContext context)
Constructs a new
ClientMasterSync . |
Modifier and Type | Method and Description |
---|---|
void |
close()
Cleans up any resources used by the heartbeat executor.
|
void |
heartbeat()
Implements the heartbeat logic.
|
public ClientMasterSync(MetricsMasterClient masterClient, FileSystemContext context)
ClientMasterSync
.masterClient
- the master clientcontext
- the filesystem contextpublic void heartbeat() throws InterruptedException
HeartbeatExecutor
heartbeat
in interface HeartbeatExecutor
InterruptedException
- if the thread is interruptedpublic void close()
HeartbeatExecutor
close
in interface HeartbeatExecutor
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2023. All Rights Reserved.