Skip to content
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

Reversed scanners? #67

Closed
wbolster opened this issue Jun 20, 2014 · 4 comments
Closed

Reversed scanners? #67

wbolster opened this issue Jun 20, 2014 · 4 comments

Comments

@wbolster
Copy link
Member

The TScan struct in the Thrift definition has a reversed field in newer HBase versions.

@Tachyon5
Copy link

I would love love to see reversed method in the happybase api. Any development on this?

@wbolster
Copy link
Member Author

Sorry, no code yet. I don't use HappyBase myself anymore, but still maintain it in my spare time because of my beloved users. ;-)

Anyway, to get support for this in HappyBase, the following needs to be known/done:

  • Exact HBase version when the TScan.reversed field was introduced in the Thrift API
  • A new reversed= arg to Table.scan() that should raise an exception in case it's enabled and the HBase version is too old.
  • The exact behaviour in case the reversed field is set to true needs to be figured out, and I'm not sure this is properly documented/spec'ed, so I guess some experimentation is in order here:
    • does it swap start/stop arguments?
    • how can we still support the row_prefix= argument, which is currently implemented using a client-side (Python side) util.str_increment() helper that calculates the boundaries to be put in TScan.startRow and TScan.stopRow fields of the Thrift API.
  • Of course all of this would need tests. Not extensive ones that check all possible combinations (other tests already do that), just a few that check the boundaries (e.g. start/stop key exclusive/inclusive? does limit work properly? does row_prefix= work properly?)

@Tachyon5
Copy link

If i can commit my group to upgrade to the newer version of HBase and Thrift , I will take a shot and implementing this. Thanks for the response.

@wbolster
Copy link
Member Author

fixed by #155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants