hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pankaj Misra <pankaj.mi...@impetus.co.in>
Subject RE: Thrift2 Asynch Row Mutations
Date Tue, 30 Oct 2012 13:09:20 GMT
Thank you Marcos. Yes I had seen this client on StumbleUpon, but this client does not use thrift
server for async calls. It has its own implementation for async calls.

Thanks for sharing the link for finagle as well.


But I intend to use thrift for making the async calls for nonblocking mode, which I believe
should be simple and straight forward but I cant get it working.

Thanks and Regards
Pankaj Misra


________________________________________
From: Marcos Ortiz [mlortiz@uci.cu]
Sent: Tuesday, October 30, 2012 7:30 PM
To: user@hbase.apache.org
Cc: Pankaj Misra
Subject: Re: Thrift2 Asynch Row Mutations

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

________________________________

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.
Mime
View raw message