use of org.apache.storm.kafka.trident.selector.KafkaTopicSelector in project storm by apache.
the class TridentKafkaTest method setup.
@Before
public void setup() {
broker = new KafkaTestBroker();
simpleConsumer = TestUtils.getKafkaConsumer(broker);
TridentTupleToKafkaMapper<Object, Object> mapper = new FieldNameBasedTupleToKafkaMapper<Object, Object>("key", "message");
KafkaTopicSelector topicSelector = new DefaultTopicSelector(TestUtils.TOPIC);
state = new TridentKafkaState().withKafkaTopicSelector(topicSelector).withTridentTupleToKafkaMapper(mapper);
state.prepare(TestUtils.getProducerProperties(broker.getBrokerConnectionString()));
}
Aggregations