thrift hbase client - support filters and coprocessors

走远了吗. 提交于 2019-12-23 13:05:32

问题


Sadly, My hbase client language is Python, I am using happybase for now which is based on thrift AFAIK. I know thrift so far is still not supporting filters, coprocessors (correct me if I am wrong here). Can some one point me any Jira items I can track the plan/progress if there is one? The only ones I can find is from "Hbase in Action":

  • “Thrift server to match the new Java API”: https://issues.apache.org/jira/browse/HBASE-1744

  • “Make Endpoint Coprocessors Available from Thrift”: https://issues.apache.org/jira/browse/HBASE-5600

The 1st one doesn't seem covering filters and the 2nd one hasn't been updated for a long while.


回答1:


Filters are supported through Thrift. Here's a HappyBase example:

table = connection.table("mytable")
g = table.scan(filter="SingleColumnValueFilter ('f', 'column1', =, 'substring:text')")
for key, data in g:
    print data

Also check out Thrift book for information on various filters and their configuration.




回答2:


Family Filter

Description: This filter takes a compare operator and a comparator. It compares each qualifier name with the comparator using the compare operator and if the comparison returns true, it returns all the key-values in that column

Syntax: QualifierFilter (, ‘’)

Example: "QualifierFilter (=, ‘Column1’)"

I think it is a mistake in it



来源:https://stackoverflow.com/questions/14070303/thrift-hbase-client-support-filters-and-coprocessors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!