HOW TO install thrift on ubuntu lucid 10.04 lts

参考:
http://blog.csdn.net/wksnm0724/article/details/6585388
sudo apt-get install mono-gmcs
http://vccv.posterous.com/installing-thrift-scribe-on-ubuntu-lucid-1004
 
    
 
    
sudo apt-get install libboost-dev libevent-dev python-dev automake pkg-config libtool flex bison
sudo apt-get install php5-dev
sudo apt-get install ant
sudo apt-get install openjdk-6-jdk
sudo apt-get install bjam
sudo apt-get install libboost-all-dev
 
    
sudo apt-get install libboost-dev libevent-dev libtool flex bison g++ automake pkg-config
$ sudo apt-get install libboost-test-dev
$ sudo apt-get install libmono-dev ruby1.8-dev libcommons-lang-java php5-dev $ 
thrift --gen py /home/mlzboy/hbase-0.90.4/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift
./start-hbase.sh 
./hbase thrift start
http://localhost:60010/

good article
http://whynosql.com/using-thrift-python-client-with-hbase/


#! /usr/bin/env python
#coding=utf-8
import sys
sys.path.append("/home/mlzboy/my/crawler/thrift/gen-py")
from thrift.transport.TSocket import TSocket
from thrift.transport.TTransport import TBufferedTransport
from thrift.protocol import TBinaryProtocol
from hbase import Hbase 
from hbase.ttypes import *
transport = TBufferedTransport(TSocket('localhost', 9090))
transport.open()
protocol = TBinaryProtocol.TBinaryProtocol(transport)
client = Hbase.Client(protocol)
print(client.getTableNames())
print "="*10
#try:
#    client.createTable("table_name", [ColumnDescriptor(name="foo:")])
#    print client.getTableNames()
#except AlreadyExists, tx:
#    print "Thrift exception"
#    print '%s' % (tx.message)
#print(client.getTableNames())


http://blog.csdn.net/lotusdeng2010/article/details/7004537
http://yannramin.com/2008/07/19/using-facebook-thrift-with-python-and-hbase/

a simple hbase python wrap around python-thrift binding
https://github.com/adamhadani/HBasta

LZO installed
sudo apt-get install liblzo2-dev
http://wiki.apache.org/hadoop/UsingLzoCompression
posted on 2011-12-11 15:47  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2011/12/11/2283983.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值