Yes.  You have a version problem with Thrift.

>From the 0.6.0 release notes for Thrift:


THRIFT-830   Java         Switch binary field implementation from
byte[] to ByteBuffer (Bryan Duxbury)

If you look at THRIFT-830
<https://issues.apache.org/jira/browse/THRIFT-830> you
will see the trenchant comment from Bryan:

Making this change will probably cause more than a little bit of trauma,
changing the method signatures in both TProtocol and generated code. It's *
possible* that I could be persuaded to support a command line switch for
producing old-style byte[] methods in some contexts, but I'd love not to
waste time supporting suboptimal features.


On Tue, May 31, 2011 at 5:32 PM, Matthew Ward <[email protected]> wrote:

> The issue I am encountering is that the code generated doing 'thrift --gen
> java Hbase.thrift' outputs code utilizing the 'ByteBuffer' type instead of
> 'bytes[]'. All the code in org.apache.hadoop.hbase.thrift utilizes byte[].
> So basically the code generated via thrift is incompatible with the current
> implementation of org.apache.hadoop.hbase.thrfit.Hbase.java. I would either
> have to rewrite Hbase.java to use ByteBuffers (like the most latest code is
> doing) or Rewrite all the boiler plate code thrift generates to use byte[].
> Bothe process seem to be a big pain, so I was seeing if there was something
> I didn't know in getting thrift to generate code that is compatible with how
> 90.3 is implemented.
>
>
> -Matt
>
>
>
> On May 31, 2011, at 5:24 PM, Ted Dunning wrote:
>
> > This may help:
> >
> >
> >
> http://download.oracle.com/javase/1,5.0/docs/api/java/nio/ByteBuffer.html#array()
> >
> > <
> http://download.oracle.com/javase/1,5.0/docs/api/java/nio/ByteBuffer.html#array()
> >What
> > is it you are actually trying to do?
> >
> > On Tue, May 31, 2011 at 5:14 PM, Matthew Ward <[email protected]>
> wrote:
> >
> >> Hello,
> >>
> >>
> >> I am trying to autogen some code off of 90.3. I made some custom
> additions
> >> to our thrift server, however the code that gets generated uses
> ByteBuffers
> >> as opposed to byte[]. How can I get around having to manually add to the
> >> autogen code to match?
> >> Is there a thrift flag or different server definition i should use?
> >>
> >> Thanks,
> >> Matt
> >>
>
>

Reply via email to