Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1808#discussion_r97334512
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/KafkaSpout.java
---
@@ -447,7 +440,10 @@ private void shutdown() {
@Override
public void declareOutputFields(OutputFieldsDeclarer declarer) {
- kafkaSpoutStreams.declareOutputFields(declarer);
+ RecordTranslator<K, V> translator =
kafkaSpoutConfig.getTranslator();
--- End diff --
I agree I think we need a fairly standard way to Tuple->X and X->Tuple.
But really it would just end up looking like
```java
public interface <X> TupleToX {
public X fromTuple(Tuple t);
}
public interface X XToTuple {
public Tuple toTuple(X record);
}
```
But I don't know how much code reuse there could be, because X is so
different for each library we are going to interface with.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---