Search in sources :

Example 1 with KryoTupleDeserializer

use of org.apache.storm.serialization.KryoTupleDeserializer in project storm by apache.

the class DeserializingConnectionCallback method recv.

@Override
public void recv(List<TaskMessage> batch) {
    KryoTupleDeserializer des = _des.get();
    ArrayList<AddressedTuple> ret = new ArrayList<>(batch.size());
    for (TaskMessage message : batch) {
        ret.add(new AddressedTuple(message.task(), des.deserialize(message.message())));
    }
    _cb.transfer(ret);
}
Also used : KryoTupleDeserializer(org.apache.storm.serialization.KryoTupleDeserializer) ArrayList(java.util.ArrayList) AddressedTuple(org.apache.storm.tuple.AddressedTuple)

Aggregations

ArrayList (java.util.ArrayList)1 KryoTupleDeserializer (org.apache.storm.serialization.KryoTupleDeserializer)1 AddressedTuple (org.apache.storm.tuple.AddressedTuple)1