Search in sources :

Example 36 with GlobalStreamId

use of org.apache.storm.generated.GlobalStreamId in project flink by apache.

the class StormTupleTest method testGetSourceGlobalStreamid.

@Test
public void testGetSourceGlobalStreamid() {
    GlobalStreamId globalStreamid = new StormTuple<>(null, null, -1, "streamId", "componentID", null).getSourceGlobalStreamid();
    Assert.assertEquals("streamId", globalStreamid.get_streamId());
    Assert.assertEquals("componentID", globalStreamid.get_componentId());
}
Also used : GlobalStreamId(org.apache.storm.generated.GlobalStreamId) Test(org.junit.Test) AbstractTest(org.apache.flink.storm.util.AbstractTest)

Example 37 with GlobalStreamId

use of org.apache.storm.generated.GlobalStreamId in project heron by twitter.

the class CustomStreamGroupingDelegate method prepare.

@Override
public void prepare(com.twitter.heron.api.topology.TopologyContext context, String component, String streamId, List<Integer> targetTasks) {
    TopologyContext c = new TopologyContext(context);
    GlobalStreamId g = new GlobalStreamId(component, streamId);
    delegate.prepare(c, g, targetTasks);
}
Also used : GlobalStreamId(org.apache.storm.generated.GlobalStreamId) TopologyContext(org.apache.storm.task.TopologyContext)

Aggregations

GlobalStreamId (org.apache.storm.generated.GlobalStreamId)37 HashMap (java.util.HashMap)21 Grouping (org.apache.storm.generated.Grouping)16 Map (java.util.Map)13 Test (org.junit.Test)10 ArrayList (java.util.ArrayList)8 Bolt (org.apache.storm.generated.Bolt)7 Tuple (org.apache.storm.tuple.Tuple)7 StormTopology (org.apache.storm.generated.StormTopology)6 HashSet (java.util.HashSet)5 ComponentCommon (org.apache.storm.generated.ComponentCommon)4 NullStruct (org.apache.storm.generated.NullStruct)4 SpoutSpec (org.apache.storm.generated.SpoutSpec)4 StreamInfo (org.apache.storm.generated.StreamInfo)4 TopologyContext (org.apache.storm.task.TopologyContext)4 IRichSpout (org.apache.storm.topology.IRichSpout)4 Fields (org.apache.storm.tuple.Fields)4 TreeMap (java.util.TreeMap)3 OutputCollector (org.apache.storm.task.OutputCollector)3 IRichBolt (org.apache.storm.topology.IRichBolt)3