0.引言
HBase-thrift项目是对HBase Thrift接口的封装,屏蔽底层的细节,使用户可以方便地通过HBase Thrift接口访问HBase集群,python通过thrift访问HBase。
1.thrift安装
python客户端机器安装:
thrift官网
下载thrift-0.9.3.tar.gz
下载后解压到当前文件夹
tar xvf thrift-0.9.3.tar.gz
进入thrift-0.9.3文件夹
cd thrift-0.9.3
构建
./configure –prefix=/usr/qy/thrift
错误:configure:error:Bison 2.5 or higher must be installed on the system.
查看bison版本:
which bison
/usr/bin/bison -V (我的是2.4)
tar xvf bison-2.5.tar.gz
cd bison-2.5
./configure --prefix=/usr(覆盖原有的bison)
或者./configure --prefix=/usr/qy/bison-2.5
make
make install(卸载的话直接在当前目录(bison-2.5)里make uninstall)
然后在vim ~/.bashrc 中添加路径
即:原来是:
export PATH="/usr/qy/anaconda/bin:$PATH"
现在是:
export PATH="/usr/qy/ananconda/bin:/usr/qy/bison/bin:$PATH"
然后source ~/.bashrc 使配置的环境变量生效
现在再查看
bison -