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

Switch to Threaded View
Kafka, mail # user - OffsetResponse: protocol size error


Copy link to this message
-
Re: OffsetResponse: protocol size error
Vinicius Carvalho 2013-07-15, 17:13
Yes, my bad. I need to pay more attention to the [] structures.

Sorry
On Mon, Jul 15, 2013 at 12:57 PM, Colin Blower <[EMAIL PROTECTED]>wrote:

> It looks like you may be parsing the result incorrectly. I would have
> expected your data structure to look like:
>
> If you are still having issues with this could you post the raw response
> bytes?
>
> {
>     "topics": [
>         {
>             "partitionOffsets": [
>                 {
>                     "partitionId": 0,
>                     "errorCode": 0,
>                     "offsets": [
>                         0
>                     ]
>                 }
>             ],
>             "topicName": "myTopic"
>         }
>     ],
>     "responseSize": 31,
>     "correlationId": 1979,
>     "byteLength": 35
> }
>
>
>
> On 07/13/2013 06:52 PM, Vinicius Carvalho wrote:
> > Hi there, when issuing offsetrequests with this payload:
> >
> > {
> >     "requestMessage": {
> >         "API_KEY": 2,
> >         "replicaId": 0,
> >         "topics": [
> >             {
> >                 "topicName": "myTopic",
> >                 "partitions": [
> >                     {
> >                         "partitionId": 0,
> >                         "time": 10000,
> >                         "maxNumberofOffsets": 10
> >                     }
> >                 ]
> >             }
> >         ]
> >     },
> >     "correlationId": 1979,
> >     "clientId": "foo"
> > }
> >
> > I'm getting back:
> >
> > {
> >     "topics": [
> >         {
> >             "partitionOffsets": [
> >                 {
> >                     "partitionId": 0,
> >                     "errorCode": 0,
> >                     "offset": 0
> >                 }
> >             ],
> >             "topicName": "myTopic"
> >         }
> >     ],
> >     "responseSize": 31,
> >     "correlationId": 1979,
> >     "byteLength": 35
> > }
> >
> > It would be ok if not the fact that while reading the bytes from the
> > server, when I get to the offset position, there's only 4 bytes left,
> not 8
> > as expected. I've fixed this on my code by reading only an Int32 instead.
> > Is this a bug?
> >
> > Regards
> >
> >
>
>
> --
> *Colin Blower*
> /Software Engineer/
> Barracuda Networks Inc.
> +1 408-342-5576 (o)
>

--
The intuitive mind is a sacred gift and the
rational mind is a faithful servant. We have
created a society that honors the servant and
has forgotten the gift.