hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcos Ortiz <mlor...@uci.cu>
Subject Re: Thrift2 Asynch Row Mutations
Date Tue, 30 Oct 2012 14:00:11 GMT
Regards, Pankaj.
There are good asynchronous clients for HBase:
StumbleUpon´s asynchbase
https://github.com/stumbleupon/asynchbase

Twitter´s Finagle:
https://github.com/twitter/finagle

On 10/30/2012 07:48 AM, Pankaj Misra wrote:
> Dear All,
>
> I am trying to build an asynch client (nonblocking mode) using thrift2 implementation
of Hbase. My Hbase version in 0.94.1. I am calling HbaseAsynchClient's mutateRow method with
a callback implementation. I have also started the thrift2 server in nonblocking mode listening
on default HOST and PORT.
>
>          TBinaryProtocol.Factory binProtoFactory=new TBinaryProtocol.Factory();
>          TAsyncClientManager clientManager=null;
>          TNonblockingSocket nonBlockingSocket=null;
>
>          try {
>              clientManager=new TAsyncClientManager();
>          } catch (IOException e) {
>              throw new RuntimeException(e);
>          }
>          try {
>              nonBlockingSocket=new TNonblockingSocket(HOST_NAME,PORT_NUMBER);
>
>          } catch (IOException e) {
>              throw new RuntimeException(e);
>          }
>          Hbase.AsyncClient client=new Hbase.AsyncClient(binProtoFactory, clientManager,
nonBlockingSocket);
>
>          client.mutateRow(ipdrTable, ByteBuffer.wrap(key), mutations, mutationAttributes,
new HBaseInsertAsyncHandler());
>
> The handler code is as given below
>
> class HBaseInsertAsyncHandler implements AsyncMethodCallback<mutateRow_call> {
>          public void onComplete(mutateRow_call response) {
>              System.out.println("Completed:"+response);
>          }
>          public void onError(Exception exception) {
>              System.out.println("Error:"+exception);
>          }
>      }
>
>
> When I run this code, it returns with success from the call back handler,
> Completed:org.apache.hadoop.hbase.thrift.generated.Hbase$AsyncClient$mutateRow_call@ffeef1
>
> But I do not see any activity in the thrift logs and neither do I see the records being
inserted in hbase. I am not sure what could be the issue, and I may be missing something here,
for which I would request community's help. I suspect I am not using it properly, would greatly
appreciate your help.
>
>
> Thanks and Regards
> Pankaj Misra
>
> ________________________________
>
> Impetus Ranked in the Top 50 India's Best Companies to Work For 2012.
>
> Impetus webcast 'Designing a Test Automation Framework for Multi-vendor Interoperable
Systems' available at http://lf1.me/0E/.
>
>
> NOTE: This message may contain information that is confidential, proprietary, privileged
or otherwise protected by law. The message is intended solely for the named addressee. If
received in error, please destroy and notify the sender. Any use of this email is prohibited
when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity
of this communication has been maintained nor that the communication is free of errors, virus,
interception or interference.
>
>
> 10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
> CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION
>
> http://www.uci.cu
> http://www.facebook.com/universidad.uci
> http://www.flickr.com/photos/universidad_uci
>
>

-- 

Marcos Luis Ortíz Valmaseda
about.me/marcosortiz <http://about.me/marcosortiz>
@marcosluis2186 <http://twitter.com/marcosluis2186>



10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message