Debianized Egg of the Thrift client for HBase
Latest commit 187984b Jun 18, 2010 Simple Geebus Prepared changelog for build 19



This package can be used to generate a Python egg for the HBase thrift bindings.


$ sudo add-apt-repository "deb foss-development main"
$ sudo aptitude update
$ sudo aptitude install simplegeo-keyring
$ sudo aptitude update
$ sudo aptiutde install python-hbase-thrift


$ make sdist
$ sudo easy_install dist/*.tar.gz


#!/usr/bin/env python
import sys

from thrift import Thrift
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol

from hbase import Hbase
from hbase.ttypes import *

# Make socket
transport = TSocket.TSocket('localhost', 9090)

# Buffering is critical. Raw sockets are very slow
transport = TTransport.TBufferedTransport(transport)

# Wrap in a protocol
protocol = TBinaryProtocol.TBinaryProtocol(transport)

client = Hbase.Client(protocol)

print client.getTableNames()

desc = ColumnDescriptor( { 'name' : 'foo:' } )
client.createTable('our_table', [desc])
print client.getTableNames()