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

Switch to Threaded View
Kafka >> mail # user >> Weird encoder issue

Copy link to this message
Re: Weird encoder issue
No. Based on the docs this seemed unnecessary. However, we tried this and
it made no difference. We got the same error.

I'm just confused why a change in the java version would have an effect on
> Did you set both the key and the message encoder to DefaultEncoder?

> Thanks,

> Jun

On Wed, Feb 5, 2014 at 2:46 PM, Tom Amon <[EMAIL PROTECTED]> wrote:

> Hi,


> We have a functioning producer that uses <byte[], byte[]> as the

> Producer and KeyedMessage signature. We specify the DefaultEncoder in

> the properties. In Java 1.6 it works fine. However, under Java 1.7 it

> gives the following error:


> Failed to collate messages by topic, partition due to: [B incompatible

> with java.lang.String


> If we change the signature to <String, String>, change the byte arrays

> we're passing to strings, and change the encoder to StringEncoder then

> things work just fine.


> Has anyone encountered something like this before?


> Thanks.