python hbase

16 篇文章 0 订阅
[b]需求[/b]
将文本数据导入至hbase中。
[b]安装thrift[/b]
[list]
[*]下载[url]http://thrift.apache.org/download/[/url],并解压
[*]我使用ubuntu系统,参考[url]http://thrift.apache.org/docs/install/[/url],执行sudo apt-get install libboost-dev libboost-test-dev libboost-program-options-dev libevent-dev automake libtool flex bison pkg-config g++ libssl-dev
[*]root账户下,先后执行./configure、make、make install
[/list]
安装python thrift链接,执行easy_install thrift
测试python,from thrift import Thrift 通过
[b]编译[/b]
thrift --gen py src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
当前目录下生成gen-py,将该目录下的hbase文件夹拷贝至/usr/local/lib/python2.7/site-packages/(有可能不在这文件夹)
测试python,from hbase import Hbase通过
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值