@ThreadSafe public class MetricsHeartbeatContext extends Object
addHeartbeat(ClientContext, MasterInquireClient)with the necessary arguments. For each separate set of connection details, a new instance of this class is created. As FileSystemContexts are closed, they remove themselves from the internal metrics heartbeat. When a context reaches 0 tracked contexts it will automatically close and remove itself from the internal MASTER_METRICS_HEARTBEAT map. When the final FileSystemContext closes and removes its heartbeat from metrics it will also shutdown and close the executor service until a new
|Modifier and Type||Method and Description|
Sets up a new metrics heartbeat with the given client information.
Removes an application from the metrics heartbeat.
public static void addHeartbeat(ClientContext ctx, MasterInquireClient inquireClient)
ctx- The application's client context
inquireClient- the master inquire client used to connect to the master
public static void removeHeartbeat(ClientContext ctx)
ctx- The client context used to register the heartbeat
Copyright © 2021. All Rights Reserved.