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

Does happybase support filters? #11

Closed
shengjie-min opened this issue Dec 28, 2012 · 2 comments
Closed

Does happybase support filters? #11

shengjie-min opened this issue Dec 28, 2012 · 2 comments
Milestone

Comments

@shengjie-min
Copy link

I noticed that in the document:

scan(row_start=None, row_stop=None, row_prefix=None, columns=None, filter=None, timestamp=None, include_timestamp=False, batch_size=1000, limit=None)

The filter argument may be a filter string that will be applied at the server by the region servers.

Does the filter here mean column filters? what does "filter string" mean? in hbase shell, you use filter like this:

scan 'table', { COLUMNS => 'family:qualifier', FILTER =>
SingleColumnValueFilter.new
(Bytes.toBytes('family'),
Bytes.toBytes('qualifier'),
CompareFilter::CompareOp.valueOf('EQUAL'),
SubstringComparator.new('somevalue'))
}

How does it work using happybase ?

@wbolster
Copy link
Member

HappyBase simply passes the filter argument to Table.scan() to the Thrift API. This string should use the filter string syntax used by the HBase Thrift API.

See these pages for more information:

@wbolster
Copy link
Member

See #14.

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