You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Srinivas Krishnan <sh...@gmail.com> on 2012/04/27 04:47:35 UTC

HBase with C++

We are transitioning from a BerkeleyDB+MySQL backend to testing Hbase.
One of the toughest challenges we are facing is porting the interface
over.

All our clients were using C/C++ APIs of Berkeley and MySQL to write
data, is there a standard way to do that for HBase. The current method
we are exploring is using JNI to interface with the Java connector,
but its more trouble than it worth.

Is there a C++ client library for HBase, or is the expected mechanism Thrift ?

One point to mention we have used Avro in the past to serialized some
data, would that be preferred over Thrift ?

-sri

Re: HBase with C++

Posted by Ted Yu <yu...@gmail.com>.
Please refer to http://wiki.apache.org/hadoop/Hbase/ThriftApi

You can download hbase source code and read the following:

./src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
./src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift

Cheers

On Thu, Apr 26, 2012 at 7:47 PM, Srinivas Krishnan <shrin.krishnan@gmail.com
> wrote:

> We are transitioning from a BerkeleyDB+MySQL backend to testing Hbase.
> One of the toughest challenges we are facing is porting the interface
> over.
>
> All our clients were using C/C++ APIs of Berkeley and MySQL to write
> data, is there a standard way to do that for HBase. The current method
> we are exploring is using JNI to interface with the Java connector,
> but its more trouble than it worth.
>
> Is there a C++ client library for HBase, or is the expected mechanism
> Thrift ?
>
> One point to mention we have used Avro in the past to serialized some
> data, would that be preferred over Thrift ?
>
> -sri
>

Re: HBase with C++

Posted by shashwat shriparv <dw...@gmail.com>.
Check out this code for help

http://svn.apache.org/repos/asf/hbase/trunk/src/examples/thrift/DemoClient.cpp


On Fri, Apr 27, 2012 at 9:06 PM, Srinivas Krishnan <kr...@cs.unc.edu>wrote:

> Tom,
>
> Thanks, taking a look at actual examples would help us a lot.
>
> One of the concerns we have Thrift is how the writes will get
> distributed across the Region Servers, this is still a new paradigm
> for us moving away from MySQL, so any insights on that would be great.
>
> thanks
> -srinivas
>
>
> On Fri, Apr 27, 2012 at 10:36 AM, Thomas Macke <tm...@walmartlabs.com>
> wrote:
> > I have some simple C++ thrift codes that create & delete tables, show the
> > status of all tables in an hbase, a simple delim sep line inserter and
> > simple scanner.  These are not production codes, but I have craeted
> > multi-million line tables with them. I can send them to you if you'd like
> > to see some real thrift examples.
> >
> > Tom
> >
> > On 4/26/12 7:47 PM, "Srinivas Krishnan" <sh...@gmail.com>
> wrote:
> >
> >>We are transitioning from a BerkeleyDB+MySQL backend to testing Hbase.
> >>One of the toughest challenges we are facing is porting the interface
> >>over.
> >>
> >>All our clients were using C/C++ APIs of Berkeley and MySQL to write
> >>data, is there a standard way to do that for HBase. The current method
> >>we are exploring is using JNI to interface with the Java connector,
> >>but its more trouble than it worth.
> >>
> >>Is there a C++ client library for HBase, or is the expected mechanism
> >>Thrift ?
> >>
> >>One point to mention we have used Avro in the past to serialized some
> >>data, would that be preferred over Thrift ?
> >>
> >>-sri
> >
>



-- 


∞
Shashwat Shriparv

Re: HBase with C++

Posted by Srinivas Krishnan <kr...@cs.unc.edu>.
Tom,

Thanks, taking a look at actual examples would help us a lot.

One of the concerns we have Thrift is how the writes will get
distributed across the Region Servers, this is still a new paradigm
for us moving away from MySQL, so any insights on that would be great.

thanks
-srinivas


On Fri, Apr 27, 2012 at 10:36 AM, Thomas Macke <tm...@walmartlabs.com> wrote:
> I have some simple C++ thrift codes that create & delete tables, show the
> status of all tables in an hbase, a simple delim sep line inserter and
> simple scanner.  These are not production codes, but I have craeted
> multi-million line tables with them. I can send them to you if you'd like
> to see some real thrift examples.
>
> Tom
>
> On 4/26/12 7:47 PM, "Srinivas Krishnan" <sh...@gmail.com> wrote:
>
>>We are transitioning from a BerkeleyDB+MySQL backend to testing Hbase.
>>One of the toughest challenges we are facing is porting the interface
>>over.
>>
>>All our clients were using C/C++ APIs of Berkeley and MySQL to write
>>data, is there a standard way to do that for HBase. The current method
>>we are exploring is using JNI to interface with the Java connector,
>>but its more trouble than it worth.
>>
>>Is there a C++ client library for HBase, or is the expected mechanism
>>Thrift ?
>>
>>One point to mention we have used Avro in the past to serialized some
>>data, would that be preferred over Thrift ?
>>
>>-sri
>

Re: HBase with C++

Posted by Thomas Macke <tm...@walmartlabs.com>.
I have some simple C++ thrift codes that create & delete tables, show the
status of all tables in an hbase, a simple delim sep line inserter and
simple scanner.  These are not production codes, but I have craeted
multi-million line tables with them. I can send them to you if you'd like
to see some real thrift examples.

Tom

On 4/26/12 7:47 PM, "Srinivas Krishnan" <sh...@gmail.com> wrote:

>We are transitioning from a BerkeleyDB+MySQL backend to testing Hbase.
>One of the toughest challenges we are facing is porting the interface
>over.
>
>All our clients were using C/C++ APIs of Berkeley and MySQL to write
>data, is there a standard way to do that for HBase. The current method
>we are exploring is using JNI to interface with the Java connector,
>but its more trouble than it worth.
>
>Is there a C++ client library for HBase, or is the expected mechanism
>Thrift ?
>
>One point to mention we have used Avro in the past to serialized some
>data, would that be preferred over Thrift ?
>
>-sri