public class KafkaSpoutStreamsNamedTopics extends Object implements KafkaSpoutStreams
Represents the KafkaSpoutStream
associated with each topic, and provides a public API to declare output streams and emmit tuples, on the appropriate stream, for all the topics specified.
Modifier and Type | Class and Description |
---|---|
static class |
KafkaSpoutStreamsNamedTopics.Builder |
Modifier and Type | Method and Description |
---|---|
void |
declareOutputFields(OutputFieldsDeclarer declarer) |
void |
emit(SpoutOutputCollector collector,
List<Object> tuple,
KafkaSpoutMessageId messageId) |
Fields |
getOutputFields(String topic) |
KafkaSpoutStream |
getStream(String topic) |
List<String> |
getTopics() |
String |
toString() |
public Fields getOutputFields(String topic)
topic
- the topic for which to get output fieldspublic KafkaSpoutStream getStream(String topic)
topic
- the topic to for which to get the stream idpublic List<String> getTopics()
KafkaSpoutStream
public void declareOutputFields(OutputFieldsDeclarer declarer)
declareOutputFields
in interface KafkaSpoutStreams
public void emit(SpoutOutputCollector collector, List<Object> tuple, KafkaSpoutMessageId messageId)
emit
in interface KafkaSpoutStreams
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.