Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # dev >> [jira] [Created] (KAFKA-869) Java API needs Encoder / Decoder interfaces


Copy link to this message
-
[jira] [Created] (KAFKA-869) Java API needs Encoder / Decoder interfaces
Xavier Stevens created KAFKA-869:
------------------------------------

             Summary: Java API needs Encoder / Decoder interfaces
                 Key: KAFKA-869
                 URL: https://issues.apache.org/jira/browse/KAFKA-869
             Project: Kafka
          Issue Type: Improvement
    Affects Versions: 0.8
            Reporter: Xavier Stevens
            Priority: Minor
The current 0.8 API requires that a serializer class implements a constructor that takes a single VerifiableProperties argument. The built-in scala serializers default this argument to null. But when implementing a custom encoder from Java you won't get any compilation errors. However, at runtime you'll get a NoSuchMethodException when the Kafka producer tries to instantiate the class.

If this is actually a dependency for the serialization classes it should be made more clear for Java API usage. I could see adding an abstract base class or perhaps an init(VerifiableProperties props) method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira