Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Thrift2 Asynch Row Mutations


Copy link to this message
-
RE: Thrift2 Asynch Row Mutations
Dear All,

It looks like I got messed up between thrift2 and thrift implementations. While I had started the thrift2 server in non-blocking mode, I was using thrift api (instead of thrift2 api) for async operaitons, hence my operations were being ignored by the thrift2 server.

I tried to change to thrift2 api (TPut and client.put), but it did not work as I received errors during async operations, reporting not able to find the target table, and subsequently all other request failed with errors.
2012-10-30 19:42:46,083 WARN org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: Encountered problems when prefetch META table:
org.apache.hadoop.hbase.TableNotFoundException: Cannot find row in .META. for table: �put
                                                                                         testtable_dummy

I changed the server to thrift server (in nonblocking mode) and reverted my changes to have thrift api calls. This worked fine without any issues.

Thanks and Regards
Pankaj Misra
________________________________________
From: Pankaj Misra
Sent: Tuesday, October 30, 2012 6:39 PM
To: [EMAIL PROTECTED]
Subject: RE: Thrift2 Asynch Row Mutations

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 [[EMAIL PROTECTED]]
Sent: Tuesday, October 30, 2012 7:30 PM
To: [EMAIL PROTECTED]
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.
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.

________________________________

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.