You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by Chris Gerken <ch...@mindspring.com> on 2012/09/21 01:36:08 UTC

BufferUnderflowException

Just wanted to note that I'm getting a BufferUnderflowException in  org.apache.gora.cassandra.query.CassandraColumn in fromByteBuffer().

I've seen this problem before (see my answer for http://stackoverflow.com/questions/11318834/store-and-retrieve-a-float-to-from-cassandra-using-hector ).  Basically, the value in the ByteBuffer doesn't start at offset 0 (where the serializer expects it to).  As a result, the deserialization returns the wrong answer and/or the exception is thrown.

I haven't had a chance to download the source, let alone build it yet, but in case somebody else is putting together a nightly build or something this would be great to include.

Thanks

- Chris

Re: BufferUnderflowException

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Chris,

On Fri, Sep 21, 2012 at 2:45 AM, Chris Gerken
<ch...@mindspring.com> wrote:

> Once I figure out how to open a Jira ticket I will do so.

For reference, the Gora Jira is here [0], you need to create a uname
and passwd before you can register tickets. It would be great to get
some of your discoveries registered on there.

>
> In the mean time I forgot to say that there is a class in Cassandra (TBaseHelper) that takes a ByteBuffer whose value is not at offset 0 and returns a ByteBuffer with the same value, but at offset 0.  The fix is to zero the offset in the byte buffer with this helper class before passing the ByteBuffer to the serializer.
>

This is excellent, I will fire into it over the comig days and
hopefully we can get a solution shortly.

Some other news, I've just pushed the Nutch 2.1 RC over on user@ and
dev@nutch (which reverts back to gora-cassandra 0.2), it would be
excellent if you have time and are able to test drive the
gora-cassandra module in your Nutch stack.

Have a great weekend.

Lewis

[0] https://issues.apache.org/jira/browse/GORA

Re: BufferUnderflowException

Posted by Chris Gerken <ch...@mindspring.com>.
Lewis,

Once I figure out how to open a Jira ticket I will do so.

In the mean time I forgot to say that there is a class in Cassandra (TBaseHelper) that takes a ByteBuffer whose value is not at offset 0 and returns a ByteBuffer with the same value, but at offset 0.  The fix is to zero the offset in the byte buffer with this helper class before passing the ByteBuffer to the serializer.

- Chris 


On Sep 20, 2012, at 6:46 PM, Lewis John Mcgibbney wrote:

> Hi Chris,
> I can also confirm this.
> It has been happening rather sporadically throughout the day and I was
> actually unable to replicate or reproduce.
> 
> This definitely merits a Jira ticket so please fire in and create one
> if you have the time and are able to reproduce and describe your
> experience.
> 
> If you want a more stable Nutch/gora-cassandra/Cassandra stack please
> revert to gora-cassandra v0.2 for the time being.
> 
> Thank you
> Lewis
> 
> On Fri, Sep 21, 2012 at 12:36 AM, Chris Gerken
> <ch...@mindspring.com> wrote:
>> Just wanted to note that I'm getting a BufferUnderflowException in  org.apache.gora.cassandra.query.CassandraColumn in fromByteBuffer().
>> 
>> I've seen this problem before (see my answer for http://stackoverflow.com/questions/11318834/store-and-retrieve-a-float-to-from-cassandra-using-hector ).  Basically, the value in the ByteBuffer doesn't start at offset 0 (where the serializer expects it to).  As a result, the deserialization returns the wrong answer and/or the exception is thrown.
>> 
>> I haven't had a chance to download the source, let alone build it yet, but in case somebody else is putting together a nightly build or something this would be great to include.
>> 
>> Thanks
>> 
>> - Chris
> 
> 
> 
> -- 
> Lewis


Re: BufferUnderflowException

Posted by Lewis John Mcgibbney <le...@gmail.com>.
Hi Chris,
I can also confirm this.
It has been happening rather sporadically throughout the day and I was
actually unable to replicate or reproduce.

This definitely merits a Jira ticket so please fire in and create one
if you have the time and are able to reproduce and describe your
experience.

If you want a more stable Nutch/gora-cassandra/Cassandra stack please
revert to gora-cassandra v0.2 for the time being.

Thank you
Lewis

On Fri, Sep 21, 2012 at 12:36 AM, Chris Gerken
<ch...@mindspring.com> wrote:
> Just wanted to note that I'm getting a BufferUnderflowException in  org.apache.gora.cassandra.query.CassandraColumn in fromByteBuffer().
>
> I've seen this problem before (see my answer for http://stackoverflow.com/questions/11318834/store-and-retrieve-a-float-to-from-cassandra-using-hector ).  Basically, the value in the ByteBuffer doesn't start at offset 0 (where the serializer expects it to).  As a result, the deserialization returns the wrong answer and/or the exception is thrown.
>
> I haven't had a chance to download the source, let alone build it yet, but in case somebody else is putting together a nightly build or something this would be great to include.
>
> Thanks
>
> - Chris



-- 
Lewis