You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Jay Kreps <ja...@gmail.com> on 2012/05/29 17:01:29 UTC

Anything common gotchas we should add to the FAQ?

There was a question about getting the exception when the consumer doesn't
have any metadata, which is normal. I was going to document that. Anything
else I should add?

-Jay

Re: Anything common gotchas we should add to the FAQ?

Posted by Jay Kreps <ja...@gmail.com>.
Actually ditto for this one. We should really just fix the error message.
Reopened https://issues.apache.org/jira/browse/KAFKA-294

I will document both issues in the faq as a stop gap since the fix will
likely be 0.8.

-Jay

On Tue, May 29, 2012 at 8:45 PM, Jun Rao <ju...@gmail.com> wrote:

> Another thing is that if zk namespace is used, the namespace needs to be
> create manually using ZK client shell first.
>
> Thanks,
>
> Jun
>
> On Tue, May 29, 2012 at 8:01 AM, Jay Kreps <ja...@gmail.com> wrote:
>
> > There was a question about getting the exception when the consumer
> doesn't
> > have any metadata, which is normal. I was going to document that.
> Anything
> > else I should add?
> >
> > -Jay
> >
>

Re: Anything common gotchas we should add to the FAQ?

Posted by Jay Kreps <ja...@gmail.com>.
Hmm, Ross, that actually sounds more like a bug. Rather than fix it, I
think we should just get rid of these numeric codes entirely, they are
pretty obscure. I filed
  https://issues.apache.org/jira/browse/KAFKA-363

Should be a pretty easy one to fix...

-Jay

On Thu, May 31, 2012 at 5:59 PM, Ross Black <ro...@gmail.com> wrote:

> I just fell into the trap of using:
>
>        Properties props = new Properties();
>        props.put("compression.codec", 2);
>        ProducerConfig config = new ProducerConfig(props);
>
> instead of
>
>        props.put("compression.codec", "2");
>
> or (better because it forces a string)
>
>        props.setProperty("compression.codec", "2");
>
> Using an int value means that no compression occurs, and no errors/warnings
> are emitted.
>
> Ross
>
>
>
> On 30 May 2012 13:45, Jun Rao <ju...@gmail.com> wrote:
>
> > Another thing is that if zk namespace is used, the namespace needs to be
> > create manually using ZK client shell first.
> >
> > Thanks,
> >
> > Jun
> >
> > On Tue, May 29, 2012 at 8:01 AM, Jay Kreps <ja...@gmail.com> wrote:
> >
> > > There was a question about getting the exception when the consumer
> > doesn't
> > > have any metadata, which is normal. I was going to document that.
> > Anything
> > > else I should add?
> > >
> > > -Jay
> > >
> >
>

Re: Anything common gotchas we should add to the FAQ?

Posted by Ross Black <ro...@gmail.com>.
I just fell into the trap of using:

        Properties props = new Properties();
        props.put("compression.codec", 2);
        ProducerConfig config = new ProducerConfig(props);

instead of

        props.put("compression.codec", "2");

or (better because it forces a string)

        props.setProperty("compression.codec", "2");

Using an int value means that no compression occurs, and no errors/warnings
are emitted.

Ross



On 30 May 2012 13:45, Jun Rao <ju...@gmail.com> wrote:

> Another thing is that if zk namespace is used, the namespace needs to be
> create manually using ZK client shell first.
>
> Thanks,
>
> Jun
>
> On Tue, May 29, 2012 at 8:01 AM, Jay Kreps <ja...@gmail.com> wrote:
>
> > There was a question about getting the exception when the consumer
> doesn't
> > have any metadata, which is normal. I was going to document that.
> Anything
> > else I should add?
> >
> > -Jay
> >
>

Re: Anything common gotchas we should add to the FAQ?

Posted by Jun Rao <ju...@gmail.com>.
Another thing is that if zk namespace is used, the namespace needs to be
create manually using ZK client shell first.

Thanks,

Jun

On Tue, May 29, 2012 at 8:01 AM, Jay Kreps <ja...@gmail.com> wrote:

> There was a question about getting the exception when the consumer doesn't
> have any metadata, which is normal. I was going to document that. Anything
> else I should add?
>
> -Jay
>