Search in sources :

Example 21 with TupleImpl

use of org.apache.storm.tuple.TupleImpl in project heron by twitter.

the class OutputCollectorImpl method ack.

@Override
public void ack(Tuple input) {
    TupleImpl i = (TupleImpl) input;
    delegate.ack(i.getDelegate());
}
Also used : TupleImpl(org.apache.storm.tuple.TupleImpl)

Example 22 with TupleImpl

use of org.apache.storm.tuple.TupleImpl in project heron by twitter.

the class OutputCollectorImpl method fail.

@Override
public void fail(Tuple input) {
    TupleImpl i = (TupleImpl) input;
    delegate.fail(i.getDelegate());
}
Also used : TupleImpl(org.apache.storm.tuple.TupleImpl)

Example 23 with TupleImpl

use of org.apache.storm.tuple.TupleImpl in project storm by apache.

the class KafkaBoltTest method generateTestTuple.

private Tuple generateTestTuple(Object key, Object message) {
    TopologyBuilder builder = new TopologyBuilder();
    GeneralTopologyContext topologyContext = new GeneralTopologyContext(builder.createTopology(), new Config(), new HashMap<>(), new HashMap<>(), new HashMap<>(), "") {

        @Override
        public Fields getComponentOutputFields(String componentId, String streamId) {
            return new Fields("key", "message");
        }
    };
    return new TupleImpl(topologyContext, new Values(key, message), 1, "");
}
Also used : Fields(org.apache.storm.tuple.Fields) GeneralTopologyContext(org.apache.storm.task.GeneralTopologyContext) TopologyBuilder(org.apache.storm.topology.TopologyBuilder) Config(org.apache.storm.Config) Values(org.apache.storm.tuple.Values) TupleImpl(org.apache.storm.tuple.TupleImpl)

Aggregations

TupleImpl (org.apache.storm.tuple.TupleImpl)23 Values (org.apache.storm.tuple.Values)12 HashMap (java.util.HashMap)10 ArrayList (java.util.ArrayList)8 Fields (org.apache.storm.tuple.Fields)8 Config (org.apache.storm.Config)7 GeneralTopologyContext (org.apache.storm.task.GeneralTopologyContext)7 TopologyBuilder (org.apache.storm.topology.TopologyBuilder)7 Tuple (org.apache.storm.tuple.Tuple)5 AddressedTuple (org.apache.storm.tuple.AddressedTuple)4 MessageId (org.apache.storm.tuple.MessageId)3 List (java.util.List)2 Map (java.util.Map)2 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 StormTimer (org.apache.storm.StormTimer)2 IOException (java.io.IOException)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 TupleInfo (org.apache.storm.executor.TupleInfo)1 BoltAckInfo (org.apache.storm.hooks.info.BoltAckInfo)1