public class ReadClusterState extends Object implements Runnable, AutoCloseable
Modifier and Type | Field and Description |
---|---|
static UniFunc<Slot> |
DEFAULT_ON_ERROR_TIMEOUT |
static UniFunc<Slot> |
DEFAULT_ON_WARN_TIMEOUT |
static UniFunc<Slot> |
THREAD_DUMP_ON_ERROR |
Constructor and Description |
---|
ReadClusterState(Supervisor supervisor) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected Map<String,VersionedData<Assignment>> |
getAssignmentsSnapshot(IStormClusterState stormClusterState,
List<String> topoIds,
Map<String,VersionedData<Assignment>> localAssignmentVersion,
Runnable callback) |
protected Map<String,List<ProfileRequest>> |
getProfileActions(IStormClusterState stormClusterState,
List<String> stormIds) |
protected Map<Integer,LocalAssignment> |
readAssignments(Map<String,VersionedData<Assignment>> assignmentsSnapshot) |
protected Map<Integer,LocalAssignment> |
readMyExecutors(String stormId,
String assignmentId,
Assignment assignment) |
void |
run() |
void |
shutdownAllWorkers(UniFunc<Slot> onWarnTimeout,
UniFunc<Slot> onErrorTimeout) |
public ReadClusterState(Supervisor supervisor) throws Exception
Exception
protected Map<String,VersionedData<Assignment>> getAssignmentsSnapshot(IStormClusterState stormClusterState, List<String> topoIds, Map<String,VersionedData<Assignment>> localAssignmentVersion, Runnable callback) throws Exception
Exception
protected Map<String,List<ProfileRequest>> getProfileActions(IStormClusterState stormClusterState, List<String> stormIds) throws Exception
Exception
protected Map<Integer,LocalAssignment> readAssignments(Map<String,VersionedData<Assignment>> assignmentsSnapshot)
protected Map<Integer,LocalAssignment> readMyExecutors(String stormId, String assignmentId, Assignment assignment)
public void shutdownAllWorkers(UniFunc<Slot> onWarnTimeout, UniFunc<Slot> onErrorTimeout)
public void close()
close
in interface AutoCloseable
Copyright © 2022 The Apache Software Foundation. All Rights Reserved.