From 3e7c6a6e4faa8244157f6f0353f6d50d3a14dda0 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 24 Jul 2009 15:01:09 +0000 Subject: [PATCH] HBASE-1699 Remove hbrep example as it's too out of date git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@797512 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../uploaders/hbrep/HBaseConnection.py | 39 - src/examples/uploaders/hbrep/HBaseConsumer.py | 90 - .../uploaders/hbrep/Hbase/Hbase-remote | 247 - src/examples/uploaders/hbrep/Hbase/Hbase.py | 5153 ----------------- .../uploaders/hbrep/Hbase/__init__.py | 1 - .../uploaders/hbrep/Hbase/constants.py | 9 - src/examples/uploaders/hbrep/Hbase/ttypes.py | 708 --- src/examples/uploaders/hbrep/README | 107 - src/examples/uploaders/hbrep/__init__.py | 0 src/examples/uploaders/hbrep/bootstrap.py | 190 - src/examples/uploaders/hbrep/hbrep.ini | 22 - src/examples/uploaders/hbrep/hbrep.py | 126 - src/examples/uploaders/hbrep/pgq.ini | 10 - src/examples/uploaders/hbrep/tablemapping.py | 33 - 15 files changed, 1 insertion(+), 6735 deletions(-) delete mode 100644 src/examples/uploaders/hbrep/HBaseConnection.py delete mode 100644 src/examples/uploaders/hbrep/HBaseConsumer.py delete mode 100755 src/examples/uploaders/hbrep/Hbase/Hbase-remote delete mode 100644 src/examples/uploaders/hbrep/Hbase/Hbase.py delete mode 100644 src/examples/uploaders/hbrep/Hbase/__init__.py delete mode 100644 src/examples/uploaders/hbrep/Hbase/constants.py delete mode 100644 src/examples/uploaders/hbrep/Hbase/ttypes.py delete mode 100644 src/examples/uploaders/hbrep/README delete mode 100644 src/examples/uploaders/hbrep/__init__.py delete mode 100644 src/examples/uploaders/hbrep/bootstrap.py delete mode 100644 src/examples/uploaders/hbrep/hbrep.ini delete mode 100755 src/examples/uploaders/hbrep/hbrep.py delete mode 100644 src/examples/uploaders/hbrep/pgq.ini delete mode 100644 src/examples/uploaders/hbrep/tablemapping.py diff --git a/CHANGES.txt b/CHANGES.txt index 732c870ab64..bd762773af7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -508,6 +508,7 @@ Release 0.20.0 - Unreleased HBASE-1688 Improve javadocs in Result and KeyValue HBASE-1694 Add TOC to 'Getting Started', add references to THBase and ITHBase + HBASE-1699 Remove hbrep example as it's too out of date OPTIMIZATIONS HBASE-1412 Change values for delete column and column family in KeyValue diff --git a/src/examples/uploaders/hbrep/HBaseConnection.py b/src/examples/uploaders/hbrep/HBaseConnection.py deleted file mode 100644 index d8006b234c7..00000000000 --- a/src/examples/uploaders/hbrep/HBaseConnection.py +++ /dev/null @@ -1,39 +0,0 @@ -import sys, os - -from Hbase.ttypes import * -from Hbase import Hbase - -from thrift import Thrift -from thrift.transport import TSocket, TTransport -from thrift.protocol import TBinaryProtocol - -class HBaseConnection: - def __init__(self, hostname, port): - # Make socket - self.transport = TSocket.TSocket(hostname, port) - # Buffering is critical. Raw sockets are very slow - self.transport = TTransport.TBufferedTransport(self.transport) - # Wrap in a protocol - self.protocol = TBinaryProtocol.TBinaryProtocol(self.transport) - # Create a client to use the protocol encoder - self.client = Hbase.Client(self.protocol) - - def connect(self): - self.transport.open() - - def disconnect(self): - self.transport.close() - - def validate_column_descriptors(self, table_name, column_descriptors): - hbase_families = self.client.getColumnDescriptors(table_name) - for col_desc in column_descriptors: - family, column = col_desc.split(":") - if not family in hbase_families: - raise Exception("Invalid column descriptor \"%s\" for hbase table \"%s\"" % (col_desc,table_name)) - - def validate_table_name(self, table_name): - if not table_name in self.client.getTableNames(): - raise Exception("hbase table '%s' not found." % (table_name)) - - - \ No newline at end of file diff --git a/src/examples/uploaders/hbrep/HBaseConsumer.py b/src/examples/uploaders/hbrep/HBaseConsumer.py deleted file mode 100644 index 175f331b52d..00000000000 --- a/src/examples/uploaders/hbrep/HBaseConsumer.py +++ /dev/null @@ -1,90 +0,0 @@ -import sys, os, pgq, skytools, ConfigParser - -from thrift import Thrift -from thrift.transport import TSocket, TTransport -from thrift.protocol import TBinaryProtocol - -from HBaseConnection import * -import tablemapping - -INSERT = 'I' -UPDATE = 'U' -DELETE = 'D' - -class HBaseConsumer(pgq.Consumer): - """HBaseConsumer is a pgq.Consumer that sends processed events to hbase as mutations.""" - - def __init__(self, service_name, args): - pgq.Consumer.__init__(self, service_name, "postgresql_db", args) - - config_file = self.args[0] - if len(self.args) < 2: - print "need table names" - sys.exit(1) - else: - self.table_names = self.args[1:] - - #just to check this option exists - self.cf.get("postgresql_db") - - self.max_batch_size = int(self.cf.get("max_batch_size", "10000")) - self.hbase_hostname = self.cf.get("hbase_hostname", "localhost") - self.hbase_port = int(self.cf.get("hbase_port", "9090")) - self.row_limit = int(self.cf.get("bootstrap_row_limit", 0)) - self.table_mappings = tablemapping.load_table_mappings(config_file, self.table_names) - - def process_batch(self, source_db, batch_id, event_list): - try: - self.log.debug("processing batch %s" % (batch_id)) - hbase = HBaseConnection(self.hbase_hostname, self.hbase_port) - try: - self.log.debug("Connecting to HBase") - hbase.connect() - - i = 0L - for event in event_list: - i = i+1 - self.process_event(event, hbase) - print "%i events processed" % (i) - - except Exception, e: - #self.log.info(e) - sys.exit(e) - - finally: - hbase.disconnect() - - def process_event(self, event, hbase): - if event.ev_extra1 in self.table_mappings: - table_mapping = self.table_mappings[event.ev_extra1] - else: - self.log.info("table name not found in config, skipping event") - return - #hbase.validate_table_name(table_mapping.hbase_table_name) - #hbase.validate_column_descriptors(table_mapping.hbase_table_name, table_mapping.hbase_column_descriptors) - event_data = skytools.db_urldecode(event.data) - event_type = event.type.split(':')[0] - - batch = BatchMutation() - batch.row = table_mapping.hbase_row_prefix + str(event_data[table_mapping.psql_key_column]) - - batch.mutations = [] - for psql_column, hbase_column in zip(table_mapping.psql_columns, table_mapping.hbase_column_descriptors): - if event_type == INSERT or event_type == UPDATE: - m = Mutation() - m.column = hbase_column - m.value = str(event_data[psql_column]) - elif event_type == DELETE: - # delete this column entry - m = Mutation() - m.isDelete = True - m.column = hbase_column - else: - raise Exception("Invalid event type: %s, event data was: %s" % (event_type, str(event_data))) - batch.mutations.append(m) - hbase.client.mutateRow(table_mapping.hbase_table_name, batch.row, batch.mutations) - event.tag_done() - -if __name__ == '__main__': - script = HBaseConsumer("HBaseReplic",sys.argv[1:]) - script.start() diff --git a/src/examples/uploaders/hbrep/Hbase/Hbase-remote b/src/examples/uploaders/hbrep/Hbase/Hbase-remote deleted file mode 100755 index 2ec9e95abd3..00000000000 --- a/src/examples/uploaders/hbrep/Hbase/Hbase-remote +++ /dev/null @@ -1,247 +0,0 @@ -#!/usr/bin/env python -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -import sys -import pprint -from urlparse import urlparse -from thrift.transport import TTransport -from thrift.transport import TSocket -from thrift.transport import THttpClient -from thrift.protocol import TBinaryProtocol - -import Hbase -from ttypes import * - -if len(sys.argv) <= 1 or sys.argv[1] == '--help': - print '' - print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]' - print '' - print 'Functions:' - print ' getTableNames()' - print ' getColumnDescriptors(Text tableName)' - print ' getTableRegions(Text tableName)' - print ' void createTable(Text tableName, columnFamilies)' - print ' void deleteTable(Text tableName)' - print ' Bytes get(Text tableName, Text row, Text column)' - print ' getVer(Text tableName, Text row, Text column, i32 numVersions)' - print ' getVerTs(Text tableName, Text row, Text column, i64 timestamp, i32 numVersions)' - print ' getRow(Text tableName, Text row)' - print ' getRowTs(Text tableName, Text row, i64 timestamp)' - print ' void put(Text tableName, Text row, Text column, Bytes value)' - print ' void mutateRow(Text tableName, Text row, mutations)' - print ' void mutateRowTs(Text tableName, Text row, mutations, i64 timestamp)' - print ' void mutateRows(Text tableName, rowBatches)' - print ' void mutateRowsTs(Text tableName, rowBatches, i64 timestamp)' - print ' void deleteAll(Text tableName, Text row, Text column)' - print ' void deleteAllTs(Text tableName, Text row, Text column, i64 timestamp)' - print ' void deleteAllRow(Text tableName, Text row)' - print ' void deleteAllRowTs(Text tableName, Text row, i64 timestamp)' - print ' ScannerID scannerOpen(Text tableName, Text startRow, columns)' - print ' ScannerID scannerOpenWithStop(Text tableName, Text startRow, Text stopRow, columns)' - print ' ScannerID scannerOpenTs(Text tableName, Text startRow, columns, i64 timestamp)' - print ' ScannerID scannerOpenWithStopTs(Text tableName, Text startRow, Text stopRow, columns, i64 timestamp)' - print ' ScanEntry scannerGet(ScannerID id)' - print ' void scannerClose(ScannerID id)' - print '' - sys.exit(0) - -pp = pprint.PrettyPrinter(indent = 2) -host = 'localhost' -port = 9090 -uri = '' -framed = False -http = False -argi = 1 - -if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - port = int(parts[1]) - argi += 2 - -if sys.argv[argi] == '-u': - url = urlparse(sys.argv[argi+1]) - parts = url[1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - else: - port = 80 - uri = url[2] - http = True - argi += 2 - -if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 - -cmd = sys.argv[argi] -args = sys.argv[argi+1:] - -if http: - transport = THttpClient.THttpClient(host, port, uri) -else: - socket = TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol.TBinaryProtocol(transport) -client = Hbase.Client(protocol) -transport.open() - -if cmd == 'getTableNames': - if len(args) != 0: - print 'getTableNames requires 0 args' - sys.exit(1) - pp.pprint(client.getTableNames()) - -elif cmd == 'getColumnDescriptors': - if len(args) != 1: - print 'getColumnDescriptors requires 1 args' - sys.exit(1) - pp.pprint(client.getColumnDescriptors(eval(args[0]),)) - -elif cmd == 'getTableRegions': - if len(args) != 1: - print 'getTableRegions requires 1 args' - sys.exit(1) - pp.pprint(client.getTableRegions(eval(args[0]),)) - -elif cmd == 'createTable': - if len(args) != 2: - print 'createTable requires 2 args' - sys.exit(1) - pp.pprint(client.createTable(eval(args[0]),eval(args[1]),)) - -elif cmd == 'deleteTable': - if len(args) != 1: - print 'deleteTable requires 1 args' - sys.exit(1) - pp.pprint(client.deleteTable(eval(args[0]),)) - -elif cmd == 'get': - if len(args) != 3: - print 'get requires 3 args' - sys.exit(1) - pp.pprint(client.get(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'getVer': - if len(args) != 4: - print 'getVer requires 4 args' - sys.exit(1) - pp.pprint(client.getVer(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'getVerTs': - if len(args) != 5: - print 'getVerTs requires 5 args' - sys.exit(1) - pp.pprint(client.getVerTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) - -elif cmd == 'getRow': - if len(args) != 2: - print 'getRow requires 2 args' - sys.exit(1) - pp.pprint(client.getRow(eval(args[0]),eval(args[1]),)) - -elif cmd == 'getRowTs': - if len(args) != 3: - print 'getRowTs requires 3 args' - sys.exit(1) - pp.pprint(client.getRowTs(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'put': - if len(args) != 4: - print 'put requires 4 args' - sys.exit(1) - pp.pprint(client.put(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'mutateRow': - if len(args) != 3: - print 'mutateRow requires 3 args' - sys.exit(1) - pp.pprint(client.mutateRow(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'mutateRowTs': - if len(args) != 4: - print 'mutateRowTs requires 4 args' - sys.exit(1) - pp.pprint(client.mutateRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'mutateRows': - if len(args) != 2: - print 'mutateRows requires 2 args' - sys.exit(1) - pp.pprint(client.mutateRows(eval(args[0]),eval(args[1]),)) - -elif cmd == 'mutateRowsTs': - if len(args) != 3: - print 'mutateRowsTs requires 3 args' - sys.exit(1) - pp.pprint(client.mutateRowsTs(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'deleteAll': - if len(args) != 3: - print 'deleteAll requires 3 args' - sys.exit(1) - pp.pprint(client.deleteAll(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'deleteAllTs': - if len(args) != 4: - print 'deleteAllTs requires 4 args' - sys.exit(1) - pp.pprint(client.deleteAllTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'deleteAllRow': - if len(args) != 2: - print 'deleteAllRow requires 2 args' - sys.exit(1) - pp.pprint(client.deleteAllRow(eval(args[0]),eval(args[1]),)) - -elif cmd == 'deleteAllRowTs': - if len(args) != 3: - print 'deleteAllRowTs requires 3 args' - sys.exit(1) - pp.pprint(client.deleteAllRowTs(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'scannerOpen': - if len(args) != 3: - print 'scannerOpen requires 3 args' - sys.exit(1) - pp.pprint(client.scannerOpen(eval(args[0]),eval(args[1]),eval(args[2]),)) - -elif cmd == 'scannerOpenWithStop': - if len(args) != 4: - print 'scannerOpenWithStop requires 4 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithStop(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'scannerOpenTs': - if len(args) != 4: - print 'scannerOpenTs requires 4 args' - sys.exit(1) - pp.pprint(client.scannerOpenTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) - -elif cmd == 'scannerOpenWithStopTs': - if len(args) != 5: - print 'scannerOpenWithStopTs requires 5 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithStopTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) - -elif cmd == 'scannerGet': - if len(args) != 1: - print 'scannerGet requires 1 args' - sys.exit(1) - pp.pprint(client.scannerGet(eval(args[0]),)) - -elif cmd == 'scannerClose': - if len(args) != 1: - print 'scannerClose requires 1 args' - sys.exit(1) - pp.pprint(client.scannerClose(eval(args[0]),)) - -transport.close() diff --git a/src/examples/uploaders/hbrep/Hbase/Hbase.py b/src/examples/uploaders/hbrep/Hbase/Hbase.py deleted file mode 100644 index 0ce842f0563..00000000000 --- a/src/examples/uploaders/hbrep/Hbase/Hbase.py +++ /dev/null @@ -1,5153 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * -from ttypes import * -from thrift.Thrift import TProcessor -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class Iface: - def getTableNames(self, ): - pass - - def getColumnDescriptors(self, tableName): - pass - - def getTableRegions(self, tableName): - pass - - def createTable(self, tableName, columnFamilies): - pass - - def deleteTable(self, tableName): - pass - - def get(self, tableName, row, column): - pass - - def getVer(self, tableName, row, column, numVersions): - pass - - def getVerTs(self, tableName, row, column, timestamp, numVersions): - pass - - def getRow(self, tableName, row): - pass - - def getRowTs(self, tableName, row, timestamp): - pass - - def put(self, tableName, row, column, value): - pass - - def mutateRow(self, tableName, row, mutations): - pass - - def mutateRowTs(self, tableName, row, mutations, timestamp): - pass - - def mutateRows(self, tableName, rowBatches): - pass - - def mutateRowsTs(self, tableName, rowBatches, timestamp): - pass - - def deleteAll(self, tableName, row, column): - pass - - def deleteAllTs(self, tableName, row, column, timestamp): - pass - - def deleteAllRow(self, tableName, row): - pass - - def deleteAllRowTs(self, tableName, row, timestamp): - pass - - def scannerOpen(self, tableName, startRow, columns): - pass - - def scannerOpenWithStop(self, tableName, startRow, stopRow, columns): - pass - - def scannerOpenTs(self, tableName, startRow, columns, timestamp): - pass - - def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp): - pass - - def scannerGet(self, id): - pass - - def scannerClose(self, id): - pass - - -class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot != None: - self._oprot = oprot - self._seqid = 0 - - def getTableNames(self, ): - self.send_getTableNames() - return self.recv_getTableNames() - - def send_getTableNames(self, ): - self._oprot.writeMessageBegin('getTableNames', TMessageType.CALL, self._seqid) - args = getTableNames_args() - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getTableNames(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getTableNames_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); - - def getColumnDescriptors(self, tableName): - self.send_getColumnDescriptors(tableName) - return self.recv_getColumnDescriptors() - - def send_getColumnDescriptors(self, tableName): - self._oprot.writeMessageBegin('getColumnDescriptors', TMessageType.CALL, self._seqid) - args = getColumnDescriptors_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getColumnDescriptors(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getColumnDescriptors_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); - - def getTableRegions(self, tableName): - self.send_getTableRegions(tableName) - return self.recv_getTableRegions() - - def send_getTableRegions(self, tableName): - self._oprot.writeMessageBegin('getTableRegions', TMessageType.CALL, self._seqid) - args = getTableRegions_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getTableRegions(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getTableRegions_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); - - def createTable(self, tableName, columnFamilies): - self.send_createTable(tableName, columnFamilies) - self.recv_createTable() - - def send_createTable(self, tableName, columnFamilies): - self._oprot.writeMessageBegin('createTable', TMessageType.CALL, self._seqid) - args = createTable_args() - args.tableName = tableName - args.columnFamilies = columnFamilies - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_createTable(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = createTable_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - if result.exist != None: - raise result.exist - return - - def deleteTable(self, tableName): - self.send_deleteTable(tableName) - self.recv_deleteTable() - - def send_deleteTable(self, tableName): - self._oprot.writeMessageBegin('deleteTable', TMessageType.CALL, self._seqid) - args = deleteTable_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteTable(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteTable_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.nf != None: - raise result.nf - return - - def get(self, tableName, row, column): - self.send_get(tableName, row, column) - return self.recv_get() - - def send_get(self, tableName, row, column): - self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) - args = get_args() - args.tableName = tableName - args.row = row - args.column = column - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_get(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = get_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - if result.nf != None: - raise result.nf - raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result"); - - def getVer(self, tableName, row, column, numVersions): - self.send_getVer(tableName, row, column, numVersions) - return self.recv_getVer() - - def send_getVer(self, tableName, row, column, numVersions): - self._oprot.writeMessageBegin('getVer', TMessageType.CALL, self._seqid) - args = getVer_args() - args.tableName = tableName - args.row = row - args.column = column - args.numVersions = numVersions - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getVer(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getVer_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - if result.nf != None: - raise result.nf - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); - - def getVerTs(self, tableName, row, column, timestamp, numVersions): - self.send_getVerTs(tableName, row, column, timestamp, numVersions) - return self.recv_getVerTs() - - def send_getVerTs(self, tableName, row, column, timestamp, numVersions): - self._oprot.writeMessageBegin('getVerTs', TMessageType.CALL, self._seqid) - args = getVerTs_args() - args.tableName = tableName - args.row = row - args.column = column - args.timestamp = timestamp - args.numVersions = numVersions - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getVerTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getVerTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - if result.nf != None: - raise result.nf - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); - - def getRow(self, tableName, row): - self.send_getRow(tableName, row) - return self.recv_getRow() - - def send_getRow(self, tableName, row): - self._oprot.writeMessageBegin('getRow', TMessageType.CALL, self._seqid) - args = getRow_args() - args.tableName = tableName - args.row = row - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getRow(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRow_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); - - def getRowTs(self, tableName, row, timestamp): - self.send_getRowTs(tableName, row, timestamp) - return self.recv_getRowTs() - - def send_getRowTs(self, tableName, row, timestamp): - self._oprot.writeMessageBegin('getRowTs', TMessageType.CALL, self._seqid) - args = getRowTs_args() - args.tableName = tableName - args.row = row - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_getRowTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); - - def put(self, tableName, row, column, value): - self.send_put(tableName, row, column, value) - self.recv_put() - - def send_put(self, tableName, row, column, value): - self._oprot.writeMessageBegin('put', TMessageType.CALL, self._seqid) - args = put_args() - args.tableName = tableName - args.row = row - args.column = column - args.value = value - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_put(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = put_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - def mutateRow(self, tableName, row, mutations): - self.send_mutateRow(tableName, row, mutations) - self.recv_mutateRow() - - def send_mutateRow(self, tableName, row, mutations): - self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) - args = mutateRow_args() - args.tableName = tableName - args.row = row - args.mutations = mutations - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_mutateRow(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = mutateRow_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - def mutateRowTs(self, tableName, row, mutations, timestamp): - self.send_mutateRowTs(tableName, row, mutations, timestamp) - self.recv_mutateRowTs() - - def send_mutateRowTs(self, tableName, row, mutations, timestamp): - self._oprot.writeMessageBegin('mutateRowTs', TMessageType.CALL, self._seqid) - args = mutateRowTs_args() - args.tableName = tableName - args.row = row - args.mutations = mutations - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_mutateRowTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = mutateRowTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - def mutateRows(self, tableName, rowBatches): - self.send_mutateRows(tableName, rowBatches) - self.recv_mutateRows() - - def send_mutateRows(self, tableName, rowBatches): - self._oprot.writeMessageBegin('mutateRows', TMessageType.CALL, self._seqid) - args = mutateRows_args() - args.tableName = tableName - args.rowBatches = rowBatches - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_mutateRows(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = mutateRows_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - def mutateRowsTs(self, tableName, rowBatches, timestamp): - self.send_mutateRowsTs(tableName, rowBatches, timestamp) - self.recv_mutateRowsTs() - - def send_mutateRowsTs(self, tableName, rowBatches, timestamp): - self._oprot.writeMessageBegin('mutateRowsTs', TMessageType.CALL, self._seqid) - args = mutateRowsTs_args() - args.tableName = tableName - args.rowBatches = rowBatches - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_mutateRowsTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = mutateRowsTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - def deleteAll(self, tableName, row, column): - self.send_deleteAll(tableName, row, column) - self.recv_deleteAll() - - def send_deleteAll(self, tableName, row, column): - self._oprot.writeMessageBegin('deleteAll', TMessageType.CALL, self._seqid) - args = deleteAll_args() - args.tableName = tableName - args.row = row - args.column = column - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteAll(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteAll_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - return - - def deleteAllTs(self, tableName, row, column, timestamp): - self.send_deleteAllTs(tableName, row, column, timestamp) - self.recv_deleteAllTs() - - def send_deleteAllTs(self, tableName, row, column, timestamp): - self._oprot.writeMessageBegin('deleteAllTs', TMessageType.CALL, self._seqid) - args = deleteAllTs_args() - args.tableName = tableName - args.row = row - args.column = column - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteAllTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteAllTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - return - - def deleteAllRow(self, tableName, row): - self.send_deleteAllRow(tableName, row) - self.recv_deleteAllRow() - - def send_deleteAllRow(self, tableName, row): - self._oprot.writeMessageBegin('deleteAllRow', TMessageType.CALL, self._seqid) - args = deleteAllRow_args() - args.tableName = tableName - args.row = row - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteAllRow(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteAllRow_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - return - - def deleteAllRowTs(self, tableName, row, timestamp): - self.send_deleteAllRowTs(tableName, row, timestamp) - self.recv_deleteAllRowTs() - - def send_deleteAllRowTs(self, tableName, row, timestamp): - self._oprot.writeMessageBegin('deleteAllRowTs', TMessageType.CALL, self._seqid) - args = deleteAllRowTs_args() - args.tableName = tableName - args.row = row - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_deleteAllRowTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = deleteAllRowTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - return - - def scannerOpen(self, tableName, startRow, columns): - self.send_scannerOpen(tableName, startRow, columns) - return self.recv_scannerOpen() - - def send_scannerOpen(self, tableName, startRow, columns): - self._oprot.writeMessageBegin('scannerOpen', TMessageType.CALL, self._seqid) - args = scannerOpen_args() - args.tableName = tableName - args.startRow = startRow - args.columns = columns - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerOpen(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpen_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); - - def scannerOpenWithStop(self, tableName, startRow, stopRow, columns): - self.send_scannerOpenWithStop(tableName, startRow, stopRow, columns) - return self.recv_scannerOpenWithStop() - - def send_scannerOpenWithStop(self, tableName, startRow, stopRow, columns): - self._oprot.writeMessageBegin('scannerOpenWithStop', TMessageType.CALL, self._seqid) - args = scannerOpenWithStop_args() - args.tableName = tableName - args.startRow = startRow - args.stopRow = stopRow - args.columns = columns - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerOpenWithStop(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpenWithStop_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); - - def scannerOpenTs(self, tableName, startRow, columns, timestamp): - self.send_scannerOpenTs(tableName, startRow, columns, timestamp) - return self.recv_scannerOpenTs() - - def send_scannerOpenTs(self, tableName, startRow, columns, timestamp): - self._oprot.writeMessageBegin('scannerOpenTs', TMessageType.CALL, self._seqid) - args = scannerOpenTs_args() - args.tableName = tableName - args.startRow = startRow - args.columns = columns - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerOpenTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpenTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); - - def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp): - self.send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) - return self.recv_scannerOpenWithStopTs() - - def send_scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp): - self._oprot.writeMessageBegin('scannerOpenWithStopTs', TMessageType.CALL, self._seqid) - args = scannerOpenWithStopTs_args() - args.tableName = tableName - args.startRow = startRow - args.stopRow = stopRow - args.columns = columns - args.timestamp = timestamp - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerOpenWithStopTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpenWithStopTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); - - def scannerGet(self, id): - self.send_scannerGet(id) - return self.recv_scannerGet() - - def send_scannerGet(self, id): - self._oprot.writeMessageBegin('scannerGet', TMessageType.CALL, self._seqid) - args = scannerGet_args() - args.id = id - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerGet(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerGet_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success != None: - return result.success - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - if result.nf != None: - raise result.nf - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result"); - - def scannerClose(self, id): - self.send_scannerClose(id) - self.recv_scannerClose() - - def send_scannerClose(self, id): - self._oprot.writeMessageBegin('scannerClose', TMessageType.CALL, self._seqid) - args = scannerClose_args() - args.id = id - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_scannerClose(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerClose_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io != None: - raise result.io - if result.ia != None: - raise result.ia - return - - -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["getTableNames"] = Processor.process_getTableNames - self._processMap["getColumnDescriptors"] = Processor.process_getColumnDescriptors - self._processMap["getTableRegions"] = Processor.process_getTableRegions - self._processMap["createTable"] = Processor.process_createTable - self._processMap["deleteTable"] = Processor.process_deleteTable - self._processMap["get"] = Processor.process_get - self._processMap["getVer"] = Processor.process_getVer - self._processMap["getVerTs"] = Processor.process_getVerTs - self._processMap["getRow"] = Processor.process_getRow - self._processMap["getRowTs"] = Processor.process_getRowTs - self._processMap["put"] = Processor.process_put - self._processMap["mutateRow"] = Processor.process_mutateRow - self._processMap["mutateRowTs"] = Processor.process_mutateRowTs - self._processMap["mutateRows"] = Processor.process_mutateRows - self._processMap["mutateRowsTs"] = Processor.process_mutateRowsTs - self._processMap["deleteAll"] = Processor.process_deleteAll - self._processMap["deleteAllTs"] = Processor.process_deleteAllTs - self._processMap["deleteAllRow"] = Processor.process_deleteAllRow - self._processMap["deleteAllRowTs"] = Processor.process_deleteAllRowTs - self._processMap["scannerOpen"] = Processor.process_scannerOpen - self._processMap["scannerOpenWithStop"] = Processor.process_scannerOpenWithStop - self._processMap["scannerOpenTs"] = Processor.process_scannerOpenTs - self._processMap["scannerOpenWithStopTs"] = Processor.process_scannerOpenWithStopTs - self._processMap["scannerGet"] = Processor.process_scannerGet - self._processMap["scannerClose"] = Processor.process_scannerClose - - def process(self, iprot, oprot): - (name, type, seqid) = iprot.readMessageBegin() - if name not in self._processMap: - iprot.skip(TType.STRUCT) - iprot.readMessageEnd() - x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) - oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) - x.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - return - else: - self._processMap[name](self, seqid, iprot, oprot) - return True - - def process_getTableNames(self, seqid, iprot, oprot): - args = getTableNames_args() - args.read(iprot) - iprot.readMessageEnd() - result = getTableNames_result() - try: - result.success = self._handler.getTableNames() - except IOError, io: - result.io = io - oprot.writeMessageBegin("getTableNames", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getColumnDescriptors(self, seqid, iprot, oprot): - args = getColumnDescriptors_args() - args.read(iprot) - iprot.readMessageEnd() - result = getColumnDescriptors_result() - try: - result.success = self._handler.getColumnDescriptors(args.tableName) - except IOError, io: - result.io = io - oprot.writeMessageBegin("getColumnDescriptors", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getTableRegions(self, seqid, iprot, oprot): - args = getTableRegions_args() - args.read(iprot) - iprot.readMessageEnd() - result = getTableRegions_result() - try: - result.success = self._handler.getTableRegions(args.tableName) - except IOError, io: - result.io = io - oprot.writeMessageBegin("getTableRegions", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_createTable(self, seqid, iprot, oprot): - args = createTable_args() - args.read(iprot) - iprot.readMessageEnd() - result = createTable_result() - try: - self._handler.createTable(args.tableName, args.columnFamilies) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - except AlreadyExists, exist: - result.exist = exist - oprot.writeMessageBegin("createTable", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteTable(self, seqid, iprot, oprot): - args = deleteTable_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteTable_result() - try: - self._handler.deleteTable(args.tableName) - except IOError, io: - result.io = io - except NotFound, nf: - result.nf = nf - oprot.writeMessageBegin("deleteTable", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_get(self, seqid, iprot, oprot): - args = get_args() - args.read(iprot) - iprot.readMessageEnd() - result = get_result() - try: - result.success = self._handler.get(args.tableName, args.row, args.column) - except IOError, io: - result.io = io - except NotFound, nf: - result.nf = nf - oprot.writeMessageBegin("get", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getVer(self, seqid, iprot, oprot): - args = getVer_args() - args.read(iprot) - iprot.readMessageEnd() - result = getVer_result() - try: - result.success = self._handler.getVer(args.tableName, args.row, args.column, args.numVersions) - except IOError, io: - result.io = io - except NotFound, nf: - result.nf = nf - oprot.writeMessageBegin("getVer", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getVerTs(self, seqid, iprot, oprot): - args = getVerTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = getVerTs_result() - try: - result.success = self._handler.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions) - except IOError, io: - result.io = io - except NotFound, nf: - result.nf = nf - oprot.writeMessageBegin("getVerTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRow(self, seqid, iprot, oprot): - args = getRow_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRow_result() - try: - result.success = self._handler.getRow(args.tableName, args.row) - except IOError, io: - result.io = io - oprot.writeMessageBegin("getRow", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowTs(self, seqid, iprot, oprot): - args = getRowTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowTs_result() - try: - result.success = self._handler.getRowTs(args.tableName, args.row, args.timestamp) - except IOError, io: - result.io = io - oprot.writeMessageBegin("getRowTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_put(self, seqid, iprot, oprot): - args = put_args() - args.read(iprot) - iprot.readMessageEnd() - result = put_result() - try: - self._handler.put(args.tableName, args.row, args.column, args.value) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("put", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_mutateRow(self, seqid, iprot, oprot): - args = mutateRow_args() - args.read(iprot) - iprot.readMessageEnd() - result = mutateRow_result() - try: - self._handler.mutateRow(args.tableName, args.row, args.mutations) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("mutateRow", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_mutateRowTs(self, seqid, iprot, oprot): - args = mutateRowTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = mutateRowTs_result() - try: - self._handler.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("mutateRowTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_mutateRows(self, seqid, iprot, oprot): - args = mutateRows_args() - args.read(iprot) - iprot.readMessageEnd() - result = mutateRows_result() - try: - self._handler.mutateRows(args.tableName, args.rowBatches) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("mutateRows", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_mutateRowsTs(self, seqid, iprot, oprot): - args = mutateRowsTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = mutateRowsTs_result() - try: - self._handler.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("mutateRowsTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteAll(self, seqid, iprot, oprot): - args = deleteAll_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteAll_result() - try: - self._handler.deleteAll(args.tableName, args.row, args.column) - except IOError, io: - result.io = io - oprot.writeMessageBegin("deleteAll", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteAllTs(self, seqid, iprot, oprot): - args = deleteAllTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteAllTs_result() - try: - self._handler.deleteAllTs(args.tableName, args.row, args.column, args.timestamp) - except IOError, io: - result.io = io - oprot.writeMessageBegin("deleteAllTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteAllRow(self, seqid, iprot, oprot): - args = deleteAllRow_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteAllRow_result() - try: - self._handler.deleteAllRow(args.tableName, args.row) - except IOError, io: - result.io = io - oprot.writeMessageBegin("deleteAllRow", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteAllRowTs(self, seqid, iprot, oprot): - args = deleteAllRowTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteAllRowTs_result() - try: - self._handler.deleteAllRowTs(args.tableName, args.row, args.timestamp) - except IOError, io: - result.io = io - oprot.writeMessageBegin("deleteAllRowTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpen(self, seqid, iprot, oprot): - args = scannerOpen_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpen_result() - try: - result.success = self._handler.scannerOpen(args.tableName, args.startRow, args.columns) - except IOError, io: - result.io = io - oprot.writeMessageBegin("scannerOpen", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpenWithStop(self, seqid, iprot, oprot): - args = scannerOpenWithStop_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpenWithStop_result() - try: - result.success = self._handler.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns) - except IOError, io: - result.io = io - oprot.writeMessageBegin("scannerOpenWithStop", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpenTs(self, seqid, iprot, oprot): - args = scannerOpenTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpenTs_result() - try: - result.success = self._handler.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp) - except IOError, io: - result.io = io - oprot.writeMessageBegin("scannerOpenTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpenWithStopTs(self, seqid, iprot, oprot): - args = scannerOpenWithStopTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpenWithStopTs_result() - try: - result.success = self._handler.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp) - except IOError, io: - result.io = io - oprot.writeMessageBegin("scannerOpenWithStopTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerGet(self, seqid, iprot, oprot): - args = scannerGet_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerGet_result() - try: - result.success = self._handler.scannerGet(args.id) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - except NotFound, nf: - result.nf = nf - oprot.writeMessageBegin("scannerGet", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerClose(self, seqid, iprot, oprot): - args = scannerClose_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerClose_result() - try: - self._handler.scannerClose(args.id) - except IOError, io: - result.io = io - except IllegalArgument, ia: - result.ia = ia - oprot.writeMessageBegin("scannerClose", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class getTableNames_args: - - thrift_spec = ( - ) - - def __init__(self, d=None): - pass - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTableNames_args') - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getTableNames_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = iprot.readString(); - self.success.append(_elem21) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTableNames_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter22 in self.success: - oprot.writeString(iter22) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getColumnDescriptors_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.tableName = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getColumnDescriptors_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getColumnDescriptors_result: - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ColumnDescriptor, ColumnDescriptor.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype24, _vtype25, _size23 ) = iprot.readMapBegin() - for _i27 in xrange(_size23): - _key28 = iprot.readString(); - _val29 = ColumnDescriptor() - _val29.read(iprot) - self.success[_key28] = _val29 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getColumnDescriptors_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter30,viter31 in self.success.items(): - oprot.writeString(kiter30) - viter31.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getTableRegions_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.tableName = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTableRegions_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getTableRegions_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(RegionDescriptor, RegionDescriptor.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype35, _size32) = iprot.readListBegin() - for _i36 in xrange(_size32): - _elem37 = RegionDescriptor() - _elem37.read(iprot) - self.success.append(_elem37) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getTableRegions_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter38 in self.success: - iter38.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class createTable_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'columnFamilies', (TType.STRUCT,(ColumnDescriptor, ColumnDescriptor.thrift_spec)), None, ), # 2 - ) - - def __init__(self, d=None): - self.tableName = None - self.columnFamilies = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'columnFamilies' in d: - self.columnFamilies = d['columnFamilies'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.columnFamilies = [] - (_etype42, _size39) = iprot.readListBegin() - for _i43 in xrange(_size39): - _elem44 = ColumnDescriptor() - _elem44.read(iprot) - self.columnFamilies.append(_elem44) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('createTable_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.columnFamilies != None: - oprot.writeFieldBegin('columnFamilies', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columnFamilies)) - for iter45 in self.columnFamilies: - iter45.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class createTable_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'exist', (AlreadyExists, AlreadyExists.thrift_spec), None, ), # 3 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - self.exist = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - if 'exist' in d: - self.exist = d['exist'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.exist = AlreadyExists() - self.exist.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('createTable_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - if self.exist != None: - oprot.writeFieldBegin('exist', TType.STRUCT, 3) - self.exist.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteTable_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.tableName = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteTable_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteTable_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'nf', (NotFound, NotFound.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.nf = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'nf' in d: - self.nf = d['nf'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.nf = NotFound() - self.nf.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteTable_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.nf != None: - oprot.writeFieldBegin('nf', TType.STRUCT, 2) - self.nf.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class get_result: - - thrift_spec = ( - (0, TType.STRING, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'nf', (NotFound, NotFound.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - self.nf = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - if 'nf' in d: - self.nf = d['nf'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRING: - self.success = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.nf = NotFound() - self.nf.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('get_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRING, 0) - oprot.writeString(self.success) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.nf != None: - oprot.writeFieldBegin('nf', TType.STRUCT, 2) - self.nf.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getVer_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - (4, TType.I32, 'numVersions', None, None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - self.numVersions = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - if 'numVersions' in d: - self.numVersions = d['numVersions'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.numVersions = iprot.readI32(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVer_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.numVersions != None: - oprot.writeFieldBegin('numVersions', TType.I32, 4) - oprot.writeI32(self.numVersions) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getVer_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'nf', (NotFound, NotFound.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - self.nf = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - if 'nf' in d: - self.nf = d['nf'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in xrange(_size46): - _elem51 = iprot.readString(); - self.success.append(_elem51) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.nf = NotFound() - self.nf.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVer_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter52 in self.success: - oprot.writeString(iter52) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.nf != None: - oprot.writeFieldBegin('nf', TType.STRUCT, 2) - self.nf.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getVerTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - (5, TType.I32, 'numVersions', None, None, ), # 5 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - self.timestamp = None - self.numVersions = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - if 'numVersions' in d: - self.numVersions = d['numVersions'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.numVersions = iprot.readI32(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVerTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.numVersions != None: - oprot.writeFieldBegin('numVersions', TType.I32, 5) - oprot.writeI32(self.numVersions) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getVerTs_result: - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'nf', (NotFound, NotFound.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - self.nf = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - if 'nf' in d: - self.nf = d['nf'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.LIST: - self.success = [] - (_etype56, _size53) = iprot.readListBegin() - for _i57 in xrange(_size53): - _elem58 = iprot.readString(); - self.success.append(_elem58) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.nf = NotFound() - self.nf.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getVerTs_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter59 in self.success: - oprot.writeString(iter59) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.nf != None: - oprot.writeFieldBegin('nf', TType.STRUCT, 2) - self.nf.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRow_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getRow_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRow_result: - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype61, _vtype62, _size60 ) = iprot.readMapBegin() - for _i64 in xrange(_size60): - _key65 = iprot.readString(); - _val66 = iprot.readString(); - self.success[_key65] = _val66 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getRow_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter67,viter68 in self.success.items(): - oprot.writeString(kiter67) - oprot.writeString(viter68) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getRowTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowTs_result: - - thrift_spec = ( - (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.MAP: - self.success = {} - (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin() - for _i73 in xrange(_size69): - _key74 = iprot.readString(); - _val75 = iprot.readString(); - self.success[_key74] = _val75 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('getRowTs_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success)) - for kiter76,viter77 in self.success.items(): - oprot.writeString(kiter76) - oprot.writeString(viter77) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class put_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - (4, TType.STRING, 'value', None, None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - self.value = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - if 'value' in d: - self.value = d['value'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.value = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('put_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.value != None: - oprot.writeFieldBegin('value', TType.STRING, 4) - oprot.writeString(self.value) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class put_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('put_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRow_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.mutations = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'mutations' in d: - self.mutations = d['mutations'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.mutations = [] - (_etype81, _size78) = iprot.readListBegin() - for _i82 in xrange(_size78): - _elem83 = Mutation() - _elem83.read(iprot) - self.mutations.append(_elem83) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRow_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations != None: - oprot.writeFieldBegin('mutations', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter84 in self.mutations: - iter84.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRow_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRow_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRowTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.mutations = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'mutations' in d: - self.mutations = d['mutations'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.mutations = [] - (_etype88, _size85) = iprot.readListBegin() - for _i89 in xrange(_size85): - _elem90 = Mutation() - _elem90.read(iprot) - self.mutations.append(_elem90) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRowTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations != None: - oprot.writeFieldBegin('mutations', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter91 in self.mutations: - iter91.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRowTs_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRowTs_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRows_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rowBatches', (TType.STRUCT,(BatchMutation, BatchMutation.thrift_spec)), None, ), # 2 - ) - - def __init__(self, d=None): - self.tableName = None - self.rowBatches = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'rowBatches' in d: - self.rowBatches = d['rowBatches'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.rowBatches = [] - (_etype95, _size92) = iprot.readListBegin() - for _i96 in xrange(_size92): - _elem97 = BatchMutation() - _elem97.read(iprot) - self.rowBatches.append(_elem97) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRows_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rowBatches != None: - oprot.writeFieldBegin('rowBatches', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) - for iter98 in self.rowBatches: - iter98.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRows_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRows_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRowsTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rowBatches', (TType.STRUCT,(BatchMutation, BatchMutation.thrift_spec)), None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.rowBatches = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'rowBatches' in d: - self.rowBatches = d['rowBatches'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.rowBatches = [] - (_etype102, _size99) = iprot.readListBegin() - for _i103 in xrange(_size99): - _elem104 = BatchMutation() - _elem104.read(iprot) - self.rowBatches.append(_elem104) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRowsTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rowBatches != None: - oprot.writeFieldBegin('rowBatches', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) - for iter105 in self.rowBatches: - iter105.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class mutateRowsTs_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('mutateRowsTs_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAll_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAll_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAll_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.io = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAll_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.column = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'column' in d: - self.column = d['column'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllTs_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.io = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllTs_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllRow_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllRow_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllRow_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.io = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllRow_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllRowTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.row = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'row' in d: - self.row = d['row'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllRowTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteAllRowTs_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.io = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('deleteAllRowTs_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpen_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'startRow', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - ) - - def __init__(self, d=None): - self.tableName = None - self.startRow = None - self.columns = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'startRow' in d: - self.startRow = d['startRow'] - if 'columns' in d: - self.columns = d['columns'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.startRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype109, _size106) = iprot.readListBegin() - for _i110 in xrange(_size106): - _elem111 = iprot.readString(); - self.columns.append(_elem111) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpen_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow != None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.columns != None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter112 in self.columns: - oprot.writeString(iter112) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpen_result: - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpen_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithStop_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'startRow', None, None, ), # 2 - (3, TType.STRING, 'stopRow', None, None, ), # 3 - (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.startRow = None - self.stopRow = None - self.columns = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'startRow' in d: - self.startRow = d['startRow'] - if 'stopRow' in d: - self.stopRow = d['stopRow'] - if 'columns' in d: - self.columns = d['columns'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.startRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.stopRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.columns = [] - (_etype116, _size113) = iprot.readListBegin() - for _i117 in xrange(_size113): - _elem118 = iprot.readString(); - self.columns.append(_elem118) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenWithStop_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow != None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow != None: - oprot.writeFieldBegin('stopRow', TType.STRING, 3) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.columns != None: - oprot.writeFieldBegin('columns', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter119 in self.columns: - oprot.writeString(iter119) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithStop_result: - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenWithStop_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'startRow', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - ) - - def __init__(self, d=None): - self.tableName = None - self.startRow = None - self.columns = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'startRow' in d: - self.startRow = d['startRow'] - if 'columns' in d: - self.columns = d['columns'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.startRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype123, _size120) = iprot.readListBegin() - for _i124 in xrange(_size120): - _elem125 = iprot.readString(); - self.columns.append(_elem125) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow != None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.columns != None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter126 in self.columns: - oprot.writeString(iter126) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenTs_result: - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenTs_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithStopTs_args: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'startRow', None, None, ), # 2 - (3, TType.STRING, 'stopRow', None, None, ), # 3 - (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 - (5, TType.I64, 'timestamp', None, None, ), # 5 - ) - - def __init__(self, d=None): - self.tableName = None - self.startRow = None - self.stopRow = None - self.columns = None - self.timestamp = None - if isinstance(d, dict): - if 'tableName' in d: - self.tableName = d['tableName'] - if 'startRow' in d: - self.startRow = d['startRow'] - if 'stopRow' in d: - self.stopRow = d['stopRow'] - if 'columns' in d: - self.columns = d['columns'] - if 'timestamp' in d: - self.timestamp = d['timestamp'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.tableName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.startRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.stopRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.columns = [] - (_etype130, _size127) = iprot.readListBegin() - for _i131 in xrange(_size127): - _elem132 = iprot.readString(); - self.columns.append(_elem132) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenWithStopTs_args') - if self.tableName != None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow != None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow != None: - oprot.writeFieldBegin('stopRow', TType.STRING, 3) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.columns != None: - oprot.writeFieldBegin('columns', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter133 in self.columns: - oprot.writeString(iter133) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp != None: - oprot.writeFieldBegin('timestamp', TType.I64, 5) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithStopTs_result: - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.I32: - self.success = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerOpenWithStopTs_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerGet_args: - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.id = None - if isinstance(d, dict): - if 'id' in d: - self.id = d['id'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.id = iprot.readI32(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerGet_args') - if self.id != None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerGet_result: - - thrift_spec = ( - (0, TType.STRUCT, 'success', (ScanEntry, ScanEntry.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - (3, TType.STRUCT, 'nf', (NotFound, NotFound.thrift_spec), None, ), # 3 - ) - - def __init__(self, d=None): - self.success = None - self.io = None - self.ia = None - self.nf = None - if isinstance(d, dict): - if 'success' in d: - self.success = d['success'] - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - if 'nf' in d: - self.nf = d['nf'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 0: - if ftype == TType.STRUCT: - self.success = ScanEntry() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRUCT: - self.nf = NotFound() - self.nf.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerGet_result') - if self.success != None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - if self.nf != None: - oprot.writeFieldBegin('nf', TType.STRUCT, 3) - self.nf.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerClose_args: - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.id = None - if isinstance(d, dict): - if 'id' in d: - self.id = d['id'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.I32: - self.id = iprot.readI32(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerClose_args') - if self.id != None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerClose_result: - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, d=None): - self.io = None - self.ia = None - if isinstance(d, dict): - if 'io' in d: - self.io = d['io'] - if 'ia' in d: - self.ia = d['ia'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRUCT: - self.io = IOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = IllegalArgument() - self.ia.read(iprot) - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('scannerClose_result') - if self.io != None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia != None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - - diff --git a/src/examples/uploaders/hbrep/Hbase/__init__.py b/src/examples/uploaders/hbrep/Hbase/__init__.py deleted file mode 100644 index 31dc15ce46e..00000000000 --- a/src/examples/uploaders/hbrep/Hbase/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ['ttypes', 'constants', 'Hbase'] diff --git a/src/examples/uploaders/hbrep/Hbase/constants.py b/src/examples/uploaders/hbrep/Hbase/constants.py deleted file mode 100644 index 2f17ec34fee..00000000000 --- a/src/examples/uploaders/hbrep/Hbase/constants.py +++ /dev/null @@ -1,9 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * -from ttypes import * - diff --git a/src/examples/uploaders/hbrep/Hbase/ttypes.py b/src/examples/uploaders/hbrep/Hbase/ttypes.py deleted file mode 100644 index 96df8044bc3..00000000000 --- a/src/examples/uploaders/hbrep/Hbase/ttypes.py +++ /dev/null @@ -1,708 +0,0 @@ -# -# Autogenerated by Thrift -# -# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING -# - -from thrift.Thrift import * - -from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class ColumnDescriptor: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.I32, 'maxVersions', None, None, ), # 2 - (3, TType.STRING, 'compression', None, None, ), # 3 - (4, TType.BOOL, 'inMemory', None, None, ), # 4 - (5, TType.I32, 'maxValueLength', None, None, ), # 5 - (6, TType.STRING, 'bloomFilterType', None, None, ), # 6 - (7, TType.I32, 'bloomFilterVectorSize', None, None, ), # 7 - (8, TType.I32, 'bloomFilterNbHashes', None, None, ), # 8 - (9, TType.BOOL, 'blockCacheEnabled', None, None, ), # 9 - (10, TType.I32, 'timeToLive', None, None, ), # 10 - ) - - def __init__(self, d=None): - self.name = None - self.maxVersions = 3 - self.compression = 'NONE' - self.inMemory = False - self.maxValueLength = 2147483647 - self.bloomFilterType = 'NONE' - self.bloomFilterVectorSize = 0 - self.bloomFilterNbHashes = 0 - self.blockCacheEnabled = False - self.timeToLive = -1 - if isinstance(d, dict): - if 'name' in d: - self.name = d['name'] - if 'maxVersions' in d: - self.maxVersions = d['maxVersions'] - if 'compression' in d: - self.compression = d['compression'] - if 'inMemory' in d: - self.inMemory = d['inMemory'] - if 'maxValueLength' in d: - self.maxValueLength = d['maxValueLength'] - if 'bloomFilterType' in d: - self.bloomFilterType = d['bloomFilterType'] - if 'bloomFilterVectorSize' in d: - self.bloomFilterVectorSize = d['bloomFilterVectorSize'] - if 'bloomFilterNbHashes' in d: - self.bloomFilterNbHashes = d['bloomFilterNbHashes'] - if 'blockCacheEnabled' in d: - self.blockCacheEnabled = d['blockCacheEnabled'] - if 'timeToLive' in d: - self.timeToLive = d['timeToLive'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.maxVersions = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.compression = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.BOOL: - self.inMemory = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.maxValueLength = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.bloomFilterType = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.bloomFilterVectorSize = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.bloomFilterNbHashes = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.BOOL: - self.blockCacheEnabled = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.I32: - self.timeToLive = iprot.readI32(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ColumnDescriptor') - if self.name != None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.maxVersions != None: - oprot.writeFieldBegin('maxVersions', TType.I32, 2) - oprot.writeI32(self.maxVersions) - oprot.writeFieldEnd() - if self.compression != None: - oprot.writeFieldBegin('compression', TType.STRING, 3) - oprot.writeString(self.compression) - oprot.writeFieldEnd() - if self.inMemory != None: - oprot.writeFieldBegin('inMemory', TType.BOOL, 4) - oprot.writeBool(self.inMemory) - oprot.writeFieldEnd() - if self.maxValueLength != None: - oprot.writeFieldBegin('maxValueLength', TType.I32, 5) - oprot.writeI32(self.maxValueLength) - oprot.writeFieldEnd() - if self.bloomFilterType != None: - oprot.writeFieldBegin('bloomFilterType', TType.STRING, 6) - oprot.writeString(self.bloomFilterType) - oprot.writeFieldEnd() - if self.bloomFilterVectorSize != None: - oprot.writeFieldBegin('bloomFilterVectorSize', TType.I32, 7) - oprot.writeI32(self.bloomFilterVectorSize) - oprot.writeFieldEnd() - if self.bloomFilterNbHashes != None: - oprot.writeFieldBegin('bloomFilterNbHashes', TType.I32, 8) - oprot.writeI32(self.bloomFilterNbHashes) - oprot.writeFieldEnd() - if self.blockCacheEnabled != None: - oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 9) - oprot.writeBool(self.blockCacheEnabled) - oprot.writeFieldEnd() - if self.timeToLive != None: - oprot.writeFieldBegin('timeToLive', TType.I32, 10) - oprot.writeI32(self.timeToLive) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class RegionDescriptor: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'startKey', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.startKey = None - if isinstance(d, dict): - if 'startKey' in d: - self.startKey = d['startKey'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.startKey = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('RegionDescriptor') - if self.startKey != None: - oprot.writeFieldBegin('startKey', TType.STRING, 1) - oprot.writeString(self.startKey) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Mutation: - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'isDelete', None, None, ), # 1 - (2, TType.STRING, 'column', None, None, ), # 2 - (3, TType.STRING, 'value', None, None, ), # 3 - ) - - def __init__(self, d=None): - self.isDelete = False - self.column = None - self.value = None - if isinstance(d, dict): - if 'isDelete' in d: - self.isDelete = d['isDelete'] - if 'column' in d: - self.column = d['column'] - if 'value' in d: - self.value = d['value'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.BOOL: - self.isDelete = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.column = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.value = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('Mutation') - if self.isDelete != None: - oprot.writeFieldBegin('isDelete', TType.BOOL, 1) - oprot.writeBool(self.isDelete) - oprot.writeFieldEnd() - if self.column != None: - oprot.writeFieldBegin('column', TType.STRING, 2) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.value != None: - oprot.writeFieldBegin('value', TType.STRING, 3) - oprot.writeString(self.value) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class BatchMutation: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 2 - ) - - def __init__(self, d=None): - self.row = None - self.mutations = None - if isinstance(d, dict): - if 'row' in d: - self.row = d['row'] - if 'mutations' in d: - self.mutations = d['mutations'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.mutations = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = Mutation() - _elem5.read(iprot) - self.mutations.append(_elem5) - iprot.readListEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('BatchMutation') - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations != None: - oprot.writeFieldBegin('mutations', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter6 in self.mutations: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ScanEntry: - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.MAP, 'columns', (TType.STRING,None,TType.STRING,None), None, ), # 2 - ) - - def __init__(self, d=None): - self.row = None - self.columns = None - if isinstance(d, dict): - if 'row' in d: - self.row = d['row'] - if 'columns' in d: - self.columns = d['columns'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.row = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.MAP: - self.columns = {} - (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() - for _i11 in xrange(_size7): - _key12 = iprot.readString(); - _val13 = iprot.readString(); - self.columns[_key12] = _val13 - iprot.readMapEnd() - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('ScanEntry') - if self.row != None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns != None: - oprot.writeFieldBegin('columns', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.columns)) - for kiter14,viter15 in self.columns.items(): - oprot.writeString(kiter14) - oprot.writeString(viter15) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class IOError(Exception): - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.message = None - if isinstance(d, dict): - if 'message' in d: - self.message = d['message'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('IOError') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class IllegalArgument(Exception): - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.message = None - if isinstance(d, dict): - if 'message' in d: - self.message = d['message'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('IllegalArgument') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class NotFound(Exception): - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.message = None - if isinstance(d, dict): - if 'message' in d: - self.message = d['message'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('NotFound') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class AlreadyExists(Exception): - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, d=None): - self.message = None - if isinstance(d, dict): - if 'message' in d: - self.message = d['message'] - - def read(self, iprot): - if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: - fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) - return - iprot.readStructBegin() - while True: - (fname, ftype, fid) = iprot.readFieldBegin() - if ftype == TType.STOP: - break - if fid == 1: - if ftype == TType.STRING: - self.message = iprot.readString(); - else: - iprot.skip(ftype) - else: - iprot.skip(ftype) - iprot.readFieldEnd() - iprot.readStructEnd() - - def write(self, oprot): - if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: - oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) - return - oprot.writeStructBegin('AlreadyExists') - if self.message != None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def __str__(self): - return str(self.__dict__) - - def __repr__(self): - return repr(self.__dict__) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - diff --git a/src/examples/uploaders/hbrep/README b/src/examples/uploaders/hbrep/README deleted file mode 100644 index 6cfab16a835..00000000000 --- a/src/examples/uploaders/hbrep/README +++ /dev/null @@ -1,107 +0,0 @@ -hbrep is a tool for replicating data from postgresql tables to hbase tables. - -Dependancies: - - python 2.4 - - hbase 0.2.0 - - skytools 2.1.7 - - postgresql - -It has two main functions. - - bootstrap, which bootstraps all the data from specified columns of a table - - play, which processes incoming insert, update and delete events and applies them to hbase. - -Example usage: -install triggers: - ./hbrep.py hbrep.ini install schema1.table1 schema2.table2 -now that future updates are queuing, bootstrap the tables. - ./hbrep.py hbrep.ini bootstrap schema1.table1 schema2.table2 -start pgq ticker - pgqadm.py pgq.ini ticker -play our queue consumer - ./hbrep.py hbrep.ini play schema1.table1 schema2.table2 - - -More details follow. - - -All functions require an ini file (say hbrep.ini) with a HBaseReplic section, and a section for each postgresql table you wish to replicate containing the table mapping. Note the table mapping section names should match the name of the postgresql table. - -eg. ini file: -#################### -[HBaseReplic] -job_name = hbase_replic_job -logfile = %(job_name)s.log -pidfile = %(job_name)s.pid -postgresql_db = dbname=source_database user=dbuser -pgq_queue_name = hbase_replic_queue -hbase_hostname = localhost -hbase_port = 9090 -# If omitted, default is 10000 -max_batch_size = 10000 -# file to use when copying a table, if omitted a select columns will be done instead. -bootstrap_tmpfile = tabledump.dat - -# For each table mapping, there must be the same number psql_columns as hbase_column_descriptors -[public.users] -psql_schema = public -psql_table_name = users -psql_key_column = user_id -psql_columns = dob -hbase_table_name = stuff -hbase_column_descriptors = users:dob -hbase_row_prefix = user_id: -#################### - -Bootstrapping: -To bootstrap the public.users table from postgresql to hbase, - - ./hbrep.py hbrep.ini bootstrap public.users - -you can specify multiple tables as arguments. - - -Play: -This mode uses pgq from the skytools package to create and manage event queues on postgresql. -You need to have pgq installed on the database you are replicating. - -With a pgq.ini file like this: -#################### -[pgqadm] -job_name = sourcedb_ticker -db = dbname=source_database user=dbuser -# how often to run maintenance [minutes] -maint_delay_min = 1 -# how often to check for activity [secs] -loop_delay = 0.2 -logfile = %(job_name)s.log -pidfile = %(job_name)s.pid -use_skylog = 0 -#################### - -You install pgq on the database by, - - pgqadm.py pgq.ini install - -Next you install hbrep. - - hbrep.py hbrep.ini install public.users - -This creates a queue using pgq, which in this case will be called hbase_replic_queue. It also registers the hbrep consumer (called HBaseReplic) with that queue. Then finally it creates triggers on each table specified to add an event for each insert, update or delete. - -Start the pgq event ticker, - - pgqadm.py pgq.ini ticker - -Finally, run the hbreplic consumer - ./hbrep.py hbrep.ini play public.users - -Now any inserts, updates or deletes on the postgresql users table will be processed and sent to the -hbase table. - - -uninstall: -You can remove the triggers from a table by - ./hbrep.py hbrep.ini uninstall public.users - - - diff --git a/src/examples/uploaders/hbrep/__init__.py b/src/examples/uploaders/hbrep/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/examples/uploaders/hbrep/bootstrap.py b/src/examples/uploaders/hbrep/bootstrap.py deleted file mode 100644 index f65a66db7f3..00000000000 --- a/src/examples/uploaders/hbrep/bootstrap.py +++ /dev/null @@ -1,190 +0,0 @@ -import sys, os - -import pgq, pgq.producer -import skytools - -from HBaseConnection import * -import tablemapping - -class HBaseBootstrap(skytools.DBScript): - """Bootstrapping script for loading columns from a table in postgresql to hbase.""" - - def __init__(self, service_name, args): - # This will process any options eg -k -v -d - skytools.DBScript.__init__(self, service_name, args) - - config_file = self.args[0] - if len(self.args) < 2: - print "need table names" - sys.exit(1) - else: - self.table_names = self.args[1:] - - #just to check this option exists - self.cf.get("postgresql_db") - - self.max_batch_size = int(self.cf.get("max_batch_size", "10000")) - self.hbase_hostname = self.cf.get("hbase_hostname", "localhost") - self.hbase_port = int(self.cf.get("hbase_port", "9090")) - self.table_mappings = tablemapping.load_table_mappings(config_file, self.table_names) - - def startup(self): - # make sure the script loops only once. - self.set_single_loop(1) - self.log.info("Starting " + self.job_name) - - def work(self): - for t in self.table_names: - self.bootstrap_table(t) - - def bootstrap_table(self, table_name): - try: - self.log.info("Bootstrapping table %s" % table_name) - hbase = HBaseConnection(self.hbase_hostname, self.hbase_port) - try: - table_mapping = self.table_mappings[table_name] - - self.log.debug("Connecting to HBase") - hbase.connect() - - # Fetch postgresql cursor - self.log.debug("Getting postgresql cursor") - db = self.get_database("postgresql_db") - curs = db.cursor() - - hbase.validate_table_name(table_mapping.hbase_table_name) - hbase.validate_column_descriptors(table_mapping.hbase_table_name, table_mapping.hbase_column_descriptors) - - try: - dump_file = self.cf.get("bootstrap_tmpfile") - except: - dump_file = None - - if dump_file != None: - row_source = CopiedRows(self.log, curs, dump_file) - else: - row_source = SelectedRows(self.log, curs) - - table_name = table_mapping.psql_schema+"."+table_mapping.psql_table_name - # we are careful to make sure that the first column will be the key. - column_list = [table_mapping.psql_key_column] + table_mapping.psql_columns - - # Load the rows either via a select or via a table copy to file. - # Either way, it does not load it all into memory. - # copy is faster, but may incorrectly handle data with tabs in it. - row_source.load_rows(table_name, column_list) - - # max number of rows to fetch at once - batch_size = self.max_batch_size - total_rows = 0L - - self.log.debug("Starting puts to hbase") - rows = row_source.get_rows(batch_size) - while rows != []: - batches = [] - for row in rows: - batches.append(self.createRowBatch(table_mapping, row)) - - hbase.client.mutateRows(table_mapping.hbase_table_name, batches) - total_rows = total_rows + len(batches) - self.log.debug("total rows put = %d" % (total_rows)) - # get next batch of rows - rows = row_source.get_rows(batch_size) - - self.log.info("total rows put = %d" % (total_rows)) - self.log.info("Bootstrapping table %s complete" % table_name) - - - except Exception, e: - #self.log.info(e) - sys.exit(e) - - finally: - hbase.disconnect() - - def createRowBatch(self, table_mapping, row): - batch = BatchMutation() - batch.row = table_mapping.hbase_row_prefix + str(row[0]) - batch.mutations = [] - for column, value in zip(table_mapping.hbase_column_descriptors, row[1:]): - if value != 'NULL' and value != None: - m = Mutation() - m.column = column - m.value = str(value) - batch.mutations.append(m) - return batch - - -## Helper classes to fetch rows from a select, or from a table dumped by copy - -class RowSource: - """ Base class for fetching rows from somewhere. """ - - def __init__(self, log): - self.log = log - - def make_column_str(self, column_list): - i = 0 - while i < len(column_list): - column_list[i] = '"%s"' % column_list[i] - i += 1 - return ",".join(column_list) - - -class CopiedRows(RowSource): - """ - Class for fetching rows from a postgresql database, - rows are dumped to a copied to a file first - """ - def __init__(self, log, curs, dump_file): - RowSource.__init__(self, log) - self.dump_file = dump_file - # Set DBAPI-2.0 cursor - self.curs = curs - - def load_rows(self, table_name, column_list): - columns = self.make_column_str(column_list) - self.log.debug("starting dump to file:%s. table:%s. columns:%s" % (self.dump_file, table_name, columns)) - dump_out = open(self.dump_file, 'w') - self.curs.copy_to(dump_out, table_name + "(%s)" % columns, '\t', 'NULL') - dump_out.close() - self.log.debug("table %s dump complete" % table_name) - - self.dump_in = open(self.dump_file, 'r') - - def get_rows(self, no_of_rows): - rows = [] - if not self.dump_in.closed: - for line in self.dump_in: - rows.append(line.split()) - if len(rows) >= no_of_rows: - break - if rows == []: - self.dump_in.close() - return rows - - -class SelectedRows(RowSource): - """ - Class for fetching rows from a postgresql database, - rows are fetched via a select on the entire table. - """ - def __init__(self, log, curs): - RowSource.__init__(self, log) - # Set DBAPI-2.0 cursor - self.curs = curs - - def load_rows(self, table_name, column_list): - columns = self.make_column_str(column_list) - q = "SELECT %s FROM %s" % (columns,table_name) - self.log.debug("Executing query %s" % q) - self.curs.execute(q) - self.log.debug("query finished") - - def get_rows(self, no_of_rows): - return self.curs.fetchmany(no_of_rows) - - -if __name__ == '__main__': - bootstrap = HBaseBootstrap("HBaseReplic",sys.argv[1:]) - bootstrap.start() diff --git a/src/examples/uploaders/hbrep/hbrep.ini b/src/examples/uploaders/hbrep/hbrep.ini deleted file mode 100644 index 08398978a48..00000000000 --- a/src/examples/uploaders/hbrep/hbrep.ini +++ /dev/null @@ -1,22 +0,0 @@ -[HBaseReplic] -job_name = hbase_replic_job -logfile = %(job_name)s.log -pidfile = %(job_name)s.pid -postgresql_db = dbname=source_database user=dbuser -pgq_queue_name = hbase_replic_queue -hbase_hostname = localhost -hbase_port = 9090 -# If omitted, default is 10000 -max_batch_size = 10000 -# file to use when copying a table, if omitted a select columns will be done instead. -bootstrap_tmpfile = tabledump.dat - -# For each table mapping, there must be the same number psql_columns as hbase_column_descriptors -[public.users] -psql_schema = public -psql_table_name = users -psql_key_column = user_id -psql_columns = dob -hbase_table_name = stuff -hbase_column_descriptors = users:dob -hbase_row_prefix = user_id: diff --git a/src/examples/uploaders/hbrep/hbrep.py b/src/examples/uploaders/hbrep/hbrep.py deleted file mode 100755 index 665387fd6ee..00000000000 --- a/src/examples/uploaders/hbrep/hbrep.py +++ /dev/null @@ -1,126 +0,0 @@ -#!/usr/bin/env python -import sys, os - -import pgq, pgq.producer -import skytools, skytools._pyquoting - -from bootstrap import HBaseBootstrap -from HBaseConsumer import HBaseConsumer - -command_usage = """ -%prog [options] inifile command [tablenames] - -commands: - play Run event consumer to update specified tables with hbase. - bootstrap Bootstrap specified tables args into hbase. - install Setup the pgq queue, and install trigger on each table. - uninstall Remove the triggers from each specified table. -""" - -class HBaseReplic(skytools.DBScript): - def __init__(self, service_name, args): - try: - self.run_script = 0 - - # This will process any options eg -k -v -d - skytools.DBScript.__init__(self, service_name, args) - - self.config_file = self.args[0] - - if len(self.args) < 2: - self.print_usage() - print "need command" - sys.exit(0) - cmd = self.args[1] - - if not cmd in ["play","bootstrap","install", "uninstall"]: - self.print_usage() - print "unknown command" - sys.exit(0) - - if len(self.args) < 3: - self.print_usage() - print "need table names" - sys.exit(0) - else: - self.table_names = self.args[2:] - - if cmd == "play": - self.run_script = HBaseConsumer(service_name, [self.config_file] + self.table_names) - elif cmd == "bootstrap": - self.run_script = HBaseBootstrap(service_name, [self.config_file] + self.table_names) - elif cmd == "install": - self.work = self.do_install - elif cmd == "uninstall": - self.work = self.do_uninstall - - except Exception, e: - sys.exit(e) - - def print_usage(self): - print "Usage: " + command_usage - - def init_optparse(self, parser=None): - p = skytools.DBScript.init_optparse(self, parser) - p.set_usage(command_usage.strip()) - return p - - def start(self): - if self.run_script: - self.run_script.start() - else: - skytools.DBScript.start(self) - - def startup(self): - # make sure the script loops only once. - self.set_single_loop(1) - - def do_install(self): - try: - queue_name = self.cf.get("pgq_queue_name") - consumer = self.job_name - - self.log.info('Creating queue: %s' % queue_name) - self.exec_sql("select pgq.create_queue(%s)", [queue_name]) - - self.log.info('Registering consumer %s on queue %s' % (consumer, queue_name)) - self.exec_sql("select pgq.register_consumer(%s, %s)", [queue_name, consumer]) - - for table_name in self.table_names: - self.log.info('Creating trigger hbase_replic on table %s' % (table_name)) - q = """ - CREATE TRIGGER hbase_replic - AFTER INSERT OR UPDATE OR DELETE - ON %s - FOR EACH ROW - EXECUTE PROCEDURE pgq.logutriga('%s')""" - self.exec_sql(q % (table_name, queue_name), []) - except Exception, e: - sys.exit(e) - - def do_uninstall(self): - try: - queue_name = self.cf.get("pgq_queue_name") - consumer = "HBaseReplic" - - #self.log.info('Unregistering consumer %s on queue %s' % (consumer, queue_name)) - #self.exec_sql("select pgq.unregister_consumer(%s, %s)", [queue_name, consumer]) - - for table_name in self.table_names: - self.log.info('Dropping trigger hbase_replic on table %s' % (table_name)) - q = "DROP TRIGGER hbase_replic ON %s" % table_name - self.exec_sql(q, []) - - except Exception, e: - sys.exit(e) - - def exec_sql(self, q, args): - self.log.debug(q) - db = self.get_database('postgresql_db') - curs = db.cursor() - curs.execute(q, args) - db.commit() - -if __name__ == '__main__': - script = HBaseReplic("HBaseReplic",sys.argv[1:]) - script.start() diff --git a/src/examples/uploaders/hbrep/pgq.ini b/src/examples/uploaders/hbrep/pgq.ini deleted file mode 100644 index d11b5dd3436..00000000000 --- a/src/examples/uploaders/hbrep/pgq.ini +++ /dev/null @@ -1,10 +0,0 @@ -[pgqadm] -job_name = sourcedb_ticker -db = dbname=source_database user=dbuser -# how often to run maintenance [minutes] -maint_delay_min = 1 -# how often to check for activity [secs] -loop_delay = 0.2 -logfile = %(job_name)s.log -pidfile = %(job_name)s.pid -use_skylog = 0 diff --git a/src/examples/uploaders/hbrep/tablemapping.py b/src/examples/uploaders/hbrep/tablemapping.py deleted file mode 100644 index d85cbfbb37b..00000000000 --- a/src/examples/uploaders/hbrep/tablemapping.py +++ /dev/null @@ -1,33 +0,0 @@ -import sys, os -from skytools.config import * - -PSQL_SCHEMA = "psql_schema" -PSQL_TABLENAME = "psql_table_name" -PSQL_KEYCOL = "psql_key_column" -PSQL_COLUMNS = "psql_columns" -HBASE_TABLENAME = "hbase_table_name" -HBASE_COLUMNDESCS = "hbase_column_descriptors" -HBASE_ROWPREFIX = "hbase_row_prefix" - -def load_table_mappings(config_file, table_names): - table_mappings = {} - for table_name in table_names: - conf = Config(table_name, config_file) - table_mappings[table_name] = PSqlHBaseTableMapping(conf) - return table_mappings - -class PSqlHBaseTableMapping: - # conf can be anything with a get function eg, a dictionary - def __init__(self, conf): - self.psql_schema = conf.get(PSQL_SCHEMA) - self.psql_table_name = conf.get(PSQL_TABLENAME) - self.psql_key_column = conf.get(PSQL_KEYCOL) - self.psql_columns = conf.get(PSQL_COLUMNS).split() - self.hbase_table_name = conf.get(HBASE_TABLENAME) - self.hbase_column_descriptors = conf.get(HBASE_COLUMNDESCS).split() - self.hbase_row_prefix = conf.get(HBASE_ROWPREFIX) - - if len(self.psql_columns) != len(self.hbase_column_descriptors): - raise Exception("psql_columns and hbase_column_descriptors must have same length") - -