public final class TopologyUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAdditionalClassPath(TopologyAPI.Topology topology) |
static java.lang.String |
getComponentJvmOptions(TopologyAPI.Topology topology) |
static java.util.Map<java.lang.String,java.lang.Integer> |
getComponentParallelism(TopologyAPI.Topology topology) |
static java.util.Map<java.lang.String,ByteAmount> |
getComponentRamMapConfig(TopologyAPI.Topology topology)
Parses the value in Config.TOPOLOGY_COMPONENT_RAMMAP,
and returns a map containing only component specified.
|
static ByteAmount |
getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key,
ByteAmount defaultValue) |
static java.lang.Double |
getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key,
java.lang.Double defaultValue) |
static java.lang.Integer |
getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key,
java.lang.Integer defaultValue) |
static java.lang.Long |
getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key,
java.lang.Long defaultValue) |
static java.lang.String |
getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key,
java.lang.String defaultValue) |
static java.lang.String |
getConfigWithException(java.util.List<TopologyAPI.Config.KeyValue> config,
java.lang.String key) |
static java.lang.String |
getInstanceJvmOptions(TopologyAPI.Topology topology) |
static int |
getNumContainers(TopologyAPI.Topology topology) |
static TopologyAPI.Topology |
getTopology(java.lang.String topologyDefnFile) |
static int |
getTotalInstance(TopologyAPI.Topology topology) |
static java.lang.String |
lookUpTopologyDefnFile(java.lang.String dir,
java.lang.String filename) |
static java.lang.String |
makeClassPath(TopologyAPI.Topology topology,
java.lang.String originalPackageFile) |
static boolean |
verifyTopology(TopologyAPI.Topology topology)
Verify if the given topology has all the necessary information
|
public static TopologyAPI.Topology getTopology(java.lang.String topologyDefnFile)
public static java.lang.String getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key, java.lang.String defaultValue)
public static java.lang.Long getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key, java.lang.Long defaultValue)
public static java.lang.Integer getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key, java.lang.Integer defaultValue)
public static java.lang.Double getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key, java.lang.Double defaultValue)
public static ByteAmount getConfigWithDefault(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key, ByteAmount defaultValue)
public static java.lang.String getConfigWithException(java.util.List<TopologyAPI.Config.KeyValue> config, java.lang.String key)
public static java.util.Map<java.lang.String,java.lang.Integer> getComponentParallelism(TopologyAPI.Topology topology)
public static java.lang.String getInstanceJvmOptions(TopologyAPI.Topology topology)
public static java.lang.String getComponentJvmOptions(TopologyAPI.Topology topology)
public static int getTotalInstance(TopologyAPI.Topology topology)
public static boolean verifyTopology(TopologyAPI.Topology topology)
public static java.lang.String getAdditionalClassPath(TopologyAPI.Topology topology)
public static java.util.Map<java.lang.String,ByteAmount> getComponentRamMapConfig(TopologyAPI.Topology topology)
topology
- the topology defpublic static int getNumContainers(TopologyAPI.Topology topology)
public static java.lang.String makeClassPath(TopologyAPI.Topology topology, java.lang.String originalPackageFile)
public static java.lang.String lookUpTopologyDefnFile(java.lang.String dir, java.lang.String filename)