class HBaseThriftClient(HBaseClient): ''' Client for HBase using the Thrift Interface ''' def __init__(self, host='127.0.0.1', port=9090): ''' Constructor ''' HBaseClient.__init__(self, host, port) self.transport = TBufferedTransport(TSocket(self.host, self.port)) self.protocol = TBinaryProtocol(self.transport) self.client = Hbase.Client(self.protocol) def connect(self): """ Connects to the HBase instance """ try: self.transport.open() except TTransportException, e: print e.message