-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
asynchbase does not work w/ hbase master branch (hbase-2.0.0); getClosestRowOrBefore was removed #150
Comments
@saintstack Giving it a shot as beginner, pardon me if trivial questions asked :)
|
Ok, finally taking a look at this. It would be nice if HBase could throw an exception on calls to |
@SahilAggarwal Got any code for the short-scan? |
@saintstack A simple reverse scanner like that in the MetaTableAccessor seems to work fine, easy tweak. The only problem I see is that HBase 2.0.0-beta-2 doesn't seem to be responding to the ConnectionHeader RPC from the client, it just reads it and leaves the connection open if everything was good like previous versions of HBase. I couldn't find any server code that created a Any other way we could probe the version? If not I can just add a config flag that folks would have to set marking it as 2.x |
…t should be set when HBase 2.x is used. This will turn on reverse scanning for meta information as opposed to the old way of calling getClosestRowBefore(). As part of this, some callbacks in the Scanner class are now package private so we can re-use them in HBaseClient.java. Fixes OpenTSDB#150 Thanks @saintstack TODO - need to see how this behaves with split meta. TODO - I'd still like to auto-detect HBase 2.0 somehow.
…t should be set when HBase 2.x is used. This will turn on reverse scanning for meta information as opposed to the old way of calling getClosestRowBefore(). As part of this, some callbacks in the Scanner class are now package private so we can re-use them in HBaseClient.java. Fixes OpenTSDB#150 Thanks @saintstack TODO - need to see how this behaves with split meta. TODO - I'd still like to auto-detect HBase 2.0 somehow.
…t should be set when HBase 2.x is used. This will turn on reverse scanning for meta information as opposed to the old way of calling getClosestRowBefore(). As part of this, some callbacks in the Scanner class are now package private so we can re-use them in HBaseClient.java. Fixes OpenTSDB#150 Thanks @saintstack TODO - need to see how this behaves with split meta. TODO - I'd still like to auto-detect HBase 2.0 somehow.
…t should be set when HBase 2.x is used. This will turn on reverse scanning for meta information as opposed to the old way of calling getClosestRowBefore(). As part of this, some callbacks in the Scanner class are now package private so we can re-use them in HBaseClient.java. Fixes #150 Thanks @saintstack TODO - need to see how this behaves with split meta. TODO - I'd still like to auto-detect HBase 2.0 somehow. Signed-off-by: Chris Larsen <clarsen@yahoo-inc.com>
Thanks @manolama Let me try it out. Thats great. Yeah, I'd forgotten how our RPC works but yeah, Server sends nothing back post-Connection [1]. It should but it doesn't. It only complains if the Client asks for something it is unable to provide. I opened an issue on our side to address [2] but the best way would be to throw away our hand-done RPC (smile). I poked around. There is nothing hbase2 specific around Connection setup that asynchbase could leverage unfortunately so could avoid this config which violates the asynchbase philosophy of just figuring it out by probing. |
Awesome, thanks for checking. One way I'm thinking of probing is to perform the getClosestRow call on meta for something like the 'hbase:namespace' that should always be present in 2.x. If it throws an exception or returns empty (as 2.0 currently does) then I could perform a reverse scan to confirm that it's picked up. Make sense @saintstack ? |
@manolama Would it help if we put back getClosestRow... and threw an exception if it was called, UnsupportedOperationException? I'd have to check it didn't mess up old hbase-1.x clients but I don't think it will since they seem fine against hbase2. Could do this quick before we put up a hbase2 RC. hbase:namespace should be there but it can take a while to show up. |
@saintstack Yeah if you return that exception it'd be perfect. Right now it just returns an empty response when I call getClosestRow. Thanks! |
How is this @manolama ? Below is startup of a tsdb daemon against an hbase that has a patch that will throw UnknownProtocolException if client does a get with getClosestOrBefore set:
|
Yeah that sounds good @saintstack, I can catch that and flip to scans easy. |
@manolama Ok. Pushed HBASE-20237 You'll have to check out the tip of branch-2 to get it or play with the pending RC... Start of next week or so. Thanks. |
sweet, thanks! |
@saintstack wanna peep #191 please? |
In master branch which will become hbase-2.0.0, the deprecated getClosestRowOrBefore has been removed. This makes it so asynchbase fails out immediately unable to locate tables/regions in hbase:meta.
A few things:
I'm not too up on asynchbase. If anyone who knows it better is up for working on this, I'd be up for helping out. We'd need to add in some decent tests to ensure asynchbase always did the right thing. I could help here too.
The text was updated successfully, but these errors were encountered: