Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/1868#discussion_r96432779
--- Diff:
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/StormStringDeserializer.java
---
@@ -15,22 +15,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.storm.kafka.spout;
-import org.apache.kafka.clients.consumer.ConsumerRecord;
-
-import java.util.List;
-
-public class KafkaSpoutTuplesBuilderWildcardTopics<K,V> implements
KafkaSpoutTuplesBuilder<K,V> {
- private KafkaSpoutTupleBuilder<K, V> tupleBuilder;
+import org.apache.kafka.common.serialization.StringDeserializer;
- public KafkaSpoutTuplesBuilderWildcardTopics(KafkaSpoutTupleBuilder<K,
V> tupleBuilder) {
- this.tupleBuilder = tupleBuilder;
- }
+public class StormStringDeserializer extends StringDeserializer implements
SerializableDeserializer<String> {
--- End diff --
Yes we need this even more now. The Kafka Deserializer (including
StringDeserializer) is not java serializable. So if we don't do this on a real
storm cluster we will get exceptions when we try to write out the spout.
I can look into trying to support some kind of generics like
```
public <NK> Builder<NK,V> setKey(Class<? extends Deserializer<NK>>
keyDeserializer) {
```
But I really don't know if that works. I'll try it out and let you know.
---
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.
---