public class ClusterUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ASSIGNMENTS_ROOT |
static String |
ASSIGNMENTS_SUBTREE |
static String |
BACKPRESSURE_ROOT |
static String |
BACKPRESSURE_SUBTREE |
static String |
BLOBSTORE_MAX_KEY_SEQUENCE_NUMBER_ROOT |
static String |
BLOBSTORE_MAX_KEY_SEQUENCE_NUMBER_SUBTREE |
static String |
BLOBSTORE_ROOT |
static String |
BLOBSTORE_SUBTREE |
static String |
CREDENTIALS_ROOT |
static String |
CREDENTIALS_SUBTREE |
static String |
ERRORS_ROOT |
static String |
ERRORS_SUBTREE |
static String |
LOGCONFIG_ROOT |
static String |
LOGCONFIG_SUBTREE |
static String |
NIMBUSES_ROOT |
static String |
NIMBUSES_SUBTREE |
static String |
PROFILERCONFIG_ROOT |
static String |
PROFILERCONFIG_SUBTREE |
static String |
STORMS_ROOT |
static String |
STORMS_SUBTREE |
static String |
SUPERVISORS_ROOT |
static String |
SUPERVISORS_SUBTREE |
static String |
WORKERBEATS_ROOT |
static String |
WORKERBEATS_SUBTREE |
static String |
ZK_SEPERATOR |
Constructor and Description |
---|
ClusterUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
assignmentPath(String id) |
static String |
backpressurePath(String stormId,
String node,
Long port) |
static String |
backpressureStormRoot(String stormId) |
static String |
blobstoreMaxKeySequenceNumberPath(String key) |
static String |
blobstorePath(String key) |
static Map<ExecutorInfo,ExecutorBeat> |
convertExecutorBeats(List<ExecutorInfo> executors,
ClusterWorkerHeartbeat workerHeartbeat)
Ensures that we only return heartbeats for executors assigned to this worker
|
static String |
credentialsPath(String stormId) |
static String |
errorPath(String stormId,
String componentId) |
static String |
errorStormRoot(String stormId) |
static String |
lastErrorPath(String stormId,
String componentId) |
static String |
logConfigPath(String stormId) |
static <T> T |
maybeDeserialize(byte[] serialized,
Class<T> clazz) |
static IStateStorage |
mkStateStorage(Map config,
Map auth_conf,
List<org.apache.zookeeper.data.ACL> acls,
ClusterStateContext context) |
IStateStorage |
mkStateStorageImpl(Map config,
Map auth_conf,
List<org.apache.zookeeper.data.ACL> acls,
ClusterStateContext context) |
static IStormClusterState |
mkStormClusterState(Object StateStorage,
List<org.apache.zookeeper.data.ACL> acls,
ClusterStateContext context) |
IStormClusterState |
mkStormClusterStateImpl(Object stateStorage,
List<org.apache.zookeeper.data.ACL> acls,
ClusterStateContext context) |
static List<org.apache.zookeeper.data.ACL> |
mkTopoReadOnlyAcls(Map<String,Object> topoConf)
Get ZK ACLs for a topology to have read only access.
|
static List<org.apache.zookeeper.data.ACL> |
mkTopoReadWriteAcls(Map<String,Object> topoConf)
Get ZK ACLs for a topology to have read/write access.
|
static String |
nimbusPath(String id) |
static String |
profilerConfigPath(String stormId) |
static String |
profilerConfigPath(String stormId,
String host,
Long port,
ProfileAction requestType) |
static void |
resetInstance()
Resets the singleton instance to the default.
|
static void |
setInstance(ClusterUtils u)
Provide an instance of this class for delegates to use.
|
static String |
stormPath(String id) |
static String |
stringifyError(Throwable error) |
static String |
supervisorPath(String id) |
static String |
workerbeatPath(String stormId,
String node,
Long port) |
static String |
workerbeatStormRoot(String stormId) |
public static final String ZK_SEPERATOR
public static final String ASSIGNMENTS_ROOT
public static final String STORMS_ROOT
public static final String SUPERVISORS_ROOT
public static final String WORKERBEATS_ROOT
public static final String BACKPRESSURE_ROOT
public static final String ERRORS_ROOT
public static final String BLOBSTORE_ROOT
public static final String BLOBSTORE_MAX_KEY_SEQUENCE_NUMBER_ROOT
public static final String NIMBUSES_ROOT
public static final String CREDENTIALS_ROOT
public static final String LOGCONFIG_ROOT
public static final String PROFILERCONFIG_ROOT
public static final String ASSIGNMENTS_SUBTREE
public static final String STORMS_SUBTREE
public static final String SUPERVISORS_SUBTREE
public static final String WORKERBEATS_SUBTREE
public static final String BACKPRESSURE_SUBTREE
public static final String ERRORS_SUBTREE
public static final String BLOBSTORE_SUBTREE
public static final String BLOBSTORE_MAX_KEY_SEQUENCE_NUMBER_SUBTREE
public static final String NIMBUSES_SUBTREE
public static final String CREDENTIALS_SUBTREE
public static final String LOGCONFIG_SUBTREE
public static final String PROFILERCONFIG_SUBTREE
public static void setInstance(ClusterUtils u)
Provide an instance of this class for delegates to use. To mock out delegated methods, provide an instance of a subclass that overrides the implementation of the delegated method.
u
- a Cluster instancepublic static void resetInstance()
Resets the singleton instance to the default. This is helpful to reset the class to its original functionality when mocking is no longer desired.
public static List<org.apache.zookeeper.data.ACL> mkTopoReadWriteAcls(Map<String,Object> topoConf)
Get ZK ACLs for a topology to have read/write access.
topoConf
- the topology config.public static List<org.apache.zookeeper.data.ACL> mkTopoReadOnlyAcls(Map<String,Object> topoConf)
Get ZK ACLs for a topology to have read only access.
topoConf
- the topology config.public static String blobstoreMaxKeySequenceNumberPath(String key)
public static String profilerConfigPath(String stormId, String host, Long port, ProfileAction requestType)
public static <T> T maybeDeserialize(byte[] serialized, Class<T> clazz)
public static Map<ExecutorInfo,ExecutorBeat> convertExecutorBeats(List<ExecutorInfo> executors, ClusterWorkerHeartbeat workerHeartbeat)
Ensures that we only return heartbeats for executors assigned to this worker
executors
- workerHeartbeat
- public IStormClusterState mkStormClusterStateImpl(Object stateStorage, List<org.apache.zookeeper.data.ACL> acls, ClusterStateContext context) throws Exception
Exception
public IStateStorage mkStateStorageImpl(Map config, Map auth_conf, List<org.apache.zookeeper.data.ACL> acls, ClusterStateContext context) throws Exception
Exception
public static IStateStorage mkStateStorage(Map config, Map auth_conf, List<org.apache.zookeeper.data.ACL> acls, ClusterStateContext context) throws Exception
Exception
public static IStormClusterState mkStormClusterState(Object StateStorage, List<org.apache.zookeeper.data.ACL> acls, ClusterStateContext context) throws Exception
Exception
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.