python操作hbase创建表(一)

python 通过thrift来操作hbase

  1. 在开发环境安装python库 pip install thrift pip install hbase-thrift
  2. hbase 中需要开启 hbase-daemon.sh start thrift
  3. hadoop、hbse 、Zookeeper 都需要开启
from hbase import Hbase
from thrift.transport import TSocket
from hbase.ttypes import *
# 一定要开启  hbase-daemon.sh start thrift 
transport=TSocket

你可能感兴趣的:(大数据,hbase,python,数据库)