Package org.apache.storm.sql.kafka
Class RecordTranslatorSchemeAdapter
java.lang.Object
org.apache.storm.sql.kafka.RecordTranslatorSchemeAdapter
- All Implemented Interfaces:
- Serializable,- Func<org.apache.kafka.clients.consumer.ConsumerRecord<ByteBuffer,,- ByteBuffer>, - List<Object>> - RecordTranslator<ByteBuffer,- ByteBuffer> 
public class RecordTranslatorSchemeAdapter
extends Object
implements RecordTranslator<ByteBuffer,ByteBuffer> 
RecordTranslator that delegates to a Scheme.
- See Also:
- 
Field SummaryFields inherited from interface org.apache.storm.kafka.spout.RecordTranslatorDEFAULT_STREAM
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionapply(org.apache.kafka.clients.consumer.ConsumerRecord<ByteBuffer, ByteBuffer> record) Translate the ConsumerRecord into a list of objects that can be emitted.getFieldsFor(String stream) Get the fields associated with a stream.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.storm.kafka.spout.RecordTranslatorstreams
- 
Constructor Details- 
RecordTranslatorSchemeAdapter
 
- 
- 
Method Details- 
applypublic List<Object> apply(org.apache.kafka.clients.consumer.ConsumerRecord<ByteBuffer, ByteBuffer> record) Description copied from interface:RecordTranslatorTranslate the ConsumerRecord into a list of objects that can be emitted.- Specified by:
- applyin interface- Func<org.apache.kafka.clients.consumer.ConsumerRecord<ByteBuffer,- ByteBuffer>, - List<Object>> 
- Specified by:
- applyin interface- RecordTranslator<ByteBuffer,- ByteBuffer> 
- Parameters:
- record- the record to translate
- Returns:
- the objects in the tuple.  Return a KafkaTupleif you want to route the tuple to a non-default stream. Returnnullto discard an invalidConsumerRecordifKafkaSpoutConfig.Builder.setEmitNullTuples(boolean)is set tofalse.
 
- 
getFieldsForDescription copied from interface:RecordTranslatorGet the fields associated with a stream. The streams passed in are returned by theRecordTranslator.streams()method.- Specified by:
- getFieldsForin interface- RecordTranslator<ByteBuffer,- ByteBuffer> 
- Parameters:
- stream- the stream the fields are for
- Returns:
- the fields for that stream.
 
 
-