好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

HOW TO install thrift on ubuntu lucid 10.04 lts

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 

查看更多关于HOW TO install thrift on ubuntu lucid 10.04 lts的详细内容...

  阅读:39次

上一篇: JDBC初步

下一篇:处长经济