Sunday, December 09, 2012

Introduction — HappyBase 0.5dev documentation

Introduction — HappyBase 0.5dev documentation: "from thrift import Thrift
from thrift.transport import TSocket, TTransport
from thrift.protocol import TBinaryProtocol

from hbase import ttypes
from hbase.Hbase import Client, Mutation

sock = TSocket.TSocket('hostname', 9090)
transport = TTransport.TBufferedTransport(sock)
protocol = TBinaryProtocol.TBinaryProtocol(transport)
client = Client(protocol)
transport.open()

mutations = [Mutation(column='family:qual1', value='value1'),
Mutation(column='family:qual2', value='value2')]
client.mutateRow('table-name', 'row-key', mutations)"

'via Blog this'