happybase官方文档
HappyBase — HappyBase 1.2.0 documentation
代码
# 注意 我这里表小,使用scan全表扫描hbase数据,如果你数据量大,建议看官方文档.
import happybase
'''
本脚本的需求是从hbase获取到rowkey的set,然后和hive中某列比较,下面的代码会说去hbase中rowkey组成的set
'''
'''
导入包:
pip install thrift
pip install hbase-thrift
pip install happybase
报错 No protocol version header https://blog.csdn.net/u012447842/article/details/90603942
需要 启动hbase thrift服务(默认端口9090) ./hbase-daemon.sh start thrift
查看thrift是否启动:
shell>> jps
28668 ThriftServer
shell>> netstat -anp|grep 9090
可以看到 9090端口占用的pid和ThriftServer的