hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Shelukhin <ser...@hortonworks.com>
Subject Re: Any code example for access HBase using C++ except the out-of-date Democlient.cpp ?
Date Mon, 25 Feb 2013 19:30:30 GMT
At some point few months ago, I think I was able to make cpp sample from
trunk compile and link (against trunk).
I think one of the problems on the way was that some HBase thrift classes
got renamed between versions of thrift used before and after (in your case,
94 and current trunk).
Can you check the thrift generated code, thrift headers you use to compile,
and thrift you are actually linking against, for, respectively, usage,
declaration and definition of this ctor?
I am not sure how, you might be compiling against thrift headers of one
version but linking against a different one...

On Sun, Feb 24, 2013 at 5:19 PM, Kun Ling <lkun.lingcc@qq.com> wrote:

> Dear All,
>     I am writing for some C++ code example for using HBase.
>     After Google and look into the HBase Document, I found that C++ code
> can  connect to HBase using Thrift Interface.
>     However, when compile the DemoClient.cpp within the latest HBase
> release package, it seems that this file is out of date(plenty of APIs need
> a new std::map<Text, Text> & attributes parameter ).
>     And I have also tried to replace  the DemoClient.cpp with the latest
> trunk version. However, after some modification there are still link
> problems when compile the code( undefined reference to
> `apache::thrift::transport::TSocket::TSocket(std::string, int)', I have
> passed the -lthrift parameter to gcc).
>   Is there anyone who can kindly show some can-work C++ code for HBase
> connection?  Or does anyone have any experience on this error?
>   Thanks.
> Kun Ling

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message