PutRequest failure and error handling

13 views
Skip to first unread message

Amit Chavan

unread,
Jul 19, 2018, 1:18:57 PM7/19/18
to Async HBase
Hello,

I am inserting records in hbase using hclient.put(PutRequest).Below is some psuedo code -

final List<Deferred<Object>> ds = new ArrayList<Deferred<Object>>();

  for(int i=0; i < 1000; i++) {
       PutRequest pr = new PutRequest()
       Deferred<Object> d = hbaseClient.put(pr);
      d.addErrback(new Callback<Exception, Exception>() {
                    @Override
                     public Exception call(Exception arg) throws Exception {
                           //handle exception here. 
                           return arg;
                    }
                });   
       ds.add(d);
 }

Deferred.grou(ds).join();

My question is - Is it possible to pin point which put request actually failed. The error callback is getting hit  and I get the exception stack trace but I need to know if I can exactly find out which put request out of the 1k put request i make fails? Is there facility in the library or the callback to tell me that?

Thanks,
Amit
Reply all
Reply to author
Forward
0 new messages