use of backtype.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());
}
use of backtype.storm.tuple.TupleImpl in project heron by twitter.
the class IRichBoltDelegate method execute.
@Override
public void execute(com.twitter.heron.api.tuple.Tuple tuple) {
TupleImpl impl = new TupleImpl(tuple);
delegate.execute(impl);
}
use of backtype.storm.tuple.TupleImpl in project storm-elastic-search by hmsonline.
the class ElasticSearchTest method testBolt.
@Test
public void testBolt() {
TopologyBuilder builder = new TopologyBuilder();
ElasticSearchBolt bolt = new ElasticSearchBolt(new DefaultTupleMapper());
builder.setBolt("TEST_BOLT", bolt);
TopologyContext context = new MockTopologyContext(builder.createTopology());
Config config = new Config();
config.put(ElasticSearchBolt.ELASTIC_LOCAL_MODE, true);
bolt.prepare(config, context, null);
List<Object> values = new ArrayList<Object>();
values.add("testIndex");
values.add("entity");
values.add("testId");
values.add("{\"bolt\":\"lightning\"}");
Tuple tuple = new TupleImpl(context, values, 5, "test");
bolt.execute(tuple);
}
use of backtype.storm.tuple.TupleImpl in project storm by nathanmarz.
the class KryoTupleDeserializer method deserialize.
public Tuple deserialize(byte[] ser) {
try {
_kryoInput.setBuffer(ser);
int taskId = _kryoInput.readInt(true);
int streamId = _kryoInput.readInt(true);
String componentName = _context.getComponentId(taskId);
String streamName = _ids.getStreamName(componentName, streamId);
MessageId id = MessageId.deserialize(_kryoInput);
List<Object> values = _kryo.deserializeFrom(_kryoInput);
return new TupleImpl(_context, values, taskId, streamName, id);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
use of backtype.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());
}
Aggregations