public class GeneralTopologyContextImpl extends java.lang.Object implements GeneralTopologyContext
Constructor and Description |
---|
GeneralTopologyContextImpl(java.util.Map<java.lang.String,java.lang.Object> clusterConfig,
TopologyAPI.Topology topology,
java.util.Map<java.lang.Integer,java.lang.String> taskToComponentMap) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getComponentId(int taskId)
Gets the component id for the specified task id.
|
java.util.Set<java.lang.String> |
getComponentIds()
Gets a list of all component ids in this topology
|
Fields |
getComponentOutputFields(java.lang.String componentId,
java.lang.String streamId)
Gets the declared output fields for the specified component/stream.
|
java.util.Set<java.lang.String> |
getComponentStreams(java.lang.String componentId)
Gets the set of streams declared for the specified component.
|
java.util.List<java.lang.Integer> |
getComponentTasks(java.lang.String componentId)
Gets the task ids allocated for the given component id.
|
static java.util.Map<java.lang.String,java.util.Map<java.lang.String,Fields>> |
getOutputToComponentsFields(java.util.List<TopologyAPI.OutputStream> outputs) |
java.util.Map<TopologyAPI.StreamId,TopologyAPI.Grouping> |
getSources(java.lang.String componentId)
Gets the declared inputs to the specified component.
|
java.util.Map<java.lang.String,java.util.Map<java.lang.String,TopologyAPI.Grouping>> |
getTargets(java.lang.String componentId)
Gets information about who is consuming the outputs of the specified component,
and how.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getTaskToComponent()
Gets a map from task id to component id.
|
java.util.Map<java.lang.String,java.lang.Object> |
getTopologyConfig() |
java.lang.String |
getTopologyId()
Gets the unique id assigned to this topology.
|
int |
maxTopologyMessageTimeout() |
public GeneralTopologyContextImpl(java.util.Map<java.lang.String,java.lang.Object> clusterConfig, TopologyAPI.Topology topology, java.util.Map<java.lang.Integer,java.lang.String> taskToComponentMap)
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,Fields>> getOutputToComponentsFields(java.util.List<TopologyAPI.OutputStream> outputs)
public java.util.Map<java.lang.String,java.lang.Object> getTopologyConfig()
public java.lang.String getTopologyId()
getTopologyId
in interface GeneralTopologyContext
public java.lang.String getComponentId(int taskId)
getComponentId
in interface GeneralTopologyContext
taskId
- the task idpublic java.util.Set<java.lang.String> getComponentStreams(java.lang.String componentId)
getComponentStreams
in interface GeneralTopologyContext
public java.util.List<java.lang.Integer> getComponentTasks(java.lang.String componentId)
getComponentTasks
in interface GeneralTopologyContext
public Fields getComponentOutputFields(java.lang.String componentId, java.lang.String streamId)
getComponentOutputFields
in interface GeneralTopologyContext
public java.util.Map<TopologyAPI.StreamId,TopologyAPI.Grouping> getSources(java.lang.String componentId)
getSources
in interface GeneralTopologyContext
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,TopologyAPI.Grouping>> getTargets(java.lang.String componentId)
getTargets
in interface GeneralTopologyContext
public java.util.Map<java.lang.Integer,java.lang.String> getTaskToComponent()
getTaskToComponent
in interface GeneralTopologyContext
public java.util.Set<java.lang.String> getComponentIds()
getComponentIds
in interface GeneralTopologyContext
public int maxTopologyMessageTimeout()
maxTopologyMessageTimeout
in interface GeneralTopologyContext