Cascading / cascading.hbase

HBase adapters for Cascading
http://www.cascading.org/
10 stars 11 forks source link

restart on a fresh scanner in case of DoNotRetryIOException(OutOfOrderScannerNextException) #10

Closed cchepelov closed 8 years ago

cchepelov commented 8 years ago

On a busy HBase table, running a full scan can fail if a region is split while it's being mapped.

In that case, the scanner will fail with a DoNotRetryIOException wrapping an OutOfOrderScannerNextException.

The behaviour of the current code is to fail the scan. In fact, the "DoNotRetryIOException" simply requests the client to not retry the offending RPC "as is", as the server knows it can no longer be satisfied. It is however permissible to try again with a fresh scanner (which will presumably scan on different regions).

The patch adds some recovery logic in the OutOfOrderScannerNextException, guarded by a maximum retry limit. If it's reached, we will fail the scan as previously.

fs111 commented 8 years ago

@cchepelov thanks! I took the freedom to start a wip-3.1 branch and pushed the patch into that. LMK if you need anything else.

cchepelov commented 8 years ago

Thanks a lot! I guess I'll wait for 3.1-wip-1 on conjars if/when @cwensel has the time (noticed https://github.com/Cascading/cascading.hbase/blob/wip-3.1/version.properties is still on 3.0.0)

fs111 commented 8 years ago

@cchepelov thanks for the version thing. build should be on conjars on 30 minutes or so

cchepelov commented 8 years ago

Fantastic, thanks! (confirming OK)