public class StormCommon extends Object
Modifier and Type | Field and Description |
---|---|
static String |
EVENTLOGGER_COMPONENT_ID |
static String |
EVENTLOGGER_STREAM_ID |
static String |
SYSTEM_STREAM_ID |
static String |
TOPOLOGY_EVENT_LOGGER_ARGUMENTS |
static String |
TOPOLOGY_EVENT_LOGGER_CLASS |
static String |
TOPOLOGY_METRICS_CONSUMER_ARGUMENT |
static String |
TOPOLOGY_METRICS_CONSUMER_BLACKLIST |
static String |
TOPOLOGY_METRICS_CONSUMER_CLASS |
static String |
TOPOLOGY_METRICS_CONSUMER_EXPAND_MAP_TYPE |
static String |
TOPOLOGY_METRICS_CONSUMER_MAX_RETAIN_METRIC_TUPLES |
static String |
TOPOLOGY_METRICS_CONSUMER_METRIC_NAME_SEPARATOR |
static String |
TOPOLOGY_METRICS_CONSUMER_PARALLELISM_HINT |
static String |
TOPOLOGY_METRICS_CONSUMER_WHITELIST |
Constructor and Description |
---|
StormCommon() |
public static final String SYSTEM_STREAM_ID
public static final String EVENTLOGGER_COMPONENT_ID
public static final String EVENTLOGGER_STREAM_ID
public static final String TOPOLOGY_METRICS_CONSUMER_CLASS
public static final String TOPOLOGY_METRICS_CONSUMER_ARGUMENT
public static final String TOPOLOGY_METRICS_CONSUMER_MAX_RETAIN_METRIC_TUPLES
public static final String TOPOLOGY_METRICS_CONSUMER_PARALLELISM_HINT
public static final String TOPOLOGY_METRICS_CONSUMER_WHITELIST
public static final String TOPOLOGY_METRICS_CONSUMER_BLACKLIST
public static final String TOPOLOGY_METRICS_CONSUMER_EXPAND_MAP_TYPE
public static final String TOPOLOGY_METRICS_CONSUMER_METRIC_NAME_SEPARATOR
public static final String TOPOLOGY_EVENT_LOGGER_CLASS
public static final String TOPOLOGY_EVENT_LOGGER_ARGUMENTS
public static StormCommon setInstance(StormCommon common)
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.
common
- a StormCommon instancepublic static Map<String,Object> allComponents(StormTopology topology)
public static void validateBasic(StormTopology topology) throws InvalidTopologyException
InvalidTopologyException
public static void validateStructure(StormTopology topology) throws InvalidTopologyException
InvalidTopologyException
public static Map<GlobalStreamId,Grouping> ackerInputs(StormTopology topology)
public static IBolt makeAckerBolt()
public static void addAcker(Map<String,Object> conf, StormTopology topology)
public static ComponentCommon getComponentCommon(Object component)
public static void addMetricStreams(StormTopology topology)
public static void addSystemStreams(StormTopology topology)
public static Map<GlobalStreamId,Grouping> eventLoggerInputs(StormTopology topology)
public static void addEventLogger(Map<String,Object> conf, StormTopology topology)
public static Map<String,Bolt> metricsConsumerBoltSpecs(Map<String,Object> conf, StormTopology topology)
public static void addMetricComponents(Map<String,Object> conf, StormTopology topology)
public static void addSystemComponents(Map<String,Object> conf, StormTopology topology)
public static StormTopology systemTopology(Map<String,Object> topoConf, StormTopology topology) throws InvalidTopologyException
Construct a new topology structure after adding system components and streams. WARNING: while changing the existing code to add or remove streams for a component is allowed, please be aware that it might cause issues during cluster rolling upgrade because SerializationFactory.IdDictionary
depends on having a consistent map of component to streams to work properly (see STORM-3687 for an example). It will not impact a cluster running on a single version or running an older topology on a newer cluster. But a mixed cluster (with different versions of daemons running) is not guaranteed to work.
topoConf
- the topology configurationtopology
- the original topology structureInvalidTopologyException
- if the topology is invalidpublic static int numStartExecutors(Object component) throws InvalidTopologyException
InvalidTopologyException
public static Map<Integer,String> stormTaskInfo(StormTopology userTopology, Map<String,Object> topoConf) throws InvalidTopologyException
InvalidTopologyException
public static Map<Integer,NodeInfo> taskToNodeport(Map<List<Long>,NodeInfo> executorToNodePort)
public static IAuthorizer mkAuthorizationHandler(String klassName, Map<String,Object> conf) throws IllegalAccessException, InstantiationException, ClassNotFoundException
public static WorkerTopologyContext makeWorkerContext(Map<String,Object> workerData)
public IBolt makeAckerBoltImpl()
protected StormTopology systemTopologyImpl(Map<String,Object> topoConf, StormTopology topology) throws InvalidTopologyException
InvalidTopologyException
protected Map<Integer,String> stormTaskInfoImpl(StormTopology userTopology, Map<String,Object> topoConf) throws InvalidTopologyException
InvalidTopologyException
protected IAuthorizer mkAuthorizationHandlerImpl(String klassName, Map<String,Object> conf) throws ClassNotFoundException, IllegalAccessException, InstantiationException
Copyright © 2022 The Apache Software Foundation. All rights reserved.