From e3a4c228ac31646eaca537b99452b2398b3fef34 Mon Sep 17 00:00:00 2001 From: Guangxu Cheng Date: Tue, 26 Nov 2019 19:52:46 +0800 Subject: [PATCH] HBASE-20395 Displaying thrift server type on the thrift page (#811) Signed-off-by: Lijin Bin Signed-off-by: Bharath Vissapragada --- .../src/main/python/thrift1/DemoClient.py | 7 +- .../python/thrift1/gen-py/hbase/Hbase-remote | 565 +- .../main/python/thrift1/gen-py/hbase/Hbase.py | 20991 ++++++++-------- .../python/thrift1/gen-py/hbase/constants.py | 9 +- .../python/thrift1/gen-py/hbase/ttypes.py | 2397 +- .../src/main/python/thrift2/DemoClient.py | 5 + .../thrift2/gen-py/hbase/THBaseService-remote | 502 +- .../thrift2/gen-py/hbase/THBaseService.py | 15317 +++++++---- .../python/thrift2/gen-py/hbase/constants.py | 9 +- .../python/thrift2/gen-py/hbase/ttypes.py | 5759 +++-- .../hbase/thrift/HBaseServiceHandler.java | 2 - .../thrift/ThriftHBaseServiceHandler.java | 6 + .../hadoop/hbase/thrift/ThriftMetrics.java | 10 +- .../hadoop/hbase/thrift/ThriftServer.java | 1 + .../hbase/thrift/generated/AlreadyExists.java | 2 +- .../hbase/thrift/generated/BatchMutation.java | 2 +- .../thrift/generated/ColumnDescriptor.java | 2 +- .../hadoop/hbase/thrift/generated/Hbase.java | 787 +- .../hbase/thrift/generated/IOError.java | 2 +- .../thrift/generated/IllegalArgument.java | 2 +- .../hbase/thrift/generated/Mutation.java | 2 +- .../hbase/thrift/generated/TAppend.java | 2 +- .../hadoop/hbase/thrift/generated/TCell.java | 2 +- .../hbase/thrift/generated/TColumn.java | 2 +- .../hbase/thrift/generated/TIncrement.java | 2 +- .../hbase/thrift/generated/TRegionInfo.java | 2 +- .../hbase/thrift/generated/TRowResult.java | 2 +- .../hadoop/hbase/thrift/generated/TScan.java | 2 +- .../thrift/generated/TThriftServerType.java | 46 + .../thrift2/ThriftHBaseServiceHandler.java | 6 + .../hbase/thrift2/generated/TAppend.java | 2 +- .../thrift2/generated/TAuthorization.java | 2 +- .../thrift2/generated/TBloomFilterType.java | 2 +- .../thrift2/generated/TCellVisibility.java | 2 +- .../hbase/thrift2/generated/TColumn.java | 2 +- .../generated/TColumnFamilyDescriptor.java | 2 +- .../thrift2/generated/TColumnIncrement.java | 2 +- .../hbase/thrift2/generated/TColumnValue.java | 2 +- .../hbase/thrift2/generated/TCompareOp.java | 2 +- .../generated/TCompressionAlgorithm.java | 2 +- .../hbase/thrift2/generated/TConsistency.java | 2 +- .../thrift2/generated/TDataBlockEncoding.java | 2 +- .../hbase/thrift2/generated/TDelete.java | 2 +- .../hbase/thrift2/generated/TDeleteType.java | 2 +- .../hbase/thrift2/generated/TDurability.java | 2 +- .../hadoop/hbase/thrift2/generated/TGet.java | 2 +- .../thrift2/generated/THBaseService.java | 787 +- .../hbase/thrift2/generated/THRegionInfo.java | 2 +- .../thrift2/generated/THRegionLocation.java | 2 +- .../hbase/thrift2/generated/TIOError.java | 2 +- .../thrift2/generated/TIllegalArgument.java | 2 +- .../hbase/thrift2/generated/TIncrement.java | 2 +- .../thrift2/generated/TKeepDeletedCells.java | 2 +- .../hbase/thrift2/generated/TMutation.java | 2 +- .../generated/TNamespaceDescriptor.java | 2 +- .../hadoop/hbase/thrift2/generated/TPut.java | 2 +- .../hbase/thrift2/generated/TReadType.java | 2 +- .../hbase/thrift2/generated/TResult.java | 2 +- .../thrift2/generated/TRowMutations.java | 2 +- .../hadoop/hbase/thrift2/generated/TScan.java | 2 +- .../hbase/thrift2/generated/TServerName.java | 2 +- .../thrift2/generated/TTableDescriptor.java | 2 +- .../hbase/thrift2/generated/TTableName.java | 2 +- .../thrift2/generated/TThriftServerType.java | 46 + .../hbase/thrift2/generated/TTimeRange.java | 2 +- .../resources/hbase-webapps/thrift/thrift.jsp | 7 +- .../apache/hadoop/hbase/thrift/Hbase.thrift | 15 + .../apache/hadoop/hbase/thrift2/hbase.thrift | 15 + .../thrift/HBaseThriftTestingUtility.java | 128 + .../hadoop/hbase/thrift/TestThriftServer.java | 38 + .../TestThriftHBaseServiceHandler.java | 38 + 71 files changed, 28968 insertions(+), 18617 deletions(-) mode change 100644 => 100755 hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote create mode 100644 hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TThriftServerType.java create mode 100644 hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TThriftServerType.java create mode 100644 hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java diff --git a/hbase-examples/src/main/python/thrift1/DemoClient.py b/hbase-examples/src/main/python/thrift1/DemoClient.py index 0d41226c423..7467eed713c 100644 --- a/hbase-examples/src/main/python/thrift1/DemoClient.py +++ b/hbase-examples/src/main/python/thrift1/DemoClient.py @@ -30,7 +30,7 @@ sys.path.append(gen_py_path) from thrift import Thrift from thrift.transport import TSocket, TTransport from thrift.protocol import TBinaryProtocol -from hbase import ttypes +from hbase.ttypes import TThriftServerType from hbase.Hbase import Client, ColumnDescriptor, Mutation def printVersions(row, versions): @@ -66,6 +66,11 @@ def demo_client(host, port, is_framed_transport): # Connect! transport.open() + # Check Thrift Server Type + serverType = client.getThriftServerType() + if serverType != TThriftServerType.ONE: + raise Exception("Mismatch between client and server, server type is %s" % serverType) + t = "demo_table" # diff --git a/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote b/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote old mode 100644 new mode 100755 index 884a87d6b1c..69f05172bd4 --- a/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote +++ b/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,374 +9,417 @@ 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 +if sys.version_info[0] > 2: + from urllib.parse import urlparse +else: + from urlparse import urlparse +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient +from thrift.protocol.TBinaryProtocol import TBinaryProtocol -import Hbase -from ttypes import * +from hbase import Hbase +from hbase.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 ' void enableTable(Bytes tableName)' - print ' void disableTable(Bytes tableName)' - print ' bool isTableEnabled(Bytes tableName)' - print ' void compact(Bytes tableNameOrRegionName)' - print ' void majorCompact(Bytes tableNameOrRegionName)' - print ' getTableNames()' - print ' getColumnDescriptors(Text tableName)' - print ' getTableRegions(Text tableName)' - print ' void createTable(Text tableName, columnFamilies)' - print ' void deleteTable(Text tableName)' - print ' get(Text tableName, Text row, Text column, attributes)' - print ' getVer(Text tableName, Text row, Text column, i32 numVersions, attributes)' - print ' getVerTs(Text tableName, Text row, Text column, i64 timestamp, i32 numVersions, attributes)' - print ' getRow(Text tableName, Text row, attributes)' - print ' getRowWithColumns(Text tableName, Text row, columns, attributes)' - print ' getRowTs(Text tableName, Text row, i64 timestamp, attributes)' - print ' getRowWithColumnsTs(Text tableName, Text row, columns, i64 timestamp, attributes)' - print ' getRows(Text tableName, rows, attributes)' - print ' getRowsWithColumns(Text tableName, rows, columns, attributes)' - print ' getRowsTs(Text tableName, rows, i64 timestamp, attributes)' - print ' getRowsWithColumnsTs(Text tableName, rows, columns, i64 timestamp, attributes)' - print ' void mutateRow(Text tableName, Text row, mutations, attributes)' - print ' void mutateRowTs(Text tableName, Text row, mutations, i64 timestamp, attributes)' - print ' void mutateRows(Text tableName, rowBatches, attributes)' - print ' void mutateRowsTs(Text tableName, rowBatches, i64 timestamp, attributes)' - print ' i64 atomicIncrement(Text tableName, Text row, Text column, i64 value)' - print ' void deleteAll(Text tableName, Text row, Text column, attributes)' - print ' void deleteAllTs(Text tableName, Text row, Text column, i64 timestamp, attributes)' - print ' void deleteAllRow(Text tableName, Text row, attributes)' - print ' void increment(TIncrement increment)' - print ' void incrementRows( increments)' - print ' void deleteAllRowTs(Text tableName, Text row, i64 timestamp, attributes)' - print ' ScannerID scannerOpenWithScan(Text tableName, TScan scan, attributes)' - print ' ScannerID scannerOpen(Text tableName, Text startRow, columns, attributes)' - print ' ScannerID scannerOpenWithStop(Text tableName, Text startRow, Text stopRow, columns, attributes)' - print ' ScannerID scannerOpenWithPrefix(Text tableName, Text startAndPrefix, columns, attributes)' - print ' ScannerID scannerOpenTs(Text tableName, Text startRow, columns, i64 timestamp, attributes)' - print ' ScannerID scannerOpenWithStopTs(Text tableName, Text startRow, Text stopRow, columns, i64 timestamp, attributes)' - print ' scannerGet(ScannerID id)' - print ' scannerGetList(ScannerID id, i32 nbRows)' - print ' void scannerClose(ScannerID id)' - print ' getRowOrBefore(Text tableName, Text row, Text family)' - print ' TRegionInfo getRegionInfo(Text row)' - print '' - sys.exit(0) + print('') + print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') + print('') + print('Functions:') + print(' void enableTable(Bytes tableName)') + print(' void disableTable(Bytes tableName)') + print(' bool isTableEnabled(Bytes tableName)') + print(' void compact(Bytes tableNameOrRegionName)') + print(' void majorCompact(Bytes tableNameOrRegionName)') + print(' getTableNames()') + print(' getColumnDescriptors(Text tableName)') + print(' getTableRegions(Text tableName)') + print(' void createTable(Text tableName, columnFamilies)') + print(' void deleteTable(Text tableName)') + print(' get(Text tableName, Text row, Text column, attributes)') + print(' getVer(Text tableName, Text row, Text column, i32 numVersions, attributes)') + print(' getVerTs(Text tableName, Text row, Text column, i64 timestamp, i32 numVersions, attributes)') + print(' getRow(Text tableName, Text row, attributes)') + print(' getRowWithColumns(Text tableName, Text row, columns, attributes)') + print(' getRowTs(Text tableName, Text row, i64 timestamp, attributes)') + print(' getRowWithColumnsTs(Text tableName, Text row, columns, i64 timestamp, attributes)') + print(' getRows(Text tableName, rows, attributes)') + print(' getRowsWithColumns(Text tableName, rows, columns, attributes)') + print(' getRowsTs(Text tableName, rows, i64 timestamp, attributes)') + print(' getRowsWithColumnsTs(Text tableName, rows, columns, i64 timestamp, attributes)') + print(' void mutateRow(Text tableName, Text row, mutations, attributes)') + print(' void mutateRowTs(Text tableName, Text row, mutations, i64 timestamp, attributes)') + print(' void mutateRows(Text tableName, rowBatches, attributes)') + print(' void mutateRowsTs(Text tableName, rowBatches, i64 timestamp, attributes)') + print(' i64 atomicIncrement(Text tableName, Text row, Text column, i64 value)') + print(' void deleteAll(Text tableName, Text row, Text column, attributes)') + print(' void deleteAllTs(Text tableName, Text row, Text column, i64 timestamp, attributes)') + print(' void deleteAllRow(Text tableName, Text row, attributes)') + print(' void increment(TIncrement increment)') + print(' void incrementRows( increments)') + print(' void deleteAllRowTs(Text tableName, Text row, i64 timestamp, attributes)') + print(' ScannerID scannerOpenWithScan(Text tableName, TScan scan, attributes)') + print(' ScannerID scannerOpen(Text tableName, Text startRow, columns, attributes)') + print(' ScannerID scannerOpenWithStop(Text tableName, Text startRow, Text stopRow, columns, attributes)') + print(' ScannerID scannerOpenWithPrefix(Text tableName, Text startAndPrefix, columns, attributes)') + print(' ScannerID scannerOpenTs(Text tableName, Text startRow, columns, i64 timestamp, attributes)') + print(' ScannerID scannerOpenWithStopTs(Text tableName, Text startRow, Text stopRow, columns, i64 timestamp, attributes)') + print(' scannerGet(ScannerID id)') + print(' scannerGetList(ScannerID id, i32 nbRows)') + print(' void scannerClose(ScannerID id)') + print(' TRegionInfo getRegionInfo(Text row)') + print(' append(TAppend append)') + print(' bool checkAndPut(Text tableName, Text row, Text column, Text value, Mutation mput, attributes)') + print(' TThriftServerType getThriftServerType()') + print('') + sys.exit(0) -pp = pprint.PrettyPrinter(indent = 2) +pp = pprint.PrettyPrinter(indent=2) host = 'localhost' port = 9090 uri = '' framed = False +ssl = False +validate = True +ca_certs = None +keyfile = None +certfile = None http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 + parts = sys.argv[argi + 1].split(':') + host = parts[0] + if len(parts) > 1: + 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] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 + 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] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 + framed = True + argi += 1 + +if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': + ssl = True + argi += 1 + +if sys.argv[argi] == '-novalidate': + validate = False + argi += 1 + +if sys.argv[argi] == '-ca_certs': + ca_certs = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-keyfile': + keyfile = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-certfile': + certfile = sys.argv[argi+1] + argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi+1:] +args = sys.argv[argi + 1:] if http: - transport = THttpClient.THttpClient(host, port, uri) + 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) + if ssl: + socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + else: + socket = TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol(transport) client = Hbase.Client(protocol) transport.open() if cmd == 'enableTable': - if len(args) != 1: - print 'enableTable requires 1 args' - sys.exit(1) - pp.pprint(client.enableTable(eval(args[0]),)) + if len(args) != 1: + print('enableTable requires 1 args') + sys.exit(1) + pp.pprint(client.enableTable(eval(args[0]),)) elif cmd == 'disableTable': - if len(args) != 1: - print 'disableTable requires 1 args' - sys.exit(1) - pp.pprint(client.disableTable(eval(args[0]),)) + if len(args) != 1: + print('disableTable requires 1 args') + sys.exit(1) + pp.pprint(client.disableTable(eval(args[0]),)) elif cmd == 'isTableEnabled': - if len(args) != 1: - print 'isTableEnabled requires 1 args' - sys.exit(1) - pp.pprint(client.isTableEnabled(eval(args[0]),)) + if len(args) != 1: + print('isTableEnabled requires 1 args') + sys.exit(1) + pp.pprint(client.isTableEnabled(eval(args[0]),)) elif cmd == 'compact': - if len(args) != 1: - print 'compact requires 1 args' - sys.exit(1) - pp.pprint(client.compact(eval(args[0]),)) + if len(args) != 1: + print('compact requires 1 args') + sys.exit(1) + pp.pprint(client.compact(eval(args[0]),)) elif cmd == 'majorCompact': - if len(args) != 1: - print 'majorCompact requires 1 args' - sys.exit(1) - pp.pprint(client.majorCompact(eval(args[0]),)) + if len(args) != 1: + print('majorCompact requires 1 args') + sys.exit(1) + pp.pprint(client.majorCompact(eval(args[0]),)) elif cmd == 'getTableNames': - if len(args) != 0: - print 'getTableNames requires 0 args' - sys.exit(1) - pp.pprint(client.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]),)) + 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]),)) + 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]),)) + 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]),)) + 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) != 4: - print 'get requires 4 args' - sys.exit(1) - pp.pprint(client.get(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('get requires 4 args') + sys.exit(1) + pp.pprint(client.get(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'getVer': - if len(args) != 5: - print 'getVer requires 5 args' - sys.exit(1) - pp.pprint(client.getVer(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('getVer requires 5 args') + sys.exit(1) + pp.pprint(client.getVer(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'getVerTs': - if len(args) != 6: - print 'getVerTs requires 6 args' - sys.exit(1) - pp.pprint(client.getVerTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) + if len(args) != 6: + print('getVerTs requires 6 args') + sys.exit(1) + pp.pprint(client.getVerTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]), eval(args[5]),)) elif cmd == 'getRow': - if len(args) != 3: - print 'getRow requires 3 args' - sys.exit(1) - pp.pprint(client.getRow(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('getRow requires 3 args') + sys.exit(1) + pp.pprint(client.getRow(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'getRowWithColumns': - if len(args) != 4: - print 'getRowWithColumns requires 4 args' - sys.exit(1) - pp.pprint(client.getRowWithColumns(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('getRowWithColumns requires 4 args') + sys.exit(1) + pp.pprint(client.getRowWithColumns(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'getRowTs': - if len(args) != 4: - print 'getRowTs requires 4 args' - sys.exit(1) - pp.pprint(client.getRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('getRowTs requires 4 args') + sys.exit(1) + pp.pprint(client.getRowTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'getRowWithColumnsTs': - if len(args) != 5: - print 'getRowWithColumnsTs requires 5 args' - sys.exit(1) - pp.pprint(client.getRowWithColumnsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('getRowWithColumnsTs requires 5 args') + sys.exit(1) + pp.pprint(client.getRowWithColumnsTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'getRows': - if len(args) != 3: - print 'getRows requires 3 args' - sys.exit(1) - pp.pprint(client.getRows(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('getRows requires 3 args') + sys.exit(1) + pp.pprint(client.getRows(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'getRowsWithColumns': - if len(args) != 4: - print 'getRowsWithColumns requires 4 args' - sys.exit(1) - pp.pprint(client.getRowsWithColumns(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('getRowsWithColumns requires 4 args') + sys.exit(1) + pp.pprint(client.getRowsWithColumns(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'getRowsTs': - if len(args) != 4: - print 'getRowsTs requires 4 args' - sys.exit(1) - pp.pprint(client.getRowsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('getRowsTs requires 4 args') + sys.exit(1) + pp.pprint(client.getRowsTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'getRowsWithColumnsTs': - if len(args) != 5: - print 'getRowsWithColumnsTs requires 5 args' - sys.exit(1) - pp.pprint(client.getRowsWithColumnsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('getRowsWithColumnsTs requires 5 args') + sys.exit(1) + pp.pprint(client.getRowsWithColumnsTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'mutateRow': - if len(args) != 4: - print 'mutateRow requires 4 args' - sys.exit(1) - pp.pprint(client.mutateRow(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('mutateRow requires 4 args') + sys.exit(1) + pp.pprint(client.mutateRow(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'mutateRowTs': - if len(args) != 5: - print 'mutateRowTs requires 5 args' - sys.exit(1) - pp.pprint(client.mutateRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('mutateRowTs requires 5 args') + sys.exit(1) + pp.pprint(client.mutateRowTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'mutateRows': - if len(args) != 3: - print 'mutateRows requires 3 args' - sys.exit(1) - pp.pprint(client.mutateRows(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('mutateRows requires 3 args') + sys.exit(1) + pp.pprint(client.mutateRows(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'mutateRowsTs': - if len(args) != 4: - print 'mutateRowsTs requires 4 args' - sys.exit(1) - pp.pprint(client.mutateRowsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('mutateRowsTs requires 4 args') + sys.exit(1) + pp.pprint(client.mutateRowsTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'atomicIncrement': - if len(args) != 4: - print 'atomicIncrement requires 4 args' - sys.exit(1) - pp.pprint(client.atomicIncrement(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('atomicIncrement requires 4 args') + sys.exit(1) + pp.pprint(client.atomicIncrement(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'deleteAll': - if len(args) != 4: - print 'deleteAll requires 4 args' - sys.exit(1) - pp.pprint(client.deleteAll(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('deleteAll requires 4 args') + sys.exit(1) + pp.pprint(client.deleteAll(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'deleteAllTs': - if len(args) != 5: - print 'deleteAllTs requires 5 args' - sys.exit(1) - pp.pprint(client.deleteAllTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('deleteAllTs requires 5 args') + sys.exit(1) + pp.pprint(client.deleteAllTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'deleteAllRow': - if len(args) != 3: - print 'deleteAllRow requires 3 args' - sys.exit(1) - pp.pprint(client.deleteAllRow(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('deleteAllRow requires 3 args') + sys.exit(1) + pp.pprint(client.deleteAllRow(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'increment': - if len(args) != 1: - print 'increment requires 1 args' - sys.exit(1) - pp.pprint(client.increment(eval(args[0]),)) + if len(args) != 1: + print('increment requires 1 args') + sys.exit(1) + pp.pprint(client.increment(eval(args[0]),)) elif cmd == 'incrementRows': - if len(args) != 1: - print 'incrementRows requires 1 args' - sys.exit(1) - pp.pprint(client.incrementRows(eval(args[0]),)) + if len(args) != 1: + print('incrementRows requires 1 args') + sys.exit(1) + pp.pprint(client.incrementRows(eval(args[0]),)) elif cmd == 'deleteAllRowTs': - if len(args) != 4: - print 'deleteAllRowTs requires 4 args' - sys.exit(1) - pp.pprint(client.deleteAllRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('deleteAllRowTs requires 4 args') + sys.exit(1) + pp.pprint(client.deleteAllRowTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'scannerOpenWithScan': - if len(args) != 3: - print 'scannerOpenWithScan requires 3 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithScan(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('scannerOpenWithScan requires 3 args') + sys.exit(1) + pp.pprint(client.scannerOpenWithScan(eval(args[0]), eval(args[1]), eval(args[2]),)) elif cmd == 'scannerOpen': - if len(args) != 4: - print 'scannerOpen requires 4 args' - sys.exit(1) - pp.pprint(client.scannerOpen(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('scannerOpen requires 4 args') + sys.exit(1) + pp.pprint(client.scannerOpen(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'scannerOpenWithStop': - if len(args) != 5: - print 'scannerOpenWithStop requires 5 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithStop(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('scannerOpenWithStop requires 5 args') + sys.exit(1) + pp.pprint(client.scannerOpenWithStop(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'scannerOpenWithPrefix': - if len(args) != 4: - print 'scannerOpenWithPrefix requires 4 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithPrefix(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + if len(args) != 4: + print('scannerOpenWithPrefix requires 4 args') + sys.exit(1) + pp.pprint(client.scannerOpenWithPrefix(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]),)) elif cmd == 'scannerOpenTs': - if len(args) != 5: - print 'scannerOpenTs requires 5 args' - sys.exit(1) - pp.pprint(client.scannerOpenTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + if len(args) != 5: + print('scannerOpenTs requires 5 args') + sys.exit(1) + pp.pprint(client.scannerOpenTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]),)) elif cmd == 'scannerOpenWithStopTs': - if len(args) != 6: - print 'scannerOpenWithStopTs requires 6 args' - sys.exit(1) - pp.pprint(client.scannerOpenWithStopTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) + if len(args) != 6: + print('scannerOpenWithStopTs requires 6 args') + sys.exit(1) + pp.pprint(client.scannerOpenWithStopTs(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]), eval(args[5]),)) elif cmd == 'scannerGet': - if len(args) != 1: - print 'scannerGet requires 1 args' - sys.exit(1) - pp.pprint(client.scannerGet(eval(args[0]),)) + if len(args) != 1: + print('scannerGet requires 1 args') + sys.exit(1) + pp.pprint(client.scannerGet(eval(args[0]),)) elif cmd == 'scannerGetList': - if len(args) != 2: - print 'scannerGetList requires 2 args' - sys.exit(1) - pp.pprint(client.scannerGetList(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('scannerGetList requires 2 args') + sys.exit(1) + pp.pprint(client.scannerGetList(eval(args[0]), eval(args[1]),)) elif cmd == 'scannerClose': - if len(args) != 1: - print 'scannerClose requires 1 args' - sys.exit(1) - pp.pprint(client.scannerClose(eval(args[0]),)) - -elif cmd == 'getRowOrBefore': - if len(args) != 3: - print 'getRowOrBefore requires 3 args' - sys.exit(1) - pp.pprint(client.getRowOrBefore(eval(args[0]),eval(args[1]),eval(args[2]),)) + if len(args) != 1: + print('scannerClose requires 1 args') + sys.exit(1) + pp.pprint(client.scannerClose(eval(args[0]),)) elif cmd == 'getRegionInfo': - if len(args) != 1: - print 'getRegionInfo requires 1 args' - sys.exit(1) - pp.pprint(client.getRegionInfo(eval(args[0]),)) + if len(args) != 1: + print('getRegionInfo requires 1 args') + sys.exit(1) + pp.pprint(client.getRegionInfo(eval(args[0]),)) + +elif cmd == 'append': + if len(args) != 1: + print('append requires 1 args') + sys.exit(1) + pp.pprint(client.append(eval(args[0]),)) + +elif cmd == 'checkAndPut': + if len(args) != 6: + print('checkAndPut requires 6 args') + sys.exit(1) + pp.pprint(client.checkAndPut(eval(args[0]), eval(args[1]), eval(args[2]), eval(args[3]), eval(args[4]), eval(args[5]),)) + +elif cmd == 'getThriftServerType': + if len(args) != 0: + print('getThriftServerType requires 0 args') + sys.exit(1) + pp.pprint(client.getThriftServerType()) else: - print 'Unrecognized method %s' % cmd - sys.exit(1) + print('Unrecognized method %s' % cmd) + sys.exit(1) transport.close() diff --git a/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase.py b/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase.py index 2f225230800..48d602e58f6 100644 --- a/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase.py +++ b/hbase-examples/src/main/python/thrift1/gen-py/hbase/Hbase.py @@ -1,1927 +1,9498 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -from ttypes import * +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys +import logging +from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class Iface: - def enableTable(self, tableName): - """ - Brings a table on-line (enables it) - - Parameters: - - tableName: name of the table - """ - pass - - def disableTable(self, tableName): - """ - Disables a table (takes it off-line) If it is being served, the master - will tell the servers to stop serving it. - - Parameters: - - tableName: name of the table - """ - pass - - def isTableEnabled(self, tableName): - """ - @return true if table is on-line - - Parameters: - - tableName: name of the table to check - """ - pass - - def compact(self, tableNameOrRegionName): - """ - Parameters: - - tableNameOrRegionName - """ - pass - - def majorCompact(self, tableNameOrRegionName): - """ - Parameters: - - tableNameOrRegionName - """ - pass - - def getTableNames(self, ): - """ - List all the userspace tables. - - @return returns a list of names - """ - pass - - def getColumnDescriptors(self, tableName): - """ - List all the column families assoicated with a table. - - @return list of column family descriptors - - Parameters: - - tableName: table name - """ - pass - - def getTableRegions(self, tableName): - """ - List the regions associated with a table. - - @return list of region descriptors - - Parameters: - - tableName: table name - """ - pass - - def createTable(self, tableName, columnFamilies): - """ - Create a table with the specified column families. The name - field for each ColumnDescriptor must be set and must end in a - colon (:). All other fields are optional and will get default - values if not explicitly specified. - - @throws IllegalArgument if an input parameter is invalid - - @throws AlreadyExists if the table name already exists - - Parameters: - - tableName: name of table to create - - columnFamilies: list of column family descriptors - """ - pass - - def deleteTable(self, tableName): - """ - Deletes a table - - @throws IOError if table doesn't exist on server or there was some other - problem - - Parameters: - - tableName: name of table to delete - """ - pass - - def get(self, tableName, row, column, attributes): - """ - Get a single TCell for the specified table, row, and column at the - latest timestamp. Returns an empty list if no such value exists. - - @return value for specified row/column - - Parameters: - - tableName: name of table - - row: row key - - column: column name - - attributes: Get attributes - """ - pass - - def getVer(self, tableName, row, column, numVersions, attributes): - """ - Get the specified number of versions for the specified table, - row, and column. - - @return list of cells for specified row/column - - Parameters: - - tableName: name of table - - row: row key - - column: column name - - numVersions: number of versions to retrieve - - attributes: Get attributes - """ - pass - - def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): - """ - Get the specified number of versions for the specified table, - row, and column. Only versions less than or equal to the specified - timestamp will be returned. - - @return list of cells for specified row/column - - Parameters: - - tableName: name of table - - row: row key - - column: column name - - timestamp: timestamp - - numVersions: number of versions to retrieve - - attributes: Get attributes - """ - pass - - def getRow(self, tableName, row, attributes): - """ - Get all the data for the specified table and row at the latest - timestamp. Returns an empty list if the row does not exist. - - @return TRowResult containing the row and map of columns to TCells - - Parameters: - - tableName: name of table - - row: row key - - attributes: Get attributes - """ - pass - - def getRowWithColumns(self, tableName, row, columns, attributes): - """ - Get the specified columns for the specified table and row at the latest - timestamp. Returns an empty list if the row does not exist. - - @return TRowResult containing the row and map of columns to TCells - - Parameters: - - tableName: name of table - - row: row key - - columns: List of columns to return, null for all columns - - attributes: Get attributes - """ - pass - - def getRowTs(self, tableName, row, timestamp, attributes): - """ - Get all the data for the specified table and row at the specified - timestamp. Returns an empty list if the row does not exist. - - @return TRowResult containing the row and map of columns to TCells - - Parameters: - - tableName: name of the table - - row: row key - - timestamp: timestamp - - attributes: Get attributes - """ - pass - - def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): - """ - Get the specified columns for the specified table and row at the specified - timestamp. Returns an empty list if the row does not exist. - - @return TRowResult containing the row and map of columns to TCells - - Parameters: - - tableName: name of table - - row: row key - - columns: List of columns to return, null for all columns - - timestamp - - attributes: Get attributes - """ - pass - - def getRows(self, tableName, rows, attributes): - """ - Get all the data for the specified table and rows at the latest - timestamp. Returns an empty list if no rows exist. - - @return TRowResult containing the rows and map of columns to TCells - - Parameters: - - tableName: name of table - - rows: row keys - - attributes: Get attributes - """ - pass - - def getRowsWithColumns(self, tableName, rows, columns, attributes): - """ - Get the specified columns for the specified table and rows at the latest - timestamp. Returns an empty list if no rows exist. - - @return TRowResult containing the rows and map of columns to TCells - - Parameters: - - tableName: name of table - - rows: row keys - - columns: List of columns to return, null for all columns - - attributes: Get attributes - """ - pass - - def getRowsTs(self, tableName, rows, timestamp, attributes): - """ - Get all the data for the specified table and rows at the specified - timestamp. Returns an empty list if no rows exist. - - @return TRowResult containing the rows and map of columns to TCells - - Parameters: - - tableName: name of the table - - rows: row keys - - timestamp: timestamp - - attributes: Get attributes - """ - pass - - def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): - """ - Get the specified columns for the specified table and rows at the specified - timestamp. Returns an empty list if no rows exist. - - @return TRowResult containing the rows and map of columns to TCells - - Parameters: - - tableName: name of table - - rows: row keys - - columns: List of columns to return, null for all columns - - timestamp - - attributes: Get attributes - """ - pass - - def mutateRow(self, tableName, row, mutations, attributes): - """ - Apply a series of mutations (updates/deletes) to a row in a - single transaction. If an exception is thrown, then the - transaction is aborted. Default current timestamp is used, and - all entries will have an identical timestamp. - - Parameters: - - tableName: name of table - - row: row key - - mutations: list of mutation commands - - attributes: Mutation attributes - """ - pass - - def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): - """ - Apply a series of mutations (updates/deletes) to a row in a - single transaction. If an exception is thrown, then the - transaction is aborted. The specified timestamp is used, and - all entries will have an identical timestamp. - - Parameters: - - tableName: name of table - - row: row key - - mutations: list of mutation commands - - timestamp: timestamp - - attributes: Mutation attributes - """ - pass - - def mutateRows(self, tableName, rowBatches, attributes): - """ - Apply a series of batches (each a series of mutations on a single row) - in a single transaction. If an exception is thrown, then the - transaction is aborted. Default current timestamp is used, and - all entries will have an identical timestamp. - - Parameters: - - tableName: name of table - - rowBatches: list of row batches - - attributes: Mutation attributes - """ - pass - - def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): - """ - Apply a series of batches (each a series of mutations on a single row) - in a single transaction. If an exception is thrown, then the - transaction is aborted. The specified timestamp is used, and - all entries will have an identical timestamp. - - Parameters: - - tableName: name of table - - rowBatches: list of row batches - - timestamp: timestamp - - attributes: Mutation attributes - """ - pass - - def atomicIncrement(self, tableName, row, column, value): - """ - Atomically increment the column value specified. Returns the next value post increment. - - Parameters: - - tableName: name of table - - row: row to increment - - column: name of column - - value: amount to increment by - """ - pass - - def deleteAll(self, tableName, row, column, attributes): - """ - Delete all cells that match the passed row and column. - - Parameters: - - tableName: name of table - - row: Row to update - - column: name of column whose value is to be deleted - - attributes: Delete attributes - """ - pass - - def deleteAllTs(self, tableName, row, column, timestamp, attributes): - """ - Delete all cells that match the passed row and column and whose - timestamp is equal-to or older than the passed timestamp. - - Parameters: - - tableName: name of table - - row: Row to update - - column: name of column whose value is to be deleted - - timestamp: timestamp - - attributes: Delete attributes - """ - pass - - def deleteAllRow(self, tableName, row, attributes): - """ - Completely delete the row's cells. - - Parameters: - - tableName: name of table - - row: key of the row to be completely deleted. - - attributes: Delete attributes - """ - pass - - def increment(self, increment): - """ - Increment a cell by the ammount. - Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. - False is the default. Turn to true if you need the extra performance and can accept some - data loss if a thrift server dies with increments still in the queue. - - Parameters: - - increment: The single increment to apply - """ - pass - - def incrementRows(self, increments): - """ - Parameters: - - increments: The list of increments - """ - pass - - def deleteAllRowTs(self, tableName, row, timestamp, attributes): - """ - Completely delete the row's cells marked with a timestamp - equal-to or older than the passed timestamp. - - Parameters: - - tableName: name of table - - row: key of the row to be completely deleted. - - timestamp: timestamp - - attributes: Delete attributes - """ - pass - - def scannerOpenWithScan(self, tableName, scan, attributes): - """ - Get a scanner on the current table, using the Scan instance - for the scan parameters. - - Parameters: - - tableName: name of table - - scan: Scan instance - - attributes: Scan attributes - """ - pass - - def scannerOpen(self, tableName, startRow, columns, attributes): - """ - Get a scanner on the current table starting at the specified row and - ending at the last row in the table. Return the specified columns. - - @return scanner id to be used with other scanner procedures - - Parameters: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - attributes: Scan attributes - """ - pass - - def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): - """ - Get a scanner on the current table starting and stopping at the - specified rows. ending at the last row in the table. Return the - specified columns. - - @return scanner id to be used with other scanner procedures - - Parameters: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - stopRow: row to stop scanning on. This row is *not* included in the - scanner's results - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - attributes: Scan attributes - """ - pass - - def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): - """ - Open a scanner for a given prefix. That is all rows will have the specified - prefix. No other rows will be returned. - - @return scanner id to use with other scanner calls - - Parameters: - - tableName: name of table - - startAndPrefix: the prefix (and thus start row) of the keys you want - - columns: the columns you want returned - - attributes: Scan attributes - """ - pass - - def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): - """ - Get a scanner on the current table starting at the specified row and - ending at the last row in the table. Return the specified columns. - Only values with the specified timestamp are returned. - - @return scanner id to be used with other scanner procedures - - Parameters: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - timestamp: timestamp - - attributes: Scan attributes - """ - pass - - def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): - """ - Get a scanner on the current table starting and stopping at the - specified rows. ending at the last row in the table. Return the - specified columns. Only values with the specified timestamp are - returned. - - @return scanner id to be used with other scanner procedures - - Parameters: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - stopRow: row to stop scanning on. This row is *not* included in the - scanner's results - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - timestamp: timestamp - - attributes: Scan attributes - """ - pass - - def scannerGet(self, id): - """ - Returns the scanner's current row value and advances to the next - row in the table. When there are no more rows in the table, or a key - greater-than-or-equal-to the scanner's specified stopRow is reached, - an empty list is returned. - - @return a TRowResult containing the current row and a map of the columns to TCells. - - @throws IllegalArgument if ScannerID is invalid - - @throws NotFound when the scanner reaches the end - - Parameters: - - id: id of a scanner returned by scannerOpen - """ - pass - - def scannerGetList(self, id, nbRows): - """ - Returns, starting at the scanner's current row value nbRows worth of - rows and advances to the next row in the table. When there are no more - rows in the table, or a key greater-than-or-equal-to the scanner's - specified stopRow is reached, an empty list is returned. - - @return a TRowResult containing the current row and a map of the columns to TCells. - - @throws IllegalArgument if ScannerID is invalid - - @throws NotFound when the scanner reaches the end - - Parameters: - - id: id of a scanner returned by scannerOpen - - nbRows: number of results to return - """ - pass - - def scannerClose(self, id): - """ - Closes the server-state associated with an open scanner. - - @throws IllegalArgument if ScannerID is invalid - - Parameters: - - id: id of a scanner returned by scannerOpen - """ - pass - - def getRowOrBefore(self, tableName, row, family): - """ - Get the row just before the specified one. - - @return value for specified row/column - - Parameters: - - tableName: name of table - - row: row key - - family: column name - """ - pass - - def getRegionInfo(self, row): - """ - Get the regininfo for the specified row. It scans - the metatable to find region's start and end keys. - - @return value for specified row/column - - Parameters: - - row: row key - """ - pass +all_structs = [] + + +class Iface(object): + def enableTable(self, tableName): + """ + Brings a table on-line (enables it) + + Parameters: + - tableName: name of the table + + """ + pass + + def disableTable(self, tableName): + """ + Disables a table (takes it off-line) If it is being served, the master + will tell the servers to stop serving it. + + Parameters: + - tableName: name of the table + + """ + pass + + def isTableEnabled(self, tableName): + """ + @return true if table is on-line + + Parameters: + - tableName: name of the table to check + + """ + pass + + def compact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + + """ + pass + + def majorCompact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + + """ + pass + + def getTableNames(self): + """ + List all the userspace tables. + + @return returns a list of names + + """ + pass + + def getColumnDescriptors(self, tableName): + """ + List all the column families assoicated with a table. + + @return list of column family descriptors + + Parameters: + - tableName: table name + + """ + pass + + def getTableRegions(self, tableName): + """ + List the regions associated with a table. + + @return list of region descriptors + + Parameters: + - tableName: table name + + """ + pass + + def createTable(self, tableName, columnFamilies): + """ + Create a table with the specified column families. The name + field for each ColumnDescriptor must be set and must end in a + colon (:). All other fields are optional and will get default + values if not explicitly specified. + + @throws IllegalArgument if an input parameter is invalid + + @throws AlreadyExists if the table name already exists + + Parameters: + - tableName: name of table to create + - columnFamilies: list of column family descriptors + + """ + pass + + def deleteTable(self, tableName): + """ + Deletes a table + + @throws IOError if table doesn't exist on erer or there was some other + problem + + Parameters: + - tableName: name of table to delete + + """ + pass + + def get(self, tableName, row, column, attributes): + """ + Get a single TCell for the specified table, row, and column at the + latest timestamp. Returns an empty list if no such value exists. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - attributes: Get attributes + + """ + pass + + def getVer(self, tableName, row, column, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - numVersions: number of versions to retrieve + - attributes: Get attributes + + """ + pass + + def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. Only versions less than or equal to the specified + timestamp will be returned. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - timestamp: timestamp + - numVersions: number of versions to retrieve + - attributes: Get attributes + + """ + pass + + def getRow(self, tableName, row, attributes): + """ + Get all the data for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - attributes: Get attributes + + """ + pass + + def getRowWithColumns(self, tableName, row, columns, attributes): + """ + Get the specified columns for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - attributes: Get attributes + + """ + pass + + def getRowTs(self, tableName, row, timestamp, attributes): + """ + Get all the data for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of the table + - row: row key + - timestamp: timestamp + - attributes: Get attributes + + """ + pass + + def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + + """ + pass + + def getRows(self, tableName, rows, attributes): + """ + Get all the data for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - attributes: Get attributes + + """ + pass + + def getRowsWithColumns(self, tableName, rows, columns, attributes): + """ + Get the specified columns for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - attributes: Get attributes + + """ + pass + + def getRowsTs(self, tableName, rows, timestamp, attributes): + """ + Get all the data for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of the table + - rows: row keys + - timestamp: timestamp + - attributes: Get attributes + + """ + pass + + def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + + """ + pass + + def mutateRow(self, tableName, row, mutations, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - attributes: Mutation attributes + + """ + pass + + def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - timestamp: timestamp + - attributes: Mutation attributes + + """ + pass + + def mutateRows(self, tableName, rowBatches, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - attributes: Mutation attributes + + """ + pass + + def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - timestamp: timestamp + - attributes: Mutation attributes + + """ + pass + + def atomicIncrement(self, tableName, row, column, value): + """ + Atomically increment the column value specified. Returns the next value post increment. + + Parameters: + - tableName: name of table + - row: row to increment + - column: name of column + - value: amount to increment by + + """ + pass + + def deleteAll(self, tableName, row, column, attributes): + """ + Delete all cells that match the passed row and column. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - attributes: Delete attributes + + """ + pass + + def deleteAllTs(self, tableName, row, column, timestamp, attributes): + """ + Delete all cells that match the passed row and column and whose + timestamp is equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - timestamp: timestamp + - attributes: Delete attributes + + """ + pass + + def deleteAllRow(self, tableName, row, attributes): + """ + Completely delete the row's cells. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - attributes: Delete attributes + + """ + pass + + def increment(self, increment): + """ + Increment a cell by the ammount. + Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. + False is the default. Turn to true if you need the extra performance and can accept some + data loss if a thrift server dies with increments still in the queue. + + Parameters: + - increment: The single increment to apply + + """ + pass + + def incrementRows(self, increments): + """ + Parameters: + - increments: The list of increments + + """ + pass + + def deleteAllRowTs(self, tableName, row, timestamp, attributes): + """ + Completely delete the row's cells marked with a timestamp + equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - timestamp: timestamp + - attributes: Delete attributes + + """ + pass + + def scannerOpenWithScan(self, tableName, scan, attributes): + """ + Get a scanner on the current table, using the Scan instance + for the scan parameters. + + Parameters: + - tableName: name of table + - scan: Scan instance + - attributes: Scan attributes + + """ + pass + + def scannerOpen(self, tableName, startRow, columns, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + + """ + pass + + def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + + """ + pass + + def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + """ + Open a scanner for a given prefix. That is all rows will have the specified + prefix. No other rows will be returned. + + @return scanner id to use with other scanner calls + + Parameters: + - tableName: name of table + - startAndPrefix: the prefix (and thus start row) of the keys you want + - columns: the columns you want returned + - attributes: Scan attributes + + """ + pass + + def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + Only values with the specified timestamp are returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + + """ + pass + + def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. Only values with the specified timestamp are + returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + + """ + pass + + def scannerGet(self, id): + """ + Returns the scanner's current row value and advances to the next + row in the table. When there are no more rows in the table, or a key + greater-than-or-equal-to the scanner's specified stopRow is reached, + an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + + """ + pass + + def scannerGetList(self, id, nbRows): + """ + Returns, starting at the scanner's current row value nbRows worth of + rows and advances to the next row in the table. When there are no more + rows in the table, or a key greater-than-or-equal-to the scanner's + specified stopRow is reached, an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + - nbRows: number of results to return + + """ + pass + + def scannerClose(self, id): + """ + Closes the server-state associated with an open scanner. + + @throws IllegalArgument if ScannerID is invalid + + Parameters: + - id: id of a scanner returned by scannerOpen + + """ + pass + + def getRegionInfo(self, row): + """ + Get the regininfo for the specified row. It scans + the metatable to find region's start and end keys. + + @return value for specified row/column + + Parameters: + - row: row key + + """ + pass + + def append(self, append): + """ + Appends values to one or more columns within a single row. + + @return values of columns after the append operation. + + Parameters: + - append: The single append operation to apply + + """ + pass + + def checkAndPut(self, tableName, row, column, value, mput, attributes): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the corresponding mutation operation for put. + + @return true if the new put was executed, false otherwise + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - value: the expected value for the column parameter, if not + provided the check is for the non-existence of the + column in question + - mput: mutation for the put + - attributes: Mutation attributes + + """ + pass + + def getThriftServerType(self): + """ + Get the type of this thrift server. + + @return the type of this thrift server + + """ + pass class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot is not None: - self._oprot = oprot - self._seqid = 0 + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot is not None: + self._oprot = oprot + self._seqid = 0 - def enableTable(self, tableName): + def enableTable(self, tableName): + """ + Brings a table on-line (enables it) + + Parameters: + - tableName: name of the table + + """ + self.send_enableTable(tableName) + self.recv_enableTable() + + def send_enableTable(self, tableName): + self._oprot.writeMessageBegin('enableTable', TMessageType.CALL, self._seqid) + args = enableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_enableTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = enableTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def disableTable(self, tableName): + """ + Disables a table (takes it off-line) If it is being served, the master + will tell the servers to stop serving it. + + Parameters: + - tableName: name of the table + + """ + self.send_disableTable(tableName) + self.recv_disableTable() + + def send_disableTable(self, tableName): + self._oprot.writeMessageBegin('disableTable', TMessageType.CALL, self._seqid) + args = disableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_disableTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = disableTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def isTableEnabled(self, tableName): + """ + @return true if table is on-line + + Parameters: + - tableName: name of the table to check + + """ + self.send_isTableEnabled(tableName) + return self.recv_isTableEnabled() + + def send_isTableEnabled(self, tableName): + self._oprot.writeMessageBegin('isTableEnabled', TMessageType.CALL, self._seqid) + args = isTableEnabled_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableEnabled(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isTableEnabled_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result") + + def compact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + + """ + self.send_compact(tableNameOrRegionName) + self.recv_compact() + + def send_compact(self, tableNameOrRegionName): + self._oprot.writeMessageBegin('compact', TMessageType.CALL, self._seqid) + args = compact_args() + args.tableNameOrRegionName = tableNameOrRegionName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = compact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def majorCompact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + + """ + self.send_majorCompact(tableNameOrRegionName) + self.recv_majorCompact() + + def send_majorCompact(self, tableNameOrRegionName): + self._oprot.writeMessageBegin('majorCompact', TMessageType.CALL, self._seqid) + args = majorCompact_args() + args.tableNameOrRegionName = tableNameOrRegionName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_majorCompact(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = majorCompact_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def getTableNames(self): + """ + List all the userspace tables. + + @return returns a list of names + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableNames_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result") + + def getColumnDescriptors(self, tableName): + """ + List all the column families assoicated with a table. + + @return list of column family descriptors + + Parameters: + - tableName: table name + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getColumnDescriptors_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result") + + def getTableRegions(self, tableName): + """ + List the regions associated with a table. + + @return list of region descriptors + + Parameters: + - tableName: table name + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableRegions_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result") + + def createTable(self, tableName, columnFamilies): + """ + Create a table with the specified column families. The name + field for each ColumnDescriptor must be set and must end in a + colon (:). All other fields are optional and will get default + values if not explicitly specified. + + @throws IllegalArgument if an input parameter is invalid + + @throws AlreadyExists if the table name already exists + + Parameters: + - tableName: name of table to create + - columnFamilies: list of column family descriptors + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = createTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + if result.exist is not None: + raise result.exist + return + + def deleteTable(self, tableName): + """ + Deletes a table + + @throws IOError if table doesn't exist on server or there was some other + problem + + Parameters: + - tableName: name of table to delete + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def get(self, tableName, row, column, attributes): + """ + Get a single TCell for the specified table, row, and column at the + latest timestamp. Returns an empty list if no such value exists. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - attributes: Get attributes + + """ + self.send_get(tableName, row, column, attributes) + return self.recv_get() + + def send_get(self, tableName, row, column, attributes): + self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) + args = get_args() + args.tableName = tableName + args.row = row + args.column = column + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result") + + def getVer(self, tableName, row, column, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - numVersions: number of versions to retrieve + - attributes: Get attributes + + """ + self.send_getVer(tableName, row, column, numVersions, attributes) + return self.recv_getVer() + + def send_getVer(self, tableName, row, column, numVersions, attributes): + self._oprot.writeMessageBegin('getVer', TMessageType.CALL, self._seqid) + args = getVer_args() + args.tableName = tableName + args.row = row + args.column = column + args.numVersions = numVersions + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getVer(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getVer_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result") + + def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. Only versions less than or equal to the specified + timestamp will be returned. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - timestamp: timestamp + - numVersions: number of versions to retrieve + - attributes: Get attributes + + """ + self.send_getVerTs(tableName, row, column, timestamp, numVersions, attributes) + return self.recv_getVerTs() + + def send_getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + 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.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getVerTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getVerTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result") + + def getRow(self, tableName, row, attributes): + """ + Get all the data for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - attributes: Get attributes + + """ + self.send_getRow(tableName, row, attributes) + return self.recv_getRow() + + def send_getRow(self, tableName, row, attributes): + self._oprot.writeMessageBegin('getRow', TMessageType.CALL, self._seqid) + args = getRow_args() + args.tableName = tableName + args.row = row + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRow(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRow_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result") + + def getRowWithColumns(self, tableName, row, columns, attributes): + """ + Get the specified columns for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - attributes: Get attributes + + """ + self.send_getRowWithColumns(tableName, row, columns, attributes) + return self.recv_getRowWithColumns() + + def send_getRowWithColumns(self, tableName, row, columns, attributes): + self._oprot.writeMessageBegin('getRowWithColumns', TMessageType.CALL, self._seqid) + args = getRowWithColumns_args() + args.tableName = tableName + args.row = row + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowWithColumns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowWithColumns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result") + + def getRowTs(self, tableName, row, timestamp, attributes): + """ + Get all the data for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of the table + - row: row key + - timestamp: timestamp + - attributes: Get attributes + + """ + self.send_getRowTs(tableName, row, timestamp, attributes) + return self.recv_getRowTs() + + def send_getRowTs(self, tableName, row, timestamp, attributes): + self._oprot.writeMessageBegin('getRowTs', TMessageType.CALL, self._seqid) + args = getRowTs_args() + args.tableName = tableName + args.row = row + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result") + + def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + + """ + self.send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes) + return self.recv_getRowWithColumnsTs() + + def send_getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + self._oprot.writeMessageBegin('getRowWithColumnsTs', TMessageType.CALL, self._seqid) + args = getRowWithColumnsTs_args() + args.tableName = tableName + args.row = row + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowWithColumnsTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowWithColumnsTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result") + + def getRows(self, tableName, rows, attributes): + """ + Get all the data for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - attributes: Get attributes + + """ + self.send_getRows(tableName, rows, attributes) + return self.recv_getRows() + + def send_getRows(self, tableName, rows, attributes): + self._oprot.writeMessageBegin('getRows', TMessageType.CALL, self._seqid) + args = getRows_args() + args.tableName = tableName + args.rows = rows + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRows(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRows_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRows failed: unknown result") + + def getRowsWithColumns(self, tableName, rows, columns, attributes): + """ + Get the specified columns for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - attributes: Get attributes + + """ + self.send_getRowsWithColumns(tableName, rows, columns, attributes) + return self.recv_getRowsWithColumns() + + def send_getRowsWithColumns(self, tableName, rows, columns, attributes): + self._oprot.writeMessageBegin('getRowsWithColumns', TMessageType.CALL, self._seqid) + args = getRowsWithColumns_args() + args.tableName = tableName + args.rows = rows + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsWithColumns(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowsWithColumns_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumns failed: unknown result") + + def getRowsTs(self, tableName, rows, timestamp, attributes): + """ + Get all the data for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of the table + - rows: row keys + - timestamp: timestamp + - attributes: Get attributes + + """ + self.send_getRowsTs(tableName, rows, timestamp, attributes) + return self.recv_getRowsTs() + + def send_getRowsTs(self, tableName, rows, timestamp, attributes): + self._oprot.writeMessageBegin('getRowsTs', TMessageType.CALL, self._seqid) + args = getRowsTs_args() + args.tableName = tableName + args.rows = rows + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowsTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsTs failed: unknown result") + + def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + + """ + self.send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes) + return self.recv_getRowsWithColumnsTs() + + def send_getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + self._oprot.writeMessageBegin('getRowsWithColumnsTs', TMessageType.CALL, self._seqid) + args = getRowsWithColumnsTs_args() + args.tableName = tableName + args.rows = rows + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsWithColumnsTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRowsWithColumnsTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumnsTs failed: unknown result") + + def mutateRow(self, tableName, row, mutations, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - attributes: Mutation attributes + + """ + self.send_mutateRow(tableName, row, mutations, attributes) + self.recv_mutateRow() + + def send_mutateRow(self, tableName, row, mutations, attributes): + self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) + args = mutateRow_args() + args.tableName = tableName + args.row = row + args.mutations = mutations + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRow(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mutateRow_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - timestamp: timestamp + - attributes: Mutation attributes + + """ + self.send_mutateRowTs(tableName, row, mutations, timestamp, attributes) + self.recv_mutateRowTs() + + def send_mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + self._oprot.writeMessageBegin('mutateRowTs', TMessageType.CALL, self._seqid) + args = mutateRowTs_args() + args.tableName = tableName + args.row = row + args.mutations = mutations + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRowTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mutateRowTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRows(self, tableName, rowBatches, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - attributes: Mutation attributes + + """ + self.send_mutateRows(tableName, rowBatches, attributes) + self.recv_mutateRows() + + def send_mutateRows(self, tableName, rowBatches, attributes): + self._oprot.writeMessageBegin('mutateRows', TMessageType.CALL, self._seqid) + args = mutateRows_args() + args.tableName = tableName + args.rowBatches = rowBatches + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRows(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mutateRows_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - timestamp: timestamp + - attributes: Mutation attributes + + """ + self.send_mutateRowsTs(tableName, rowBatches, timestamp, attributes) + self.recv_mutateRowsTs() + + def send_mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + self._oprot.writeMessageBegin('mutateRowsTs', TMessageType.CALL, self._seqid) + args = mutateRowsTs_args() + args.tableName = tableName + args.rowBatches = rowBatches + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRowsTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mutateRowsTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def atomicIncrement(self, tableName, row, column, value): + """ + Atomically increment the column value specified. Returns the next value post increment. + + Parameters: + - tableName: name of table + - row: row to increment + - column: name of column + - value: amount to increment by + + """ + self.send_atomicIncrement(tableName, row, column, value) + return self.recv_atomicIncrement() + + def send_atomicIncrement(self, tableName, row, column, value): + self._oprot.writeMessageBegin('atomicIncrement', TMessageType.CALL, self._seqid) + args = atomicIncrement_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_atomicIncrement(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = atomicIncrement_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result") + + def deleteAll(self, tableName, row, column, attributes): + """ + Delete all cells that match the passed row and column. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - attributes: Delete attributes + + """ + self.send_deleteAll(tableName, row, column, attributes) + self.recv_deleteAll() + + def send_deleteAll(self, tableName, row, column, attributes): + self._oprot.writeMessageBegin('deleteAll', TMessageType.CALL, self._seqid) + args = deleteAll_args() + args.tableName = tableName + args.row = row + args.column = column + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAll(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteAll_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllTs(self, tableName, row, column, timestamp, attributes): + """ + Delete all cells that match the passed row and column and whose + timestamp is equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - timestamp: timestamp + - attributes: Delete attributes + + """ + self.send_deleteAllTs(tableName, row, column, timestamp, attributes) + self.recv_deleteAllTs() + + def send_deleteAllTs(self, tableName, row, column, timestamp, attributes): + self._oprot.writeMessageBegin('deleteAllTs', TMessageType.CALL, self._seqid) + args = deleteAllTs_args() + args.tableName = tableName + args.row = row + args.column = column + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteAllTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllRow(self, tableName, row, attributes): + """ + Completely delete the row's cells. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - attributes: Delete attributes + + """ + self.send_deleteAllRow(tableName, row, attributes) + self.recv_deleteAllRow() + + def send_deleteAllRow(self, tableName, row, attributes): + self._oprot.writeMessageBegin('deleteAllRow', TMessageType.CALL, self._seqid) + args = deleteAllRow_args() + args.tableName = tableName + args.row = row + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllRow(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteAllRow_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def increment(self, increment): + """ + Increment a cell by the ammount. + Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. + False is the default. Turn to true if you need the extra performance and can accept some + data loss if a thrift server dies with increments still in the queue. + + Parameters: + - increment: The single increment to apply + + """ + self.send_increment(increment) + self.recv_increment() + + def send_increment(self, increment): + self._oprot.writeMessageBegin('increment', TMessageType.CALL, self._seqid) + args = increment_args() + args.increment = increment + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_increment(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = increment_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def incrementRows(self, increments): + """ + Parameters: + - increments: The list of increments + + """ + self.send_incrementRows(increments) + self.recv_incrementRows() + + def send_incrementRows(self, increments): + self._oprot.writeMessageBegin('incrementRows', TMessageType.CALL, self._seqid) + args = incrementRows_args() + args.increments = increments + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_incrementRows(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = incrementRows_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllRowTs(self, tableName, row, timestamp, attributes): + """ + Completely delete the row's cells marked with a timestamp + equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - timestamp: timestamp + - attributes: Delete attributes + + """ + self.send_deleteAllRowTs(tableName, row, timestamp, attributes) + self.recv_deleteAllRowTs() + + def send_deleteAllRowTs(self, tableName, row, timestamp, attributes): + self._oprot.writeMessageBegin('deleteAllRowTs', TMessageType.CALL, self._seqid) + args = deleteAllRowTs_args() + args.tableName = tableName + args.row = row + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllRowTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteAllRowTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def scannerOpenWithScan(self, tableName, scan, attributes): + """ + Get a scanner on the current table, using the Scan instance + for the scan parameters. + + Parameters: + - tableName: name of table + - scan: Scan instance + - attributes: Scan attributes + + """ + self.send_scannerOpenWithScan(tableName, scan, attributes) + return self.recv_scannerOpenWithScan() + + def send_scannerOpenWithScan(self, tableName, scan, attributes): + self._oprot.writeMessageBegin('scannerOpenWithScan', TMessageType.CALL, self._seqid) + args = scannerOpenWithScan_args() + args.tableName = tableName + args.scan = scan + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithScan(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpenWithScan_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithScan failed: unknown result") + + def scannerOpen(self, tableName, startRow, columns, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + + """ + self.send_scannerOpen(tableName, startRow, columns, attributes) + return self.recv_scannerOpen() + + def send_scannerOpen(self, tableName, startRow, columns, attributes): + self._oprot.writeMessageBegin('scannerOpen', TMessageType.CALL, self._seqid) + args = scannerOpen_args() + args.tableName = tableName + args.startRow = startRow + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpen(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpen_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result") + + def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + + """ + self.send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes) + return self.recv_scannerOpenWithStop() + + def send_scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + self._oprot.writeMessageBegin('scannerOpenWithStop', TMessageType.CALL, self._seqid) + args = scannerOpenWithStop_args() + args.tableName = tableName + args.startRow = startRow + args.stopRow = stopRow + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithStop(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpenWithStop_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result") + + def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + """ + Open a scanner for a given prefix. That is all rows will have the specified + prefix. No other rows will be returned. + + @return scanner id to use with other scanner calls + + Parameters: + - tableName: name of table + - startAndPrefix: the prefix (and thus start row) of the keys you want + - columns: the columns you want returned + - attributes: Scan attributes + + """ + self.send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes) + return self.recv_scannerOpenWithPrefix() + + def send_scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + self._oprot.writeMessageBegin('scannerOpenWithPrefix', TMessageType.CALL, self._seqid) + args = scannerOpenWithPrefix_args() + args.tableName = tableName + args.startAndPrefix = startAndPrefix + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithPrefix(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpenWithPrefix_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result") + + def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + Only values with the specified timestamp are returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + + """ + self.send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes) + return self.recv_scannerOpenTs() + + def send_scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + self._oprot.writeMessageBegin('scannerOpenTs', TMessageType.CALL, self._seqid) + args = scannerOpenTs_args() + args.tableName = tableName + args.startRow = startRow + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpenTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result") + + def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. Only values with the specified timestamp are + returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + + """ + self.send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes) + return self.recv_scannerOpenWithStopTs() + + def send_scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + 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.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithStopTs(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerOpenWithStopTs_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result") + + def scannerGet(self, id): + """ + Returns the scanner's current row value and advances to the next + row in the table. When there are no more rows in the table, or a key + greater-than-or-equal-to the scanner's specified stopRow is reached, + an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerGet_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result") + + def scannerGetList(self, id, nbRows): + """ + Returns, starting at the scanner's current row value nbRows worth of + rows and advances to the next row in the table. When there are no more + rows in the table, or a key greater-than-or-equal-to the scanner's + specified stopRow is reached, an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + - nbRows: number of results to return + + """ + self.send_scannerGetList(id, nbRows) + return self.recv_scannerGetList() + + def send_scannerGetList(self, id, nbRows): + self._oprot.writeMessageBegin('scannerGetList', TMessageType.CALL, self._seqid) + args = scannerGetList_args() + args.id = id + args.nbRows = nbRows + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerGetList(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerGetList_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGetList failed: unknown result") + + def scannerClose(self, id): + """ + Closes the server-state associated with an open scanner. + + @throws IllegalArgument if ScannerID is invalid + + Parameters: + - id: id of a scanner returned by scannerOpen + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = scannerClose_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def getRegionInfo(self, row): + """ + Get the regininfo for the specified row. It scans + the metatable to find region's start and end keys. + + @return value for specified row/column + + Parameters: + - row: row key + + """ + self.send_getRegionInfo(row) + return self.recv_getRegionInfo() + + def send_getRegionInfo(self, row): + self._oprot.writeMessageBegin('getRegionInfo', TMessageType.CALL, self._seqid) + args = getRegionInfo_args() + args.row = row + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRegionInfo(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRegionInfo_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRegionInfo failed: unknown result") + + def append(self, append): + """ + Appends values to one or more columns within a single row. + + @return values of columns after the append operation. + + Parameters: + - append: The single append operation to apply + + """ + self.send_append(append) + return self.recv_append() + + def send_append(self, append): + self._oprot.writeMessageBegin('append', TMessageType.CALL, self._seqid) + args = append_args() + args.append = append + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "append failed: unknown result") + + def checkAndPut(self, tableName, row, column, value, mput, attributes): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the corresponding mutation operation for put. + + @return true if the new put was executed, false otherwise + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - value: the expected value for the column parameter, if not + provided the check is for the non-existence of the + column in question + - mput: mutation for the put + - attributes: Mutation attributes + + """ + self.send_checkAndPut(tableName, row, column, value, mput, attributes) + return self.recv_checkAndPut() + + def send_checkAndPut(self, tableName, row, column, value, mput, attributes): + self._oprot.writeMessageBegin('checkAndPut', TMessageType.CALL, self._seqid) + args = checkAndPut_args() + args.tableName = tableName + args.row = row + args.column = column + args.value = value + args.mput = mput + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_checkAndPut(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = checkAndPut_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndPut failed: unknown result") + + def getThriftServerType(self): + """ + Get the type of this thrift server. + + @return the type of this thrift server + + """ + self.send_getThriftServerType() + return self.recv_getThriftServerType() + + def send_getThriftServerType(self): + self._oprot.writeMessageBegin('getThriftServerType', TMessageType.CALL, self._seqid) + args = getThriftServerType_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getThriftServerType(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getThriftServerType_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getThriftServerType failed: unknown result") + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["enableTable"] = Processor.process_enableTable + self._processMap["disableTable"] = Processor.process_disableTable + self._processMap["isTableEnabled"] = Processor.process_isTableEnabled + self._processMap["compact"] = Processor.process_compact + self._processMap["majorCompact"] = Processor.process_majorCompact + 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["getRowWithColumns"] = Processor.process_getRowWithColumns + self._processMap["getRowTs"] = Processor.process_getRowTs + self._processMap["getRowWithColumnsTs"] = Processor.process_getRowWithColumnsTs + self._processMap["getRows"] = Processor.process_getRows + self._processMap["getRowsWithColumns"] = Processor.process_getRowsWithColumns + self._processMap["getRowsTs"] = Processor.process_getRowsTs + self._processMap["getRowsWithColumnsTs"] = Processor.process_getRowsWithColumnsTs + 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["atomicIncrement"] = Processor.process_atomicIncrement + self._processMap["deleteAll"] = Processor.process_deleteAll + self._processMap["deleteAllTs"] = Processor.process_deleteAllTs + self._processMap["deleteAllRow"] = Processor.process_deleteAllRow + self._processMap["increment"] = Processor.process_increment + self._processMap["incrementRows"] = Processor.process_incrementRows + self._processMap["deleteAllRowTs"] = Processor.process_deleteAllRowTs + self._processMap["scannerOpenWithScan"] = Processor.process_scannerOpenWithScan + self._processMap["scannerOpen"] = Processor.process_scannerOpen + self._processMap["scannerOpenWithStop"] = Processor.process_scannerOpenWithStop + self._processMap["scannerOpenWithPrefix"] = Processor.process_scannerOpenWithPrefix + self._processMap["scannerOpenTs"] = Processor.process_scannerOpenTs + self._processMap["scannerOpenWithStopTs"] = Processor.process_scannerOpenWithStopTs + self._processMap["scannerGet"] = Processor.process_scannerGet + self._processMap["scannerGetList"] = Processor.process_scannerGetList + self._processMap["scannerClose"] = Processor.process_scannerClose + self._processMap["getRegionInfo"] = Processor.process_getRegionInfo + self._processMap["append"] = Processor.process_append + self._processMap["checkAndPut"] = Processor.process_checkAndPut + self._processMap["getThriftServerType"] = Processor.process_getThriftServerType + + 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_enableTable(self, seqid, iprot, oprot): + args = enableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = enableTable_result() + try: + self._handler.enableTable(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("enableTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_disableTable(self, seqid, iprot, oprot): + args = disableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = disableTable_result() + try: + self._handler.disableTable(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("disableTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableEnabled(self, seqid, iprot, oprot): + args = isTableEnabled_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableEnabled_result() + try: + result.success = self._handler.isTableEnabled(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isTableEnabled", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact(self, seqid, iprot, oprot): + args = compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact_result() + try: + self._handler.compact(args.tableNameOrRegionName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("compact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_majorCompact(self, seqid, iprot, oprot): + args = majorCompact_args() + args.read(iprot) + iprot.readMessageEnd() + result = majorCompact_result() + try: + self._handler.majorCompact(args.tableNameOrRegionName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("majorCompact", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableNames(self, seqid, iprot, oprot): + args = getTableNames_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableNames_result() + try: + result.success = self._handler.getTableNames() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableNames", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getColumnDescriptors", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableRegions", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except AlreadyExists as exist: + msg_type = TMessageType.REPLY + result.exist = exist + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("createTable", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteTable", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getVer", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getVerTs", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRow", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowWithColumns(self, seqid, iprot, oprot): + args = getRowWithColumns_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowWithColumns_result() + try: + result.success = self._handler.getRowWithColumns(args.tableName, args.row, args.columns, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowWithColumns", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowTs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowWithColumnsTs(self, seqid, iprot, oprot): + args = getRowWithColumnsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowWithColumnsTs_result() + try: + result.success = self._handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowWithColumnsTs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRows(self, seqid, iprot, oprot): + args = getRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRows_result() + try: + result.success = self._handler.getRows(args.tableName, args.rows, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRows", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsWithColumns(self, seqid, iprot, oprot): + args = getRowsWithColumns_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsWithColumns_result() + try: + result.success = self._handler.getRowsWithColumns(args.tableName, args.rows, args.columns, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowsWithColumns", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsTs(self, seqid, iprot, oprot): + args = getRowsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsTs_result() + try: + result.success = self._handler.getRowsTs(args.tableName, args.rows, args.timestamp, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowsTs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsWithColumnsTs(self, seqid, iprot, oprot): + args = getRowsWithColumnsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsWithColumnsTs_result() + try: + result.success = self._handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRowsWithColumnsTs", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mutateRow", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mutateRowTs", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mutateRows", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mutateRowsTs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_atomicIncrement(self, seqid, iprot, oprot): + args = atomicIncrement_args() + args.read(iprot) + iprot.readMessageEnd() + result = atomicIncrement_result() + try: + result.success = self._handler.atomicIncrement(args.tableName, args.row, args.column, args.value) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("atomicIncrement", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteAll", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteAllTs", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteAllRow", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_increment(self, seqid, iprot, oprot): + args = increment_args() + args.read(iprot) + iprot.readMessageEnd() + result = increment_result() + try: + self._handler.increment(args.increment) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("increment", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_incrementRows(self, seqid, iprot, oprot): + args = incrementRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = incrementRows_result() + try: + self._handler.incrementRows(args.increments) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("incrementRows", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteAllRowTs", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithScan(self, seqid, iprot, oprot): + args = scannerOpenWithScan_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithScan_result() + try: + result.success = self._handler.scannerOpenWithScan(args.tableName, args.scan, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpenWithScan", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpen", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpenWithStop", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithPrefix(self, seqid, iprot, oprot): + args = scannerOpenWithPrefix_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithPrefix_result() + try: + result.success = self._handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpenWithPrefix", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpenTs", msg_type, 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, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerOpenWithStopTs", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerGet", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerGetList(self, seqid, iprot, oprot): + args = scannerGetList_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerGetList_result() + try: + result.success = self._handler.scannerGetList(args.id, args.nbRows) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerGetList", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("scannerClose", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRegionInfo(self, seqid, iprot, oprot): + args = getRegionInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRegionInfo_result() + try: + result.success = self._handler.getRegionInfo(args.row) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRegionInfo", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append(self, seqid, iprot, oprot): + args = append_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_result() + try: + result.success = self._handler.append(args.append) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkAndPut(self, seqid, iprot, oprot): + args = checkAndPut_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkAndPut_result() + try: + result.success = self._handler.checkAndPut(args.tableName, args.row, args.column, args.value, args.mput, args.attributes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except IOError as io: + msg_type = TMessageType.REPLY + result.io = io + except IllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("checkAndPut", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getThriftServerType(self, seqid, iprot, oprot): + args = getThriftServerType_args() + args.read(iprot) + iprot.readMessageEnd() + result = getThriftServerType_result() + try: + result.success = self._handler.getThriftServerType() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getThriftServerType", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + +# HELPER FUNCTIONS AND STRUCTURES + + +class enableTable_args(object): """ - Brings a table on-line (enables it) - - Parameters: + Attributes: - tableName: name of the table + """ - self.send_enableTable(tableName) - self.recv_enableTable() - def send_enableTable(self, tableName): - self._oprot.writeMessageBegin('enableTable', TMessageType.CALL, self._seqid) - args = enableTable_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_enableTable(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = enableTable_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, tableName=None,): + self.tableName = tableName - def disableTable(self, tableName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('enableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(enableTable_args) +enableTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class enableTable_result(object): """ - Disables a table (takes it off-line) If it is being served, the master - will tell the servers to stop serving it. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('enableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(enableTable_result) +enableTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class disableTable_args(object): + """ + Attributes: - tableName: name of the table + """ - self.send_disableTable(tableName) - self.recv_disableTable() - def send_disableTable(self, tableName): - self._oprot.writeMessageBegin('disableTable', TMessageType.CALL, self._seqid) - args = disableTable_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_disableTable(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = disableTable_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, tableName=None,): + self.tableName = tableName - def isTableEnabled(self, tableName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('disableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(disableTable_args) +disableTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class disableTable_result(object): """ - @return true if table is on-line + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('disableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(disableTable_result) +disableTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class isTableEnabled_args(object): + """ + Attributes: - tableName: name of the table to check + """ - self.send_isTableEnabled(tableName) - return self.recv_isTableEnabled() - def send_isTableEnabled(self, tableName): - self._oprot.writeMessageBegin('isTableEnabled', TMessageType.CALL, self._seqid) - args = isTableEnabled_args() - args.tableName = tableName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_isTableEnabled(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = isTableEnabled_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); + def __init__(self, tableName=None,): + self.tableName = tableName - def compact(self, tableNameOrRegionName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableEnabled_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableEnabled_args) +isTableEnabled_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class isTableEnabled_result(object): """ - Parameters: + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableEnabled_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableEnabled_result) +isTableEnabled_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class compact_args(object): + """ + Attributes: - tableNameOrRegionName + """ - self.send_compact(tableNameOrRegionName) - self.recv_compact() - def send_compact(self, tableNameOrRegionName): - self._oprot.writeMessageBegin('compact', TMessageType.CALL, self._seqid) - args = compact_args() - args.tableNameOrRegionName = tableNameOrRegionName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_compact(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = compact_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, tableNameOrRegionName=None,): + self.tableNameOrRegionName = tableNameOrRegionName - def majorCompact(self, tableNameOrRegionName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableNameOrRegionName = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('compact_args') + if self.tableNameOrRegionName is not None: + oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) + oprot.writeBinary(self.tableNameOrRegionName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(compact_args) +compact_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableNameOrRegionName', 'BINARY', None, ), # 1 +) + + +class compact_result(object): """ - Parameters: + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('compact_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(compact_result) +compact_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class majorCompact_args(object): + """ + Attributes: - tableNameOrRegionName + """ - self.send_majorCompact(tableNameOrRegionName) - self.recv_majorCompact() - def send_majorCompact(self, tableNameOrRegionName): - self._oprot.writeMessageBegin('majorCompact', TMessageType.CALL, self._seqid) - args = majorCompact_args() - args.tableNameOrRegionName = tableNameOrRegionName - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_majorCompact(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = majorCompact_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, tableNameOrRegionName=None,): + self.tableNameOrRegionName = tableNameOrRegionName - def getTableNames(self, ): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableNameOrRegionName = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('majorCompact_args') + if self.tableNameOrRegionName is not None: + oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) + oprot.writeBinary(self.tableNameOrRegionName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(majorCompact_args) +majorCompact_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableNameOrRegionName', 'BINARY', None, ), # 1 +) + + +class majorCompact_result(object): """ - List all the userspace tables. + Attributes: + - io - @return returns a list of names """ - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); + def __init__(self, io=None,): + self.io = io - def getColumnDescriptors(self, tableName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('majorCompact_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(majorCompact_result) +majorCompact_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getTableNames_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNames_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNames_args) +getTableNames_args.thrift_spec = ( +) + + +class getTableNames_result(object): """ - List all the column families assoicated with a table. + Attributes: + - success + - io - @return list of column family descriptors + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype47, _size44) = iprot.readListBegin() + for _i48 in range(_size44): + _elem49 = iprot.readBinary() + self.success.append(_elem49) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNames_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter50 in self.success: + oprot.writeBinary(iter50) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNames_result) +getTableNames_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING, 'BINARY', False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getColumnDescriptors_args(object): + """ + Attributes: - tableName: table name + """ - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); + def __init__(self, tableName=None,): + self.tableName = tableName - def getTableRegions(self, tableName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getColumnDescriptors_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getColumnDescriptors_args) +getColumnDescriptors_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class getColumnDescriptors_result(object): """ - List the regions associated with a table. + Attributes: + - success + - io - @return list of region descriptors + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = {} + (_ktype52, _vtype53, _size51) = iprot.readMapBegin() + for _i55 in range(_size51): + _key56 = iprot.readBinary() + _val57 = ColumnDescriptor() + _val57.read(iprot) + self.success[_key56] = _val57 + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getColumnDescriptors_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter58, viter59 in self.success.items(): + oprot.writeBinary(kiter58) + viter59.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getColumnDescriptors_result) +getColumnDescriptors_result.thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING, 'BINARY', TType.STRUCT, [ColumnDescriptor, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getTableRegions_args(object): + """ + Attributes: - tableName: table name + """ - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); + def __init__(self, tableName=None,): + self.tableName = tableName - def createTable(self, tableName, columnFamilies): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableRegions_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableRegions_args) +getTableRegions_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class getTableRegions_result(object): """ - Create a table with the specified column families. The name - field for each ColumnDescriptor must be set and must end in a - colon (:). All other fields are optional and will get default - values if not explicitly specified. + Attributes: + - success + - io - @throws IllegalArgument if an input parameter is invalid + """ - @throws AlreadyExists if the table name already exists - Parameters: + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype63, _size60) = iprot.readListBegin() + for _i64 in range(_size60): + _elem65 = TRegionInfo() + _elem65.read(iprot) + self.success.append(_elem65) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableRegions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter66 in self.success: + iter66.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableRegions_result) +getTableRegions_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRegionInfo, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class createTable_args(object): + """ + Attributes: - tableName: name of table to create - columnFamilies: list of column family descriptors + """ - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - if result.exist is not None: - raise result.exist - return + def __init__(self, tableName=None, columnFamilies=None,): + self.tableName = tableName + self.columnFamilies = columnFamilies - def deleteTable(self, tableName): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columnFamilies = [] + (_etype70, _size67) = iprot.readListBegin() + for _i71 in range(_size67): + _elem72 = ColumnDescriptor() + _elem72.read(iprot) + self.columnFamilies.append(_elem72) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.columnFamilies is not None: + oprot.writeFieldBegin('columnFamilies', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columnFamilies)) + for iter73 in self.columnFamilies: + iter73.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createTable_args) +createTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columnFamilies', (TType.STRUCT, [ColumnDescriptor, None], False), None, ), # 2 +) + + +class createTable_result(object): """ - Deletes a table + Attributes: + - io + - ia + - exist - @throws IOError if table doesn't exist on server or there was some other - problem + """ - Parameters: + + def __init__(self, io=None, ia=None, exist=None,): + self.io = io + self.ia = ia + self.exist = exist + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + if self.exist is not None: + oprot.writeFieldBegin('exist', TType.STRUCT, 3) + self.exist.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createTable_result) +createTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 + (3, TType.STRUCT, 'exist', [AlreadyExists, None], None, ), # 3 +) + + +class deleteTable_args(object): + """ + Attributes: - tableName: name of table to delete + """ - 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 is not None: - raise result.io - return + def __init__(self, tableName=None,): + self.tableName = tableName - def get(self, tableName, row, column, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteTable_args) +deleteTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 +) + + +class deleteTable_result(object): """ - Get a single TCell for the specified table, row, and column at the - latest timestamp. Returns an empty list if no such value exists. + Attributes: + - io - @return value for specified row/column + """ - Parameters: + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteTable_result) +deleteTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class get_args(object): + """ + Attributes: - tableName: name of table - row: row key - column: column name - attributes: Get attributes + """ - self.send_get(tableName, row, column, attributes) - return self.recv_get() - def send_get(self, tableName, row, column, attributes): - self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) - args = get_args() - args.tableName = tableName - args.row = row - args.column = column - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result"); + def __init__(self, tableName=None, row=None, column=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.attributes = attributes - def getVer(self, tableName, row, column, numVersions, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype75, _vtype76, _size74) = iprot.readMapBegin() + for _i78 in range(_size74): + _key79 = iprot.readBinary() + _val80 = iprot.readBinary() + self.attributes[_key79] = _val80 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter81, viter82 in self.attributes.items(): + oprot.writeBinary(kiter81) + oprot.writeBinary(viter82) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_args) +get_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class get_result(object): """ - Get the specified number of versions for the specified table, - row, and column. + Attributes: + - success + - io - @return list of cells for specified row/column + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype86, _size83) = iprot.readListBegin() + for _i87 in range(_size83): + _elem88 = TCell() + _elem88.read(iprot) + self.success.append(_elem88) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter89 in self.success: + iter89.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_result) +get_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TCell, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getVer_args(object): + """ + Attributes: - tableName: name of table - row: row key - column: column name - numVersions: number of versions to retrieve - attributes: Get attributes + """ - self.send_getVer(tableName, row, column, numVersions, attributes) - return self.recv_getVer() - def send_getVer(self, tableName, row, column, numVersions, attributes): - self._oprot.writeMessageBegin('getVer', TMessageType.CALL, self._seqid) - args = getVer_args() - args.tableName = tableName - args.row = row - args.column = column - args.numVersions = numVersions - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); + def __init__(self, tableName=None, row=None, column=None, numVersions=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.numVersions = numVersions + self.attributes = attributes - def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.numVersions = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype91, _vtype92, _size90) = iprot.readMapBegin() + for _i94 in range(_size90): + _key95 = iprot.readBinary() + _val96 = iprot.readBinary() + self.attributes[_key95] = _val96 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getVer_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.numVersions is not None: + oprot.writeFieldBegin('numVersions', TType.I32, 4) + oprot.writeI32(self.numVersions) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter97, viter98 in self.attributes.items(): + oprot.writeBinary(kiter97) + oprot.writeBinary(viter98) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getVer_args) +getVer_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.I32, 'numVersions', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class getVer_result(object): """ - Get the specified number of versions for the specified table, - row, and column. Only versions less than or equal to the specified - timestamp will be returned. + Attributes: + - success + - io - @return list of cells for specified row/column + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype102, _size99) = iprot.readListBegin() + for _i103 in range(_size99): + _elem104 = TCell() + _elem104.read(iprot) + self.success.append(_elem104) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getVer_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter105 in self.success: + iter105.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getVer_result) +getVer_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TCell, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getVerTs_args(object): + """ + Attributes: - tableName: name of table - row: row key - column: column name - timestamp: timestamp - numVersions: number of versions to retrieve - attributes: Get attributes + """ - self.send_getVerTs(tableName, row, column, timestamp, numVersions, attributes) - return self.recv_getVerTs() - def send_getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): - 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.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); + def __init__(self, tableName=None, row=None, column=None, timestamp=None, numVersions=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.timestamp = timestamp + self.numVersions = numVersions + self.attributes = attributes - def getRow(self, tableName, row, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + 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) + elif fid == 6: + if ftype == TType.MAP: + self.attributes = {} + (_ktype107, _vtype108, _size106) = iprot.readMapBegin() + for _i110 in range(_size106): + _key111 = iprot.readBinary() + _val112 = iprot.readBinary() + self.attributes[_key111] = _val112 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getVerTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.numVersions is not None: + oprot.writeFieldBegin('numVersions', TType.I32, 5) + oprot.writeI32(self.numVersions) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter113, viter114 in self.attributes.items(): + oprot.writeBinary(kiter113) + oprot.writeBinary(viter114) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getVerTs_args) +getVerTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.I32, 'numVersions', None, None, ), # 5 + (6, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 6 +) + + +class getVerTs_result(object): """ - Get all the data for the specified table and row at the latest - timestamp. Returns an empty list if the row does not exist. + Attributes: + - success + - io - @return TRowResult containing the row and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype118, _size115) = iprot.readListBegin() + for _i119 in range(_size115): + _elem120 = TCell() + _elem120.read(iprot) + self.success.append(_elem120) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getVerTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter121 in self.success: + iter121.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getVerTs_result) +getVerTs_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TCell, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRow_args(object): + """ + Attributes: - tableName: name of table - row: row key - attributes: Get attributes + """ - self.send_getRow(tableName, row, attributes) - return self.recv_getRow() - def send_getRow(self, tableName, row, attributes): - self._oprot.writeMessageBegin('getRow', TMessageType.CALL, self._seqid) - args = getRow_args() - args.tableName = tableName - args.row = row - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); + def __init__(self, tableName=None, row=None, attributes=None,): + self.tableName = tableName + self.row = row + self.attributes = attributes - def getRowWithColumns(self, tableName, row, columns, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype123, _vtype124, _size122) = iprot.readMapBegin() + for _i126 in range(_size122): + _key127 = iprot.readBinary() + _val128 = iprot.readBinary() + self.attributes[_key127] = _val128 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter129, viter130 in self.attributes.items(): + oprot.writeBinary(kiter129) + oprot.writeBinary(viter130) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRow_args) +getRow_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 +) + + +class getRow_result(object): """ - Get the specified columns for the specified table and row at the latest - timestamp. Returns an empty list if the row does not exist. + Attributes: + - success + - io - @return TRowResult containing the row and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype134, _size131) = iprot.readListBegin() + for _i135 in range(_size131): + _elem136 = TRowResult() + _elem136.read(iprot) + self.success.append(_elem136) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRow_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter137 in self.success: + iter137.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRow_result) +getRow_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowWithColumns_args(object): + """ + Attributes: - tableName: name of table - row: row key - columns: List of columns to return, null for all columns - attributes: Get attributes + """ - self.send_getRowWithColumns(tableName, row, columns, attributes) - return self.recv_getRowWithColumns() - def send_getRowWithColumns(self, tableName, row, columns, attributes): - self._oprot.writeMessageBegin('getRowWithColumns', TMessageType.CALL, self._seqid) - args = getRowWithColumns_args() - args.tableName = tableName - args.row = row - args.columns = columns - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowWithColumns(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowWithColumns_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result"); + def __init__(self, tableName=None, row=None, columns=None, attributes=None,): + self.tableName = tableName + self.row = row + self.columns = columns + self.attributes = attributes - def getRowTs(self, tableName, row, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype141, _size138) = iprot.readListBegin() + for _i142 in range(_size138): + _elem143 = iprot.readBinary() + self.columns.append(_elem143) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype145, _vtype146, _size144) = iprot.readMapBegin() + for _i148 in range(_size144): + _key149 = iprot.readBinary() + _val150 = iprot.readBinary() + self.attributes[_key149] = _val150 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowWithColumns_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter151 in self.columns: + oprot.writeBinary(iter151) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter152, viter153 in self.attributes.items(): + oprot.writeBinary(kiter152) + oprot.writeBinary(viter153) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowWithColumns_args) +getRowWithColumns_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class getRowWithColumns_result(object): """ - Get all the data for the specified table and row at the specified - timestamp. Returns an empty list if the row does not exist. + Attributes: + - success + - io - @return TRowResult containing the row and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype157, _size154) = iprot.readListBegin() + for _i158 in range(_size154): + _elem159 = TRowResult() + _elem159.read(iprot) + self.success.append(_elem159) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowWithColumns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter160 in self.success: + iter160.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowWithColumns_result) +getRowWithColumns_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowTs_args(object): + """ + Attributes: - tableName: name of the table - row: row key - timestamp: timestamp - attributes: Get attributes + """ - self.send_getRowTs(tableName, row, timestamp, attributes) - return self.recv_getRowTs() - def send_getRowTs(self, tableName, row, timestamp, attributes): - self._oprot.writeMessageBegin('getRowTs', TMessageType.CALL, self._seqid) - args = getRowTs_args() - args.tableName = tableName - args.row = row - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); + def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.timestamp = timestamp + self.attributes = attributes - def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype162, _vtype163, _size161) = iprot.readMapBegin() + for _i165 in range(_size161): + _key166 = iprot.readBinary() + _val167 = iprot.readBinary() + self.attributes[_key166] = _val167 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter168, viter169 in self.attributes.items(): + oprot.writeBinary(kiter168) + oprot.writeBinary(viter169) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowTs_args) +getRowTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class getRowTs_result(object): """ - Get the specified columns for the specified table and row at the specified - timestamp. Returns an empty list if the row does not exist. + Attributes: + - success + - io - @return TRowResult containing the row and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype173, _size170) = iprot.readListBegin() + for _i174 in range(_size170): + _elem175 = TRowResult() + _elem175.read(iprot) + self.success.append(_elem175) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter176 in self.success: + iter176.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowTs_result) +getRowTs_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowWithColumnsTs_args(object): + """ + Attributes: - tableName: name of table - row: row key - columns: List of columns to return, null for all columns - timestamp - attributes: Get attributes + """ - self.send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes) - return self.recv_getRowWithColumnsTs() - def send_getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): - self._oprot.writeMessageBegin('getRowWithColumnsTs', TMessageType.CALL, self._seqid) - args = getRowWithColumnsTs_args() - args.tableName = tableName - args.row = row - args.columns = columns - args.timestamp = timestamp - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowWithColumnsTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowWithColumnsTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); + def __init__(self, tableName=None, row=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes - def getRows(self, tableName, rows, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype180, _size177) = iprot.readListBegin() + for _i181 in range(_size177): + _elem182 = iprot.readBinary() + self.columns.append(_elem182) + iprot.readListEnd() + 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.MAP: + self.attributes = {} + (_ktype184, _vtype185, _size183) = iprot.readMapBegin() + for _i187 in range(_size183): + _key188 = iprot.readBinary() + _val189 = iprot.readBinary() + self.attributes[_key188] = _val189 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowWithColumnsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter190 in self.columns: + oprot.writeBinary(iter190) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter191, viter192 in self.attributes.items(): + oprot.writeBinary(kiter191) + oprot.writeBinary(viter192) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowWithColumnsTs_args) +getRowWithColumnsTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class getRowWithColumnsTs_result(object): """ - Get all the data for the specified table and rows at the latest - timestamp. Returns an empty list if no rows exist. + Attributes: + - success + - io - @return TRowResult containing the rows and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype196, _size193) = iprot.readListBegin() + for _i197 in range(_size193): + _elem198 = TRowResult() + _elem198.read(iprot) + self.success.append(_elem198) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowWithColumnsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter199 in self.success: + iter199.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowWithColumnsTs_result) +getRowWithColumnsTs_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRows_args(object): + """ + Attributes: - tableName: name of table - rows: row keys - attributes: Get attributes + """ - self.send_getRows(tableName, rows, attributes) - return self.recv_getRows() - def send_getRows(self, tableName, rows, attributes): - self._oprot.writeMessageBegin('getRows', TMessageType.CALL, self._seqid) - args = getRows_args() - args.tableName = tableName - args.rows = rows - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRows(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRows_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRows failed: unknown result"); + def __init__(self, tableName=None, rows=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.attributes = attributes - def getRowsWithColumns(self, tableName, rows, columns, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype203, _size200) = iprot.readListBegin() + for _i204 in range(_size200): + _elem205 = iprot.readBinary() + self.rows.append(_elem205) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype207, _vtype208, _size206) = iprot.readMapBegin() + for _i210 in range(_size206): + _key211 = iprot.readBinary() + _val212 = iprot.readBinary() + self.attributes[_key211] = _val212 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRows_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter213 in self.rows: + oprot.writeBinary(iter213) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter214, viter215 in self.attributes.items(): + oprot.writeBinary(kiter214) + oprot.writeBinary(viter215) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRows_args) +getRows_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING, 'BINARY', False), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 +) + + +class getRows_result(object): """ - Get the specified columns for the specified table and rows at the latest - timestamp. Returns an empty list if no rows exist. + Attributes: + - success + - io - @return TRowResult containing the rows and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype219, _size216) = iprot.readListBegin() + for _i220 in range(_size216): + _elem221 = TRowResult() + _elem221.read(iprot) + self.success.append(_elem221) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRows_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter222 in self.success: + iter222.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRows_result) +getRows_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowsWithColumns_args(object): + """ + Attributes: - tableName: name of table - rows: row keys - columns: List of columns to return, null for all columns - attributes: Get attributes + """ - self.send_getRowsWithColumns(tableName, rows, columns, attributes) - return self.recv_getRowsWithColumns() - def send_getRowsWithColumns(self, tableName, rows, columns, attributes): - self._oprot.writeMessageBegin('getRowsWithColumns', TMessageType.CALL, self._seqid) - args = getRowsWithColumns_args() - args.tableName = tableName - args.rows = rows - args.columns = columns - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowsWithColumns(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowsWithColumns_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumns failed: unknown result"); + def __init__(self, tableName=None, rows=None, columns=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.columns = columns + self.attributes = attributes - def getRowsTs(self, tableName, rows, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype226, _size223) = iprot.readListBegin() + for _i227 in range(_size223): + _elem228 = iprot.readBinary() + self.rows.append(_elem228) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype232, _size229) = iprot.readListBegin() + for _i233 in range(_size229): + _elem234 = iprot.readBinary() + self.columns.append(_elem234) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype236, _vtype237, _size235) = iprot.readMapBegin() + for _i239 in range(_size235): + _key240 = iprot.readBinary() + _val241 = iprot.readBinary() + self.attributes[_key240] = _val241 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsWithColumns_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter242 in self.rows: + oprot.writeBinary(iter242) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter243 in self.columns: + oprot.writeBinary(iter243) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter244, viter245 in self.attributes.items(): + oprot.writeBinary(kiter244) + oprot.writeBinary(viter245) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsWithColumns_args) +getRowsWithColumns_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING, 'BINARY', False), None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class getRowsWithColumns_result(object): """ - Get all the data for the specified table and rows at the specified - timestamp. Returns an empty list if no rows exist. + Attributes: + - success + - io - @return TRowResult containing the rows and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype249, _size246) = iprot.readListBegin() + for _i250 in range(_size246): + _elem251 = TRowResult() + _elem251.read(iprot) + self.success.append(_elem251) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsWithColumns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter252 in self.success: + iter252.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsWithColumns_result) +getRowsWithColumns_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowsTs_args(object): + """ + Attributes: - tableName: name of the table - rows: row keys - timestamp: timestamp - attributes: Get attributes + """ - self.send_getRowsTs(tableName, rows, timestamp, attributes) - return self.recv_getRowsTs() - def send_getRowsTs(self, tableName, rows, timestamp, attributes): - self._oprot.writeMessageBegin('getRowsTs', TMessageType.CALL, self._seqid) - args = getRowsTs_args() - args.tableName = tableName - args.rows = rows - args.timestamp = timestamp - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowsTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowsTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsTs failed: unknown result"); + def __init__(self, tableName=None, rows=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.timestamp = timestamp + self.attributes = attributes - def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype256, _size253) = iprot.readListBegin() + for _i257 in range(_size253): + _elem258 = iprot.readBinary() + self.rows.append(_elem258) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype260, _vtype261, _size259) = iprot.readMapBegin() + for _i263 in range(_size259): + _key264 = iprot.readBinary() + _val265 = iprot.readBinary() + self.attributes[_key264] = _val265 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter266 in self.rows: + oprot.writeBinary(iter266) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter267, viter268 in self.attributes.items(): + oprot.writeBinary(kiter267) + oprot.writeBinary(viter268) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsTs_args) +getRowsTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING, 'BINARY', False), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class getRowsTs_result(object): """ - Get the specified columns for the specified table and rows at the specified - timestamp. Returns an empty list if no rows exist. + Attributes: + - success + - io - @return TRowResult containing the rows and map of columns to TCells + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype272, _size269) = iprot.readListBegin() + for _i273 in range(_size269): + _elem274 = TRowResult() + _elem274.read(iprot) + self.success.append(_elem274) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter275 in self.success: + iter275.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsTs_result) +getRowsTs_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class getRowsWithColumnsTs_args(object): + """ + Attributes: - tableName: name of table - rows: row keys - columns: List of columns to return, null for all columns - timestamp - attributes: Get attributes + """ - self.send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes) - return self.recv_getRowsWithColumnsTs() - def send_getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): - self._oprot.writeMessageBegin('getRowsWithColumnsTs', TMessageType.CALL, self._seqid) - args = getRowsWithColumnsTs_args() - args.tableName = tableName - args.rows = rows - args.columns = columns - args.timestamp = timestamp - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowsWithColumnsTs(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowsWithColumnsTs_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumnsTs failed: unknown result"); + def __init__(self, tableName=None, rows=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes - def mutateRow(self, tableName, row, mutations, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype279, _size276) = iprot.readListBegin() + for _i280 in range(_size276): + _elem281 = iprot.readBinary() + self.rows.append(_elem281) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype285, _size282) = iprot.readListBegin() + for _i286 in range(_size282): + _elem287 = iprot.readBinary() + self.columns.append(_elem287) + iprot.readListEnd() + 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.MAP: + self.attributes = {} + (_ktype289, _vtype290, _size288) = iprot.readMapBegin() + for _i292 in range(_size288): + _key293 = iprot.readBinary() + _val294 = iprot.readBinary() + self.attributes[_key293] = _val294 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsWithColumnsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter295 in self.rows: + oprot.writeBinary(iter295) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter296 in self.columns: + oprot.writeBinary(iter296) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter297, viter298 in self.attributes.items(): + oprot.writeBinary(kiter297) + oprot.writeBinary(viter298) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsWithColumnsTs_args) +getRowsWithColumnsTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING, 'BINARY', False), None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class getRowsWithColumnsTs_result(object): """ - Apply a series of mutations (updates/deletes) to a row in a - single transaction. If an exception is thrown, then the - transaction is aborted. Default current timestamp is used, and - all entries will have an identical timestamp. + Attributes: + - success + - io - Parameters: + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype302, _size299) = iprot.readListBegin() + for _i303 in range(_size299): + _elem304 = TRowResult() + _elem304.read(iprot) + self.success.append(_elem304) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRowsWithColumnsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter305 in self.success: + iter305.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRowsWithColumnsTs_result) +getRowsWithColumnsTs_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class mutateRow_args(object): + """ + Attributes: - tableName: name of table - row: row key - mutations: list of mutation commands - attributes: Mutation attributes + """ - self.send_mutateRow(tableName, row, mutations, attributes) - self.recv_mutateRow() - def send_mutateRow(self, tableName, row, mutations, attributes): - self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) - args = mutateRow_args() - args.tableName = tableName - args.row = row - args.mutations = mutations - args.attributes = attributes - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, tableName=None, row=None, mutations=None, attributes=None,): + self.tableName = tableName + self.row = row + self.mutations = mutations + self.attributes = attributes - def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.mutations = [] + (_etype309, _size306) = iprot.readListBegin() + for _i310 in range(_size306): + _elem311 = Mutation() + _elem311.read(iprot) + self.mutations.append(_elem311) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype313, _vtype314, _size312) = iprot.readMapBegin() + for _i316 in range(_size312): + _key317 = iprot.readBinary() + _val318 = iprot.readBinary() + self.attributes[_key317] = _val318 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter319 in self.mutations: + iter319.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter320, viter321 in self.attributes.items(): + oprot.writeBinary(kiter320) + oprot.writeBinary(viter321) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRow_args) +mutateRow_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.LIST, 'mutations', (TType.STRUCT, [Mutation, None], False), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class mutateRow_result(object): """ - Apply a series of mutations (updates/deletes) to a row in a - single transaction. If an exception is thrown, then the - transaction is aborted. The specified timestamp is used, and - all entries will have an identical timestamp. + Attributes: + - io + - ia - Parameters: + """ + + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRow_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRow_result) +mutateRow_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class mutateRowTs_args(object): + """ + Attributes: - tableName: name of table - row: row key - mutations: list of mutation commands - timestamp: timestamp - attributes: Mutation attributes + """ - self.send_mutateRowTs(tableName, row, mutations, timestamp, attributes) - self.recv_mutateRowTs() - def send_mutateRowTs(self, tableName, row, mutations, timestamp, attributes): - self._oprot.writeMessageBegin('mutateRowTs', TMessageType.CALL, self._seqid) - args = mutateRowTs_args() - args.tableName = tableName - args.row = row - args.mutations = mutations - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, tableName=None, row=None, mutations=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.mutations = mutations + self.timestamp = timestamp + self.attributes = attributes - def mutateRows(self, tableName, rowBatches, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.mutations = [] + (_etype325, _size322) = iprot.readListBegin() + for _i326 in range(_size322): + _elem327 = Mutation() + _elem327.read(iprot) + self.mutations.append(_elem327) + iprot.readListEnd() + 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.MAP: + self.attributes = {} + (_ktype329, _vtype330, _size328) = iprot.readMapBegin() + for _i332 in range(_size328): + _key333 = iprot.readBinary() + _val334 = iprot.readBinary() + self.attributes[_key333] = _val334 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter335 in self.mutations: + iter335.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter336, viter337 in self.attributes.items(): + oprot.writeBinary(kiter336) + oprot.writeBinary(viter337) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRowTs_args) +mutateRowTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.LIST, 'mutations', (TType.STRUCT, [Mutation, None], False), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class mutateRowTs_result(object): """ - Apply a series of batches (each a series of mutations on a single row) - in a single transaction. If an exception is thrown, then the - transaction is aborted. Default current timestamp is used, and - all entries will have an identical timestamp. + Attributes: + - io + - ia - Parameters: + """ + + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRowTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRowTs_result) +mutateRowTs_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class mutateRows_args(object): + """ + Attributes: - tableName: name of table - rowBatches: list of row batches - attributes: Mutation attributes + """ - self.send_mutateRows(tableName, rowBatches, attributes) - self.recv_mutateRows() - def send_mutateRows(self, tableName, rowBatches, attributes): - self._oprot.writeMessageBegin('mutateRows', TMessageType.CALL, self._seqid) - args = mutateRows_args() - args.tableName = tableName - args.rowBatches = rowBatches - args.attributes = attributes - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, tableName=None, rowBatches=None, attributes=None,): + self.tableName = tableName + self.rowBatches = rowBatches + self.attributes = attributes - def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rowBatches = [] + (_etype341, _size338) = iprot.readListBegin() + for _i342 in range(_size338): + _elem343 = BatchMutation() + _elem343.read(iprot) + self.rowBatches.append(_elem343) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype345, _vtype346, _size344) = iprot.readMapBegin() + for _i348 in range(_size344): + _key349 = iprot.readBinary() + _val350 = iprot.readBinary() + self.attributes[_key349] = _val350 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRows_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rowBatches is not None: + oprot.writeFieldBegin('rowBatches', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) + for iter351 in self.rowBatches: + iter351.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter352, viter353 in self.attributes.items(): + oprot.writeBinary(kiter352) + oprot.writeBinary(viter353) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRows_args) +mutateRows_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rowBatches', (TType.STRUCT, [BatchMutation, None], False), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 +) + + +class mutateRows_result(object): """ - Apply a series of batches (each a series of mutations on a single row) - in a single transaction. If an exception is thrown, then the - transaction is aborted. The specified timestamp is used, and - all entries will have an identical timestamp. + Attributes: + - io + - ia - Parameters: + """ + + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRows_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRows_result) +mutateRows_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class mutateRowsTs_args(object): + """ + Attributes: - tableName: name of table - rowBatches: list of row batches - timestamp: timestamp - attributes: Mutation attributes + """ - self.send_mutateRowsTs(tableName, rowBatches, timestamp, attributes) - self.recv_mutateRowsTs() - def send_mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): - self._oprot.writeMessageBegin('mutateRowsTs', TMessageType.CALL, self._seqid) - args = mutateRowsTs_args() - args.tableName = tableName - args.rowBatches = rowBatches - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, tableName=None, rowBatches=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rowBatches = rowBatches + self.timestamp = timestamp + self.attributes = attributes - def atomicIncrement(self, tableName, row, column, value): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rowBatches = [] + (_etype357, _size354) = iprot.readListBegin() + for _i358 in range(_size354): + _elem359 = BatchMutation() + _elem359.read(iprot) + self.rowBatches.append(_elem359) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype361, _vtype362, _size360) = iprot.readMapBegin() + for _i364 in range(_size360): + _key365 = iprot.readBinary() + _val366 = iprot.readBinary() + self.attributes[_key365] = _val366 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRowsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.rowBatches is not None: + oprot.writeFieldBegin('rowBatches', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) + for iter367 in self.rowBatches: + iter367.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter368, viter369 in self.attributes.items(): + oprot.writeBinary(kiter368) + oprot.writeBinary(viter369) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRowsTs_args) +mutateRowsTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.LIST, 'rowBatches', (TType.STRUCT, [BatchMutation, None], False), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class mutateRowsTs_result(object): """ - Atomically increment the column value specified. Returns the next value post increment. + Attributes: + - io + - ia - Parameters: + """ + + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRowsTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRowsTs_result) +mutateRowsTs_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class atomicIncrement_args(object): + """ + Attributes: - tableName: name of table - row: row to increment - column: name of column - value: amount to increment by + """ - self.send_atomicIncrement(tableName, row, column, value) - return self.recv_atomicIncrement() - def send_atomicIncrement(self, tableName, row, column, value): - self._oprot.writeMessageBegin('atomicIncrement', TMessageType.CALL, self._seqid) - args = atomicIncrement_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_atomicIncrement(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = atomicIncrement_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - if result.ia is not None: - raise result.ia - raise TApplicationException(TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result"); + def __init__(self, tableName=None, row=None, column=None, value=None,): + self.tableName = tableName + self.row = row + self.column = column + self.value = value - def deleteAll(self, tableName, row, column, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.value = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('atomicIncrement_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.I64, 4) + oprot.writeI64(self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(atomicIncrement_args) +atomicIncrement_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.I64, 'value', None, None, ), # 4 +) + + +class atomicIncrement_result(object): """ - Delete all cells that match the passed row and column. + Attributes: + - success + - io + - ia - Parameters: + """ + + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.I64: + self.success = iprot.readI64() + 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) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('atomicIncrement_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(atomicIncrement_result) +atomicIncrement_result.thrift_spec = ( + (0, TType.I64, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class deleteAll_args(object): + """ + Attributes: - tableName: name of table - row: Row to update - column: name of column whose value is to be deleted - attributes: Delete attributes + """ - self.send_deleteAll(tableName, row, column, attributes) - self.recv_deleteAll() - def send_deleteAll(self, tableName, row, column, attributes): - self._oprot.writeMessageBegin('deleteAll', TMessageType.CALL, self._seqid) - args = deleteAll_args() - args.tableName = tableName - args.row = row - args.column = column - args.attributes = attributes - 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 is not None: - raise result.io - return + def __init__(self, tableName=None, row=None, column=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.attributes = attributes - def deleteAllTs(self, tableName, row, column, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype371, _vtype372, _size370) = iprot.readMapBegin() + for _i374 in range(_size370): + _key375 = iprot.readBinary() + _val376 = iprot.readBinary() + self.attributes[_key375] = _val376 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAll_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter377, viter378 in self.attributes.items(): + oprot.writeBinary(kiter377) + oprot.writeBinary(viter378) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAll_args) +deleteAll_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class deleteAll_result(object): """ - Delete all cells that match the passed row and column and whose - timestamp is equal-to or older than the passed timestamp. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAll_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAll_result) +deleteAll_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class deleteAllTs_args(object): + """ + Attributes: - tableName: name of table - row: Row to update - column: name of column whose value is to be deleted - timestamp: timestamp - attributes: Delete attributes + """ - self.send_deleteAllTs(tableName, row, column, timestamp, attributes) - self.recv_deleteAllTs() - def send_deleteAllTs(self, tableName, row, column, timestamp, attributes): - self._oprot.writeMessageBegin('deleteAllTs', TMessageType.CALL, self._seqid) - args = deleteAllTs_args() - args.tableName = tableName - args.row = row - args.column = column - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - raise result.io - return + def __init__(self, tableName=None, row=None, column=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.timestamp = timestamp + self.attributes = attributes - def deleteAllRow(self, tableName, row, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + 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.MAP: + self.attributes = {} + (_ktype380, _vtype381, _size379) = iprot.readMapBegin() + for _i383 in range(_size379): + _key384 = iprot.readBinary() + _val385 = iprot.readBinary() + self.attributes[_key384] = _val385 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter386, viter387 in self.attributes.items(): + oprot.writeBinary(kiter386) + oprot.writeBinary(viter387) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllTs_args) +deleteAllTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class deleteAllTs_result(object): """ - Completely delete the row's cells. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllTs_result) +deleteAllTs_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class deleteAllRow_args(object): + """ + Attributes: - tableName: name of table - row: key of the row to be completely deleted. - attributes: Delete attributes + """ - self.send_deleteAllRow(tableName, row, attributes) - self.recv_deleteAllRow() - def send_deleteAllRow(self, tableName, row, attributes): - self._oprot.writeMessageBegin('deleteAllRow', TMessageType.CALL, self._seqid) - args = deleteAllRow_args() - args.tableName = tableName - args.row = row - args.attributes = attributes - 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 is not None: - raise result.io - return + def __init__(self, tableName=None, row=None, attributes=None,): + self.tableName = tableName + self.row = row + self.attributes = attributes - def increment(self, increment): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype389, _vtype390, _size388) = iprot.readMapBegin() + for _i392 in range(_size388): + _key393 = iprot.readBinary() + _val394 = iprot.readBinary() + self.attributes[_key393] = _val394 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter395, viter396 in self.attributes.items(): + oprot.writeBinary(kiter395) + oprot.writeBinary(viter396) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllRow_args) +deleteAllRow_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 +) + + +class deleteAllRow_result(object): """ - Increment a cell by the ammount. - Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. - False is the default. Turn to true if you need the extra performance and can accept some - data loss if a thrift server dies with increments still in the queue. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllRow_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllRow_result) +deleteAllRow_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class increment_args(object): + """ + Attributes: - increment: The single increment to apply + """ - self.send_increment(increment) - self.recv_increment() - def send_increment(self, increment): - self._oprot.writeMessageBegin('increment', TMessageType.CALL, self._seqid) - args = increment_args() - args.increment = increment - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_increment(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = increment_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, increment=None,): + self.increment = increment - def incrementRows(self, increments): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.increment = TIncrement() + self.increment.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('increment_args') + if self.increment is not None: + oprot.writeFieldBegin('increment', TType.STRUCT, 1) + self.increment.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(increment_args) +increment_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'increment', [TIncrement, None], None, ), # 1 +) + + +class increment_result(object): """ - Parameters: + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('increment_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(increment_result) +increment_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class incrementRows_args(object): + """ + Attributes: - increments: The list of increments + """ - self.send_incrementRows(increments) - self.recv_incrementRows() - def send_incrementRows(self, increments): - self._oprot.writeMessageBegin('incrementRows', TMessageType.CALL, self._seqid) - args = incrementRows_args() - args.increments = increments - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_incrementRows(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = incrementRows_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, increments=None,): + self.increments = increments - def deleteAllRowTs(self, tableName, row, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.LIST: + self.increments = [] + (_etype400, _size397) = iprot.readListBegin() + for _i401 in range(_size397): + _elem402 = TIncrement() + _elem402.read(iprot) + self.increments.append(_elem402) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('incrementRows_args') + if self.increments is not None: + oprot.writeFieldBegin('increments', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.increments)) + for iter403 in self.increments: + iter403.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(incrementRows_args) +incrementRows_args.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'increments', (TType.STRUCT, [TIncrement, None], False), None, ), # 1 +) + + +class incrementRows_result(object): """ - Completely delete the row's cells marked with a timestamp - equal-to or older than the passed timestamp. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('incrementRows_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(incrementRows_result) +incrementRows_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class deleteAllRowTs_args(object): + """ + Attributes: - tableName: name of table - row: key of the row to be completely deleted. - timestamp: timestamp - attributes: Delete attributes + """ - self.send_deleteAllRowTs(tableName, row, timestamp, attributes) - self.recv_deleteAllRowTs() - def send_deleteAllRowTs(self, tableName, row, timestamp, attributes): - self._oprot.writeMessageBegin('deleteAllRowTs', TMessageType.CALL, self._seqid) - args = deleteAllRowTs_args() - args.tableName = tableName - args.row = row - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - raise result.io - return + def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.timestamp = timestamp + self.attributes = attributes - def scannerOpenWithScan(self, tableName, scan, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype405, _vtype406, _size404) = iprot.readMapBegin() + for _i408 in range(_size404): + _key409 = iprot.readBinary() + _val410 = iprot.readBinary() + self.attributes[_key409] = _val410 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter411, viter412 in self.attributes.items(): + oprot.writeBinary(kiter411) + oprot.writeBinary(viter412) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllRowTs_args) +deleteAllRowTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class deleteAllRowTs_result(object): """ - Get a scanner on the current table, using the Scan instance - for the scan parameters. + Attributes: + - io - Parameters: + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteAllRowTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteAllRowTs_result) +deleteAllRowTs_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpenWithScan_args(object): + """ + Attributes: - tableName: name of table - scan: Scan instance - attributes: Scan attributes + """ - self.send_scannerOpenWithScan(tableName, scan, attributes) - return self.recv_scannerOpenWithScan() - def send_scannerOpenWithScan(self, tableName, scan, attributes): - self._oprot.writeMessageBegin('scannerOpenWithScan', TMessageType.CALL, self._seqid) - args = scannerOpenWithScan_args() - args.tableName = tableName - args.scan = scan - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_scannerOpenWithScan(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpenWithScan_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithScan failed: unknown result"); + def __init__(self, tableName=None, scan=None, attributes=None,): + self.tableName = tableName + self.scan = scan + self.attributes = attributes - def scannerOpen(self, tableName, startRow, columns, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.scan = TScan() + self.scan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype414, _vtype415, _size413) = iprot.readMapBegin() + for _i417 in range(_size413): + _key418 = iprot.readBinary() + _val419 = iprot.readBinary() + self.attributes[_key418] = _val419 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithScan_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.scan is not None: + oprot.writeFieldBegin('scan', TType.STRUCT, 2) + self.scan.write(oprot) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter420, viter421 in self.attributes.items(): + oprot.writeBinary(kiter420) + oprot.writeBinary(viter421) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithScan_args) +scannerOpenWithScan_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'scan', [TScan, None], None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 +) + + +class scannerOpenWithScan_result(object): """ - Get a scanner on the current table starting at the specified row and - ending at the last row in the table. Return the specified columns. + Attributes: + - success + - io - @return scanner id to be used with other scanner procedures + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithScan_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithScan_result) +scannerOpenWithScan_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpen_args(object): + """ + Attributes: - tableName: name of table - startRow: Starting row in table to scan. Send "" (empty string) to start at the first row. @@ -1929,46 +9500,192 @@ class Client(Iface): columns of the specified column family are returned. It's also possible to pass a regex in the column qualifier. - attributes: Scan attributes + """ - self.send_scannerOpen(tableName, startRow, columns, attributes) - return self.recv_scannerOpen() - def send_scannerOpen(self, tableName, startRow, columns, attributes): - self._oprot.writeMessageBegin('scannerOpen', TMessageType.CALL, self._seqid) - args = scannerOpen_args() - args.tableName = tableName - args.startRow = startRow - args.columns = columns - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); + def __init__(self, tableName=None, startRow=None, columns=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.columns = columns + self.attributes = attributes - def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype425, _size422) = iprot.readListBegin() + for _i426 in range(_size422): + _elem427 = iprot.readBinary() + self.columns.append(_elem427) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype429, _vtype430, _size428) = iprot.readMapBegin() + for _i432 in range(_size428): + _key433 = iprot.readBinary() + _val434 = iprot.readBinary() + self.attributes[_key433] = _val434 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpen_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter435 in self.columns: + oprot.writeBinary(iter435) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter436, viter437 in self.attributes.items(): + oprot.writeBinary(kiter436) + oprot.writeBinary(viter437) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpen_args) +scannerOpen_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'startRow', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class scannerOpen_result(object): """ - Get a scanner on the current table starting and stopping at the - specified rows. ending at the last row in the table. Return the - specified columns. + Attributes: + - success + - io - @return scanner id to be used with other scanner procedures + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpen_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpen_result) +scannerOpen_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpenWithStop_args(object): + """ + Attributes: - tableName: name of table - startRow: Starting row in table to scan. Send "" (empty string) to start at the first row. @@ -1978,90 +9695,393 @@ class Client(Iface): columns of the specified column family are returned. It's also possible to pass a regex in the column qualifier. - attributes: Scan attributes + """ - self.send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes) - return self.recv_scannerOpenWithStop() - def send_scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): - self._oprot.writeMessageBegin('scannerOpenWithStop', TMessageType.CALL, self._seqid) - args = scannerOpenWithStop_args() - args.tableName = tableName - args.startRow = startRow - args.stopRow = stopRow - args.columns = columns - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); + def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.stopRow = stopRow + self.columns = columns + self.attributes = attributes - def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.stopRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype441, _size438) = iprot.readListBegin() + for _i442 in range(_size438): + _elem443 = iprot.readBinary() + self.columns.append(_elem443) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype445, _vtype446, _size444) = iprot.readMapBegin() + for _i448 in range(_size444): + _key449 = iprot.readBinary() + _val450 = iprot.readBinary() + self.attributes[_key449] = _val450 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithStop_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 3) + oprot.writeBinary(self.stopRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter451 in self.columns: + oprot.writeBinary(iter451) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter452, viter453 in self.attributes.items(): + oprot.writeBinary(kiter452) + oprot.writeBinary(viter453) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithStop_args) +scannerOpenWithStop_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'startRow', 'BINARY', None, ), # 2 + (3, TType.STRING, 'stopRow', 'BINARY', None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class scannerOpenWithStop_result(object): """ - Open a scanner for a given prefix. That is all rows will have the specified - prefix. No other rows will be returned. + Attributes: + - success + - io - @return scanner id to use with other scanner calls + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithStop_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithStop_result) +scannerOpenWithStop_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpenWithPrefix_args(object): + """ + Attributes: - tableName: name of table - startAndPrefix: the prefix (and thus start row) of the keys you want - columns: the columns you want returned - attributes: Scan attributes + """ - self.send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes) - return self.recv_scannerOpenWithPrefix() - def send_scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): - self._oprot.writeMessageBegin('scannerOpenWithPrefix', TMessageType.CALL, self._seqid) - args = scannerOpenWithPrefix_args() - args.tableName = tableName - args.startAndPrefix = startAndPrefix - args.columns = columns - args.attributes = attributes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_scannerOpenWithPrefix(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerOpenWithPrefix_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); + def __init__(self, tableName=None, startAndPrefix=None, columns=None, attributes=None,): + self.tableName = tableName + self.startAndPrefix = startAndPrefix + self.columns = columns + self.attributes = attributes - def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startAndPrefix = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype457, _size454) = iprot.readListBegin() + for _i458 in range(_size454): + _elem459 = iprot.readBinary() + self.columns.append(_elem459) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype461, _vtype462, _size460) = iprot.readMapBegin() + for _i464 in range(_size460): + _key465 = iprot.readBinary() + _val466 = iprot.readBinary() + self.attributes[_key465] = _val466 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithPrefix_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startAndPrefix is not None: + oprot.writeFieldBegin('startAndPrefix', TType.STRING, 2) + oprot.writeBinary(self.startAndPrefix) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter467 in self.columns: + oprot.writeBinary(iter467) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter468, viter469 in self.attributes.items(): + oprot.writeBinary(kiter468) + oprot.writeBinary(viter469) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithPrefix_args) +scannerOpenWithPrefix_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'startAndPrefix', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 +) + + +class scannerOpenWithPrefix_result(object): """ - Get a scanner on the current table starting at the specified row and - ending at the last row in the table. Return the specified columns. - Only values with the specified timestamp are returned. + Attributes: + - success + - io - @return scanner id to be used with other scanner procedures + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithPrefix_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithPrefix_result) +scannerOpenWithPrefix_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpenTs_args(object): + """ + Attributes: - tableName: name of table - startRow: Starting row in table to scan. Send "" (empty string) to start at the first row. @@ -2070,48 +10090,203 @@ class Client(Iface): to pass a regex in the column qualifier. - timestamp: timestamp - attributes: Scan attributes + """ - self.send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes) - return self.recv_scannerOpenTs() - def send_scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): - self._oprot.writeMessageBegin('scannerOpenTs', TMessageType.CALL, self._seqid) - args = scannerOpenTs_args() - args.tableName = tableName - args.startRow = startRow - args.columns = columns - args.timestamp = timestamp - args.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); + def __init__(self, tableName=None, startRow=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes - def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype473, _size470) = iprot.readListBegin() + for _i474 in range(_size470): + _elem475 = iprot.readBinary() + self.columns.append(_elem475) + iprot.readListEnd() + 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.MAP: + self.attributes = {} + (_ktype477, _vtype478, _size476) = iprot.readMapBegin() + for _i480 in range(_size476): + _key481 = iprot.readBinary() + _val482 = iprot.readBinary() + self.attributes[_key481] = _val482 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter483 in self.columns: + oprot.writeBinary(iter483) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter484, viter485 in self.attributes.items(): + oprot.writeBinary(kiter484) + oprot.writeBinary(viter485) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenTs_args) +scannerOpenTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'startRow', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 +) + + +class scannerOpenTs_result(object): """ - Get a scanner on the current table starting and stopping at the - specified rows. ending at the last row in the table. Return the - specified columns. Only values with the specified timestamp are - returned. + Attributes: + - success + - io - @return scanner id to be used with other scanner procedures + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenTs_result) +scannerOpenTs_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerOpenWithStopTs_args(object): + """ + Attributes: - tableName: name of table - startRow: Starting row in table to scan. Send "" (empty string) to start at the first row. @@ -2122,8165 +10297,1285 @@ class Client(Iface): to pass a regex in the column qualifier. - timestamp: timestamp - attributes: Scan attributes + """ - self.send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes) - return self.recv_scannerOpenWithStopTs() - def send_scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): - 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.attributes = attributes - 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 is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); + def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.stopRow = stopRow + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes - def scannerGet(self, id): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.stopRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype489, _size486) = iprot.readListBegin() + for _i490 in range(_size486): + _elem491 = iprot.readBinary() + self.columns.append(_elem491) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.attributes = {} + (_ktype493, _vtype494, _size492) = iprot.readMapBegin() + for _i496 in range(_size492): + _key497 = iprot.readBinary() + _val498 = iprot.readBinary() + self.attributes[_key497] = _val498 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithStopTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 3) + oprot.writeBinary(self.stopRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter499 in self.columns: + oprot.writeBinary(iter499) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 5) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter500, viter501 in self.attributes.items(): + oprot.writeBinary(kiter500) + oprot.writeBinary(viter501) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithStopTs_args) +scannerOpenWithStopTs_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'startRow', 'BINARY', None, ), # 2 + (3, TType.STRING, 'stopRow', 'BINARY', None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 4 + (5, TType.I64, 'timestamp', None, None, ), # 5 + (6, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 6 +) + + +class scannerOpenWithStopTs_result(object): """ - Returns the scanner's current row value and advances to the next - row in the table. When there are no more rows in the table, or a key - greater-than-or-equal-to the scanner's specified stopRow is reached, - an empty list is returned. + Attributes: + - success + - io - @return a TRowResult containing the current row and a map of the columns to TCells. + """ - @throws IllegalArgument if ScannerID is invalid - @throws NotFound when the scanner reaches the end + def __init__(self, success=None, io=None,): + self.success = success + self.io = io - Parameters: + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerOpenWithStopTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerOpenWithStopTs_result) +scannerOpenWithStopTs_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class scannerGet_args(object): + """ + Attributes: - id: id of a scanner returned by scannerOpen + """ - 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 is not None: - return result.success - if result.io is not None: - raise result.io - if result.ia is not None: - raise result.ia - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result"); + def __init__(self, id=None,): + self.id = id - def scannerGetList(self, id, nbRows): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerGet_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerGet_args) +scannerGet_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 +) + + +class scannerGet_result(object): """ - Returns, starting at the scanner's current row value nbRows worth of - rows and advances to the next row in the table. When there are no more - rows in the table, or a key greater-than-or-equal-to the scanner's - specified stopRow is reached, an empty list is returned. + Attributes: + - success + - io + - ia - @return a TRowResult containing the current row and a map of the columns to TCells. + """ - @throws IllegalArgument if ScannerID is invalid - @throws NotFound when the scanner reaches the end + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia - Parameters: + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype505, _size502) = iprot.readListBegin() + for _i506 in range(_size502): + _elem507 = TRowResult() + _elem507.read(iprot) + self.success.append(_elem507) + 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.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerGet_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter508 in self.success: + iter508.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerGet_result) +scannerGet_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class scannerGetList_args(object): + """ + Attributes: - id: id of a scanner returned by scannerOpen - nbRows: number of results to return + """ - self.send_scannerGetList(id, nbRows) - return self.recv_scannerGetList() - def send_scannerGetList(self, id, nbRows): - self._oprot.writeMessageBegin('scannerGetList', TMessageType.CALL, self._seqid) - args = scannerGetList_args() - args.id = id - args.nbRows = nbRows - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_scannerGetList(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = scannerGetList_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - if result.ia is not None: - raise result.ia - raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGetList failed: unknown result"); + def __init__(self, id=None, nbRows=None,): + self.id = id + self.nbRows = nbRows - def scannerClose(self, id): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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) + elif fid == 2: + if ftype == TType.I32: + self.nbRows = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerGetList_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + if self.nbRows is not None: + oprot.writeFieldBegin('nbRows', TType.I32, 2) + oprot.writeI32(self.nbRows) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerGetList_args) +scannerGetList_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 + (2, TType.I32, 'nbRows', None, None, ), # 2 +) + + +class scannerGetList_result(object): """ - Closes the server-state associated with an open scanner. + Attributes: + - success + - io + - ia - @throws IllegalArgument if ScannerID is invalid + """ - Parameters: + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype512, _size509) = iprot.readListBegin() + for _i513 in range(_size509): + _elem514 = TRowResult() + _elem514.read(iprot) + self.success.append(_elem514) + 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.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerGetList_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter515 in self.success: + iter515.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerGetList_result) +scannerGetList_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TRowResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class scannerClose_args(object): + """ + Attributes: - id: id of a scanner returned by scannerOpen + """ - 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 is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, id=None,): + self.id = id - def getRowOrBefore(self, tableName, row, family): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerClose_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerClose_args) +scannerClose_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 +) + + +class scannerClose_result(object): """ - Get the row just before the specified one. + Attributes: + - io + - ia - @return value for specified row/column + """ - Parameters: + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('scannerClose_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(scannerClose_result) +scannerClose_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class getRegionInfo_args(object): + """ + Attributes: + - row: row key + + """ + + + def __init__(self, row=None,): + self.row = row + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRegionInfo_args') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRegionInfo_args) +getRegionInfo_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 +) + + +class getRegionInfo_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TRegionInfo() + 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) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRegionInfo_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRegionInfo_result) +getRegionInfo_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TRegionInfo, None], None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class append_args(object): + """ + Attributes: + - append: The single append operation to apply + + """ + + + def __init__(self, append=None,): + self.append = append + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.append = TAppend() + self.append.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('append_args') + if self.append is not None: + oprot.writeFieldBegin('append', TType.STRUCT, 1) + self.append.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(append_args) +append_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'append', [TAppend, None], None, ), # 1 +) + + +class append_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype519, _size516) = iprot.readListBegin() + for _i520 in range(_size516): + _elem521 = TCell() + _elem521.read(iprot) + self.success.append(_elem521) + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('append_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter522 in self.success: + iter522.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(append_result) +append_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TCell, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 +) + + +class checkAndPut_args(object): + """ + Attributes: - tableName: name of table - row: row key - - family: column name + - column: column name + - value: the expected value for the column parameter, if not + provided the check is for the non-existence of the + column in question + - mput: mutation for the put + - attributes: Mutation attributes + """ - self.send_getRowOrBefore(tableName, row, family) - return self.recv_getRowOrBefore() - def send_getRowOrBefore(self, tableName, row, family): - self._oprot.writeMessageBegin('getRowOrBefore', TMessageType.CALL, self._seqid) - args = getRowOrBefore_args() - args.tableName = tableName - args.row = row - args.family = family - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRowOrBefore(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRowOrBefore_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowOrBefore failed: unknown result"); + def __init__(self, tableName=None, row=None, column=None, value=None, mput=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.value = value + self.mput = mput + self.attributes = attributes - def getRegionInfo(self, row): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.mput = Mutation() + self.mput.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.attributes = {} + (_ktype524, _vtype525, _size523) = iprot.readMapBegin() + for _i527 in range(_size523): + _key528 = iprot.readBinary() + _val529 = iprot.readBinary() + self.attributes[_key528] = _val529 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndPut_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 5) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.mput is not None: + oprot.writeFieldBegin('mput', TType.STRUCT, 6) + self.mput.write(oprot) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter530, viter531 in self.attributes.items(): + oprot.writeBinary(kiter530) + oprot.writeBinary(viter531) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndPut_args) +checkAndPut_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + None, # 4 + (5, TType.STRING, 'value', 'BINARY', None, ), # 5 + (6, TType.STRUCT, 'mput', [Mutation, None], None, ), # 6 + (7, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 7 +) + + +class checkAndPut_result(object): """ - Get the regininfo for the specified row. It scans - the metatable to find region's start and end keys. + Attributes: + - success + - io + - ia - @return value for specified row/column - - Parameters: - - row: row key """ - self.send_getRegionInfo(row) - return self.recv_getRegionInfo() - def send_getRegionInfo(self, row): - self._oprot.writeMessageBegin('getRegionInfo', TMessageType.CALL, self._seqid) - args = getRegionInfo_args() - args.row = row - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRegionInfo(self, ): - (fname, mtype, rseqid) = self._iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(self._iprot) - self._iprot.readMessageEnd() - raise x - result = getRegionInfo_result() - result.read(self._iprot) - self._iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRegionInfo failed: unknown result"); + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + 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) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndPut_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndPut_result) +checkAndPut_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [IOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [IllegalArgument, None], None, ), # 2 +) + + +class getThriftServerType_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getThriftServerType_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getThriftServerType_args) +getThriftServerType_args.thrift_spec = ( +) + + +class getThriftServerType_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getThriftServerType_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getThriftServerType_result) +getThriftServerType_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) +fix_spec(all_structs) +del all_structs - -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["enableTable"] = Processor.process_enableTable - self._processMap["disableTable"] = Processor.process_disableTable - self._processMap["isTableEnabled"] = Processor.process_isTableEnabled - self._processMap["compact"] = Processor.process_compact - self._processMap["majorCompact"] = Processor.process_majorCompact - 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["getRowWithColumns"] = Processor.process_getRowWithColumns - self._processMap["getRowTs"] = Processor.process_getRowTs - self._processMap["getRowWithColumnsTs"] = Processor.process_getRowWithColumnsTs - self._processMap["getRows"] = Processor.process_getRows - self._processMap["getRowsWithColumns"] = Processor.process_getRowsWithColumns - self._processMap["getRowsTs"] = Processor.process_getRowsTs - self._processMap["getRowsWithColumnsTs"] = Processor.process_getRowsWithColumnsTs - 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["atomicIncrement"] = Processor.process_atomicIncrement - self._processMap["deleteAll"] = Processor.process_deleteAll - self._processMap["deleteAllTs"] = Processor.process_deleteAllTs - self._processMap["deleteAllRow"] = Processor.process_deleteAllRow - self._processMap["increment"] = Processor.process_increment - self._processMap["incrementRows"] = Processor.process_incrementRows - self._processMap["deleteAllRowTs"] = Processor.process_deleteAllRowTs - self._processMap["scannerOpenWithScan"] = Processor.process_scannerOpenWithScan - self._processMap["scannerOpen"] = Processor.process_scannerOpen - self._processMap["scannerOpenWithStop"] = Processor.process_scannerOpenWithStop - self._processMap["scannerOpenWithPrefix"] = Processor.process_scannerOpenWithPrefix - self._processMap["scannerOpenTs"] = Processor.process_scannerOpenTs - self._processMap["scannerOpenWithStopTs"] = Processor.process_scannerOpenWithStopTs - self._processMap["scannerGet"] = Processor.process_scannerGet - self._processMap["scannerGetList"] = Processor.process_scannerGetList - self._processMap["scannerClose"] = Processor.process_scannerClose - self._processMap["getRowOrBefore"] = Processor.process_getRowOrBefore - self._processMap["getRegionInfo"] = Processor.process_getRegionInfo - - 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_enableTable(self, seqid, iprot, oprot): - args = enableTable_args() - args.read(iprot) - iprot.readMessageEnd() - result = enableTable_result() - try: - self._handler.enableTable(args.tableName) - except IOError as io: - result.io = io - oprot.writeMessageBegin("enableTable", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_disableTable(self, seqid, iprot, oprot): - args = disableTable_args() - args.read(iprot) - iprot.readMessageEnd() - result = disableTable_result() - try: - self._handler.disableTable(args.tableName) - except IOError as io: - result.io = io - oprot.writeMessageBegin("disableTable", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_isTableEnabled(self, seqid, iprot, oprot): - args = isTableEnabled_args() - args.read(iprot) - iprot.readMessageEnd() - result = isTableEnabled_result() - try: - result.success = self._handler.isTableEnabled(args.tableName) - except IOError as io: - result.io = io - oprot.writeMessageBegin("isTableEnabled", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_compact(self, seqid, iprot, oprot): - args = compact_args() - args.read(iprot) - iprot.readMessageEnd() - result = compact_result() - try: - self._handler.compact(args.tableNameOrRegionName) - except IOError as io: - result.io = io - oprot.writeMessageBegin("compact", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_majorCompact(self, seqid, iprot, oprot): - args = majorCompact_args() - args.read(iprot) - iprot.readMessageEnd() - result = majorCompact_result() - try: - self._handler.majorCompact(args.tableNameOrRegionName) - except IOError as io: - result.io = io - oprot.writeMessageBegin("majorCompact", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - 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 as 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 as 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 as 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 as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - except AlreadyExists as 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 as io: - result.io = io - 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, args.attributes) - except IOError as io: - result.io = io - 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, args.attributes) - except IOError as io: - result.io = io - 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, args.attributes) - except IOError as io: - result.io = io - 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, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRow", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowWithColumns(self, seqid, iprot, oprot): - args = getRowWithColumns_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowWithColumns_result() - try: - result.success = self._handler.getRowWithColumns(args.tableName, args.row, args.columns, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowWithColumns", 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, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowWithColumnsTs(self, seqid, iprot, oprot): - args = getRowWithColumnsTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowWithColumnsTs_result() - try: - result.success = self._handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowWithColumnsTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRows(self, seqid, iprot, oprot): - args = getRows_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRows_result() - try: - result.success = self._handler.getRows(args.tableName, args.rows, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRows", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowsWithColumns(self, seqid, iprot, oprot): - args = getRowsWithColumns_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowsWithColumns_result() - try: - result.success = self._handler.getRowsWithColumns(args.tableName, args.rows, args.columns, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowsWithColumns", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowsTs(self, seqid, iprot, oprot): - args = getRowsTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowsTs_result() - try: - result.success = self._handler.getRowsTs(args.tableName, args.rows, args.timestamp, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowsTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowsWithColumnsTs(self, seqid, iprot, oprot): - args = getRowsWithColumnsTs_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowsWithColumnsTs_result() - try: - result.success = self._handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowsWithColumnsTs", 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, args.attributes) - except IOError as io: - result.io = io - except IllegalArgument as 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, args.attributes) - except IOError as io: - result.io = io - except IllegalArgument as 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, args.attributes) - except IOError as io: - result.io = io - except IllegalArgument as 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, args.attributes) - except IOError as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - oprot.writeMessageBegin("mutateRowsTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_atomicIncrement(self, seqid, iprot, oprot): - args = atomicIncrement_args() - args.read(iprot) - iprot.readMessageEnd() - result = atomicIncrement_result() - try: - result.success = self._handler.atomicIncrement(args.tableName, args.row, args.column, args.value) - except IOError as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - oprot.writeMessageBegin("atomicIncrement", 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, args.attributes) - except IOError as 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, args.attributes) - except IOError as 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, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("deleteAllRow", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_increment(self, seqid, iprot, oprot): - args = increment_args() - args.read(iprot) - iprot.readMessageEnd() - result = increment_result() - try: - self._handler.increment(args.increment) - except IOError as io: - result.io = io - oprot.writeMessageBegin("increment", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_incrementRows(self, seqid, iprot, oprot): - args = incrementRows_args() - args.read(iprot) - iprot.readMessageEnd() - result = incrementRows_result() - try: - self._handler.incrementRows(args.increments) - except IOError as io: - result.io = io - oprot.writeMessageBegin("incrementRows", 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, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("deleteAllRowTs", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpenWithScan(self, seqid, iprot, oprot): - args = scannerOpenWithScan_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpenWithScan_result() - try: - result.success = self._handler.scannerOpenWithScan(args.tableName, args.scan, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("scannerOpenWithScan", 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, args.attributes) - except IOError as 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, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("scannerOpenWithStop", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerOpenWithPrefix(self, seqid, iprot, oprot): - args = scannerOpenWithPrefix_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerOpenWithPrefix_result() - try: - result.success = self._handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns, args.attributes) - except IOError as io: - result.io = io - oprot.writeMessageBegin("scannerOpenWithPrefix", 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, args.attributes) - except IOError as 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, args.attributes) - except IOError as 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 as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - oprot.writeMessageBegin("scannerGet", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_scannerGetList(self, seqid, iprot, oprot): - args = scannerGetList_args() - args.read(iprot) - iprot.readMessageEnd() - result = scannerGetList_result() - try: - result.success = self._handler.scannerGetList(args.id, args.nbRows) - except IOError as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - oprot.writeMessageBegin("scannerGetList", 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 as io: - result.io = io - except IllegalArgument as ia: - result.ia = ia - oprot.writeMessageBegin("scannerClose", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRowOrBefore(self, seqid, iprot, oprot): - args = getRowOrBefore_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRowOrBefore_result() - try: - result.success = self._handler.getRowOrBefore(args.tableName, args.row, args.family) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRowOrBefore", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRegionInfo(self, seqid, iprot, oprot): - args = getRegionInfo_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRegionInfo_result() - try: - result.success = self._handler.getRegionInfo(args.row) - except IOError as io: - result.io = io - oprot.writeMessageBegin("getRegionInfo", TMessageType.REPLY, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class enableTable_args: - """ - Attributes: - - tableName: name of the table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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('enableTable_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class enableTable_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('enableTable_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class disableTable_args: - """ - Attributes: - - tableName: name of the table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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('disableTable_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class disableTable_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('disableTable_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class isTableEnabled_args: - """ - Attributes: - - tableName: name of the table to check - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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('isTableEnabled_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class isTableEnabled_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.BOOL: - self.success = iprot.readBool(); - 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('isTableEnabled_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact_args: - """ - Attributes: - - tableNameOrRegionName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableNameOrRegionName', None, None, ), # 1 - ) - - def __init__(self, tableNameOrRegionName=None,): - self.tableNameOrRegionName = tableNameOrRegionName - - 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.tableNameOrRegionName = 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('compact_args') - if self.tableNameOrRegionName is not None: - oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) - oprot.writeString(self.tableNameOrRegionName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class compact_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('compact_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class majorCompact_args: - """ - Attributes: - - tableNameOrRegionName - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableNameOrRegionName', None, None, ), # 1 - ) - - def __init__(self, tableNameOrRegionName=None,): - self.tableNameOrRegionName = tableNameOrRegionName - - 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.tableNameOrRegionName = 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('majorCompact_args') - if self.tableNameOrRegionName is not None: - oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) - oprot.writeString(self.tableNameOrRegionName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class majorCompact_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('majorCompact_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getTableNames_args: - - thrift_spec = ( - ) - - 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 validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype26, _size23) = iprot.readListBegin() - for _i27 in xrange(_size23): - _elem28 = iprot.readString(); - self.success.append(_elem28) - 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 is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRING, len(self.success)) - for iter29 in self.success: - oprot.writeString(iter29) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: table name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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 is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - 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, success=None, io=None,): - self.success = success - self.io = 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 = {} - (_ktype31, _vtype32, _size30 ) = iprot.readMapBegin() - for _i34 in xrange(_size30): - _key35 = iprot.readString(); - _val36 = ColumnDescriptor() - _val36.read(iprot) - self.success[_key35] = _val36 - 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 is not None: - oprot.writeFieldBegin('success', TType.MAP, 0) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) - for kiter37,viter38 in self.success.items(): - oprot.writeString(kiter37) - viter38.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: table name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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 is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRegionInfo, TRegionInfo.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype42, _size39) = iprot.readListBegin() - for _i43 in xrange(_size39): - _elem44 = TRegionInfo() - _elem44.read(iprot) - self.success.append(_elem44) - 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 is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter45 in self.success: - iter45.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table to create - - columnFamilies: list of column family descriptors - """ - - 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, tableName=None, columnFamilies=None,): - self.tableName = tableName - self.columnFamilies = 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 = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in xrange(_size46): - _elem51 = ColumnDescriptor() - _elem51.read(iprot) - self.columnFamilies.append(_elem51) - 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 is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.columnFamilies is not None: - oprot.writeFieldBegin('columnFamilies', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columnFamilies)) - for iter52 in self.columnFamilies: - iter52.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - - exist - """ - - 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, io=None, ia=None, exist=None,): - self.io = io - self.ia = ia - self.exist = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - if self.exist is not None: - oprot.writeFieldBegin('exist', TType.STRUCT, 3) - self.exist.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table to delete - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - ) - - def __init__(self, tableName=None,): - self.tableName = 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 is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('deleteTable_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - column: column name - - attributes: Get attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, column=None, attributes=None,): - self.tableName = tableName - self.row = row - self.column = column - self.attributes = attributes - - 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.MAP: - self.attributes = {} - (_ktype54, _vtype55, _size53 ) = iprot.readMapBegin() - for _i57 in xrange(_size53): - _key58 = iprot.readString(); - _val59 = iprot.readString(); - self.attributes[_key58] = _val59 - 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('get_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter60,viter61 in self.attributes.items(): - oprot.writeString(kiter60) - oprot.writeString(viter61) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype65, _size62) = iprot.readListBegin() - for _i66 in xrange(_size62): - _elem67 = TCell() - _elem67.read(iprot) - self.success.append(_elem67) - 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('get_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter68 in self.success: - iter68.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - column: column name - - numVersions: number of versions to retrieve - - attributes: Get attributes - """ - - 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 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, row=None, column=None, numVersions=None, attributes=None,): - self.tableName = tableName - self.row = row - self.column = column - self.numVersions = numVersions - self.attributes = attributes - - 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) - elif fid == 5: - if ftype == TType.MAP: - self.attributes = {} - (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin() - for _i73 in xrange(_size69): - _key74 = iprot.readString(); - _val75 = iprot.readString(); - self.attributes[_key74] = _val75 - 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('getVer_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.numVersions is not None: - oprot.writeFieldBegin('numVersions', TType.I32, 4) - oprot.writeI32(self.numVersions) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter76,viter77 in self.attributes.items(): - oprot.writeString(kiter76) - oprot.writeString(viter77) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype81, _size78) = iprot.readListBegin() - for _i82 in xrange(_size78): - _elem83 = TCell() - _elem83.read(iprot) - self.success.append(_elem83) - 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('getVer_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter84 in self.success: - iter84.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - column: column name - - timestamp: timestamp - - numVersions: number of versions to retrieve - - attributes: Get attributes - """ - - 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 - (6, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 6 - ) - - def __init__(self, tableName=None, row=None, column=None, timestamp=None, numVersions=None, attributes=None,): - self.tableName = tableName - self.row = row - self.column = column - self.timestamp = timestamp - self.numVersions = numVersions - self.attributes = attributes - - 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) - elif fid == 6: - if ftype == TType.MAP: - self.attributes = {} - (_ktype86, _vtype87, _size85 ) = iprot.readMapBegin() - for _i89 in xrange(_size85): - _key90 = iprot.readString(); - _val91 = iprot.readString(); - self.attributes[_key90] = _val91 - 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('getVerTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.numVersions is not None: - oprot.writeFieldBegin('numVersions', TType.I32, 5) - oprot.writeI32(self.numVersions) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter92,viter93 in self.attributes.items(): - oprot.writeString(kiter92) - oprot.writeString(viter93) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype97, _size94) = iprot.readListBegin() - for _i98 in xrange(_size94): - _elem99 = TCell() - _elem99.read(iprot) - self.success.append(_elem99) - 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('getVerTs_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter100 in self.success: - iter100.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, tableName=None, row=None, attributes=None,): - self.tableName = tableName - self.row = row - self.attributes = attributes - - 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.MAP: - self.attributes = {} - (_ktype102, _vtype103, _size101 ) = iprot.readMapBegin() - for _i105 in xrange(_size101): - _key106 = iprot.readString(); - _val107 = iprot.readString(); - self.attributes[_key106] = _val107 - 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('getRow_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter108,viter109 in self.attributes.items(): - oprot.writeString(kiter108) - oprot.writeString(viter109) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype113, _size110) = iprot.readListBegin() - for _i114 in xrange(_size110): - _elem115 = TRowResult() - _elem115.read(iprot) - self.success.append(_elem115) - 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('getRow_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter116 in self.success: - iter116.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowWithColumns_args: - """ - Attributes: - - tableName: name of table - - row: row key - - columns: List of columns to return, null for all columns - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, columns=None, attributes=None,): - self.tableName = tableName - self.row = row - self.columns = columns - self.attributes = attributes - - 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.columns = [] - (_etype120, _size117) = iprot.readListBegin() - for _i121 in xrange(_size117): - _elem122 = iprot.readString(); - self.columns.append(_elem122) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin() - for _i127 in xrange(_size123): - _key128 = iprot.readString(); - _val129 = iprot.readString(); - self.attributes[_key128] = _val129 - 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('getRowWithColumns_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter130 in self.columns: - oprot.writeString(iter130) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter131,viter132 in self.attributes.items(): - oprot.writeString(kiter131) - oprot.writeString(viter132) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowWithColumns_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in xrange(_size133): - _elem138 = TRowResult() - _elem138.read(iprot) - self.success.append(_elem138) - 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('getRowWithColumns_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter139 in self.success: - iter139.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of the table - - row: row key - - timestamp: timestamp - - attributes: Get attributes - """ - - 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 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.row = row - self.timestamp = timestamp - self.attributes = attributes - - 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) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype141, _vtype142, _size140 ) = iprot.readMapBegin() - for _i144 in xrange(_size140): - _key145 = iprot.readString(); - _val146 = iprot.readString(); - self.attributes[_key145] = _val146 - 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('getRowTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter147,viter148 in self.attributes.items(): - oprot.writeString(kiter147) - oprot.writeString(viter148) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype152, _size149) = iprot.readListBegin() - for _i153 in xrange(_size149): - _elem154 = TRowResult() - _elem154.read(iprot) - self.success.append(_elem154) - 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('getRowTs_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter155 in self.success: - iter155.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowWithColumnsTs_args: - """ - Attributes: - - tableName: name of table - - row: row key - - columns: List of columns to return, null for all columns - - timestamp - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, row=None, columns=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.row = row - self.columns = columns - self.timestamp = timestamp - self.attributes = attributes - - 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.columns = [] - (_etype159, _size156) = iprot.readListBegin() - for _i160 in xrange(_size156): - _elem161 = iprot.readString(); - self.columns.append(_elem161) - iprot.readListEnd() - 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.MAP: - self.attributes = {} - (_ktype163, _vtype164, _size162 ) = iprot.readMapBegin() - for _i166 in xrange(_size162): - _key167 = iprot.readString(); - _val168 = iprot.readString(); - self.attributes[_key167] = _val168 - 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('getRowWithColumnsTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter169 in self.columns: - oprot.writeString(iter169) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter170,viter171 in self.attributes.items(): - oprot.writeString(kiter170) - oprot.writeString(viter171) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowWithColumnsTs_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype175, _size172) = iprot.readListBegin() - for _i176 in xrange(_size172): - _elem177 = TRowResult() - _elem177.read(iprot) - self.success.append(_elem177) - 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('getRowWithColumnsTs_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter178 in self.success: - iter178.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRows_args: - """ - Attributes: - - tableName: name of table - - rows: row keys - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 - (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, tableName=None, rows=None, attributes=None,): - self.tableName = tableName - self.rows = rows - self.attributes = attributes - - 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.rows = [] - (_etype182, _size179) = iprot.readListBegin() - for _i183 in xrange(_size179): - _elem184 = iprot.readString(); - self.rows.append(_elem184) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.attributes = {} - (_ktype186, _vtype187, _size185 ) = iprot.readMapBegin() - for _i189 in xrange(_size185): - _key190 = iprot.readString(); - _val191 = iprot.readString(); - self.attributes[_key190] = _val191 - 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('getRows_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rows is not None: - oprot.writeFieldBegin('rows', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.rows)) - for iter192 in self.rows: - oprot.writeString(iter192) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter193,viter194 in self.attributes.items(): - oprot.writeString(kiter193) - oprot.writeString(viter194) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRows_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype198, _size195) = iprot.readListBegin() - for _i199 in xrange(_size195): - _elem200 = TRowResult() - _elem200.read(iprot) - self.success.append(_elem200) - 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('getRows_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter201 in self.success: - iter201.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsWithColumns_args: - """ - Attributes: - - tableName: name of table - - rows: row keys - - columns: List of columns to return, null for all columns - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, rows=None, columns=None, attributes=None,): - self.tableName = tableName - self.rows = rows - self.columns = columns - self.attributes = attributes - - 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.rows = [] - (_etype205, _size202) = iprot.readListBegin() - for _i206 in xrange(_size202): - _elem207 = iprot.readString(); - self.rows.append(_elem207) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype211, _size208) = iprot.readListBegin() - for _i212 in xrange(_size208): - _elem213 = iprot.readString(); - self.columns.append(_elem213) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype215, _vtype216, _size214 ) = iprot.readMapBegin() - for _i218 in xrange(_size214): - _key219 = iprot.readString(); - _val220 = iprot.readString(); - self.attributes[_key219] = _val220 - 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('getRowsWithColumns_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rows is not None: - oprot.writeFieldBegin('rows', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.rows)) - for iter221 in self.rows: - oprot.writeString(iter221) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter222 in self.columns: - oprot.writeString(iter222) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter223,viter224 in self.attributes.items(): - oprot.writeString(kiter223) - oprot.writeString(viter224) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsWithColumns_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype228, _size225) = iprot.readListBegin() - for _i229 in xrange(_size225): - _elem230 = TRowResult() - _elem230.read(iprot) - self.success.append(_elem230) - 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('getRowsWithColumns_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter231 in self.success: - iter231.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsTs_args: - """ - Attributes: - - tableName: name of the table - - rows: row keys - - timestamp: timestamp - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, rows=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.rows = rows - self.timestamp = timestamp - self.attributes = attributes - - 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.rows = [] - (_etype235, _size232) = iprot.readListBegin() - for _i236 in xrange(_size232): - _elem237 = iprot.readString(); - self.rows.append(_elem237) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype239, _vtype240, _size238 ) = iprot.readMapBegin() - for _i242 in xrange(_size238): - _key243 = iprot.readString(); - _val244 = iprot.readString(); - self.attributes[_key243] = _val244 - 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('getRowsTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rows is not None: - oprot.writeFieldBegin('rows', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.rows)) - for iter245 in self.rows: - oprot.writeString(iter245) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter246,viter247 in self.attributes.items(): - oprot.writeString(kiter246) - oprot.writeString(viter247) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsTs_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype251, _size248) = iprot.readListBegin() - for _i252 in xrange(_size248): - _elem253 = TRowResult() - _elem253.read(iprot) - self.success.append(_elem253) - 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('getRowsTs_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter254 in self.success: - iter254.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsWithColumnsTs_args: - """ - Attributes: - - tableName: name of table - - rows: row keys - - columns: List of columns to return, null for all columns - - timestamp - - attributes: Get attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, rows=None, columns=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.rows = rows - self.columns = columns - self.timestamp = timestamp - self.attributes = attributes - - 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.rows = [] - (_etype258, _size255) = iprot.readListBegin() - for _i259 in xrange(_size255): - _elem260 = iprot.readString(); - self.rows.append(_elem260) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype264, _size261) = iprot.readListBegin() - for _i265 in xrange(_size261): - _elem266 = iprot.readString(); - self.columns.append(_elem266) - iprot.readListEnd() - 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.MAP: - self.attributes = {} - (_ktype268, _vtype269, _size267 ) = iprot.readMapBegin() - for _i271 in xrange(_size267): - _key272 = iprot.readString(); - _val273 = iprot.readString(); - self.attributes[_key272] = _val273 - 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('getRowsWithColumnsTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rows is not None: - oprot.writeFieldBegin('rows', TType.LIST, 2) - oprot.writeListBegin(TType.STRING, len(self.rows)) - for iter274 in self.rows: - oprot.writeString(iter274) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter275 in self.columns: - oprot.writeString(iter275) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter276,viter277 in self.attributes.items(): - oprot.writeString(kiter276) - oprot.writeString(viter277) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowsWithColumnsTs_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype281, _size278) = iprot.readListBegin() - for _i282 in xrange(_size278): - _elem283 = TRowResult() - _elem283.read(iprot) - self.success.append(_elem283) - 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('getRowsWithColumnsTs_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter284 in self.success: - iter284.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - mutations: list of mutation commands - - attributes: Mutation attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, mutations=None, attributes=None,): - self.tableName = tableName - self.row = row - self.mutations = mutations - self.attributes = attributes - - 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 = [] - (_etype288, _size285) = iprot.readListBegin() - for _i289 in xrange(_size285): - _elem290 = Mutation() - _elem290.read(iprot) - self.mutations.append(_elem290) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype292, _vtype293, _size291 ) = iprot.readMapBegin() - for _i295 in xrange(_size291): - _key296 = iprot.readString(); - _val297 = iprot.readString(); - self.attributes[_key296] = _val297 - 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('mutateRow_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations is not None: - oprot.writeFieldBegin('mutations', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter298 in self.mutations: - iter298.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter299,viter300 in self.attributes.items(): - oprot.writeString(kiter299) - oprot.writeString(viter300) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - """ - - 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, io=None, ia=None,): - self.io = io - self.ia = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: row key - - mutations: list of mutation commands - - timestamp: timestamp - - attributes: Mutation attributes - """ - - 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 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, row=None, mutations=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.row = row - self.mutations = mutations - self.timestamp = timestamp - self.attributes = attributes - - 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 = [] - (_etype304, _size301) = iprot.readListBegin() - for _i305 in xrange(_size301): - _elem306 = Mutation() - _elem306.read(iprot) - self.mutations.append(_elem306) - iprot.readListEnd() - 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.MAP: - self.attributes = {} - (_ktype308, _vtype309, _size307 ) = iprot.readMapBegin() - for _i311 in xrange(_size307): - _key312 = iprot.readString(); - _val313 = iprot.readString(); - self.attributes[_key312] = _val313 - 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('mutateRowTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations is not None: - oprot.writeFieldBegin('mutations', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter314 in self.mutations: - iter314.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter315,viter316 in self.attributes.items(): - oprot.writeString(kiter315) - oprot.writeString(viter316) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - """ - - 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, io=None, ia=None,): - self.io = io - self.ia = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - rowBatches: list of row batches - - attributes: Mutation attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, tableName=None, rowBatches=None, attributes=None,): - self.tableName = tableName - self.rowBatches = rowBatches - self.attributes = attributes - - 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 = [] - (_etype320, _size317) = iprot.readListBegin() - for _i321 in xrange(_size317): - _elem322 = BatchMutation() - _elem322.read(iprot) - self.rowBatches.append(_elem322) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.attributes = {} - (_ktype324, _vtype325, _size323 ) = iprot.readMapBegin() - for _i327 in xrange(_size323): - _key328 = iprot.readString(); - _val329 = iprot.readString(); - self.attributes[_key328] = _val329 - 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('mutateRows_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rowBatches is not None: - oprot.writeFieldBegin('rowBatches', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) - for iter330 in self.rowBatches: - iter330.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter331,viter332 in self.attributes.items(): - oprot.writeString(kiter331) - oprot.writeString(viter332) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - """ - - 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, io=None, ia=None,): - self.io = io - self.ia = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - rowBatches: list of row batches - - timestamp: timestamp - - attributes: Mutation attributes - """ - - 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 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, rowBatches=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.rowBatches = rowBatches - self.timestamp = timestamp - self.attributes = attributes - - 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 = [] - (_etype336, _size333) = iprot.readListBegin() - for _i337 in xrange(_size333): - _elem338 = BatchMutation() - _elem338.read(iprot) - self.rowBatches.append(_elem338) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype340, _vtype341, _size339 ) = iprot.readMapBegin() - for _i343 in xrange(_size339): - _key344 = iprot.readString(); - _val345 = iprot.readString(); - self.attributes[_key344] = _val345 - 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('mutateRowsTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.rowBatches is not None: - oprot.writeFieldBegin('rowBatches', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) - for iter346 in self.rowBatches: - iter346.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter347,viter348 in self.attributes.items(): - oprot.writeString(kiter347) - oprot.writeString(viter348) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - """ - - 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, io=None, ia=None,): - self.io = io - self.ia = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class atomicIncrement_args: - """ - Attributes: - - tableName: name of table - - row: row to increment - - column: name of column - - value: amount to increment by - """ - - 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, 'value', None, None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, column=None, value=None,): - self.tableName = tableName - self.row = row - self.column = column - self.value = 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.I64: - self.value = 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('atomicIncrement_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.I64, 4) - oprot.writeI64(self.value) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class atomicIncrement_result: - """ - Attributes: - - success - - io - - ia - """ - - thrift_spec = ( - (0, TType.I64, 'success', None, 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, success=None, io=None, ia=None,): - self.success = success - self.io = io - self.ia = 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 == 0: - if ftype == TType.I64: - self.success = iprot.readI64(); - 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) - 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('atomicIncrement_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I64, 0) - oprot.writeI64(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: Row to update - - column: name of column whose value is to be deleted - - attributes: Delete attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, column=None, attributes=None,): - self.tableName = tableName - self.row = row - self.column = column - self.attributes = attributes - - 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.MAP: - self.attributes = {} - (_ktype350, _vtype351, _size349 ) = iprot.readMapBegin() - for _i353 in xrange(_size349): - _key354 = iprot.readString(); - _val355 = iprot.readString(); - self.attributes[_key354] = _val355 - 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('deleteAll_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter356,viter357 in self.attributes.items(): - oprot.writeString(kiter356) - oprot.writeString(viter357) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: Row to update - - column: name of column whose value is to be deleted - - timestamp: timestamp - - attributes: Delete attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, row=None, column=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.row = row - self.column = column - self.timestamp = timestamp - self.attributes = attributes - - 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.MAP: - self.attributes = {} - (_ktype359, _vtype360, _size358 ) = iprot.readMapBegin() - for _i362 in xrange(_size358): - _key363 = iprot.readString(); - _val364 = iprot.readString(); - self.attributes[_key363] = _val364 - 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('deleteAllTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter365,viter366 in self.attributes.items(): - oprot.writeString(kiter365) - oprot.writeString(viter366) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: key of the row to be completely deleted. - - attributes: Delete attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, tableName=None, row=None, attributes=None,): - self.tableName = tableName - self.row = row - self.attributes = attributes - - 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.MAP: - self.attributes = {} - (_ktype368, _vtype369, _size367 ) = iprot.readMapBegin() - for _i371 in xrange(_size367): - _key372 = iprot.readString(); - _val373 = iprot.readString(); - self.attributes[_key372] = _val373 - 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('deleteAllRow_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter374,viter375 in self.attributes.items(): - oprot.writeString(kiter374) - oprot.writeString(viter375) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class increment_args: - """ - Attributes: - - increment: The single increment to apply - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'increment', (TIncrement, TIncrement.thrift_spec), None, ), # 1 - ) - - def __init__(self, increment=None,): - self.increment = increment - - 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.increment = TIncrement() - self.increment.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('increment_args') - if self.increment is not None: - oprot.writeFieldBegin('increment', TType.STRUCT, 1) - self.increment.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class increment_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('increment_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class incrementRows_args: - """ - Attributes: - - increments: The list of increments - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'increments', (TType.STRUCT,(TIncrement, TIncrement.thrift_spec)), None, ), # 1 - ) - - def __init__(self, increments=None,): - self.increments = increments - - 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.LIST: - self.increments = [] - (_etype379, _size376) = iprot.readListBegin() - for _i380 in xrange(_size376): - _elem381 = TIncrement() - _elem381.read(iprot) - self.increments.append(_elem381) - 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('incrementRows_args') - if self.increments is not None: - oprot.writeFieldBegin('increments', TType.LIST, 1) - oprot.writeListBegin(TType.STRUCT, len(self.increments)) - for iter382 in self.increments: - iter382.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class incrementRows_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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('incrementRows_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - row: key of the row to be completely deleted. - - timestamp: timestamp - - attributes: Delete attributes - """ - - 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 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.row = row - self.timestamp = timestamp - self.attributes = attributes - - 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) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype384, _vtype385, _size383 ) = iprot.readMapBegin() - for _i387 in xrange(_size383): - _key388 = iprot.readString(); - _val389 = iprot.readString(); - self.attributes[_key388] = _val389 - 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('deleteAllRowTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter390,viter391 in self.attributes.items(): - oprot.writeString(kiter390) - oprot.writeString(viter391) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithScan_args: - """ - Attributes: - - tableName: name of table - - scan: Scan instance - - attributes: Scan attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRUCT, 'scan', (TScan, TScan.thrift_spec), None, ), # 2 - (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - ) - - def __init__(self, tableName=None, scan=None, attributes=None,): - self.tableName = tableName - self.scan = scan - self.attributes = attributes - - 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.STRUCT: - self.scan = TScan() - self.scan.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.attributes = {} - (_ktype393, _vtype394, _size392 ) = iprot.readMapBegin() - for _i396 in xrange(_size392): - _key397 = iprot.readString(); - _val398 = iprot.readString(); - self.attributes[_key397] = _val398 - 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('scannerOpenWithScan_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.scan is not None: - oprot.writeFieldBegin('scan', TType.STRUCT, 2) - self.scan.write(oprot) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter399,viter400 in self.attributes.items(): - oprot.writeString(kiter399) - oprot.writeString(viter400) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithScan_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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('scannerOpenWithScan_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - attributes: Scan attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, startRow=None, columns=None, attributes=None,): - self.tableName = tableName - self.startRow = startRow - self.columns = columns - self.attributes = attributes - - 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 = [] - (_etype404, _size401) = iprot.readListBegin() - for _i405 in xrange(_size401): - _elem406 = iprot.readString(); - self.columns.append(_elem406) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype408, _vtype409, _size407 ) = iprot.readMapBegin() - for _i411 in xrange(_size407): - _key412 = iprot.readString(); - _val413 = iprot.readString(); - self.attributes[_key412] = _val413 - 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('scannerOpen_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter414 in self.columns: - oprot.writeString(iter414) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter415,viter416 in self.attributes.items(): - oprot.writeString(kiter415) - oprot.writeString(viter416) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - stopRow: row to stop scanning on. This row is *not* included in the - scanner's results - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - attributes: Scan attributes - """ - - 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.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, attributes=None,): - self.tableName = tableName - self.startRow = startRow - self.stopRow = stopRow - self.columns = columns - self.attributes = attributes - - 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 = [] - (_etype420, _size417) = iprot.readListBegin() - for _i421 in xrange(_size417): - _elem422 = iprot.readString(); - self.columns.append(_elem422) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.attributes = {} - (_ktype424, _vtype425, _size423 ) = iprot.readMapBegin() - for _i427 in xrange(_size423): - _key428 = iprot.readString(); - _val429 = iprot.readString(); - self.attributes[_key428] = _val429 - 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('scannerOpenWithStop_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow is not None: - oprot.writeFieldBegin('stopRow', TType.STRING, 3) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter430 in self.columns: - oprot.writeString(iter430) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter431,viter432 in self.attributes.items(): - oprot.writeString(kiter431) - oprot.writeString(viter432) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithPrefix_args: - """ - Attributes: - - tableName: name of table - - startAndPrefix: the prefix (and thus start row) of the keys you want - - columns: the columns you want returned - - attributes: Scan attributes - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'startAndPrefix', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - ) - - def __init__(self, tableName=None, startAndPrefix=None, columns=None, attributes=None,): - self.tableName = tableName - self.startAndPrefix = startAndPrefix - self.columns = columns - self.attributes = attributes - - 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.startAndPrefix = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype436, _size433) = iprot.readListBegin() - for _i437 in xrange(_size433): - _elem438 = iprot.readString(); - self.columns.append(_elem438) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype440, _vtype441, _size439 ) = iprot.readMapBegin() - for _i443 in xrange(_size439): - _key444 = iprot.readString(); - _val445 = iprot.readString(); - self.attributes[_key444] = _val445 - 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('scannerOpenWithPrefix_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startAndPrefix is not None: - oprot.writeFieldBegin('startAndPrefix', TType.STRING, 2) - oprot.writeString(self.startAndPrefix) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter446 in self.columns: - oprot.writeString(iter446) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter447,viter448 in self.attributes.items(): - oprot.writeString(kiter447) - oprot.writeString(viter448) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerOpenWithPrefix_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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('scannerOpenWithPrefix_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - timestamp: timestamp - - attributes: Scan attributes - """ - - 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 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - ) - - def __init__(self, tableName=None, startRow=None, columns=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.startRow = startRow - self.columns = columns - self.timestamp = timestamp - self.attributes = attributes - - 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 = [] - (_etype452, _size449) = iprot.readListBegin() - for _i453 in xrange(_size449): - _elem454 = iprot.readString(); - self.columns.append(_elem454) - iprot.readListEnd() - 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.MAP: - self.attributes = {} - (_ktype456, _vtype457, _size455 ) = iprot.readMapBegin() - for _i459 in xrange(_size455): - _key460 = iprot.readString(); - _val461 = iprot.readString(); - self.attributes[_key460] = _val461 - 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('scannerOpenTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter462 in self.columns: - oprot.writeString(iter462) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter463,viter464 in self.attributes.items(): - oprot.writeString(kiter463) - oprot.writeString(viter464) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - tableName: name of table - - startRow: Starting row in table to scan. - Send "" (empty string) to start at the first row. - - stopRow: row to stop scanning on. This row is *not* included in the - scanner's results - - columns: columns to scan. If column name is a column family, all - columns of the specified column family are returned. It's also possible - to pass a regex in the column qualifier. - - timestamp: timestamp - - attributes: Scan attributes - """ - - 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 - (6, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 6 - ) - - def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, timestamp=None, attributes=None,): - self.tableName = tableName - self.startRow = startRow - self.stopRow = stopRow - self.columns = columns - self.timestamp = timestamp - self.attributes = attributes - - 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 = [] - (_etype468, _size465) = iprot.readListBegin() - for _i469 in xrange(_size465): - _elem470 = iprot.readString(); - self.columns.append(_elem470) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.MAP: - self.attributes = {} - (_ktype472, _vtype473, _size471 ) = iprot.readMapBegin() - for _i475 in xrange(_size471): - _key476 = iprot.readString(); - _val477 = iprot.readString(); - self.attributes[_key476] = _val477 - 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('scannerOpenWithStopTs_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 2) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow is not None: - oprot.writeFieldBegin('stopRow', TType.STRING, 3) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter478 in self.columns: - oprot.writeString(iter478) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 5) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter479,viter480 in self.attributes.items(): - oprot.writeString(kiter479) - oprot.writeString(viter480) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - id: id of a scanner returned by scannerOpen - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - ) - - def __init__(self, id=None,): - self.id = 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 is not None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - - ia - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.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, success=None, io=None, ia=None,): - self.success = success - self.io = io - self.ia = 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 == 0: - if ftype == TType.LIST: - self.success = [] - (_etype484, _size481) = iprot.readListBegin() - for _i485 in xrange(_size481): - _elem486 = TRowResult() - _elem486.read(iprot) - self.success.append(_elem486) - 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.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('scannerGet_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter487 in self.success: - iter487.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerGetList_args: - """ - Attributes: - - id: id of a scanner returned by scannerOpen - - nbRows: number of results to return - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - (2, TType.I32, 'nbRows', None, None, ), # 2 - ) - - def __init__(self, id=None, nbRows=None,): - self.id = id - self.nbRows = nbRows - - 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) - elif fid == 2: - if ftype == TType.I32: - self.nbRows = 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('scannerGetList_args') - if self.id is not None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - if self.nbRows is not None: - oprot.writeFieldBegin('nbRows', TType.I32, 2) - oprot.writeI32(self.nbRows) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class scannerGetList_result: - """ - Attributes: - - success - - io - - ia - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.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, success=None, io=None, ia=None,): - self.success = success - self.io = io - self.ia = 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 == 0: - if ftype == TType.LIST: - self.success = [] - (_etype491, _size488) = iprot.readListBegin() - for _i492 in xrange(_size488): - _elem493 = TRowResult() - _elem493.read(iprot) - self.success.append(_elem493) - 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.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('scannerGetList_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter494 in self.success: - iter494.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - id: id of a scanner returned by scannerOpen - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'id', None, None, ), # 1 - ) - - def __init__(self, id=None,): - self.id = 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 is not None: - oprot.writeFieldBegin('id', TType.I32, 1) - oprot.writeI32(self.id) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - - ia - """ - - 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, io=None, ia=None,): - self.io = io - self.ia = 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 is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowOrBefore_args: - """ - Attributes: - - tableName: name of table - - row: row key - - family: column name - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'tableName', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'family', None, None, ), # 3 - ) - - def __init__(self, tableName=None, row=None, family=None,): - self.tableName = tableName - self.row = row - self.family = family - - 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.family = 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('getRowOrBefore_args') - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 1) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 3) - oprot.writeString(self.family) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRowOrBefore_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype498, _size495) = iprot.readListBegin() - for _i499 in xrange(_size495): - _elem500 = TCell() - _elem500.read(iprot) - self.success.append(_elem500) - 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('getRowOrBefore_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter501 in self.success: - iter501.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRegionInfo_args: - """ - Attributes: - - row: row key - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - ) - - def __init__(self, row=None,): - self.row = 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.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('getRegionInfo_args') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRegionInfo_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TRegionInfo, TRegionInfo.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.STRUCT: - self.success = TRegionInfo() - 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) - 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('getRegionInfo_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py b/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py index a236326cf38..c59352d09f1 100644 --- a/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py +++ b/hbase-examples/src/main/python/thrift1/gen-py/hbase/constants.py @@ -1,11 +1,14 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -from ttypes import * +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys +from .ttypes import * diff --git a/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py b/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py index e3efe3a7317..7d58cc30927 100644 --- a/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py +++ b/hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py @@ -1,1083 +1,1386 @@ # -# Autogenerated by Thrift Compiler (0.9.0) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - - -class TCell: - """ - TCell - Used to transport a cell value (byte[]) and the timestamp it was - stored with together as a result for get and getRow methods. This promotes - the timestamp of a cell to a first-class value, making it easy to take - note of temporal data. Cell is used all the way from HStore up to HTable. - - Attributes: - - value - - timestamp - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'value', None, None, ), # 1 - (2, TType.I64, 'timestamp', None, None, ), # 2 - ) - - def __init__(self, value=None, timestamp=None,): - self.value = value - self.timestamp = 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.value = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - 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('TCell') - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 1) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 2) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class ColumnDescriptor: - """ - An HColumnDescriptor contains information about a column family - such as the number of versions, compression settings, etc. It is - used as input when creating a table or adding a column. - - Attributes: - - name - - maxVersions - - compression - - inMemory - - bloomFilterType - - bloomFilterVectorSize - - bloomFilterNbHashes - - blockCacheEnabled - - timeToLive - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'name', None, None, ), # 1 - (2, TType.I32, 'maxVersions', None, 3, ), # 2 - (3, TType.STRING, 'compression', None, "NONE", ), # 3 - (4, TType.BOOL, 'inMemory', None, False, ), # 4 - (5, TType.STRING, 'bloomFilterType', None, "NONE", ), # 5 - (6, TType.I32, 'bloomFilterVectorSize', None, 0, ), # 6 - (7, TType.I32, 'bloomFilterNbHashes', None, 0, ), # 7 - (8, TType.BOOL, 'blockCacheEnabled', None, False, ), # 8 - (9, TType.I32, 'timeToLive', None, -1, ), # 9 - ) - - def __init__(self, name=None, maxVersions=thrift_spec[2][4], compression=thrift_spec[3][4], inMemory=thrift_spec[4][4], bloomFilterType=thrift_spec[5][4], bloomFilterVectorSize=thrift_spec[6][4], bloomFilterNbHashes=thrift_spec[7][4], blockCacheEnabled=thrift_spec[8][4], timeToLive=thrift_spec[9][4],): - self.name = name - self.maxVersions = maxVersions - self.compression = compression - self.inMemory = inMemory - self.bloomFilterType = bloomFilterType - self.bloomFilterVectorSize = bloomFilterVectorSize - self.bloomFilterNbHashes = bloomFilterNbHashes - self.blockCacheEnabled = blockCacheEnabled - self.timeToLive = 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.STRING: - self.bloomFilterType = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.bloomFilterVectorSize = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.bloomFilterNbHashes = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.BOOL: - self.blockCacheEnabled = iprot.readBool(); - else: - iprot.skip(ftype) - elif fid == 9: - 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 is not None: - oprot.writeFieldBegin('name', TType.STRING, 1) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.maxVersions is not None: - oprot.writeFieldBegin('maxVersions', TType.I32, 2) - oprot.writeI32(self.maxVersions) - oprot.writeFieldEnd() - if self.compression is not None: - oprot.writeFieldBegin('compression', TType.STRING, 3) - oprot.writeString(self.compression) - oprot.writeFieldEnd() - if self.inMemory is not None: - oprot.writeFieldBegin('inMemory', TType.BOOL, 4) - oprot.writeBool(self.inMemory) - oprot.writeFieldEnd() - if self.bloomFilterType is not None: - oprot.writeFieldBegin('bloomFilterType', TType.STRING, 5) - oprot.writeString(self.bloomFilterType) - oprot.writeFieldEnd() - if self.bloomFilterVectorSize is not None: - oprot.writeFieldBegin('bloomFilterVectorSize', TType.I32, 6) - oprot.writeI32(self.bloomFilterVectorSize) - oprot.writeFieldEnd() - if self.bloomFilterNbHashes is not None: - oprot.writeFieldBegin('bloomFilterNbHashes', TType.I32, 7) - oprot.writeI32(self.bloomFilterNbHashes) - oprot.writeFieldEnd() - if self.blockCacheEnabled is not None: - oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 8) - oprot.writeBool(self.blockCacheEnabled) - oprot.writeFieldEnd() - if self.timeToLive is not None: - oprot.writeFieldBegin('timeToLive', TType.I32, 9) - oprot.writeI32(self.timeToLive) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TRegionInfo: - """ - A TRegionInfo contains information about an HTable region. - - Attributes: - - startKey - - endKey - - id - - name - - version - - serverName - - port - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'startKey', None, None, ), # 1 - (2, TType.STRING, 'endKey', None, None, ), # 2 - (3, TType.I64, 'id', None, None, ), # 3 - (4, TType.STRING, 'name', None, None, ), # 4 - (5, TType.BYTE, 'version', None, None, ), # 5 - (6, TType.STRING, 'serverName', None, None, ), # 6 - (7, TType.I32, 'port', None, None, ), # 7 - ) - - def __init__(self, startKey=None, endKey=None, id=None, name=None, version=None, serverName=None, port=None,): - self.startKey = startKey - self.endKey = endKey - self.id = id - self.name = name - self.version = version - self.serverName = serverName - self.port = port - - 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) - elif fid == 2: - if ftype == TType.STRING: - self.endKey = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.id = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.name = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BYTE: - self.version = iprot.readByte(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.serverName = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.port = 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('TRegionInfo') - if self.startKey is not None: - oprot.writeFieldBegin('startKey', TType.STRING, 1) - oprot.writeString(self.startKey) - oprot.writeFieldEnd() - if self.endKey is not None: - oprot.writeFieldBegin('endKey', TType.STRING, 2) - oprot.writeString(self.endKey) - oprot.writeFieldEnd() - if self.id is not None: - oprot.writeFieldBegin('id', TType.I64, 3) - oprot.writeI64(self.id) - oprot.writeFieldEnd() - if self.name is not None: - oprot.writeFieldBegin('name', TType.STRING, 4) - oprot.writeString(self.name) - oprot.writeFieldEnd() - if self.version is not None: - oprot.writeFieldBegin('version', TType.BYTE, 5) - oprot.writeByte(self.version) - oprot.writeFieldEnd() - if self.serverName is not None: - oprot.writeFieldBegin('serverName', TType.STRING, 6) - oprot.writeString(self.serverName) - oprot.writeFieldEnd() - if self.port is not None: - oprot.writeFieldBegin('port', TType.I32, 7) - oprot.writeI32(self.port) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class Mutation: - """ - A Mutation object is used to either update or delete a column-value. - - Attributes: - - isDelete - - column - - value - - writeToWAL - """ - - thrift_spec = ( - None, # 0 - (1, TType.BOOL, 'isDelete', None, False, ), # 1 - (2, TType.STRING, 'column', None, None, ), # 2 - (3, TType.STRING, 'value', None, None, ), # 3 - (4, TType.BOOL, 'writeToWAL', None, True, ), # 4 - ) - - def __init__(self, isDelete=thrift_spec[1][4], column=None, value=None, writeToWAL=thrift_spec[4][4],): - self.isDelete = isDelete - self.column = column - self.value = value - self.writeToWAL = writeToWAL - - 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) - elif fid == 4: - if ftype == TType.BOOL: - self.writeToWAL = iprot.readBool(); - 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 is not None: - oprot.writeFieldBegin('isDelete', TType.BOOL, 1) - oprot.writeBool(self.isDelete) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 2) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 3) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.writeToWAL is not None: - oprot.writeFieldBegin('writeToWAL', TType.BOOL, 4) - oprot.writeBool(self.writeToWAL) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class BatchMutation: - """ - A BatchMutation object is used to apply a number of Mutations to a single row. - - Attributes: - - row - - mutations - """ - - 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, row=None, mutations=None,): - self.row = row - self.mutations = 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 is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations is not 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 validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TIncrement: - """ - For increments that are not incrementColumnValue - equivalents. - - Attributes: - - table - - row - - column - - ammount - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'column', None, None, ), # 3 - (4, TType.I64, 'ammount', None, None, ), # 4 - ) - - def __init__(self, table=None, row=None, column=None, ammount=None,): - self.table = table - self.row = row - self.column = column - self.ammount = ammount - - 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.table = 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.ammount = 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('TIncrement') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.column is not None: - oprot.writeFieldBegin('column', TType.STRING, 3) - oprot.writeString(self.column) - oprot.writeFieldEnd() - if self.ammount is not None: - oprot.writeFieldBegin('ammount', TType.I64, 4) - oprot.writeI64(self.ammount) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TRowResult: - """ - Holds row name and then a map of columns to cells. - - Attributes: - - row - - columns - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.MAP, 'columns', (TType.STRING,None,TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 2 - ) - - def __init__(self, row=None, columns=None,): - self.row = row - self.columns = 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 = TCell() - _val13.read(iprot) - 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('TRowResult') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.MAP, 2) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.columns)) - for kiter14,viter15 in self.columns.items(): - oprot.writeString(kiter14) - viter15.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TScan: - """ - A Scan object is used to specify scanner parameters when opening a scanner. - - Attributes: - - startRow - - stopRow - - timestamp - - columns - - caching - - filterString - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'startRow', None, None, ), # 1 - (2, TType.STRING, 'stopRow', None, None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 - (5, TType.I32, 'caching', None, None, ), # 5 - (6, TType.STRING, 'filterString', None, None, ), # 6 - ) - - def __init__(self, startRow=None, stopRow=None, timestamp=None, columns=None, caching=None, filterString=None,): - self.startRow = startRow - self.stopRow = stopRow - self.timestamp = timestamp - self.columns = columns - self.caching = caching - self.filterString = filterString - - 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.startRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.stopRow = iprot.readString(); - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64(); - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.LIST: - self.columns = [] - (_etype19, _size16) = iprot.readListBegin() - for _i20 in xrange(_size16): - _elem21 = iprot.readString(); - self.columns.append(_elem21) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.caching = iprot.readI32(); - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.filterString = 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('TScan') - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 1) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow is not None: - oprot.writeFieldBegin('stopRow', TType.STRING, 2) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 4) - oprot.writeListBegin(TType.STRING, len(self.columns)) - for iter22 in self.columns: - oprot.writeString(iter22) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.caching is not None: - oprot.writeFieldBegin('caching', TType.I32, 5) - oprot.writeI32(self.caching) - oprot.writeFieldEnd() - if self.filterString is not None: - oprot.writeFieldBegin('filterString', TType.STRING, 6) - oprot.writeString(self.filterString) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) +all_structs = [] + + +class TThriftServerType(object): + """ + Specify type of thrift server: thrift and thrift2 + + """ + ONE = 1 + TWO = 2 + + _VALUES_TO_NAMES = { + 1: "ONE", + 2: "TWO", + } + + _NAMES_TO_VALUES = { + "ONE": 1, + "TWO": 2, + } + + +class TCell(object): + """ + TCell - Used to transport a cell value (byte[]) and the timestamp it was + stored with together as a result for get and getRow methods. This promotes + the timestamp of a cell to a first-class value, making it easy to take + note of temporal data. Cell is used all the way from HStore up to HTable. + + Attributes: + - value + - timestamp + + """ + + + def __init__(self, value=None, timestamp=None,): + self.value = value + self.timestamp = timestamp + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TCell') + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 1) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 2) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class ColumnDescriptor(object): + """ + An HColumnDescriptor contains information about a column family + such as the number of versions, compression settings, etc. It is + used as input when creating a table or adding a column. + + Attributes: + - name + - maxVersions + - compression + - inMemory + - bloomFilterType + - bloomFilterVectorSize + - bloomFilterNbHashes + - blockCacheEnabled + - timeToLive + + """ + + + def __init__(self, name=None, maxVersions=3, compression="NONE", inMemory=False, bloomFilterType="NONE", bloomFilterVectorSize=0, bloomFilterNbHashes=0, blockCacheEnabled=False, timeToLive=2147483647,): + self.name = name + self.maxVersions = maxVersions + self.compression = compression + self.inMemory = inMemory + self.bloomFilterType = bloomFilterType + self.bloomFilterVectorSize = bloomFilterVectorSize + self.bloomFilterNbHashes = bloomFilterNbHashes + self.blockCacheEnabled = blockCacheEnabled + self.timeToLive = timeToLive + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + 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().decode('utf-8') if sys.version_info[0] == 2 else 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.STRING: + self.bloomFilterType = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.bloomFilterVectorSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.bloomFilterNbHashes = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.blockCacheEnabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('ColumnDescriptor') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeBinary(self.name) + oprot.writeFieldEnd() + if self.maxVersions is not None: + oprot.writeFieldBegin('maxVersions', TType.I32, 2) + oprot.writeI32(self.maxVersions) + oprot.writeFieldEnd() + if self.compression is not None: + oprot.writeFieldBegin('compression', TType.STRING, 3) + oprot.writeString(self.compression.encode('utf-8') if sys.version_info[0] == 2 else self.compression) + oprot.writeFieldEnd() + if self.inMemory is not None: + oprot.writeFieldBegin('inMemory', TType.BOOL, 4) + oprot.writeBool(self.inMemory) + oprot.writeFieldEnd() + if self.bloomFilterType is not None: + oprot.writeFieldBegin('bloomFilterType', TType.STRING, 5) + oprot.writeString(self.bloomFilterType.encode('utf-8') if sys.version_info[0] == 2 else self.bloomFilterType) + oprot.writeFieldEnd() + if self.bloomFilterVectorSize is not None: + oprot.writeFieldBegin('bloomFilterVectorSize', TType.I32, 6) + oprot.writeI32(self.bloomFilterVectorSize) + oprot.writeFieldEnd() + if self.bloomFilterNbHashes is not None: + oprot.writeFieldBegin('bloomFilterNbHashes', TType.I32, 7) + oprot.writeI32(self.bloomFilterNbHashes) + oprot.writeFieldEnd() + if self.blockCacheEnabled is not None: + oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 8) + oprot.writeBool(self.blockCacheEnabled) + oprot.writeFieldEnd() + if self.timeToLive is not None: + oprot.writeFieldBegin('timeToLive', TType.I32, 9) + oprot.writeI32(self.timeToLive) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TRegionInfo(object): + """ + A TRegionInfo contains information about an HTable region. + + Attributes: + - startKey + - endKey + - id + - name + - version + - serverName + - port + + """ + + + def __init__(self, startKey=None, endKey=None, id=None, name=None, version=None, serverName=None, port=None,): + self.startKey = startKey + self.endKey = endKey + self.id = id + self.name = name + self.version = version + self.serverName = serverName + self.port = port + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.endKey = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.id = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.name = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BYTE: + self.version = iprot.readByte() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.serverName = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.port = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TRegionInfo') + if self.startKey is not None: + oprot.writeFieldBegin('startKey', TType.STRING, 1) + oprot.writeBinary(self.startKey) + oprot.writeFieldEnd() + if self.endKey is not None: + oprot.writeFieldBegin('endKey', TType.STRING, 2) + oprot.writeBinary(self.endKey) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 3) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 4) + oprot.writeBinary(self.name) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin('version', TType.BYTE, 5) + oprot.writeByte(self.version) + oprot.writeFieldEnd() + if self.serverName is not None: + oprot.writeFieldBegin('serverName', TType.STRING, 6) + oprot.writeBinary(self.serverName) + oprot.writeFieldEnd() + if self.port is not None: + oprot.writeFieldBegin('port', TType.I32, 7) + oprot.writeI32(self.port) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class Mutation(object): + """ + A Mutation object is used to either update or delete a column-value. + + Attributes: + - isDelete + - column + - value + - writeToWAL + + """ + + + def __init__(self, isDelete=False, column=None, value=None, writeToWAL=True,): + self.isDelete = isDelete + self.column = column + self.value = value + self.writeToWAL = writeToWAL + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.writeToWAL = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('Mutation') + if self.isDelete is not None: + oprot.writeFieldBegin('isDelete', TType.BOOL, 1) + oprot.writeBool(self.isDelete) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 2) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 3) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.writeToWAL is not None: + oprot.writeFieldBegin('writeToWAL', TType.BOOL, 4) + oprot.writeBool(self.writeToWAL) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class BatchMutation(object): + """ + A BatchMutation object is used to apply a number of Mutations to a single row. + + Attributes: + - row + - mutations + + """ + + + def __init__(self, row=None, mutations=None,): + self.row = row + self.mutations = mutations + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.mutations = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in range(_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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('BatchMutation') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.mutations is not 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 validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TIncrement(object): + """ + For increments that are not incrementColumnValue + equivalents. + + Attributes: + - table + - row + - column + - ammount + + """ + + + def __init__(self, table=None, row=None, column=None, ammount=None,): + self.table = table + self.row = row + self.column = column + self.ammount = ammount + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.ammount = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TIncrement') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + if self.ammount is not None: + oprot.writeFieldBegin('ammount', TType.I64, 4) + oprot.writeI64(self.ammount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TColumn(object): + """ + Holds column name and the cell. + + Attributes: + - columnName + - cell + + """ + + + def __init__(self, columnName=None, cell=None,): + self.columnName = columnName + self.cell = cell + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.columnName = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.cell = TCell() + self.cell.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TColumn') + if self.columnName is not None: + oprot.writeFieldBegin('columnName', TType.STRING, 1) + oprot.writeBinary(self.columnName) + oprot.writeFieldEnd() + if self.cell is not None: + oprot.writeFieldBegin('cell', TType.STRUCT, 2) + self.cell.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TRowResult(object): + """ + Holds row name and then a map of columns to cells. + + Attributes: + - row + - columns + - sortedColumns + + """ + + + def __init__(self, row=None, columns=None, sortedColumns=None,): + self.row = row + self.columns = columns + self.sortedColumns = sortedColumns + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.columns = {} + (_ktype8, _vtype9, _size7) = iprot.readMapBegin() + for _i11 in range(_size7): + _key12 = iprot.readBinary() + _val13 = TCell() + _val13.read(iprot) + self.columns[_key12] = _val13 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.sortedColumns = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in range(_size14): + _elem19 = TColumn() + _elem19.read(iprot) + self.sortedColumns.append(_elem19) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TRowResult') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.columns)) + for kiter20, viter21 in self.columns.items(): + oprot.writeBinary(kiter20) + viter21.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.sortedColumns is not None: + oprot.writeFieldBegin('sortedColumns', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.sortedColumns)) + for iter22 in self.sortedColumns: + iter22.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TScan(object): + """ + A Scan object is used to specify scanner parameters when opening a scanner. + + Attributes: + - startRow + - stopRow + - timestamp + - columns + - caching + - filterString + - batchSize + - sortColumns + - reversed + - cacheBlocks + + """ + + + def __init__(self, startRow=None, stopRow=None, timestamp=None, columns=None, caching=None, filterString=None, batchSize=None, sortColumns=None, reversed=None, cacheBlocks=None,): + self.startRow = startRow + self.stopRow = stopRow + self.timestamp = timestamp + self.columns = columns + self.caching = caching + self.filterString = filterString + self.batchSize = batchSize + self.sortColumns = sortColumns + self.reversed = reversed + self.cacheBlocks = cacheBlocks + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.stopRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype26, _size23) = iprot.readListBegin() + for _i27 in range(_size23): + _elem28 = iprot.readBinary() + self.columns.append(_elem28) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.caching = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.filterString = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.batchSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.sortColumns = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.BOOL: + self.reversed = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.BOOL: + self.cacheBlocks = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TScan') + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 1) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 2) + oprot.writeBinary(self.stopRow) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter29 in self.columns: + oprot.writeBinary(iter29) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.caching is not None: + oprot.writeFieldBegin('caching', TType.I32, 5) + oprot.writeI32(self.caching) + oprot.writeFieldEnd() + if self.filterString is not None: + oprot.writeFieldBegin('filterString', TType.STRING, 6) + oprot.writeBinary(self.filterString) + oprot.writeFieldEnd() + if self.batchSize is not None: + oprot.writeFieldBegin('batchSize', TType.I32, 7) + oprot.writeI32(self.batchSize) + oprot.writeFieldEnd() + if self.sortColumns is not None: + oprot.writeFieldBegin('sortColumns', TType.BOOL, 8) + oprot.writeBool(self.sortColumns) + oprot.writeFieldEnd() + if self.reversed is not None: + oprot.writeFieldBegin('reversed', TType.BOOL, 9) + oprot.writeBool(self.reversed) + oprot.writeFieldEnd() + if self.cacheBlocks is not None: + oprot.writeFieldBegin('cacheBlocks', TType.BOOL, 10) + oprot.writeBool(self.cacheBlocks) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TAppend(object): + """ + An Append object is used to specify the parameters for performing the append operation. + + Attributes: + - table + - row + - columns + - values + + """ + + + def __init__(self, table=None, row=None, columns=None, values=None,): + self.table = table + self.row = row + self.columns = columns + self.values = values + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype33, _size30) = iprot.readListBegin() + for _i34 in range(_size30): + _elem35 = iprot.readBinary() + self.columns.append(_elem35) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.values = [] + (_etype39, _size36) = iprot.readListBegin() + for _i40 in range(_size36): + _elem41 = iprot.readBinary() + self.values.append(_elem41) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TAppend') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter42 in self.columns: + oprot.writeBinary(iter42) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.values is not None: + oprot.writeFieldBegin('values', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.values)) + for iter43 in self.values: + oprot.writeBinary(iter43) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class IOError(TException): - """ - An IOError exception signals that an error occurred communicating - to the Hbase master or an Hbase region server. Also used to return - more general Hbase error conditions. + """ + An IOError exception signals that an error occurred communicating + to the Hbase master or an Hbase region server. Also used to return + more general Hbase error conditions. - Attributes: - - message - """ + Attributes: + - message - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = 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 is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return + """ - def __str__(self): - return repr(self) + def __init__(self, message=None,): + self.message = message - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('IOError') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) - def __ne__(self, other): - return not (self == other) class IllegalArgument(TException): - """ - An IllegalArgument exception indicates an illegal or invalid - argument was passed into a procedure. + """ + An IllegalArgument exception indicates an illegal or invalid + argument was passed into a procedure. - Attributes: - - message - """ + Attributes: + - message - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = 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 is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return + """ - def __str__(self): - return repr(self) + def __init__(self, message=None,): + self.message = message - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('IllegalArgument') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) - def __ne__(self, other): - return not (self == other) class AlreadyExists(TException): - """ - An AlreadyExists exceptions signals that a table with the specified - name already exists + """ + An AlreadyExists exceptions signals that a table with the specified + name already exists - Attributes: - - message - """ + Attributes: + - message - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = 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 is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return + """ - def __str__(self): - return repr(self) + def __init__(self, message=None,): + self.message = message - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('AlreadyExists') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() - def __ne__(self, other): - return not (self == other) + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(TCell) +TCell.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'value', 'BINARY', None, ), # 1 + (2, TType.I64, 'timestamp', None, None, ), # 2 +) +all_structs.append(ColumnDescriptor) +ColumnDescriptor.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'BINARY', None, ), # 1 + (2, TType.I32, 'maxVersions', None, 3, ), # 2 + (3, TType.STRING, 'compression', 'UTF8', "NONE", ), # 3 + (4, TType.BOOL, 'inMemory', None, False, ), # 4 + (5, TType.STRING, 'bloomFilterType', 'UTF8', "NONE", ), # 5 + (6, TType.I32, 'bloomFilterVectorSize', None, 0, ), # 6 + (7, TType.I32, 'bloomFilterNbHashes', None, 0, ), # 7 + (8, TType.BOOL, 'blockCacheEnabled', None, False, ), # 8 + (9, TType.I32, 'timeToLive', None, 2147483647, ), # 9 +) +all_structs.append(TRegionInfo) +TRegionInfo.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'startKey', 'BINARY', None, ), # 1 + (2, TType.STRING, 'endKey', 'BINARY', None, ), # 2 + (3, TType.I64, 'id', None, None, ), # 3 + (4, TType.STRING, 'name', 'BINARY', None, ), # 4 + (5, TType.BYTE, 'version', None, None, ), # 5 + (6, TType.STRING, 'serverName', 'BINARY', None, ), # 6 + (7, TType.I32, 'port', None, None, ), # 7 +) +all_structs.append(Mutation) +Mutation.thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'isDelete', None, False, ), # 1 + (2, TType.STRING, 'column', 'BINARY', None, ), # 2 + (3, TType.STRING, 'value', 'BINARY', None, ), # 3 + (4, TType.BOOL, 'writeToWAL', None, True, ), # 4 +) +all_structs.append(BatchMutation) +BatchMutation.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'mutations', (TType.STRUCT, [Mutation, None], False), None, ), # 2 +) +all_structs.append(TIncrement) +TIncrement.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'column', 'BINARY', None, ), # 3 + (4, TType.I64, 'ammount', None, None, ), # 4 +) +all_structs.append(TColumn) +TColumn.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'columnName', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'cell', [TCell, None], None, ), # 2 +) +all_structs.append(TRowResult) +TRowResult.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.MAP, 'columns', (TType.STRING, 'BINARY', TType.STRUCT, [TCell, None], False), None, ), # 2 + (3, TType.LIST, 'sortedColumns', (TType.STRUCT, [TColumn, None], False), None, ), # 3 +) +all_structs.append(TScan) +TScan.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'startRow', 'BINARY', None, ), # 1 + (2, TType.STRING, 'stopRow', 'BINARY', None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 4 + (5, TType.I32, 'caching', None, None, ), # 5 + (6, TType.STRING, 'filterString', 'BINARY', None, ), # 6 + (7, TType.I32, 'batchSize', None, None, ), # 7 + (8, TType.BOOL, 'sortColumns', None, None, ), # 8 + (9, TType.BOOL, 'reversed', None, None, ), # 9 + (10, TType.BOOL, 'cacheBlocks', None, None, ), # 10 +) +all_structs.append(TAppend) +TAppend.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.LIST, 'values', (TType.STRING, 'BINARY', False), None, ), # 4 +) +all_structs.append(IOError) +IOError.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +all_structs.append(IllegalArgument) +IllegalArgument.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +all_structs.append(AlreadyExists) +AlreadyExists.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +fix_spec(all_structs) +del all_structs diff --git a/hbase-examples/src/main/python/thrift2/DemoClient.py b/hbase-examples/src/main/python/thrift2/DemoClient.py index 63719f0e0b1..4e8107a1b5c 100644 --- a/hbase-examples/src/main/python/thrift2/DemoClient.py +++ b/hbase-examples/src/main/python/thrift2/DemoClient.py @@ -61,6 +61,11 @@ client = THBaseService.Client(protocol) transport.open() +# Check Thrift Server Type +serverType = client.getThriftServerType() +if serverType != TThriftServerType.TWO: + raise Exception("Mismatch between client and server, server type is %s" % serverType) + table = "example" put = TPut(row="row1", columnValues=[TColumnValue(family="family1",qualifier="qualifier1",value="value1")]) diff --git a/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote b/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote index 2b80916556c..0264483dfe5 100755 --- a/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote +++ b/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService-remote @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @@ -9,219 +9,431 @@ import sys import pprint -from urlparse import urlparse -from thrift.transport import TTransport -from thrift.transport import TSocket -from thrift.transport import TSSLSocket -from thrift.transport import THttpClient -from thrift.protocol import TBinaryProtocol +if sys.version_info[0] > 2: + from urllib.parse import urlparse +else: + from urlparse import urlparse +from thrift.transport import TTransport, TSocket, TSSLSocket, THttpClient +from thrift.protocol.TBinaryProtocol import TBinaryProtocol from hbase import THBaseService from hbase.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]] [-s[sl]] function [arg1 [arg2...]]') - print('') - print('Functions:') - print(' bool exists(string table, TGet tget)') - print(' existsAll(string table, tgets)') - print(' TResult get(string table, TGet tget)') - print(' getMultiple(string table, tgets)') - print(' void put(string table, TPut tput)') - print(' bool checkAndPut(string table, string row, string family, string qualifier, string value, TPut tput)') - print(' void putMultiple(string table, tputs)') - print(' void deleteSingle(string table, TDelete tdelete)') - print(' deleteMultiple(string table, tdeletes)') - print(' bool checkAndDelete(string table, string row, string family, string qualifier, string value, TDelete tdelete)') - print(' TResult increment(string table, TIncrement tincrement)') - print(' TResult append(string table, TAppend tappend)') - print(' i32 openScanner(string table, TScan tscan)') - print(' getScannerRows(i32 scannerId, i32 numRows)') - print(' void closeScanner(i32 scannerId)') - print(' void mutateRow(string table, TRowMutations trowMutations)') - print(' getScannerResults(string table, TScan tscan, i32 numRows)') - print(' THRegionLocation getRegionLocation(string table, string row, bool reload)') - print(' getAllRegionLocations(string table)') - print(' bool checkAndMutate(string table, string row, string family, string qualifier, TCompareOp compareOp, string value, TRowMutations rowMutations)') - print('') - sys.exit(0) + print('') + print('Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] [-s[sl]] [-novalidate] [-ca_certs certs] [-keyfile keyfile] [-certfile certfile] function [arg1 [arg2...]]') + print('') + print('Functions:') + print(' bool exists(string table, TGet tget)') + print(' existsAll(string table, tgets)') + print(' TResult get(string table, TGet tget)') + print(' getMultiple(string table, tgets)') + print(' void put(string table, TPut tput)') + print(' bool checkAndPut(string table, string row, string family, string qualifier, string value, TPut tput)') + print(' void putMultiple(string table, tputs)') + print(' void deleteSingle(string table, TDelete tdelete)') + print(' deleteMultiple(string table, tdeletes)') + print(' bool checkAndDelete(string table, string row, string family, string qualifier, string value, TDelete tdelete)') + print(' TResult increment(string table, TIncrement tincrement)') + print(' TResult append(string table, TAppend tappend)') + print(' i32 openScanner(string table, TScan tscan)') + print(' getScannerRows(i32 scannerId, i32 numRows)') + print(' void closeScanner(i32 scannerId)') + print(' void mutateRow(string table, TRowMutations trowMutations)') + print(' getScannerResults(string table, TScan tscan, i32 numRows)') + print(' THRegionLocation getRegionLocation(string table, string row, bool reload)') + print(' getAllRegionLocations(string table)') + print(' bool checkAndMutate(string table, string row, string family, string qualifier, TCompareOperator compareOperator, string value, TRowMutations rowMutations)') + print(' TTableDescriptor getTableDescriptor(TTableName table)') + print(' getTableDescriptors( tables)') + print(' bool tableExists(TTableName tableName)') + print(' getTableDescriptorsByPattern(string regex, bool includeSysTables)') + print(' getTableDescriptorsByNamespace(string name)') + print(' getTableNamesByPattern(string regex, bool includeSysTables)') + print(' getTableNamesByNamespace(string name)') + print(' void createTable(TTableDescriptor desc, splitKeys)') + print(' void deleteTable(TTableName tableName)') + print(' void truncateTable(TTableName tableName, bool preserveSplits)') + print(' void enableTable(TTableName tableName)') + print(' void disableTable(TTableName tableName)') + print(' bool isTableEnabled(TTableName tableName)') + print(' bool isTableDisabled(TTableName tableName)') + print(' bool isTableAvailable(TTableName tableName)') + print(' bool isTableAvailableWithSplit(TTableName tableName, splitKeys)') + print(' void addColumnFamily(TTableName tableName, TColumnFamilyDescriptor column)') + print(' void deleteColumnFamily(TTableName tableName, string column)') + print(' void modifyColumnFamily(TTableName tableName, TColumnFamilyDescriptor column)') + print(' void modifyTable(TTableDescriptor desc)') + print(' void createNamespace(TNamespaceDescriptor namespaceDesc)') + print(' void modifyNamespace(TNamespaceDescriptor namespaceDesc)') + print(' void deleteNamespace(string name)') + print(' TNamespaceDescriptor getNamespaceDescriptor(string name)') + print(' listNamespaceDescriptors()') + print(' listNamespaces()') + print(' TThriftServerType getThriftServerType()') + print('') + sys.exit(0) -pp = pprint.PrettyPrinter(indent = 2) +pp = pprint.PrettyPrinter(indent=2) host = 'localhost' port = 9090 uri = '' framed = False ssl = False +validate = True +ca_certs = None +keyfile = None +certfile = None http = False argi = 1 if sys.argv[argi] == '-h': - parts = sys.argv[argi+1].split(':') - host = parts[0] - if len(parts) > 1: - port = int(parts[1]) - argi += 2 + parts = sys.argv[argi + 1].split(':') + host = parts[0] + if len(parts) > 1: + 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] - if url[4]: - uri += '?%s' % url[4] - http = True - argi += 2 + 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] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': - framed = True - argi += 1 + framed = True + argi += 1 if sys.argv[argi] == '-s' or sys.argv[argi] == '-ssl': - ssl = True - argi += 1 + ssl = True + argi += 1 + +if sys.argv[argi] == '-novalidate': + validate = False + argi += 1 + +if sys.argv[argi] == '-ca_certs': + ca_certs = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-keyfile': + keyfile = sys.argv[argi+1] + argi += 2 + +if sys.argv[argi] == '-certfile': + certfile = sys.argv[argi+1] + argi += 2 cmd = sys.argv[argi] -args = sys.argv[argi+1:] +args = sys.argv[argi + 1:] if http: - transport = THttpClient.THttpClient(host, port, uri) + transport = THttpClient.THttpClient(host, port, uri) else: - socket = TSSLSocket.TSSLSocket(host, port, validate=False) if ssl else TSocket.TSocket(host, port) - if framed: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) -protocol = TBinaryProtocol.TBinaryProtocol(transport) + if ssl: + socket = TSSLSocket.TSSLSocket(host, port, validate=validate, ca_certs=ca_certs, keyfile=keyfile, certfile=certfile) + else: + socket = TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol(transport) client = THBaseService.Client(protocol) transport.open() if cmd == 'exists': - if len(args) != 2: - print('exists requires 2 args') - sys.exit(1) - pp.pprint(client.exists(args[0],eval(args[1]),)) + if len(args) != 2: + print('exists requires 2 args') + sys.exit(1) + pp.pprint(client.exists(args[0], eval(args[1]),)) elif cmd == 'existsAll': - if len(args) != 2: - print('existsAll requires 2 args') - sys.exit(1) - pp.pprint(client.existsAll(args[0],eval(args[1]),)) + if len(args) != 2: + print('existsAll requires 2 args') + sys.exit(1) + pp.pprint(client.existsAll(args[0], eval(args[1]),)) elif cmd == 'get': - if len(args) != 2: - print('get requires 2 args') - sys.exit(1) - pp.pprint(client.get(args[0],eval(args[1]),)) + if len(args) != 2: + print('get requires 2 args') + sys.exit(1) + pp.pprint(client.get(args[0], eval(args[1]),)) elif cmd == 'getMultiple': - if len(args) != 2: - print('getMultiple requires 2 args') - sys.exit(1) - pp.pprint(client.getMultiple(args[0],eval(args[1]),)) + if len(args) != 2: + print('getMultiple requires 2 args') + sys.exit(1) + pp.pprint(client.getMultiple(args[0], eval(args[1]),)) elif cmd == 'put': - if len(args) != 2: - print('put requires 2 args') - sys.exit(1) - pp.pprint(client.put(args[0],eval(args[1]),)) + if len(args) != 2: + print('put requires 2 args') + sys.exit(1) + pp.pprint(client.put(args[0], eval(args[1]),)) elif cmd == 'checkAndPut': - if len(args) != 6: - print('checkAndPut requires 6 args') - sys.exit(1) - pp.pprint(client.checkAndPut(args[0],args[1],args[2],args[3],args[4],eval(args[5]),)) + if len(args) != 6: + print('checkAndPut requires 6 args') + sys.exit(1) + pp.pprint(client.checkAndPut(args[0], args[1], args[2], args[3], args[4], eval(args[5]),)) elif cmd == 'putMultiple': - if len(args) != 2: - print('putMultiple requires 2 args') - sys.exit(1) - pp.pprint(client.putMultiple(args[0],eval(args[1]),)) + if len(args) != 2: + print('putMultiple requires 2 args') + sys.exit(1) + pp.pprint(client.putMultiple(args[0], eval(args[1]),)) elif cmd == 'deleteSingle': - if len(args) != 2: - print('deleteSingle requires 2 args') - sys.exit(1) - pp.pprint(client.deleteSingle(args[0],eval(args[1]),)) + if len(args) != 2: + print('deleteSingle requires 2 args') + sys.exit(1) + pp.pprint(client.deleteSingle(args[0], eval(args[1]),)) elif cmd == 'deleteMultiple': - if len(args) != 2: - print('deleteMultiple requires 2 args') - sys.exit(1) - pp.pprint(client.deleteMultiple(args[0],eval(args[1]),)) + if len(args) != 2: + print('deleteMultiple requires 2 args') + sys.exit(1) + pp.pprint(client.deleteMultiple(args[0], eval(args[1]),)) elif cmd == 'checkAndDelete': - if len(args) != 6: - print('checkAndDelete requires 6 args') - sys.exit(1) - pp.pprint(client.checkAndDelete(args[0],args[1],args[2],args[3],args[4],eval(args[5]),)) + if len(args) != 6: + print('checkAndDelete requires 6 args') + sys.exit(1) + pp.pprint(client.checkAndDelete(args[0], args[1], args[2], args[3], args[4], eval(args[5]),)) elif cmd == 'increment': - if len(args) != 2: - print('increment requires 2 args') - sys.exit(1) - pp.pprint(client.increment(args[0],eval(args[1]),)) + if len(args) != 2: + print('increment requires 2 args') + sys.exit(1) + pp.pprint(client.increment(args[0], eval(args[1]),)) elif cmd == 'append': - if len(args) != 2: - print('append requires 2 args') - sys.exit(1) - pp.pprint(client.append(args[0],eval(args[1]),)) + if len(args) != 2: + print('append requires 2 args') + sys.exit(1) + pp.pprint(client.append(args[0], eval(args[1]),)) elif cmd == 'openScanner': - if len(args) != 2: - print('openScanner requires 2 args') - sys.exit(1) - pp.pprint(client.openScanner(args[0],eval(args[1]),)) + if len(args) != 2: + print('openScanner requires 2 args') + sys.exit(1) + pp.pprint(client.openScanner(args[0], eval(args[1]),)) elif cmd == 'getScannerRows': - if len(args) != 2: - print('getScannerRows requires 2 args') - sys.exit(1) - pp.pprint(client.getScannerRows(eval(args[0]),eval(args[1]),)) + if len(args) != 2: + print('getScannerRows requires 2 args') + sys.exit(1) + pp.pprint(client.getScannerRows(eval(args[0]), eval(args[1]),)) elif cmd == 'closeScanner': - if len(args) != 1: - print('closeScanner requires 1 args') - sys.exit(1) - pp.pprint(client.closeScanner(eval(args[0]),)) + if len(args) != 1: + print('closeScanner requires 1 args') + sys.exit(1) + pp.pprint(client.closeScanner(eval(args[0]),)) elif cmd == 'mutateRow': - if len(args) != 2: - print('mutateRow requires 2 args') - sys.exit(1) - pp.pprint(client.mutateRow(args[0],eval(args[1]),)) + if len(args) != 2: + print('mutateRow requires 2 args') + sys.exit(1) + pp.pprint(client.mutateRow(args[0], eval(args[1]),)) elif cmd == 'getScannerResults': - if len(args) != 3: - print('getScannerResults requires 3 args') - sys.exit(1) - pp.pprint(client.getScannerResults(args[0],eval(args[1]),eval(args[2]),)) + if len(args) != 3: + print('getScannerResults requires 3 args') + sys.exit(1) + pp.pprint(client.getScannerResults(args[0], eval(args[1]), eval(args[2]),)) elif cmd == 'getRegionLocation': - if len(args) != 3: - print('getRegionLocation requires 3 args') - sys.exit(1) - pp.pprint(client.getRegionLocation(args[0],args[1],eval(args[2]),)) + if len(args) != 3: + print('getRegionLocation requires 3 args') + sys.exit(1) + pp.pprint(client.getRegionLocation(args[0], args[1], eval(args[2]),)) elif cmd == 'getAllRegionLocations': - if len(args) != 1: - print('getAllRegionLocations requires 1 args') - sys.exit(1) - pp.pprint(client.getAllRegionLocations(args[0],)) + if len(args) != 1: + print('getAllRegionLocations requires 1 args') + sys.exit(1) + pp.pprint(client.getAllRegionLocations(args[0],)) elif cmd == 'checkAndMutate': - if len(args) != 7: - print('checkAndMutate requires 7 args') - sys.exit(1) - pp.pprint(client.checkAndMutate(args[0],args[1],args[2],args[3],eval(args[4]),args[5],eval(args[6]),)) + if len(args) != 7: + print('checkAndMutate requires 7 args') + sys.exit(1) + pp.pprint(client.checkAndMutate(args[0], args[1], args[2], args[3], eval(args[4]), args[5], eval(args[6]),)) + +elif cmd == 'getTableDescriptor': + if len(args) != 1: + print('getTableDescriptor requires 1 args') + sys.exit(1) + pp.pprint(client.getTableDescriptor(eval(args[0]),)) + +elif cmd == 'getTableDescriptors': + if len(args) != 1: + print('getTableDescriptors requires 1 args') + sys.exit(1) + pp.pprint(client.getTableDescriptors(eval(args[0]),)) + +elif cmd == 'tableExists': + if len(args) != 1: + print('tableExists requires 1 args') + sys.exit(1) + pp.pprint(client.tableExists(eval(args[0]),)) + +elif cmd == 'getTableDescriptorsByPattern': + if len(args) != 2: + print('getTableDescriptorsByPattern requires 2 args') + sys.exit(1) + pp.pprint(client.getTableDescriptorsByPattern(args[0], eval(args[1]),)) + +elif cmd == 'getTableDescriptorsByNamespace': + if len(args) != 1: + print('getTableDescriptorsByNamespace requires 1 args') + sys.exit(1) + pp.pprint(client.getTableDescriptorsByNamespace(args[0],)) + +elif cmd == 'getTableNamesByPattern': + if len(args) != 2: + print('getTableNamesByPattern requires 2 args') + sys.exit(1) + pp.pprint(client.getTableNamesByPattern(args[0], eval(args[1]),)) + +elif cmd == 'getTableNamesByNamespace': + if len(args) != 1: + print('getTableNamesByNamespace requires 1 args') + sys.exit(1) + pp.pprint(client.getTableNamesByNamespace(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 == 'truncateTable': + if len(args) != 2: + print('truncateTable requires 2 args') + sys.exit(1) + pp.pprint(client.truncateTable(eval(args[0]), eval(args[1]),)) + +elif cmd == 'enableTable': + if len(args) != 1: + print('enableTable requires 1 args') + sys.exit(1) + pp.pprint(client.enableTable(eval(args[0]),)) + +elif cmd == 'disableTable': + if len(args) != 1: + print('disableTable requires 1 args') + sys.exit(1) + pp.pprint(client.disableTable(eval(args[0]),)) + +elif cmd == 'isTableEnabled': + if len(args) != 1: + print('isTableEnabled requires 1 args') + sys.exit(1) + pp.pprint(client.isTableEnabled(eval(args[0]),)) + +elif cmd == 'isTableDisabled': + if len(args) != 1: + print('isTableDisabled requires 1 args') + sys.exit(1) + pp.pprint(client.isTableDisabled(eval(args[0]),)) + +elif cmd == 'isTableAvailable': + if len(args) != 1: + print('isTableAvailable requires 1 args') + sys.exit(1) + pp.pprint(client.isTableAvailable(eval(args[0]),)) + +elif cmd == 'isTableAvailableWithSplit': + if len(args) != 2: + print('isTableAvailableWithSplit requires 2 args') + sys.exit(1) + pp.pprint(client.isTableAvailableWithSplit(eval(args[0]), eval(args[1]),)) + +elif cmd == 'addColumnFamily': + if len(args) != 2: + print('addColumnFamily requires 2 args') + sys.exit(1) + pp.pprint(client.addColumnFamily(eval(args[0]), eval(args[1]),)) + +elif cmd == 'deleteColumnFamily': + if len(args) != 2: + print('deleteColumnFamily requires 2 args') + sys.exit(1) + pp.pprint(client.deleteColumnFamily(eval(args[0]), args[1],)) + +elif cmd == 'modifyColumnFamily': + if len(args) != 2: + print('modifyColumnFamily requires 2 args') + sys.exit(1) + pp.pprint(client.modifyColumnFamily(eval(args[0]), eval(args[1]),)) + +elif cmd == 'modifyTable': + if len(args) != 1: + print('modifyTable requires 1 args') + sys.exit(1) + pp.pprint(client.modifyTable(eval(args[0]),)) + +elif cmd == 'createNamespace': + if len(args) != 1: + print('createNamespace requires 1 args') + sys.exit(1) + pp.pprint(client.createNamespace(eval(args[0]),)) + +elif cmd == 'modifyNamespace': + if len(args) != 1: + print('modifyNamespace requires 1 args') + sys.exit(1) + pp.pprint(client.modifyNamespace(eval(args[0]),)) + +elif cmd == 'deleteNamespace': + if len(args) != 1: + print('deleteNamespace requires 1 args') + sys.exit(1) + pp.pprint(client.deleteNamespace(args[0],)) + +elif cmd == 'getNamespaceDescriptor': + if len(args) != 1: + print('getNamespaceDescriptor requires 1 args') + sys.exit(1) + pp.pprint(client.getNamespaceDescriptor(args[0],)) + +elif cmd == 'listNamespaceDescriptors': + if len(args) != 0: + print('listNamespaceDescriptors requires 0 args') + sys.exit(1) + pp.pprint(client.listNamespaceDescriptors()) + +elif cmd == 'listNamespaces': + if len(args) != 0: + print('listNamespaces requires 0 args') + sys.exit(1) + pp.pprint(client.listNamespaces()) + +elif cmd == 'getThriftServerType': + if len(args) != 0: + print('getThriftServerType requires 0 args') + sys.exit(1) + pp.pprint(client.getThriftServerType()) else: - print('Unrecognized method %s' % cmd) - sys.exit(1) + print('Unrecognized method %s' % cmd) + sys.exit(1) transport.close() diff --git a/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService.py b/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService.py index da8f4a392a1..c4092668e1b 100644 --- a/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService.py +++ b/hbase-examples/src/main/python/thrift2/gen-py/hbase/THBaseService.py @@ -1,503 +1,4557 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys import logging -from ttypes import * +from .ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None +all_structs = [] -class Iface: - def exists(self, table, tget): - """ - Test for the existence of columns in the table, as specified in the TGet. +class Iface(object): + def exists(self, table, tget): + """ + Test for the existence of columns in the table, as specified in the TGet. - @return true if the specified TGet matches one or more keys, false if not + @return true if the specified TGet matches one or more keys, false if not - Parameters: - - table: the table to check on - - tget: the TGet to check for - """ - pass + Parameters: + - table: the table to check on + - tget: the TGet to check for - def existsAll(self, table, tgets): - """ - Test for the existence of columns in the table, as specified by the TGets. + """ + pass - This will return an array of booleans. Each value will be true if the related Get matches - one or more keys, false if not. + def existsAll(self, table, tgets): + """ + Test for the existence of columns in the table, as specified by the TGets. - Parameters: - - table: the table to check on - - tgets: a list of TGets to check for - """ - pass + This will return an array of booleans. Each value will be true if the related Get matches + one or more keys, false if not. - def get(self, table, tget): - """ - Method for getting data from a row. + Parameters: + - table: the table to check on + - tgets: a list of TGets to check for - If the row cannot be found an empty Result is returned. - This can be checked by the empty field of the TResult + """ + pass - @return the result + def get(self, table, tget): + """ + Method for getting data from a row. - Parameters: - - table: the table to get from - - tget: the TGet to fetch - """ - pass + If the row cannot be found an empty Result is returned. + This can be checked by the empty field of the TResult - def getMultiple(self, table, tgets): - """ - Method for getting multiple rows. + @return the result - If a row cannot be found there will be a null - value in the result list for that TGet at the - same position. + Parameters: + - table: the table to get from + - tget: the TGet to fetch - So the Results are in the same order as the TGets. + """ + pass - Parameters: - - table: the table to get from - - tgets: a list of TGets to fetch, the Result list - will have the Results at corresponding positions - or null if there was an error - """ - pass + def getMultiple(self, table, tgets): + """ + Method for getting multiple rows. - def put(self, table, tput): - """ - Commit a TPut to a table. + If a row cannot be found there will be a null + value in the result list for that TGet at the + same position. - Parameters: - - table: the table to put data in - - tput: the TPut to put - """ - pass + So the Results are in the same order as the TGets. - def checkAndPut(self, table, row, family, qualifier, value, tput): - """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it adds the TPut. + Parameters: + - table: the table to get from + - tgets: a list of TGets to fetch, the Result list + will have the Results at corresponding positions + or null if there was an error - @return true if the new put was executed, false otherwise + """ + pass - Parameters: - - table: to check in and put to - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - value: the expected value, if not provided the - check is for the non-existence of the - column in question - - tput: the TPut to put if the check succeeds - """ - pass + def put(self, table, tput): + """ + Commit a TPut to a table. - def putMultiple(self, table, tputs): - """ - Commit a List of Puts to the table. + Parameters: + - table: the table to put data in + - tput: the TPut to put - Parameters: - - table: the table to put data in - - tputs: a list of TPuts to commit - """ - pass + """ + pass - def deleteSingle(self, table, tdelete): - """ - Deletes as specified by the TDelete. + def checkAndPut(self, table, row, family, qualifier, value, tput): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the TPut. - Note: "delete" is a reserved keyword and cannot be used in Thrift - thus the inconsistent naming scheme from the other functions. + @return true if the new put was executed, false otherwise - Parameters: - - table: the table to delete from - - tdelete: the TDelete to delete - """ - pass + Parameters: + - table: to check in and put to + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - value: the expected value, if not provided the + check is for the non-existence of the + column in question + - tput: the TPut to put if the check succeeds - def deleteMultiple(self, table, tdeletes): - """ - Bulk commit a List of TDeletes to the table. + """ + pass - Throws a TIOError if any of the deletes fail. + def putMultiple(self, table, tputs): + """ + Commit a List of Puts to the table. - Always returns an empty list for backwards compatibility. + Parameters: + - table: the table to put data in + - tputs: a list of TPuts to commit - Parameters: - - table: the table to delete from - - tdeletes: list of TDeletes to delete - """ - pass + """ + pass - def checkAndDelete(self, table, row, family, qualifier, value, tdelete): - """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it adds the delete. + def deleteSingle(self, table, tdelete): + """ + Deletes as specified by the TDelete. - @return true if the new delete was executed, false otherwise + Note: "delete" is a reserved keyword and cannot be used in Thrift + thus the inconsistent naming scheme from the other functions. - Parameters: - - table: to check in and delete from - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - value: the expected value, if not provided the - check is for the non-existence of the - column in question - - tdelete: the TDelete to execute if the check succeeds - """ - pass + Parameters: + - table: the table to delete from + - tdelete: the TDelete to delete - def increment(self, table, tincrement): - """ - Parameters: - - table: the table to increment the value on - - tincrement: the TIncrement to increment - """ - pass + """ + pass - def append(self, table, tappend): - """ - Parameters: - - table: the table to append the value on - - tappend: the TAppend to append - """ - pass + def deleteMultiple(self, table, tdeletes): + """ + Bulk commit a List of TDeletes to the table. - def openScanner(self, table, tscan): - """ - Get a Scanner for the provided TScan object. + Throws a TIOError if any of the deletes fail. - @return Scanner Id to be used with other scanner procedures + Always returns an empty list for backwards compatibility. - Parameters: - - table: the table to get the Scanner for - - tscan: the scan object to get a Scanner for - """ - pass + Parameters: + - table: the table to delete from + - tdeletes: list of TDeletes to delete - def getScannerRows(self, scannerId, numRows): - """ - Grabs multiple rows from a Scanner. + """ + pass - @return Between zero and numRows TResults + def checkAndDelete(self, table, row, family, qualifier, value, tdelete): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the delete. - Parameters: - - scannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - - numRows: number of rows to return - """ - pass + @return true if the new delete was executed, false otherwise - def closeScanner(self, scannerId): - """ - Closes the scanner. Should be called to free server side resources timely. - Typically close once the scanner is not needed anymore, i.e. after looping - over it to get all the required rows. + Parameters: + - table: to check in and delete from + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - value: the expected value, if not provided the + check is for the non-existence of the + column in question + - tdelete: the TDelete to execute if the check succeeds - Parameters: - - scannerId: the Id of the Scanner to close * - """ - pass + """ + pass - def mutateRow(self, table, trowMutations): - """ - mutateRow performs multiple mutations atomically on a single row. + def increment(self, table, tincrement): + """ + Parameters: + - table: the table to increment the value on + - tincrement: the TIncrement to increment - Parameters: - - table: table to apply the mutations - - trowMutations: mutations to apply - """ - pass + """ + pass - def getScannerResults(self, table, tscan, numRows): - """ - Get results for the provided TScan object. - This helper function opens a scanner, get the results and close the scanner. + def append(self, table, tappend): + """ + Parameters: + - table: the table to append the value on + - tappend: the TAppend to append - @return between zero and numRows TResults + """ + pass - Parameters: - - table: the table to get the Scanner for - - tscan: the scan object to get a Scanner for - - numRows: number of rows to return - """ - pass + def openScanner(self, table, tscan): + """ + Get a Scanner for the provided TScan object. - def getRegionLocation(self, table, row, reload): - """ - Given a table and a row get the location of the region that - would contain the given row key. + @return Scanner Id to be used with other scanner procedures - reload = true means the cache will be cleared and the location - will be fetched from meta. + Parameters: + - table: the table to get the Scanner for + - tscan: the scan object to get a Scanner for - Parameters: - - table - - row - - reload - """ - pass + """ + pass - def getAllRegionLocations(self, table): - """ - Get all of the region locations for a given table. + def getScannerRows(self, scannerId, numRows): + """ + Grabs multiple rows from a Scanner. + + @return Between zero and numRows TResults + + Parameters: + - scannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + - numRows: number of rows to return + + """ + pass + + def closeScanner(self, scannerId): + """ + Closes the scanner. Should be called to free server side resources timely. + Typically close once the scanner is not needed anymore, i.e. after looping + over it to get all the required rows. + + Parameters: + - scannerId: the Id of the Scanner to close * + + """ + pass + + def mutateRow(self, table, trowMutations): + """ + mutateRow performs multiple mutations atomically on a single row. + + Parameters: + - table: table to apply the mutations + - trowMutations: mutations to apply + + """ + pass + + def getScannerResults(self, table, tscan, numRows): + """ + Get results for the provided TScan object. + This helper function opens a scanner, get the results and close the scanner. + + @return between zero and numRows TResults + + Parameters: + - table: the table to get the Scanner for + - tscan: the scan object to get a Scanner for + - numRows: number of rows to return + + """ + pass + + def getRegionLocation(self, table, row, reload): + """ + Given a table and a row get the location of the region that + would contain the given row key. + + reload = true means the cache will be cleared and the location + will be fetched from meta. + + Parameters: + - table + - row + - reload + + """ + pass + + def getAllRegionLocations(self, table): + """ + Get all of the region locations for a given table. - Parameters: - - table - """ - pass + Parameters: + - table - def checkAndMutate(self, table, row, family, qualifier, compareOp, value, rowMutations): - """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it mutates the row. + """ + pass - @return true if the row was mutated, false otherwise + def checkAndMutate(self, table, row, family, qualifier, compareOperator, value, rowMutations): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it mutates the row. - Parameters: - - table: to check in and delete from - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - compareOp: comparison to make on the value - - value: the expected value to be compared against, if not provided the - check is for the non-existence of the column in question - - rowMutations: row mutations to execute if the value matches - """ - pass + @return true if the row was mutated, false otherwise + + Parameters: + - table: to check in and delete from + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - compareOperator: comparison to make on the value + - value: the expected value to be compared against, if not provided the + check is for the non-existence of the column in question + - rowMutations: row mutations to execute if the value matches + + """ + pass + + def getTableDescriptor(self, table): + """ + Get a table descriptor. + @return the TableDescriptor of the giving tablename + + + Parameters: + - table: the tablename of the table to get tableDescriptor + + """ + pass + + def getTableDescriptors(self, tables): + """ + Get table descriptors of tables. + @return the TableDescriptor of the giving tablename + + + Parameters: + - tables: the tablename list of the tables to get tableDescriptor + + """ + pass + + def tableExists(self, tableName): + """ + + @return true if table exists already, false if not + + + Parameters: + - tableName: the tablename of the tables to check + + """ + pass + + def getTableDescriptorsByPattern(self, regex, includeSysTables): + """ + Get table descriptors of tables that match the given pattern + @return the tableDescriptors of the matching table + + + Parameters: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + pass + + def getTableDescriptorsByNamespace(self, name): + """ + Get table descriptors of tables in the given namespace + @return the tableDescriptors in the namespce + + + Parameters: + - name: The namesapce's name + + """ + pass + + def getTableNamesByPattern(self, regex, includeSysTables): + """ + Get table names of tables that match the given pattern + @return the table names of the matching table + + + Parameters: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + pass + + def getTableNamesByNamespace(self, name): + """ + Get table names of tables in the given namespace + @return the table names of the matching table + + + Parameters: + - name: The namesapce's name + + """ + pass + + def createTable(self, desc, splitKeys): + """ + Creates a new table with an initial set of empty regions defined by the specified split keys. + The total number of regions created will be the number of split keys plus one. Synchronous + operation. + + + Parameters: + - desc: table descriptor for table + - splitKeys: rray of split keys for the initial regions of the table + + """ + pass + + def deleteTable(self, tableName): + """ + Deletes a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to delete + + """ + pass + + def truncateTable(self, tableName, preserveSplits): + """ + Truncate a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to truncate + - preserveSplits: whether to preserve previous splits + + """ + pass + + def enableTable(self, tableName): + """ + Enalbe a table + + + Parameters: + - tableName: the tablename to enable + + """ + pass + + def disableTable(self, tableName): + """ + Disable a table + + + Parameters: + - tableName: the tablename to disable + + """ + pass + + def isTableEnabled(self, tableName): + """ + + @return true if table is enabled, false if not + + + Parameters: + - tableName: the tablename to check + + """ + pass + + def isTableDisabled(self, tableName): + """ + + @return true if table is disabled, false if not + + + Parameters: + - tableName: the tablename to check + + """ + pass + + def isTableAvailable(self, tableName): + """ + + @return true if table is available, false if not + + + Parameters: + - tableName: the tablename to check + + """ + pass + + def isTableAvailableWithSplit(self, tableName, splitKeys): + """ + * Use this api to check if the table has been created with the specified number of splitkeys + * which was used while creating the given table. Note : If this api is used after a table's + * region gets splitted, the api may return false. + * + * @return true if table is available, false if not + * + * @deprecated Since 2.2.0. Because the same method in Table interface has been deprecated + * since 2.0.0, we will remove it in 3.0.0 release. + * Use {@link #isTableAvailable(TTableName tableName)} instead + * + + Parameters: + - tableName: the tablename to check + - splitKeys: keys to check if the table has been created with all split keys + + """ + pass + + def addColumnFamily(self, tableName, column): + """ + Add a column family to an existing table. Synchronous operation. + + + Parameters: + - tableName: the tablename to add column family to + - column: column family descriptor of column family to be added + + """ + pass + + def deleteColumnFamily(self, tableName, column): + """ + Delete a column family from a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to delete column family from + - column: name of column family to be deleted + + """ + pass + + def modifyColumnFamily(self, tableName, column): + """ + Modify an existing column family on a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to modify column family + - column: column family descriptor of column family to be modified + + """ + pass + + def modifyTable(self, desc): + """ + Modify an existing table + + + Parameters: + - desc: the descriptor of the table to modify + + """ + pass + + def createNamespace(self, namespaceDesc): + """ + Create a new namespace. Blocks until namespace has been successfully created or an exception is + thrown + + + Parameters: + - namespaceDesc: descriptor which describes the new namespace + + """ + pass + + def modifyNamespace(self, namespaceDesc): + """ + Modify an existing namespace. Blocks until namespace has been successfully modified or an + exception is thrown + + + Parameters: + - namespaceDesc: descriptor which describes the new namespace + + """ + pass + + def deleteNamespace(self, name): + """ + Delete an existing namespace. Only empty namespaces (no tables) can be removed. + Blocks until namespace has been successfully deleted or an + exception is thrown. + + + Parameters: + - name: namespace name + + """ + pass + + def getNamespaceDescriptor(self, name): + """ + Get a namespace descriptor by name. + @retrun the descriptor + + + Parameters: + - name: name of namespace descriptor + + """ + pass + + def listNamespaceDescriptors(self): + """ + @return all namespaces + + + """ + pass + + def listNamespaces(self): + """ + @return all namespace names + + + """ + pass + + def getThriftServerType(self): + """ + Get the type of this thrift server. + + @return the type of this thrift server + + """ + pass class Client(Iface): - def __init__(self, iprot, oprot=None): - self._iprot = self._oprot = iprot - if oprot is not None: - self._oprot = oprot - self._seqid = 0 + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot is not None: + self._oprot = oprot + self._seqid = 0 - def exists(self, table, tget): + def exists(self, table, tget): + """ + Test for the existence of columns in the table, as specified in the TGet. + + @return true if the specified TGet matches one or more keys, false if not + + Parameters: + - table: the table to check on + - tget: the TGet to check for + + """ + self.send_exists(table, tget) + return self.recv_exists() + + def send_exists(self, table, tget): + self._oprot.writeMessageBegin('exists', TMessageType.CALL, self._seqid) + args = exists_args() + args.table = table + args.tget = tget + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_exists(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = exists_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "exists failed: unknown result") + + def existsAll(self, table, tgets): + """ + Test for the existence of columns in the table, as specified by the TGets. + + This will return an array of booleans. Each value will be true if the related Get matches + one or more keys, false if not. + + Parameters: + - table: the table to check on + - tgets: a list of TGets to check for + + """ + self.send_existsAll(table, tgets) + return self.recv_existsAll() + + def send_existsAll(self, table, tgets): + self._oprot.writeMessageBegin('existsAll', TMessageType.CALL, self._seqid) + args = existsAll_args() + args.table = table + args.tgets = tgets + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_existsAll(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = existsAll_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "existsAll failed: unknown result") + + def get(self, table, tget): + """ + Method for getting data from a row. + + If the row cannot be found an empty Result is returned. + This can be checked by the empty field of the TResult + + @return the result + + Parameters: + - table: the table to get from + - tget: the TGet to fetch + + """ + self.send_get(table, tget) + return self.recv_get() + + def send_get(self, table, tget): + self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) + args = get_args() + args.table = table + args.tget = tget + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = get_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result") + + def getMultiple(self, table, tgets): + """ + Method for getting multiple rows. + + If a row cannot be found there will be a null + value in the result list for that TGet at the + same position. + + So the Results are in the same order as the TGets. + + Parameters: + - table: the table to get from + - tgets: a list of TGets to fetch, the Result list + will have the Results at corresponding positions + or null if there was an error + + """ + self.send_getMultiple(table, tgets) + return self.recv_getMultiple() + + def send_getMultiple(self, table, tgets): + self._oprot.writeMessageBegin('getMultiple', TMessageType.CALL, self._seqid) + args = getMultiple_args() + args.table = table + args.tgets = tgets + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getMultiple(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getMultiple_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getMultiple failed: unknown result") + + def put(self, table, tput): + """ + Commit a TPut to a table. + + Parameters: + - table: the table to put data in + - tput: the TPut to put + + """ + self.send_put(table, tput) + self.recv_put() + + def send_put(self, table, tput): + self._oprot.writeMessageBegin('put', TMessageType.CALL, self._seqid) + args = put_args() + args.table = table + args.tput = tput + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_put(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = put_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def checkAndPut(self, table, row, family, qualifier, value, tput): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the TPut. + + @return true if the new put was executed, false otherwise + + Parameters: + - table: to check in and put to + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - value: the expected value, if not provided the + check is for the non-existence of the + column in question + - tput: the TPut to put if the check succeeds + + """ + self.send_checkAndPut(table, row, family, qualifier, value, tput) + return self.recv_checkAndPut() + + def send_checkAndPut(self, table, row, family, qualifier, value, tput): + self._oprot.writeMessageBegin('checkAndPut', TMessageType.CALL, self._seqid) + args = checkAndPut_args() + args.table = table + args.row = row + args.family = family + args.qualifier = qualifier + args.value = value + args.tput = tput + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_checkAndPut(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = checkAndPut_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndPut failed: unknown result") + + def putMultiple(self, table, tputs): + """ + Commit a List of Puts to the table. + + Parameters: + - table: the table to put data in + - tputs: a list of TPuts to commit + + """ + self.send_putMultiple(table, tputs) + self.recv_putMultiple() + + def send_putMultiple(self, table, tputs): + self._oprot.writeMessageBegin('putMultiple', TMessageType.CALL, self._seqid) + args = putMultiple_args() + args.table = table + args.tputs = tputs + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_putMultiple(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = putMultiple_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteSingle(self, table, tdelete): + """ + Deletes as specified by the TDelete. + + Note: "delete" is a reserved keyword and cannot be used in Thrift + thus the inconsistent naming scheme from the other functions. + + Parameters: + - table: the table to delete from + - tdelete: the TDelete to delete + + """ + self.send_deleteSingle(table, tdelete) + self.recv_deleteSingle() + + def send_deleteSingle(self, table, tdelete): + self._oprot.writeMessageBegin('deleteSingle', TMessageType.CALL, self._seqid) + args = deleteSingle_args() + args.table = table + args.tdelete = tdelete + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteSingle(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteSingle_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteMultiple(self, table, tdeletes): + """ + Bulk commit a List of TDeletes to the table. + + Throws a TIOError if any of the deletes fail. + + Always returns an empty list for backwards compatibility. + + Parameters: + - table: the table to delete from + - tdeletes: list of TDeletes to delete + + """ + self.send_deleteMultiple(table, tdeletes) + return self.recv_deleteMultiple() + + def send_deleteMultiple(self, table, tdeletes): + self._oprot.writeMessageBegin('deleteMultiple', TMessageType.CALL, self._seqid) + args = deleteMultiple_args() + args.table = table + args.tdeletes = tdeletes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteMultiple(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteMultiple_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteMultiple failed: unknown result") + + def checkAndDelete(self, table, row, family, qualifier, value, tdelete): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it adds the delete. + + @return true if the new delete was executed, false otherwise + + Parameters: + - table: to check in and delete from + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - value: the expected value, if not provided the + check is for the non-existence of the + column in question + - tdelete: the TDelete to execute if the check succeeds + + """ + self.send_checkAndDelete(table, row, family, qualifier, value, tdelete) + return self.recv_checkAndDelete() + + def send_checkAndDelete(self, table, row, family, qualifier, value, tdelete): + self._oprot.writeMessageBegin('checkAndDelete', TMessageType.CALL, self._seqid) + args = checkAndDelete_args() + args.table = table + args.row = row + args.family = family + args.qualifier = qualifier + args.value = value + args.tdelete = tdelete + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_checkAndDelete(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = checkAndDelete_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndDelete failed: unknown result") + + def increment(self, table, tincrement): + """ + Parameters: + - table: the table to increment the value on + - tincrement: the TIncrement to increment + + """ + self.send_increment(table, tincrement) + return self.recv_increment() + + def send_increment(self, table, tincrement): + self._oprot.writeMessageBegin('increment', TMessageType.CALL, self._seqid) + args = increment_args() + args.table = table + args.tincrement = tincrement + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_increment(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = increment_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "increment failed: unknown result") + + def append(self, table, tappend): + """ + Parameters: + - table: the table to append the value on + - tappend: the TAppend to append + + """ + self.send_append(table, tappend) + return self.recv_append() + + def send_append(self, table, tappend): + self._oprot.writeMessageBegin('append', TMessageType.CALL, self._seqid) + args = append_args() + args.table = table + args.tappend = tappend + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_append(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = append_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "append failed: unknown result") + + def openScanner(self, table, tscan): + """ + Get a Scanner for the provided TScan object. + + @return Scanner Id to be used with other scanner procedures + + Parameters: + - table: the table to get the Scanner for + - tscan: the scan object to get a Scanner for + + """ + self.send_openScanner(table, tscan) + return self.recv_openScanner() + + def send_openScanner(self, table, tscan): + self._oprot.writeMessageBegin('openScanner', TMessageType.CALL, self._seqid) + args = openScanner_args() + args.table = table + args.tscan = tscan + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_openScanner(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = openScanner_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "openScanner failed: unknown result") + + def getScannerRows(self, scannerId, numRows): + """ + Grabs multiple rows from a Scanner. + + @return Between zero and numRows TResults + + Parameters: + - scannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. + - numRows: number of rows to return + + """ + self.send_getScannerRows(scannerId, numRows) + return self.recv_getScannerRows() + + def send_getScannerRows(self, scannerId, numRows): + self._oprot.writeMessageBegin('getScannerRows', TMessageType.CALL, self._seqid) + args = getScannerRows_args() + args.scannerId = scannerId + args.numRows = numRows + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getScannerRows(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getScannerRows_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "getScannerRows failed: unknown result") + + def closeScanner(self, scannerId): + """ + Closes the scanner. Should be called to free server side resources timely. + Typically close once the scanner is not needed anymore, i.e. after looping + over it to get all the required rows. + + Parameters: + - scannerId: the Id of the Scanner to close * + + """ + self.send_closeScanner(scannerId) + self.recv_closeScanner() + + def send_closeScanner(self, scannerId): + self._oprot.writeMessageBegin('closeScanner', TMessageType.CALL, self._seqid) + args = closeScanner_args() + args.scannerId = scannerId + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_closeScanner(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = closeScanner_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRow(self, table, trowMutations): + """ + mutateRow performs multiple mutations atomically on a single row. + + Parameters: + - table: table to apply the mutations + - trowMutations: mutations to apply + + """ + self.send_mutateRow(table, trowMutations) + self.recv_mutateRow() + + def send_mutateRow(self, table, trowMutations): + self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) + args = mutateRow_args() + args.table = table + args.trowMutations = trowMutations + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRow(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = mutateRow_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def getScannerResults(self, table, tscan, numRows): + """ + Get results for the provided TScan object. + This helper function opens a scanner, get the results and close the scanner. + + @return between zero and numRows TResults + + Parameters: + - table: the table to get the Scanner for + - tscan: the scan object to get a Scanner for + - numRows: number of rows to return + + """ + self.send_getScannerResults(table, tscan, numRows) + return self.recv_getScannerResults() + + def send_getScannerResults(self, table, tscan, numRows): + self._oprot.writeMessageBegin('getScannerResults', TMessageType.CALL, self._seqid) + args = getScannerResults_args() + args.table = table + args.tscan = tscan + args.numRows = numRows + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getScannerResults(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getScannerResults_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getScannerResults failed: unknown result") + + def getRegionLocation(self, table, row, reload): + """ + Given a table and a row get the location of the region that + would contain the given row key. + + reload = true means the cache will be cleared and the location + will be fetched from meta. + + Parameters: + - table + - row + - reload + + """ + self.send_getRegionLocation(table, row, reload) + return self.recv_getRegionLocation() + + def send_getRegionLocation(self, table, row, reload): + self._oprot.writeMessageBegin('getRegionLocation', TMessageType.CALL, self._seqid) + args = getRegionLocation_args() + args.table = table + args.row = row + args.reload = reload + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRegionLocation(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getRegionLocation_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRegionLocation failed: unknown result") + + def getAllRegionLocations(self, table): + """ + Get all of the region locations for a given table. + + + Parameters: + - table + + """ + self.send_getAllRegionLocations(table) + return self.recv_getAllRegionLocations() + + def send_getAllRegionLocations(self, table): + self._oprot.writeMessageBegin('getAllRegionLocations', TMessageType.CALL, self._seqid) + args = getAllRegionLocations_args() + args.table = table + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getAllRegionLocations(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getAllRegionLocations_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllRegionLocations failed: unknown result") + + def checkAndMutate(self, table, row, family, qualifier, compareOperator, value, rowMutations): + """ + Atomically checks if a row/family/qualifier value matches the expected + value. If it does, it mutates the row. + + @return true if the row was mutated, false otherwise + + Parameters: + - table: to check in and delete from + - row: row to check + - family: column family to check + - qualifier: column qualifier to check + - compareOperator: comparison to make on the value + - value: the expected value to be compared against, if not provided the + check is for the non-existence of the column in question + - rowMutations: row mutations to execute if the value matches + + """ + self.send_checkAndMutate(table, row, family, qualifier, compareOperator, value, rowMutations) + return self.recv_checkAndMutate() + + def send_checkAndMutate(self, table, row, family, qualifier, compareOperator, value, rowMutations): + self._oprot.writeMessageBegin('checkAndMutate', TMessageType.CALL, self._seqid) + args = checkAndMutate_args() + args.table = table + args.row = row + args.family = family + args.qualifier = qualifier + args.compareOperator = compareOperator + args.value = value + args.rowMutations = rowMutations + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_checkAndMutate(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = checkAndMutate_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndMutate failed: unknown result") + + def getTableDescriptor(self, table): + """ + Get a table descriptor. + @return the TableDescriptor of the giving tablename + + + Parameters: + - table: the tablename of the table to get tableDescriptor + + """ + self.send_getTableDescriptor(table) + return self.recv_getTableDescriptor() + + def send_getTableDescriptor(self, table): + self._oprot.writeMessageBegin('getTableDescriptor', TMessageType.CALL, self._seqid) + args = getTableDescriptor_args() + args.table = table + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableDescriptor(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableDescriptor_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableDescriptor failed: unknown result") + + def getTableDescriptors(self, tables): + """ + Get table descriptors of tables. + @return the TableDescriptor of the giving tablename + + + Parameters: + - tables: the tablename list of the tables to get tableDescriptor + + """ + self.send_getTableDescriptors(tables) + return self.recv_getTableDescriptors() + + def send_getTableDescriptors(self, tables): + self._oprot.writeMessageBegin('getTableDescriptors', TMessageType.CALL, self._seqid) + args = getTableDescriptors_args() + args.tables = tables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableDescriptors(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableDescriptors_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableDescriptors failed: unknown result") + + def tableExists(self, tableName): + """ + + @return true if table exists already, false if not + + + Parameters: + - tableName: the tablename of the tables to check + + """ + self.send_tableExists(tableName) + return self.recv_tableExists() + + def send_tableExists(self, tableName): + self._oprot.writeMessageBegin('tableExists', TMessageType.CALL, self._seqid) + args = tableExists_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_tableExists(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = tableExists_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "tableExists failed: unknown result") + + def getTableDescriptorsByPattern(self, regex, includeSysTables): + """ + Get table descriptors of tables that match the given pattern + @return the tableDescriptors of the matching table + + + Parameters: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + self.send_getTableDescriptorsByPattern(regex, includeSysTables) + return self.recv_getTableDescriptorsByPattern() + + def send_getTableDescriptorsByPattern(self, regex, includeSysTables): + self._oprot.writeMessageBegin('getTableDescriptorsByPattern', TMessageType.CALL, self._seqid) + args = getTableDescriptorsByPattern_args() + args.regex = regex + args.includeSysTables = includeSysTables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableDescriptorsByPattern(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableDescriptorsByPattern_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableDescriptorsByPattern failed: unknown result") + + def getTableDescriptorsByNamespace(self, name): + """ + Get table descriptors of tables in the given namespace + @return the tableDescriptors in the namespce + + + Parameters: + - name: The namesapce's name + + """ + self.send_getTableDescriptorsByNamespace(name) + return self.recv_getTableDescriptorsByNamespace() + + def send_getTableDescriptorsByNamespace(self, name): + self._oprot.writeMessageBegin('getTableDescriptorsByNamespace', TMessageType.CALL, self._seqid) + args = getTableDescriptorsByNamespace_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableDescriptorsByNamespace(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableDescriptorsByNamespace_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableDescriptorsByNamespace failed: unknown result") + + def getTableNamesByPattern(self, regex, includeSysTables): + """ + Get table names of tables that match the given pattern + @return the table names of the matching table + + + Parameters: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + self.send_getTableNamesByPattern(regex, includeSysTables) + return self.recv_getTableNamesByPattern() + + def send_getTableNamesByPattern(self, regex, includeSysTables): + self._oprot.writeMessageBegin('getTableNamesByPattern', TMessageType.CALL, self._seqid) + args = getTableNamesByPattern_args() + args.regex = regex + args.includeSysTables = includeSysTables + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableNamesByPattern(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableNamesByPattern_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNamesByPattern failed: unknown result") + + def getTableNamesByNamespace(self, name): + """ + Get table names of tables in the given namespace + @return the table names of the matching table + + + Parameters: + - name: The namesapce's name + + """ + self.send_getTableNamesByNamespace(name) + return self.recv_getTableNamesByNamespace() + + def send_getTableNamesByNamespace(self, name): + self._oprot.writeMessageBegin('getTableNamesByNamespace', TMessageType.CALL, self._seqid) + args = getTableNamesByNamespace_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableNamesByNamespace(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getTableNamesByNamespace_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNamesByNamespace failed: unknown result") + + def createTable(self, desc, splitKeys): + """ + Creates a new table with an initial set of empty regions defined by the specified split keys. + The total number of regions created will be the number of split keys plus one. Synchronous + operation. + + + Parameters: + - desc: table descriptor for table + - splitKeys: rray of split keys for the initial regions of the table + + """ + self.send_createTable(desc, splitKeys) + self.recv_createTable() + + def send_createTable(self, desc, splitKeys): + self._oprot.writeMessageBegin('createTable', TMessageType.CALL, self._seqid) + args = createTable_args() + args.desc = desc + args.splitKeys = splitKeys + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_createTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = createTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteTable(self, tableName): + """ + Deletes a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to delete + + """ + 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): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def truncateTable(self, tableName, preserveSplits): + """ + Truncate a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to truncate + - preserveSplits: whether to preserve previous splits + + """ + self.send_truncateTable(tableName, preserveSplits) + self.recv_truncateTable() + + def send_truncateTable(self, tableName, preserveSplits): + self._oprot.writeMessageBegin('truncateTable', TMessageType.CALL, self._seqid) + args = truncateTable_args() + args.tableName = tableName + args.preserveSplits = preserveSplits + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_truncateTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = truncateTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def enableTable(self, tableName): + """ + Enalbe a table + + + Parameters: + - tableName: the tablename to enable + + """ + self.send_enableTable(tableName) + self.recv_enableTable() + + def send_enableTable(self, tableName): + self._oprot.writeMessageBegin('enableTable', TMessageType.CALL, self._seqid) + args = enableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_enableTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = enableTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def disableTable(self, tableName): + """ + Disable a table + + + Parameters: + - tableName: the tablename to disable + + """ + self.send_disableTable(tableName) + self.recv_disableTable() + + def send_disableTable(self, tableName): + self._oprot.writeMessageBegin('disableTable', TMessageType.CALL, self._seqid) + args = disableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_disableTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = disableTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def isTableEnabled(self, tableName): + """ + + @return true if table is enabled, false if not + + + Parameters: + - tableName: the tablename to check + + """ + self.send_isTableEnabled(tableName) + return self.recv_isTableEnabled() + + def send_isTableEnabled(self, tableName): + self._oprot.writeMessageBegin('isTableEnabled', TMessageType.CALL, self._seqid) + args = isTableEnabled_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableEnabled(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isTableEnabled_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result") + + def isTableDisabled(self, tableName): + """ + + @return true if table is disabled, false if not + + + Parameters: + - tableName: the tablename to check + + """ + self.send_isTableDisabled(tableName) + return self.recv_isTableDisabled() + + def send_isTableDisabled(self, tableName): + self._oprot.writeMessageBegin('isTableDisabled', TMessageType.CALL, self._seqid) + args = isTableDisabled_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableDisabled(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isTableDisabled_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableDisabled failed: unknown result") + + def isTableAvailable(self, tableName): + """ + + @return true if table is available, false if not + + + Parameters: + - tableName: the tablename to check + + """ + self.send_isTableAvailable(tableName) + return self.recv_isTableAvailable() + + def send_isTableAvailable(self, tableName): + self._oprot.writeMessageBegin('isTableAvailable', TMessageType.CALL, self._seqid) + args = isTableAvailable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableAvailable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isTableAvailable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableAvailable failed: unknown result") + + def isTableAvailableWithSplit(self, tableName, splitKeys): + """ + * Use this api to check if the table has been created with the specified number of splitkeys + * which was used while creating the given table. Note : If this api is used after a table's + * region gets splitted, the api may return false. + * + * @return true if table is available, false if not + * + * @deprecated Since 2.2.0. Because the same method in Table interface has been deprecated + * since 2.0.0, we will remove it in 3.0.0 release. + * Use {@link #isTableAvailable(TTableName tableName)} instead + * + + Parameters: + - tableName: the tablename to check + - splitKeys: keys to check if the table has been created with all split keys + + """ + self.send_isTableAvailableWithSplit(tableName, splitKeys) + return self.recv_isTableAvailableWithSplit() + + def send_isTableAvailableWithSplit(self, tableName, splitKeys): + self._oprot.writeMessageBegin('isTableAvailableWithSplit', TMessageType.CALL, self._seqid) + args = isTableAvailableWithSplit_args() + args.tableName = tableName + args.splitKeys = splitKeys + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableAvailableWithSplit(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = isTableAvailableWithSplit_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableAvailableWithSplit failed: unknown result") + + def addColumnFamily(self, tableName, column): + """ + Add a column family to an existing table. Synchronous operation. + + + Parameters: + - tableName: the tablename to add column family to + - column: column family descriptor of column family to be added + + """ + self.send_addColumnFamily(tableName, column) + self.recv_addColumnFamily() + + def send_addColumnFamily(self, tableName, column): + self._oprot.writeMessageBegin('addColumnFamily', TMessageType.CALL, self._seqid) + args = addColumnFamily_args() + args.tableName = tableName + args.column = column + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_addColumnFamily(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = addColumnFamily_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteColumnFamily(self, tableName, column): + """ + Delete a column family from a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to delete column family from + - column: name of column family to be deleted + + """ + self.send_deleteColumnFamily(tableName, column) + self.recv_deleteColumnFamily() + + def send_deleteColumnFamily(self, tableName, column): + self._oprot.writeMessageBegin('deleteColumnFamily', TMessageType.CALL, self._seqid) + args = deleteColumnFamily_args() + args.tableName = tableName + args.column = column + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteColumnFamily(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteColumnFamily_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def modifyColumnFamily(self, tableName, column): + """ + Modify an existing column family on a table. Synchronous operation. + + + Parameters: + - tableName: the tablename to modify column family + - column: column family descriptor of column family to be modified + + """ + self.send_modifyColumnFamily(tableName, column) + self.recv_modifyColumnFamily() + + def send_modifyColumnFamily(self, tableName, column): + self._oprot.writeMessageBegin('modifyColumnFamily', TMessageType.CALL, self._seqid) + args = modifyColumnFamily_args() + args.tableName = tableName + args.column = column + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_modifyColumnFamily(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = modifyColumnFamily_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def modifyTable(self, desc): + """ + Modify an existing table + + + Parameters: + - desc: the descriptor of the table to modify + + """ + self.send_modifyTable(desc) + self.recv_modifyTable() + + def send_modifyTable(self, desc): + self._oprot.writeMessageBegin('modifyTable', TMessageType.CALL, self._seqid) + args = modifyTable_args() + args.desc = desc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_modifyTable(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = modifyTable_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def createNamespace(self, namespaceDesc): + """ + Create a new namespace. Blocks until namespace has been successfully created or an exception is + thrown + + + Parameters: + - namespaceDesc: descriptor which describes the new namespace + + """ + self.send_createNamespace(namespaceDesc) + self.recv_createNamespace() + + def send_createNamespace(self, namespaceDesc): + self._oprot.writeMessageBegin('createNamespace', TMessageType.CALL, self._seqid) + args = createNamespace_args() + args.namespaceDesc = namespaceDesc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_createNamespace(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = createNamespace_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def modifyNamespace(self, namespaceDesc): + """ + Modify an existing namespace. Blocks until namespace has been successfully modified or an + exception is thrown + + + Parameters: + - namespaceDesc: descriptor which describes the new namespace + + """ + self.send_modifyNamespace(namespaceDesc) + self.recv_modifyNamespace() + + def send_modifyNamespace(self, namespaceDesc): + self._oprot.writeMessageBegin('modifyNamespace', TMessageType.CALL, self._seqid) + args = modifyNamespace_args() + args.namespaceDesc = namespaceDesc + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_modifyNamespace(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = modifyNamespace_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteNamespace(self, name): + """ + Delete an existing namespace. Only empty namespaces (no tables) can be removed. + Blocks until namespace has been successfully deleted or an + exception is thrown. + + + Parameters: + - name: namespace name + + """ + self.send_deleteNamespace(name) + self.recv_deleteNamespace() + + def send_deleteNamespace(self, name): + self._oprot.writeMessageBegin('deleteNamespace', TMessageType.CALL, self._seqid) + args = deleteNamespace_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteNamespace(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = deleteNamespace_result() + result.read(iprot) + iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def getNamespaceDescriptor(self, name): + """ + Get a namespace descriptor by name. + @retrun the descriptor + + + Parameters: + - name: name of namespace descriptor + + """ + self.send_getNamespaceDescriptor(name) + return self.recv_getNamespaceDescriptor() + + def send_getNamespaceDescriptor(self, name): + self._oprot.writeMessageBegin('getNamespaceDescriptor', TMessageType.CALL, self._seqid) + args = getNamespaceDescriptor_args() + args.name = name + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getNamespaceDescriptor(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getNamespaceDescriptor_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getNamespaceDescriptor failed: unknown result") + + def listNamespaceDescriptors(self): + """ + @return all namespaces + + + """ + self.send_listNamespaceDescriptors() + return self.recv_listNamespaceDescriptors() + + def send_listNamespaceDescriptors(self): + self._oprot.writeMessageBegin('listNamespaceDescriptors', TMessageType.CALL, self._seqid) + args = listNamespaceDescriptors_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_listNamespaceDescriptors(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = listNamespaceDescriptors_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "listNamespaceDescriptors failed: unknown result") + + def listNamespaces(self): + """ + @return all namespace names + + + """ + self.send_listNamespaces() + return self.recv_listNamespaces() + + def send_listNamespaces(self): + self._oprot.writeMessageBegin('listNamespaces', TMessageType.CALL, self._seqid) + args = listNamespaces_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_listNamespaces(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = listNamespaces_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "listNamespaces failed: unknown result") + + def getThriftServerType(self): + """ + Get the type of this thrift server. + + @return the type of this thrift server + + """ + self.send_getThriftServerType() + return self.recv_getThriftServerType() + + def send_getThriftServerType(self): + self._oprot.writeMessageBegin('getThriftServerType', TMessageType.CALL, self._seqid) + args = getThriftServerType_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getThriftServerType(self): + iprot = self._iprot + (fname, mtype, rseqid) = iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(iprot) + iprot.readMessageEnd() + raise x + result = getThriftServerType_result() + result.read(iprot) + iprot.readMessageEnd() + if result.success is not None: + return result.success + raise TApplicationException(TApplicationException.MISSING_RESULT, "getThriftServerType failed: unknown result") + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["exists"] = Processor.process_exists + self._processMap["existsAll"] = Processor.process_existsAll + self._processMap["get"] = Processor.process_get + self._processMap["getMultiple"] = Processor.process_getMultiple + self._processMap["put"] = Processor.process_put + self._processMap["checkAndPut"] = Processor.process_checkAndPut + self._processMap["putMultiple"] = Processor.process_putMultiple + self._processMap["deleteSingle"] = Processor.process_deleteSingle + self._processMap["deleteMultiple"] = Processor.process_deleteMultiple + self._processMap["checkAndDelete"] = Processor.process_checkAndDelete + self._processMap["increment"] = Processor.process_increment + self._processMap["append"] = Processor.process_append + self._processMap["openScanner"] = Processor.process_openScanner + self._processMap["getScannerRows"] = Processor.process_getScannerRows + self._processMap["closeScanner"] = Processor.process_closeScanner + self._processMap["mutateRow"] = Processor.process_mutateRow + self._processMap["getScannerResults"] = Processor.process_getScannerResults + self._processMap["getRegionLocation"] = Processor.process_getRegionLocation + self._processMap["getAllRegionLocations"] = Processor.process_getAllRegionLocations + self._processMap["checkAndMutate"] = Processor.process_checkAndMutate + self._processMap["getTableDescriptor"] = Processor.process_getTableDescriptor + self._processMap["getTableDescriptors"] = Processor.process_getTableDescriptors + self._processMap["tableExists"] = Processor.process_tableExists + self._processMap["getTableDescriptorsByPattern"] = Processor.process_getTableDescriptorsByPattern + self._processMap["getTableDescriptorsByNamespace"] = Processor.process_getTableDescriptorsByNamespace + self._processMap["getTableNamesByPattern"] = Processor.process_getTableNamesByPattern + self._processMap["getTableNamesByNamespace"] = Processor.process_getTableNamesByNamespace + self._processMap["createTable"] = Processor.process_createTable + self._processMap["deleteTable"] = Processor.process_deleteTable + self._processMap["truncateTable"] = Processor.process_truncateTable + self._processMap["enableTable"] = Processor.process_enableTable + self._processMap["disableTable"] = Processor.process_disableTable + self._processMap["isTableEnabled"] = Processor.process_isTableEnabled + self._processMap["isTableDisabled"] = Processor.process_isTableDisabled + self._processMap["isTableAvailable"] = Processor.process_isTableAvailable + self._processMap["isTableAvailableWithSplit"] = Processor.process_isTableAvailableWithSplit + self._processMap["addColumnFamily"] = Processor.process_addColumnFamily + self._processMap["deleteColumnFamily"] = Processor.process_deleteColumnFamily + self._processMap["modifyColumnFamily"] = Processor.process_modifyColumnFamily + self._processMap["modifyTable"] = Processor.process_modifyTable + self._processMap["createNamespace"] = Processor.process_createNamespace + self._processMap["modifyNamespace"] = Processor.process_modifyNamespace + self._processMap["deleteNamespace"] = Processor.process_deleteNamespace + self._processMap["getNamespaceDescriptor"] = Processor.process_getNamespaceDescriptor + self._processMap["listNamespaceDescriptors"] = Processor.process_listNamespaceDescriptors + self._processMap["listNamespaces"] = Processor.process_listNamespaces + self._processMap["getThriftServerType"] = Processor.process_getThriftServerType + + 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_exists(self, seqid, iprot, oprot): + args = exists_args() + args.read(iprot) + iprot.readMessageEnd() + result = exists_result() + try: + result.success = self._handler.exists(args.table, args.tget) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("exists", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_existsAll(self, seqid, iprot, oprot): + args = existsAll_args() + args.read(iprot) + iprot.readMessageEnd() + result = existsAll_result() + try: + result.success = self._handler.existsAll(args.table, args.tgets) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("existsAll", msg_type, 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.table, args.tget) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("get", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getMultiple(self, seqid, iprot, oprot): + args = getMultiple_args() + args.read(iprot) + iprot.readMessageEnd() + result = getMultiple_result() + try: + result.success = self._handler.getMultiple(args.table, args.tgets) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getMultiple", msg_type, 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.table, args.tput) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("put", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkAndPut(self, seqid, iprot, oprot): + args = checkAndPut_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkAndPut_result() + try: + result.success = self._handler.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("checkAndPut", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_putMultiple(self, seqid, iprot, oprot): + args = putMultiple_args() + args.read(iprot) + iprot.readMessageEnd() + result = putMultiple_result() + try: + self._handler.putMultiple(args.table, args.tputs) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("putMultiple", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteSingle(self, seqid, iprot, oprot): + args = deleteSingle_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteSingle_result() + try: + self._handler.deleteSingle(args.table, args.tdelete) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteSingle", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteMultiple(self, seqid, iprot, oprot): + args = deleteMultiple_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteMultiple_result() + try: + result.success = self._handler.deleteMultiple(args.table, args.tdeletes) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteMultiple", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkAndDelete(self, seqid, iprot, oprot): + args = checkAndDelete_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkAndDelete_result() + try: + result.success = self._handler.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("checkAndDelete", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_increment(self, seqid, iprot, oprot): + args = increment_args() + args.read(iprot) + iprot.readMessageEnd() + result = increment_result() + try: + result.success = self._handler.increment(args.table, args.tincrement) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("increment", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_append(self, seqid, iprot, oprot): + args = append_args() + args.read(iprot) + iprot.readMessageEnd() + result = append_result() + try: + result.success = self._handler.append(args.table, args.tappend) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("append", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_openScanner(self, seqid, iprot, oprot): + args = openScanner_args() + args.read(iprot) + iprot.readMessageEnd() + result = openScanner_result() + try: + result.success = self._handler.openScanner(args.table, args.tscan) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("openScanner", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getScannerRows(self, seqid, iprot, oprot): + args = getScannerRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = getScannerRows_result() + try: + result.success = self._handler.getScannerRows(args.scannerId, args.numRows) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TIllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getScannerRows", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_closeScanner(self, seqid, iprot, oprot): + args = closeScanner_args() + args.read(iprot) + iprot.readMessageEnd() + result = closeScanner_result() + try: + self._handler.closeScanner(args.scannerId) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TIllegalArgument as ia: + msg_type = TMessageType.REPLY + result.ia = ia + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("closeScanner", msg_type, 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.table, args.trowMutations) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("mutateRow", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getScannerResults(self, seqid, iprot, oprot): + args = getScannerResults_args() + args.read(iprot) + iprot.readMessageEnd() + result = getScannerResults_result() + try: + result.success = self._handler.getScannerResults(args.table, args.tscan, args.numRows) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getScannerResults", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRegionLocation(self, seqid, iprot, oprot): + args = getRegionLocation_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRegionLocation_result() + try: + result.success = self._handler.getRegionLocation(args.table, args.row, args.reload) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getRegionLocation", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getAllRegionLocations(self, seqid, iprot, oprot): + args = getAllRegionLocations_args() + args.read(iprot) + iprot.readMessageEnd() + result = getAllRegionLocations_result() + try: + result.success = self._handler.getAllRegionLocations(args.table) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getAllRegionLocations", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_checkAndMutate(self, seqid, iprot, oprot): + args = checkAndMutate_args() + args.read(iprot) + iprot.readMessageEnd() + result = checkAndMutate_result() + try: + result.success = self._handler.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOperator, args.value, args.rowMutations) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("checkAndMutate", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableDescriptor(self, seqid, iprot, oprot): + args = getTableDescriptor_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableDescriptor_result() + try: + result.success = self._handler.getTableDescriptor(args.table) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableDescriptor", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableDescriptors(self, seqid, iprot, oprot): + args = getTableDescriptors_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableDescriptors_result() + try: + result.success = self._handler.getTableDescriptors(args.tables) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableDescriptors", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_tableExists(self, seqid, iprot, oprot): + args = tableExists_args() + args.read(iprot) + iprot.readMessageEnd() + result = tableExists_result() + try: + result.success = self._handler.tableExists(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("tableExists", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableDescriptorsByPattern(self, seqid, iprot, oprot): + args = getTableDescriptorsByPattern_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableDescriptorsByPattern_result() + try: + result.success = self._handler.getTableDescriptorsByPattern(args.regex, args.includeSysTables) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableDescriptorsByPattern", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableDescriptorsByNamespace(self, seqid, iprot, oprot): + args = getTableDescriptorsByNamespace_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableDescriptorsByNamespace_result() + try: + result.success = self._handler.getTableDescriptorsByNamespace(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableDescriptorsByNamespace", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableNamesByPattern(self, seqid, iprot, oprot): + args = getTableNamesByPattern_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableNamesByPattern_result() + try: + result.success = self._handler.getTableNamesByPattern(args.regex, args.includeSysTables) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableNamesByPattern", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableNamesByNamespace(self, seqid, iprot, oprot): + args = getTableNamesByNamespace_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableNamesByNamespace_result() + try: + result.success = self._handler.getTableNamesByNamespace(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getTableNamesByNamespace", msg_type, 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.desc, args.splitKeys) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("createTable", msg_type, 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) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_truncateTable(self, seqid, iprot, oprot): + args = truncateTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = truncateTable_result() + try: + self._handler.truncateTable(args.tableName, args.preserveSplits) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("truncateTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_enableTable(self, seqid, iprot, oprot): + args = enableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = enableTable_result() + try: + self._handler.enableTable(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("enableTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_disableTable(self, seqid, iprot, oprot): + args = disableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = disableTable_result() + try: + self._handler.disableTable(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("disableTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableEnabled(self, seqid, iprot, oprot): + args = isTableEnabled_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableEnabled_result() + try: + result.success = self._handler.isTableEnabled(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isTableEnabled", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableDisabled(self, seqid, iprot, oprot): + args = isTableDisabled_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableDisabled_result() + try: + result.success = self._handler.isTableDisabled(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isTableDisabled", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableAvailable(self, seqid, iprot, oprot): + args = isTableAvailable_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableAvailable_result() + try: + result.success = self._handler.isTableAvailable(args.tableName) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isTableAvailable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableAvailableWithSplit(self, seqid, iprot, oprot): + args = isTableAvailableWithSplit_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableAvailableWithSplit_result() + try: + result.success = self._handler.isTableAvailableWithSplit(args.tableName, args.splitKeys) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("isTableAvailableWithSplit", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_addColumnFamily(self, seqid, iprot, oprot): + args = addColumnFamily_args() + args.read(iprot) + iprot.readMessageEnd() + result = addColumnFamily_result() + try: + self._handler.addColumnFamily(args.tableName, args.column) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("addColumnFamily", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteColumnFamily(self, seqid, iprot, oprot): + args = deleteColumnFamily_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteColumnFamily_result() + try: + self._handler.deleteColumnFamily(args.tableName, args.column) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteColumnFamily", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_modifyColumnFamily(self, seqid, iprot, oprot): + args = modifyColumnFamily_args() + args.read(iprot) + iprot.readMessageEnd() + result = modifyColumnFamily_result() + try: + self._handler.modifyColumnFamily(args.tableName, args.column) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("modifyColumnFamily", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_modifyTable(self, seqid, iprot, oprot): + args = modifyTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = modifyTable_result() + try: + self._handler.modifyTable(args.desc) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("modifyTable", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_createNamespace(self, seqid, iprot, oprot): + args = createNamespace_args() + args.read(iprot) + iprot.readMessageEnd() + result = createNamespace_result() + try: + self._handler.createNamespace(args.namespaceDesc) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("createNamespace", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_modifyNamespace(self, seqid, iprot, oprot): + args = modifyNamespace_args() + args.read(iprot) + iprot.readMessageEnd() + result = modifyNamespace_result() + try: + self._handler.modifyNamespace(args.namespaceDesc) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("modifyNamespace", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteNamespace(self, seqid, iprot, oprot): + args = deleteNamespace_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteNamespace_result() + try: + self._handler.deleteNamespace(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("deleteNamespace", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getNamespaceDescriptor(self, seqid, iprot, oprot): + args = getNamespaceDescriptor_args() + args.read(iprot) + iprot.readMessageEnd() + result = getNamespaceDescriptor_result() + try: + result.success = self._handler.getNamespaceDescriptor(args.name) + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getNamespaceDescriptor", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_listNamespaceDescriptors(self, seqid, iprot, oprot): + args = listNamespaceDescriptors_args() + args.read(iprot) + iprot.readMessageEnd() + result = listNamespaceDescriptors_result() + try: + result.success = self._handler.listNamespaceDescriptors() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("listNamespaceDescriptors", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_listNamespaces(self, seqid, iprot, oprot): + args = listNamespaces_args() + args.read(iprot) + iprot.readMessageEnd() + result = listNamespaces_result() + try: + result.success = self._handler.listNamespaces() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TIOError as io: + msg_type = TMessageType.REPLY + result.io = io + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("listNamespaces", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getThriftServerType(self, seqid, iprot, oprot): + args = getThriftServerType_args() + args.read(iprot) + iprot.readMessageEnd() + result = getThriftServerType_result() + try: + result.success = self._handler.getThriftServerType() + msg_type = TMessageType.REPLY + except TTransport.TTransportException: + raise + except TApplicationException as ex: + logging.exception('TApplication exception in handler') + msg_type = TMessageType.EXCEPTION + result = ex + except Exception: + logging.exception('Unexpected exception in handler') + msg_type = TMessageType.EXCEPTION + result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') + oprot.writeMessageBegin("getThriftServerType", msg_type, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + +# HELPER FUNCTIONS AND STRUCTURES + + +class exists_args(object): """ - Test for the existence of columns in the table, as specified in the TGet. - - @return true if the specified TGet matches one or more keys, false if not - - Parameters: + Attributes: - table: the table to check on - tget: the TGet to check for + """ - self.send_exists(table, tget) - return self.recv_exists() - def send_exists(self, table, tget): - self._oprot.writeMessageBegin('exists', TMessageType.CALL, self._seqid) - args = exists_args() - args.table = table - args.tget = tget - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_exists(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = exists_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "exists failed: unknown result") + def __init__(self, table=None, tget=None,): + self.table = table + self.tget = tget - def existsAll(self, table, tgets): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tget = TGet() + self.tget.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('exists_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tget is not None: + oprot.writeFieldBegin('tget', TType.STRUCT, 2) + self.tget.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tget is None: + raise TProtocolException(message='Required field tget is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(exists_args) +exists_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tget', [TGet, None], None, ), # 2 +) + + +class exists_result(object): """ - Test for the existence of columns in the table, as specified by the TGets. + Attributes: + - success + - io - This will return an array of booleans. Each value will be true if the related Get matches - one or more keys, false if not. + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('exists_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(exists_result) +exists_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class existsAll_args(object): + """ + Attributes: - table: the table to check on - tgets: a list of TGets to check for + """ - self.send_existsAll(table, tgets) - return self.recv_existsAll() - def send_existsAll(self, table, tgets): - self._oprot.writeMessageBegin('existsAll', TMessageType.CALL, self._seqid) - args = existsAll_args() - args.table = table - args.tgets = tgets - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_existsAll(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = existsAll_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "existsAll failed: unknown result") + def __init__(self, table=None, tgets=None,): + self.table = table + self.tgets = tgets - def get(self, table, tget): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tgets = [] + (_etype172, _size169) = iprot.readListBegin() + for _i173 in range(_size169): + _elem174 = TGet() + _elem174.read(iprot) + self.tgets.append(_elem174) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('existsAll_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tgets is not None: + oprot.writeFieldBegin('tgets', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.tgets)) + for iter175 in self.tgets: + iter175.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tgets is None: + raise TProtocolException(message='Required field tgets is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(existsAll_args) +existsAll_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.LIST, 'tgets', (TType.STRUCT, [TGet, None], False), None, ), # 2 +) + + +class existsAll_result(object): """ - Method for getting data from a row. + Attributes: + - success + - io - If the row cannot be found an empty Result is returned. - This can be checked by the empty field of the TResult + """ - @return the result - Parameters: + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype179, _size176) = iprot.readListBegin() + for _i180 in range(_size176): + _elem181 = iprot.readBool() + self.success.append(_elem181) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('existsAll_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.BOOL, len(self.success)) + for iter182 in self.success: + oprot.writeBool(iter182) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(existsAll_result) +existsAll_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.BOOL, None, False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class get_args(object): + """ + Attributes: - table: the table to get from - tget: the TGet to fetch + """ - self.send_get(table, tget) - return self.recv_get() - def send_get(self, table, tget): - self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) - args = get_args() - args.table = table - args.tget = tget - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_get(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = get_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result") + def __init__(self, table=None, tget=None,): + self.table = table + self.tget = tget - def getMultiple(self, table, tgets): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tget = TGet() + self.tget.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tget is not None: + oprot.writeFieldBegin('tget', TType.STRUCT, 2) + self.tget.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tget is None: + raise TProtocolException(message='Required field tget is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_args) +get_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tget', [TGet, None], None, ), # 2 +) + + +class get_result(object): """ - Method for getting multiple rows. + Attributes: + - success + - io - If a row cannot be found there will be a null - value in the result list for that TGet at the - same position. + """ - So the Results are in the same order as the TGets. - Parameters: + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(get_result) +get_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TResult, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getMultiple_args(object): + """ + Attributes: - table: the table to get from - tgets: a list of TGets to fetch, the Result list will have the Results at corresponding positions or null if there was an error + """ - self.send_getMultiple(table, tgets) - return self.recv_getMultiple() - def send_getMultiple(self, table, tgets): - self._oprot.writeMessageBegin('getMultiple', TMessageType.CALL, self._seqid) - args = getMultiple_args() - args.table = table - args.tgets = tgets - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getMultiple(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getMultiple_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getMultiple failed: unknown result") + def __init__(self, table=None, tgets=None,): + self.table = table + self.tgets = tgets - def put(self, table, tput): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tgets = [] + (_etype186, _size183) = iprot.readListBegin() + for _i187 in range(_size183): + _elem188 = TGet() + _elem188.read(iprot) + self.tgets.append(_elem188) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getMultiple_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tgets is not None: + oprot.writeFieldBegin('tgets', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.tgets)) + for iter189 in self.tgets: + iter189.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tgets is None: + raise TProtocolException(message='Required field tgets is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getMultiple_args) +getMultiple_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.LIST, 'tgets', (TType.STRUCT, [TGet, None], False), None, ), # 2 +) + + +class getMultiple_result(object): """ - Commit a TPut to a table. + Attributes: + - success + - io - Parameters: + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype193, _size190) = iprot.readListBegin() + for _i194 in range(_size190): + _elem195 = TResult() + _elem195.read(iprot) + self.success.append(_elem195) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getMultiple_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter196 in self.success: + iter196.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getMultiple_result) +getMultiple_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class put_args(object): + """ + Attributes: - table: the table to put data in - tput: the TPut to put + """ - self.send_put(table, tput) - self.recv_put() - def send_put(self, table, tput): - self._oprot.writeMessageBegin('put', TMessageType.CALL, self._seqid) - args = put_args() - args.table = table - args.tput = tput - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_put(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = put_result() - result.read(iprot) - iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, table=None, tput=None,): + self.table = table + self.tput = tput - def checkAndPut(self, table, row, family, qualifier, value, tput): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tput = TPut() + self.tput.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('put_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tput is not None: + oprot.writeFieldBegin('tput', TType.STRUCT, 2) + self.tput.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tput is None: + raise TProtocolException(message='Required field tput is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(put_args) +put_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tput', [TPut, None], None, ), # 2 +) + + +class put_result(object): """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it adds the TPut. + Attributes: + - io - @return true if the new put was executed, false otherwise + """ - Parameters: + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('put_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(put_result) +put_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class checkAndPut_args(object): + """ + Attributes: - table: to check in and put to - row: row to check - family: column family to check @@ -506,162 +4560,669 @@ class Client(Iface): check is for the non-existence of the column in question - tput: the TPut to put if the check succeeds + """ - self.send_checkAndPut(table, row, family, qualifier, value, tput) - return self.recv_checkAndPut() - def send_checkAndPut(self, table, row, family, qualifier, value, tput): - self._oprot.writeMessageBegin('checkAndPut', TMessageType.CALL, self._seqid) - args = checkAndPut_args() - args.table = table - args.row = row - args.family = family - args.qualifier = qualifier - args.value = value - args.tput = tput - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_checkAndPut(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = checkAndPut_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndPut failed: unknown result") + def __init__(self, table=None, row=None, family=None, qualifier=None, value=None, tput=None,): + self.table = table + self.row = row + self.family = family + self.qualifier = qualifier + self.value = value + self.tput = tput - def putMultiple(self, table, tputs): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.tput = TPut() + self.tput.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndPut_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 3) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 4) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 5) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.tput is not None: + oprot.writeFieldBegin('tput', TType.STRUCT, 6) + self.tput.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + if self.tput is None: + raise TProtocolException(message='Required field tput is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndPut_args) +checkAndPut_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'family', 'BINARY', None, ), # 3 + (4, TType.STRING, 'qualifier', 'BINARY', None, ), # 4 + (5, TType.STRING, 'value', 'BINARY', None, ), # 5 + (6, TType.STRUCT, 'tput', [TPut, None], None, ), # 6 +) + + +class checkAndPut_result(object): """ - Commit a List of Puts to the table. + Attributes: + - success + - io - Parameters: + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndPut_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndPut_result) +checkAndPut_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class putMultiple_args(object): + """ + Attributes: - table: the table to put data in - tputs: a list of TPuts to commit + """ - self.send_putMultiple(table, tputs) - self.recv_putMultiple() - def send_putMultiple(self, table, tputs): - self._oprot.writeMessageBegin('putMultiple', TMessageType.CALL, self._seqid) - args = putMultiple_args() - args.table = table - args.tputs = tputs - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_putMultiple(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = putMultiple_result() - result.read(iprot) - iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, table=None, tputs=None,): + self.table = table + self.tputs = tputs - def deleteSingle(self, table, tdelete): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tputs = [] + (_etype200, _size197) = iprot.readListBegin() + for _i201 in range(_size197): + _elem202 = TPut() + _elem202.read(iprot) + self.tputs.append(_elem202) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('putMultiple_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tputs is not None: + oprot.writeFieldBegin('tputs', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.tputs)) + for iter203 in self.tputs: + iter203.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tputs is None: + raise TProtocolException(message='Required field tputs is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(putMultiple_args) +putMultiple_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.LIST, 'tputs', (TType.STRUCT, [TPut, None], False), None, ), # 2 +) + + +class putMultiple_result(object): """ - Deletes as specified by the TDelete. + Attributes: + - io - Note: "delete" is a reserved keyword and cannot be used in Thrift - thus the inconsistent naming scheme from the other functions. + """ - Parameters: + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('putMultiple_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(putMultiple_result) +putMultiple_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class deleteSingle_args(object): + """ + Attributes: - table: the table to delete from - tdelete: the TDelete to delete + """ - self.send_deleteSingle(table, tdelete) - self.recv_deleteSingle() - def send_deleteSingle(self, table, tdelete): - self._oprot.writeMessageBegin('deleteSingle', TMessageType.CALL, self._seqid) - args = deleteSingle_args() - args.table = table - args.tdelete = tdelete - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_deleteSingle(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = deleteSingle_result() - result.read(iprot) - iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, table=None, tdelete=None,): + self.table = table + self.tdelete = tdelete - def deleteMultiple(self, table, tdeletes): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tdelete = TDelete() + self.tdelete.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteSingle_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tdelete is not None: + oprot.writeFieldBegin('tdelete', TType.STRUCT, 2) + self.tdelete.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tdelete is None: + raise TProtocolException(message='Required field tdelete is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteSingle_args) +deleteSingle_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tdelete', [TDelete, None], None, ), # 2 +) + + +class deleteSingle_result(object): """ - Bulk commit a List of TDeletes to the table. + Attributes: + - io - Throws a TIOError if any of the deletes fail. + """ - Always returns an empty list for backwards compatibility. - Parameters: + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteSingle_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteSingle_result) +deleteSingle_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class deleteMultiple_args(object): + """ + Attributes: - table: the table to delete from - tdeletes: list of TDeletes to delete + """ - self.send_deleteMultiple(table, tdeletes) - return self.recv_deleteMultiple() - def send_deleteMultiple(self, table, tdeletes): - self._oprot.writeMessageBegin('deleteMultiple', TMessageType.CALL, self._seqid) - args = deleteMultiple_args() - args.table = table - args.tdeletes = tdeletes - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_deleteMultiple(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = deleteMultiple_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "deleteMultiple failed: unknown result") + def __init__(self, table=None, tdeletes=None,): + self.table = table + self.tdeletes = tdeletes - def checkAndDelete(self, table, row, family, qualifier, value, tdelete): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.tdeletes = [] + (_etype207, _size204) = iprot.readListBegin() + for _i208 in range(_size204): + _elem209 = TDelete() + _elem209.read(iprot) + self.tdeletes.append(_elem209) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteMultiple_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tdeletes is not None: + oprot.writeFieldBegin('tdeletes', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.tdeletes)) + for iter210 in self.tdeletes: + iter210.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tdeletes is None: + raise TProtocolException(message='Required field tdeletes is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteMultiple_args) +deleteMultiple_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.LIST, 'tdeletes', (TType.STRUCT, [TDelete, None], False), None, ), # 2 +) + + +class deleteMultiple_result(object): """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it adds the delete. + Attributes: + - success + - io - @return true if the new delete was executed, false otherwise + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype214, _size211) = iprot.readListBegin() + for _i215 in range(_size211): + _elem216 = TDelete() + _elem216.read(iprot) + self.success.append(_elem216) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteMultiple_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter217 in self.success: + iter217.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteMultiple_result) +deleteMultiple_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TDelete, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class checkAndDelete_args(object): + """ + Attributes: - table: to check in and delete from - row: row to check - family: column family to check @@ -670,4383 +5231,5553 @@ class Client(Iface): check is for the non-existence of the column in question - tdelete: the TDelete to execute if the check succeeds + """ - self.send_checkAndDelete(table, row, family, qualifier, value, tdelete) - return self.recv_checkAndDelete() - def send_checkAndDelete(self, table, row, family, qualifier, value, tdelete): - self._oprot.writeMessageBegin('checkAndDelete', TMessageType.CALL, self._seqid) - args = checkAndDelete_args() - args.table = table - args.row = row - args.family = family - args.qualifier = qualifier - args.value = value - args.tdelete = tdelete - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_checkAndDelete(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = checkAndDelete_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndDelete failed: unknown result") + def __init__(self, table=None, row=None, family=None, qualifier=None, value=None, tdelete=None,): + self.table = table + self.row = row + self.family = family + self.qualifier = qualifier + self.value = value + self.tdelete = tdelete - def increment(self, table, tincrement): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.tdelete = TDelete() + self.tdelete.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndDelete_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 3) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 4) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 5) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.tdelete is not None: + oprot.writeFieldBegin('tdelete', TType.STRUCT, 6) + self.tdelete.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + if self.tdelete is None: + raise TProtocolException(message='Required field tdelete is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndDelete_args) +checkAndDelete_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'family', 'BINARY', None, ), # 3 + (4, TType.STRING, 'qualifier', 'BINARY', None, ), # 4 + (5, TType.STRING, 'value', 'BINARY', None, ), # 5 + (6, TType.STRUCT, 'tdelete', [TDelete, None], None, ), # 6 +) + + +class checkAndDelete_result(object): """ - Parameters: + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndDelete_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndDelete_result) +checkAndDelete_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class increment_args(object): + """ + Attributes: - table: the table to increment the value on - tincrement: the TIncrement to increment + """ - self.send_increment(table, tincrement) - return self.recv_increment() - def send_increment(self, table, tincrement): - self._oprot.writeMessageBegin('increment', TMessageType.CALL, self._seqid) - args = increment_args() - args.table = table - args.tincrement = tincrement - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_increment(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = increment_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "increment failed: unknown result") + def __init__(self, table=None, tincrement=None,): + self.table = table + self.tincrement = tincrement - def append(self, table, tappend): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tincrement = TIncrement() + self.tincrement.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('increment_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tincrement is not None: + oprot.writeFieldBegin('tincrement', TType.STRUCT, 2) + self.tincrement.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tincrement is None: + raise TProtocolException(message='Required field tincrement is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(increment_args) +increment_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tincrement', [TIncrement, None], None, ), # 2 +) + + +class increment_result(object): """ - Parameters: + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('increment_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(increment_result) +increment_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TResult, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class append_args(object): + """ + Attributes: - table: the table to append the value on - tappend: the TAppend to append + """ - self.send_append(table, tappend) - return self.recv_append() - def send_append(self, table, tappend): - self._oprot.writeMessageBegin('append', TMessageType.CALL, self._seqid) - args = append_args() - args.table = table - args.tappend = tappend - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_append(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = append_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "append failed: unknown result") + def __init__(self, table=None, tappend=None,): + self.table = table + self.tappend = tappend - def openScanner(self, table, tscan): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tappend = TAppend() + self.tappend.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('append_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tappend is not None: + oprot.writeFieldBegin('tappend', TType.STRUCT, 2) + self.tappend.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tappend is None: + raise TProtocolException(message='Required field tappend is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(append_args) +append_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tappend', [TAppend, None], None, ), # 2 +) + + +class append_result(object): """ - Get a Scanner for the provided TScan object. + Attributes: + - success + - io - @return Scanner Id to be used with other scanner procedures + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TResult() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('append_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(append_result) +append_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TResult, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class openScanner_args(object): + """ + Attributes: - table: the table to get the Scanner for - tscan: the scan object to get a Scanner for + """ - self.send_openScanner(table, tscan) - return self.recv_openScanner() - def send_openScanner(self, table, tscan): - self._oprot.writeMessageBegin('openScanner', TMessageType.CALL, self._seqid) - args = openScanner_args() - args.table = table - args.tscan = tscan - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_openScanner(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = openScanner_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "openScanner failed: unknown result") + def __init__(self, table=None, tscan=None,): + self.table = table + self.tscan = tscan - def getScannerRows(self, scannerId, numRows): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tscan = TScan() + self.tscan.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('openScanner_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tscan is not None: + oprot.writeFieldBegin('tscan', TType.STRUCT, 2) + self.tscan.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tscan is None: + raise TProtocolException(message='Required field tscan is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(openScanner_args) +openScanner_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tscan', [TScan, None], None, ), # 2 +) + + +class openScanner_result(object): """ - Grabs multiple rows from a Scanner. + Attributes: + - success + - io - @return Between zero and numRows TResults + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('openScanner_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(openScanner_result) +openScanner_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getScannerRows_args(object): + """ + Attributes: - scannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - numRows: number of rows to return + """ - self.send_getScannerRows(scannerId, numRows) - return self.recv_getScannerRows() - def send_getScannerRows(self, scannerId, numRows): - self._oprot.writeMessageBegin('getScannerRows', TMessageType.CALL, self._seqid) - args = getScannerRows_args() - args.scannerId = scannerId - args.numRows = numRows - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getScannerRows(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getScannerRows_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - if result.ia is not None: - raise result.ia - raise TApplicationException(TApplicationException.MISSING_RESULT, "getScannerRows failed: unknown result") + def __init__(self, scannerId=None, numRows=1,): + self.scannerId = scannerId + self.numRows = numRows - def closeScanner(self, scannerId): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.scannerId = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.numRows = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getScannerRows_args') + if self.scannerId is not None: + oprot.writeFieldBegin('scannerId', TType.I32, 1) + oprot.writeI32(self.scannerId) + oprot.writeFieldEnd() + if self.numRows is not None: + oprot.writeFieldBegin('numRows', TType.I32, 2) + oprot.writeI32(self.numRows) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scannerId is None: + raise TProtocolException(message='Required field scannerId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getScannerRows_args) +getScannerRows_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'scannerId', None, None, ), # 1 + (2, TType.I32, 'numRows', None, 1, ), # 2 +) + + +class getScannerRows_result(object): """ - Closes the scanner. Should be called to free server side resources timely. - Typically close once the scanner is not needed anymore, i.e. after looping - over it to get all the required rows. + Attributes: + - success + - io + - ia: if the scannerId is invalid - Parameters: + """ + + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype221, _size218) = iprot.readListBegin() + for _i222 in range(_size218): + _elem223 = TResult() + _elem223.read(iprot) + self.success.append(_elem223) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = TIllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getScannerRows_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter224 in self.success: + iter224.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getScannerRows_result) +getScannerRows_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [TIllegalArgument, None], None, ), # 2 +) + + +class closeScanner_args(object): + """ + Attributes: - scannerId: the Id of the Scanner to close * + """ - self.send_closeScanner(scannerId) - self.recv_closeScanner() - def send_closeScanner(self, scannerId): - self._oprot.writeMessageBegin('closeScanner', TMessageType.CALL, self._seqid) - args = closeScanner_args() - args.scannerId = scannerId - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_closeScanner(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = closeScanner_result() - result.read(iprot) - iprot.readMessageEnd() - if result.io is not None: - raise result.io - if result.ia is not None: - raise result.ia - return + def __init__(self, scannerId=None,): + self.scannerId = scannerId - def mutateRow(self, table, trowMutations): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.scannerId = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('closeScanner_args') + if self.scannerId is not None: + oprot.writeFieldBegin('scannerId', TType.I32, 1) + oprot.writeI32(self.scannerId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.scannerId is None: + raise TProtocolException(message='Required field scannerId is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(closeScanner_args) +closeScanner_args.thrift_spec = ( + None, # 0 + (1, TType.I32, 'scannerId', None, None, ), # 1 +) + + +class closeScanner_result(object): """ - mutateRow performs multiple mutations atomically on a single row. + Attributes: + - io + - ia: if the scannerId is invalid - Parameters: + """ + + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = TIllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('closeScanner_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(closeScanner_result) +closeScanner_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 + (2, TType.STRUCT, 'ia', [TIllegalArgument, None], None, ), # 2 +) + + +class mutateRow_args(object): + """ + Attributes: - table: table to apply the mutations - trowMutations: mutations to apply + """ - self.send_mutateRow(table, trowMutations) - self.recv_mutateRow() - def send_mutateRow(self, table, trowMutations): - self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) - args = mutateRow_args() - args.table = table - args.trowMutations = trowMutations - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_mutateRow(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = mutateRow_result() - result.read(iprot) - iprot.readMessageEnd() - if result.io is not None: - raise result.io - return + def __init__(self, table=None, trowMutations=None,): + self.table = table + self.trowMutations = trowMutations - def getScannerResults(self, table, tscan, numRows): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.trowMutations = TRowMutations() + self.trowMutations.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRow_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.trowMutations is not None: + oprot.writeFieldBegin('trowMutations', TType.STRUCT, 2) + self.trowMutations.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.trowMutations is None: + raise TProtocolException(message='Required field trowMutations is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRow_args) +mutateRow_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'trowMutations', [TRowMutations, None], None, ), # 2 +) + + +class mutateRow_result(object): """ - Get results for the provided TScan object. - This helper function opens a scanner, get the results and close the scanner. + Attributes: + - io - @return between zero and numRows TResults + """ - Parameters: + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('mutateRow_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(mutateRow_result) +mutateRow_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getScannerResults_args(object): + """ + Attributes: - table: the table to get the Scanner for - tscan: the scan object to get a Scanner for - numRows: number of rows to return + """ - self.send_getScannerResults(table, tscan, numRows) - return self.recv_getScannerResults() - def send_getScannerResults(self, table, tscan, numRows): - self._oprot.writeMessageBegin('getScannerResults', TMessageType.CALL, self._seqid) - args = getScannerResults_args() - args.table = table - args.tscan = tscan - args.numRows = numRows - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getScannerResults(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getScannerResults_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getScannerResults failed: unknown result") + def __init__(self, table=None, tscan=None, numRows=1,): + self.table = table + self.tscan = tscan + self.numRows = numRows - def getRegionLocation(self, table, row, reload): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.tscan = TScan() + self.tscan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I32: + self.numRows = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getScannerResults_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.tscan is not None: + oprot.writeFieldBegin('tscan', TType.STRUCT, 2) + self.tscan.write(oprot) + oprot.writeFieldEnd() + if self.numRows is not None: + oprot.writeFieldBegin('numRows', TType.I32, 3) + oprot.writeI32(self.numRows) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.tscan is None: + raise TProtocolException(message='Required field tscan is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getScannerResults_args) +getScannerResults_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRUCT, 'tscan', [TScan, None], None, ), # 2 + (3, TType.I32, 'numRows', None, 1, ), # 3 +) + + +class getScannerResults_result(object): """ - Given a table and a row get the location of the region that - would contain the given row key. + Attributes: + - success + - io - reload = true means the cache will be cleared and the location - will be fetched from meta. + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype228, _size225) = iprot.readListBegin() + for _i229 in range(_size225): + _elem230 = TResult() + _elem230.read(iprot) + self.success.append(_elem230) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getScannerResults_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter231 in self.success: + iter231.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getScannerResults_result) +getScannerResults_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TResult, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getRegionLocation_args(object): + """ + Attributes: - table - row - reload + """ - self.send_getRegionLocation(table, row, reload) - return self.recv_getRegionLocation() - def send_getRegionLocation(self, table, row, reload): - self._oprot.writeMessageBegin('getRegionLocation', TMessageType.CALL, self._seqid) - args = getRegionLocation_args() - args.table = table - args.row = row - args.reload = reload - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getRegionLocation(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getRegionLocation_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getRegionLocation failed: unknown result") + def __init__(self, table=None, row=None, reload=None,): + self.table = table + self.row = row + self.reload = reload + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.reload = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRegionLocation_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.reload is not None: + oprot.writeFieldBegin('reload', TType.BOOL, 3) + oprot.writeBool(self.reload) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRegionLocation_args) +getRegionLocation_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.BOOL, 'reload', None, None, ), # 3 +) + + +class getRegionLocation_result(object): + """ + Attributes: + - success + - io - def getAllRegionLocations(self, table): """ - Get all of the region locations for a given table. - Parameters: + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = THRegionLocation() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getRegionLocation_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getRegionLocation_result) +getRegionLocation_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [THRegionLocation, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getAllRegionLocations_args(object): + """ + Attributes: - table + """ - self.send_getAllRegionLocations(table) - return self.recv_getAllRegionLocations() - def send_getAllRegionLocations(self, table): - self._oprot.writeMessageBegin('getAllRegionLocations', TMessageType.CALL, self._seqid) - args = getAllRegionLocations_args() - args.table = table - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - def recv_getAllRegionLocations(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = getAllRegionLocations_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllRegionLocations failed: unknown result") + def __init__(self, table=None,): + self.table = table - def checkAndMutate(self, table, row, family, qualifier, compareOp, value, rowMutations): + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getAllRegionLocations_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getAllRegionLocations_args) +getAllRegionLocations_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 +) + + +class getAllRegionLocations_result(object): """ - Atomically checks if a row/family/qualifier value matches the expected - value. If it does, it mutates the row. + Attributes: + - success + - io - @return true if the row was mutated, false otherwise + """ - Parameters: + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype235, _size232) = iprot.readListBegin() + for _i236 in range(_size232): + _elem237 = THRegionLocation() + _elem237.read(iprot) + self.success.append(_elem237) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getAllRegionLocations_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter238 in self.success: + iter238.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getAllRegionLocations_result) +getAllRegionLocations_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [THRegionLocation, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class checkAndMutate_args(object): + """ + Attributes: - table: to check in and delete from - row: row to check - family: column family to check - qualifier: column qualifier to check - - compareOp: comparison to make on the value + - compareOperator: comparison to make on the value - value: the expected value to be compared against, if not provided the check is for the non-existence of the column in question - rowMutations: row mutations to execute if the value matches + """ - self.send_checkAndMutate(table, row, family, qualifier, compareOp, value, rowMutations) - return self.recv_checkAndMutate() - - def send_checkAndMutate(self, table, row, family, qualifier, compareOp, value, rowMutations): - self._oprot.writeMessageBegin('checkAndMutate', TMessageType.CALL, self._seqid) - args = checkAndMutate_args() - args.table = table - args.row = row - args.family = family - args.qualifier = qualifier - args.compareOp = compareOp - args.value = value - args.rowMutations = rowMutations - args.write(self._oprot) - self._oprot.writeMessageEnd() - self._oprot.trans.flush() - - def recv_checkAndMutate(self): - iprot = self._iprot - (fname, mtype, rseqid) = iprot.readMessageBegin() - if mtype == TMessageType.EXCEPTION: - x = TApplicationException() - x.read(iprot) - iprot.readMessageEnd() - raise x - result = checkAndMutate_result() - result.read(iprot) - iprot.readMessageEnd() - if result.success is not None: - return result.success - if result.io is not None: - raise result.io - raise TApplicationException(TApplicationException.MISSING_RESULT, "checkAndMutate failed: unknown result") - - -class Processor(Iface, TProcessor): - def __init__(self, handler): - self._handler = handler - self._processMap = {} - self._processMap["exists"] = Processor.process_exists - self._processMap["existsAll"] = Processor.process_existsAll - self._processMap["get"] = Processor.process_get - self._processMap["getMultiple"] = Processor.process_getMultiple - self._processMap["put"] = Processor.process_put - self._processMap["checkAndPut"] = Processor.process_checkAndPut - self._processMap["putMultiple"] = Processor.process_putMultiple - self._processMap["deleteSingle"] = Processor.process_deleteSingle - self._processMap["deleteMultiple"] = Processor.process_deleteMultiple - self._processMap["checkAndDelete"] = Processor.process_checkAndDelete - self._processMap["increment"] = Processor.process_increment - self._processMap["append"] = Processor.process_append - self._processMap["openScanner"] = Processor.process_openScanner - self._processMap["getScannerRows"] = Processor.process_getScannerRows - self._processMap["closeScanner"] = Processor.process_closeScanner - self._processMap["mutateRow"] = Processor.process_mutateRow - self._processMap["getScannerResults"] = Processor.process_getScannerResults - self._processMap["getRegionLocation"] = Processor.process_getRegionLocation - self._processMap["getAllRegionLocations"] = Processor.process_getAllRegionLocations - self._processMap["checkAndMutate"] = Processor.process_checkAndMutate - - 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_exists(self, seqid, iprot, oprot): - args = exists_args() - args.read(iprot) - iprot.readMessageEnd() - result = exists_result() - try: - result.success = self._handler.exists(args.table, args.tget) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("exists", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_existsAll(self, seqid, iprot, oprot): - args = existsAll_args() - args.read(iprot) - iprot.readMessageEnd() - result = existsAll_result() - try: - result.success = self._handler.existsAll(args.table, args.tgets) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("existsAll", msg_type, 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.table, args.tget) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("get", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getMultiple(self, seqid, iprot, oprot): - args = getMultiple_args() - args.read(iprot) - iprot.readMessageEnd() - result = getMultiple_result() - try: - result.success = self._handler.getMultiple(args.table, args.tgets) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getMultiple", msg_type, 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.table, args.tput) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("put", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_checkAndPut(self, seqid, iprot, oprot): - args = checkAndPut_args() - args.read(iprot) - iprot.readMessageEnd() - result = checkAndPut_result() - try: - result.success = self._handler.checkAndPut(args.table, args.row, args.family, args.qualifier, args.value, args.tput) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("checkAndPut", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_putMultiple(self, seqid, iprot, oprot): - args = putMultiple_args() - args.read(iprot) - iprot.readMessageEnd() - result = putMultiple_result() - try: - self._handler.putMultiple(args.table, args.tputs) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("putMultiple", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteSingle(self, seqid, iprot, oprot): - args = deleteSingle_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteSingle_result() - try: - self._handler.deleteSingle(args.table, args.tdelete) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("deleteSingle", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_deleteMultiple(self, seqid, iprot, oprot): - args = deleteMultiple_args() - args.read(iprot) - iprot.readMessageEnd() - result = deleteMultiple_result() - try: - result.success = self._handler.deleteMultiple(args.table, args.tdeletes) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("deleteMultiple", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_checkAndDelete(self, seqid, iprot, oprot): - args = checkAndDelete_args() - args.read(iprot) - iprot.readMessageEnd() - result = checkAndDelete_result() - try: - result.success = self._handler.checkAndDelete(args.table, args.row, args.family, args.qualifier, args.value, args.tdelete) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("checkAndDelete", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_increment(self, seqid, iprot, oprot): - args = increment_args() - args.read(iprot) - iprot.readMessageEnd() - result = increment_result() - try: - result.success = self._handler.increment(args.table, args.tincrement) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("increment", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_append(self, seqid, iprot, oprot): - args = append_args() - args.read(iprot) - iprot.readMessageEnd() - result = append_result() - try: - result.success = self._handler.append(args.table, args.tappend) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("append", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_openScanner(self, seqid, iprot, oprot): - args = openScanner_args() - args.read(iprot) - iprot.readMessageEnd() - result = openScanner_result() - try: - result.success = self._handler.openScanner(args.table, args.tscan) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("openScanner", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getScannerRows(self, seqid, iprot, oprot): - args = getScannerRows_args() - args.read(iprot) - iprot.readMessageEnd() - result = getScannerRows_result() - try: - result.success = self._handler.getScannerRows(args.scannerId, args.numRows) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except TIllegalArgument as ia: - msg_type = TMessageType.REPLY - result.ia = ia - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getScannerRows", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_closeScanner(self, seqid, iprot, oprot): - args = closeScanner_args() - args.read(iprot) - iprot.readMessageEnd() - result = closeScanner_result() - try: - self._handler.closeScanner(args.scannerId) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except TIllegalArgument as ia: - msg_type = TMessageType.REPLY - result.ia = ia - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("closeScanner", msg_type, 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.table, args.trowMutations) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("mutateRow", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getScannerResults(self, seqid, iprot, oprot): - args = getScannerResults_args() - args.read(iprot) - iprot.readMessageEnd() - result = getScannerResults_result() - try: - result.success = self._handler.getScannerResults(args.table, args.tscan, args.numRows) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getScannerResults", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getRegionLocation(self, seqid, iprot, oprot): - args = getRegionLocation_args() - args.read(iprot) - iprot.readMessageEnd() - result = getRegionLocation_result() - try: - result.success = self._handler.getRegionLocation(args.table, args.row, args.reload) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getRegionLocation", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_getAllRegionLocations(self, seqid, iprot, oprot): - args = getAllRegionLocations_args() - args.read(iprot) - iprot.readMessageEnd() - result = getAllRegionLocations_result() - try: - result.success = self._handler.getAllRegionLocations(args.table) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("getAllRegionLocations", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - def process_checkAndMutate(self, seqid, iprot, oprot): - args = checkAndMutate_args() - args.read(iprot) - iprot.readMessageEnd() - result = checkAndMutate_result() - try: - result.success = self._handler.checkAndMutate(args.table, args.row, args.family, args.qualifier, args.compareOp, args.value, args.rowMutations) - msg_type = TMessageType.REPLY - except (TTransport.TTransportException, KeyboardInterrupt, SystemExit): - raise - except TIOError as io: - msg_type = TMessageType.REPLY - result.io = io - except Exception as ex: - msg_type = TMessageType.EXCEPTION - logging.exception(ex) - result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error') - oprot.writeMessageBegin("checkAndMutate", msg_type, seqid) - result.write(oprot) - oprot.writeMessageEnd() - oprot.trans.flush() - - -# HELPER FUNCTIONS AND STRUCTURES - -class exists_args: - """ - Attributes: - - table: the table to check on - - tget: the TGet to check for - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tget', (TGet, TGet.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tget=None,): - self.table = table - self.tget = tget - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tget = TGet() - self.tget.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('exists_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tget is not None: - oprot.writeFieldBegin('tget', TType.STRUCT, 2) - self.tget.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tget is None: - raise TProtocol.TProtocolException(message='Required field tget is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tget) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class exists_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('exists_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class existsAll_args: - """ - Attributes: - - table: the table to check on - - tgets: a list of TGets to check for - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.LIST, 'tgets', (TType.STRUCT,(TGet, TGet.thrift_spec)), None, ), # 2 - ) - - def __init__(self, table=None, tgets=None,): - self.table = table - self.tgets = tgets - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tgets = [] - (_etype129, _size126) = iprot.readListBegin() - for _i130 in xrange(_size126): - _elem131 = TGet() - _elem131.read(iprot) - self.tgets.append(_elem131) - 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('existsAll_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tgets is not None: - oprot.writeFieldBegin('tgets', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.tgets)) - for iter132 in self.tgets: - iter132.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tgets is None: - raise TProtocol.TProtocolException(message='Required field tgets is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tgets) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class existsAll_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.BOOL,None), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype136, _size133) = iprot.readListBegin() - for _i137 in xrange(_size133): - _elem138 = iprot.readBool() - self.success.append(_elem138) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('existsAll_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.BOOL, len(self.success)) - for iter139 in self.success: - oprot.writeBool(iter139) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - table: the table to get from - - tget: the TGet to fetch - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tget', (TGet, TGet.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tget=None,): - self.table = table - self.tget = tget - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tget = TGet() - self.tget.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_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tget is not None: - oprot.writeFieldBegin('tget', TType.STRUCT, 2) - self.tget.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tget is None: - raise TProtocol.TProtocolException(message='Required field tget is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tget) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TResult, TResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.STRUCT: - self.success = TResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('get_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getMultiple_args: - """ - Attributes: - - table: the table to get from - - tgets: a list of TGets to fetch, the Result list - will have the Results at corresponding positions - or null if there was an error - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.LIST, 'tgets', (TType.STRUCT,(TGet, TGet.thrift_spec)), None, ), # 2 - ) - - def __init__(self, table=None, tgets=None,): - self.table = table - self.tgets = tgets - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tgets = [] - (_etype143, _size140) = iprot.readListBegin() - for _i144 in xrange(_size140): - _elem145 = TGet() - _elem145.read(iprot) - self.tgets.append(_elem145) - 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('getMultiple_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tgets is not None: - oprot.writeFieldBegin('tgets', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.tgets)) - for iter146 in self.tgets: - iter146.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tgets is None: - raise TProtocol.TProtocolException(message='Required field tgets is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tgets) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getMultiple_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TResult, TResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype150, _size147) = iprot.readListBegin() - for _i151 in xrange(_size147): - _elem152 = TResult() - _elem152.read(iprot) - self.success.append(_elem152) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('getMultiple_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter153 in self.success: - iter153.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - table: the table to put data in - - tput: the TPut to put - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tput', (TPut, TPut.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tput=None,): - self.table = table - self.tput = tput - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tput = TPut() - self.tput.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_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tput is not None: - oprot.writeFieldBegin('tput', TType.STRUCT, 2) - self.tput.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tput is None: - raise TProtocol.TProtocolException(message='Required field tput is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tput) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 = TIOError() - 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('put_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndPut_args: - """ - Attributes: - - table: to check in and put to - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - value: the expected value, if not provided the - check is for the non-existence of the - column in question - - tput: the TPut to put if the check succeeds - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'family', None, None, ), # 3 - (4, TType.STRING, 'qualifier', None, None, ), # 4 - (5, TType.STRING, 'value', None, None, ), # 5 - (6, TType.STRUCT, 'tput', (TPut, TPut.thrift_spec), None, ), # 6 - ) - - def __init__(self, table=None, row=None, family=None, qualifier=None, value=None, tput=None,): - self.table = table - self.row = row - self.family = family - self.qualifier = qualifier - self.value = value - self.tput = tput - - 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.table = 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.qualifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.value = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.tput = TPut() - self.tput.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('checkAndPut_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 3) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 4) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 5) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.tput is not None: - oprot.writeFieldBegin('tput', TType.STRUCT, 6) - self.tput.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - if self.qualifier is None: - raise TProtocol.TProtocolException(message='Required field qualifier is unset!') - if self.tput is None: - raise TProtocol.TProtocolException(message='Required field tput is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.value) - value = (value * 31) ^ hash(self.tput) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndPut_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('checkAndPut_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class putMultiple_args: - """ - Attributes: - - table: the table to put data in - - tputs: a list of TPuts to commit - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.LIST, 'tputs', (TType.STRUCT,(TPut, TPut.thrift_spec)), None, ), # 2 - ) - - def __init__(self, table=None, tputs=None,): - self.table = table - self.tputs = tputs - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tputs = [] - (_etype157, _size154) = iprot.readListBegin() - for _i158 in xrange(_size154): - _elem159 = TPut() - _elem159.read(iprot) - self.tputs.append(_elem159) - 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('putMultiple_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tputs is not None: - oprot.writeFieldBegin('tputs', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.tputs)) - for iter160 in self.tputs: - iter160.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tputs is None: - raise TProtocol.TProtocolException(message='Required field tputs is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tputs) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class putMultiple_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 = TIOError() - 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('putMultiple_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteSingle_args: - """ - Attributes: - - table: the table to delete from - - tdelete: the TDelete to delete - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tdelete', (TDelete, TDelete.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tdelete=None,): - self.table = table - self.tdelete = tdelete - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tdelete = TDelete() - self.tdelete.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('deleteSingle_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tdelete is not None: - oprot.writeFieldBegin('tdelete', TType.STRUCT, 2) - self.tdelete.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tdelete is None: - raise TProtocol.TProtocolException(message='Required field tdelete is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tdelete) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteSingle_result: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 = TIOError() - 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('deleteSingle_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteMultiple_args: - """ - Attributes: - - table: the table to delete from - - tdeletes: list of TDeletes to delete - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.LIST, 'tdeletes', (TType.STRUCT,(TDelete, TDelete.thrift_spec)), None, ), # 2 - ) - - def __init__(self, table=None, tdeletes=None,): - self.table = table - self.tdeletes = tdeletes - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.LIST: - self.tdeletes = [] - (_etype164, _size161) = iprot.readListBegin() - for _i165 in xrange(_size161): - _elem166 = TDelete() - _elem166.read(iprot) - self.tdeletes.append(_elem166) - 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('deleteMultiple_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tdeletes is not None: - oprot.writeFieldBegin('tdeletes', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.tdeletes)) - for iter167 in self.tdeletes: - iter167.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tdeletes is None: - raise TProtocol.TProtocolException(message='Required field tdeletes is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tdeletes) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class deleteMultiple_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TDelete, TDelete.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype171, _size168) = iprot.readListBegin() - for _i172 in xrange(_size168): - _elem173 = TDelete() - _elem173.read(iprot) - self.success.append(_elem173) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('deleteMultiple_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter174 in self.success: - iter174.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndDelete_args: - """ - Attributes: - - table: to check in and delete from - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - value: the expected value, if not provided the - check is for the non-existence of the - column in question - - tdelete: the TDelete to execute if the check succeeds - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'family', None, None, ), # 3 - (4, TType.STRING, 'qualifier', None, None, ), # 4 - (5, TType.STRING, 'value', None, None, ), # 5 - (6, TType.STRUCT, 'tdelete', (TDelete, TDelete.thrift_spec), None, ), # 6 - ) - - def __init__(self, table=None, row=None, family=None, qualifier=None, value=None, tdelete=None,): - self.table = table - self.row = row - self.family = family - self.qualifier = qualifier - self.value = value - self.tdelete = tdelete - - 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.table = 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.qualifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRING: - self.value = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.tdelete = TDelete() - self.tdelete.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('checkAndDelete_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 3) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 4) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 5) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.tdelete is not None: - oprot.writeFieldBegin('tdelete', TType.STRUCT, 6) - self.tdelete.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - if self.qualifier is None: - raise TProtocol.TProtocolException(message='Required field qualifier is unset!') - if self.tdelete is None: - raise TProtocol.TProtocolException(message='Required field tdelete is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.value) - value = (value * 31) ^ hash(self.tdelete) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndDelete_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('checkAndDelete_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class increment_args: - """ - Attributes: - - table: the table to increment the value on - - tincrement: the TIncrement to increment - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tincrement', (TIncrement, TIncrement.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tincrement=None,): - self.table = table - self.tincrement = tincrement - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tincrement = TIncrement() - self.tincrement.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('increment_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tincrement is not None: - oprot.writeFieldBegin('tincrement', TType.STRUCT, 2) - self.tincrement.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tincrement is None: - raise TProtocol.TProtocolException(message='Required field tincrement is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tincrement) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class increment_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TResult, TResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.STRUCT: - self.success = TResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('increment_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_args: - """ - Attributes: - - table: the table to append the value on - - tappend: the TAppend to append - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tappend', (TAppend, TAppend.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tappend=None,): - self.table = table - self.tappend = tappend - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tappend = TAppend() - self.tappend.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('append_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tappend is not None: - oprot.writeFieldBegin('tappend', TType.STRUCT, 2) - self.tappend.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tappend is None: - raise TProtocol.TProtocolException(message='Required field tappend is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tappend) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class append_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (TResult, TResult.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.STRUCT: - self.success = TResult() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('append_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class openScanner_args: - """ - Attributes: - - table: the table to get the Scanner for - - tscan: the scan object to get a Scanner for - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tscan', (TScan, TScan.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, tscan=None,): - self.table = table - self.tscan = tscan - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tscan = TScan() - self.tscan.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('openScanner_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tscan is not None: - oprot.writeFieldBegin('tscan', TType.STRUCT, 2) - self.tscan.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tscan is None: - raise TProtocol.TProtocolException(message='Required field tscan is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tscan) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class openScanner_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.I32, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = TIOError() - 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('openScanner_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.I32, 0) - oprot.writeI32(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getScannerRows_args: - """ - Attributes: - - scannerId: the Id of the Scanner to return rows from. This is an Id returned from the openScanner function. - - numRows: number of rows to return - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'scannerId', None, None, ), # 1 - (2, TType.I32, 'numRows', None, 1, ), # 2 - ) - - def __init__(self, scannerId=None, numRows=thrift_spec[2][4],): - self.scannerId = scannerId - self.numRows = numRows - - 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.scannerId = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.numRows = 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('getScannerRows_args') - if self.scannerId is not None: - oprot.writeFieldBegin('scannerId', TType.I32, 1) - oprot.writeI32(self.scannerId) - oprot.writeFieldEnd() - if self.numRows is not None: - oprot.writeFieldBegin('numRows', TType.I32, 2) - oprot.writeI32(self.numRows) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.scannerId is None: - raise TProtocol.TProtocolException(message='Required field scannerId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.scannerId) - value = (value * 31) ^ hash(self.numRows) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getScannerRows_result: - """ - Attributes: - - success - - io - - ia: if the scannerId is invalid - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TResult, TResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (TIllegalArgument, TIllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, success=None, io=None, ia=None,): - self.success = success - self.io = io - self.ia = 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 == 0: - if ftype == TType.LIST: - self.success = [] - (_etype178, _size175) = iprot.readListBegin() - for _i179 in xrange(_size175): - _elem180 = TResult() - _elem180.read(iprot) - self.success.append(_elem180) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = TIllegalArgument() - 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('getScannerRows_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter181 in self.success: - iter181.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - value = (value * 31) ^ hash(self.ia) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class closeScanner_args: - """ - Attributes: - - scannerId: the Id of the Scanner to close * - """ - - thrift_spec = ( - None, # 0 - (1, TType.I32, 'scannerId', None, None, ), # 1 - ) - - def __init__(self, scannerId=None,): - self.scannerId = scannerId - - 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.scannerId = 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('closeScanner_args') - if self.scannerId is not None: - oprot.writeFieldBegin('scannerId', TType.I32, 1) - oprot.writeI32(self.scannerId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.scannerId is None: - raise TProtocol.TProtocolException(message='Required field scannerId is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.scannerId) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class closeScanner_result: - """ - Attributes: - - io - - ia: if the scannerId is invalid - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'ia', (TIllegalArgument, TIllegalArgument.thrift_spec), None, ), # 2 - ) - - def __init__(self, io=None, ia=None,): - self.io = io - self.ia = 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 = TIOError() - self.io.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.ia = TIllegalArgument() - 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('closeScanner_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - if self.ia is not None: - oprot.writeFieldBegin('ia', TType.STRUCT, 2) - self.ia.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.io) - value = (value * 31) ^ hash(self.ia) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - table: table to apply the mutations - - trowMutations: mutations to apply - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'trowMutations', (TRowMutations, TRowMutations.thrift_spec), None, ), # 2 - ) - - def __init__(self, table=None, trowMutations=None,): - self.table = table - self.trowMutations = trowMutations - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.trowMutations = TRowMutations() - self.trowMutations.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_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.trowMutations is not None: - oprot.writeFieldBegin('trowMutations', TType.STRUCT, 2) - self.trowMutations.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.trowMutations is None: - raise TProtocol.TProtocolException(message='Required field trowMutations is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.trowMutations) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - 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: - """ - Attributes: - - io - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, io=None,): - self.io = 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 = TIOError() - 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('mutateRow_result') - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getScannerResults_args: - """ - Attributes: - - table: the table to get the Scanner for - - tscan: the scan object to get a Scanner for - - numRows: number of rows to return - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRUCT, 'tscan', (TScan, TScan.thrift_spec), None, ), # 2 - (3, TType.I32, 'numRows', None, 1, ), # 3 - ) - - def __init__(self, table=None, tscan=None, numRows=thrift_spec[3][4],): - self.table = table - self.tscan = tscan - self.numRows = numRows - - 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.table = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.tscan = TScan() - self.tscan.read(iprot) - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I32: - self.numRows = 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('getScannerResults_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.tscan is not None: - oprot.writeFieldBegin('tscan', TType.STRUCT, 2) - self.tscan.write(oprot) - oprot.writeFieldEnd() - if self.numRows is not None: - oprot.writeFieldBegin('numRows', TType.I32, 3) - oprot.writeI32(self.numRows) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.tscan is None: - raise TProtocol.TProtocolException(message='Required field tscan is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.tscan) - value = (value * 31) ^ hash(self.numRows) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getScannerResults_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(TResult, TResult.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype185, _size182) = iprot.readListBegin() - for _i186 in xrange(_size182): - _elem187 = TResult() - _elem187.read(iprot) - self.success.append(_elem187) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('getScannerResults_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter188 in self.success: - iter188.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRegionLocation_args: - """ - Attributes: - - table - - row - - reload - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.BOOL, 'reload', None, None, ), # 3 - ) - - def __init__(self, table=None, row=None, reload=None,): - self.table = table - self.row = row - self.reload = reload - - 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.table = 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.BOOL: - self.reload = iprot.readBool() - 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('getRegionLocation_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.reload is not None: - oprot.writeFieldBegin('reload', TType.BOOL, 3) - oprot.writeBool(self.reload) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.reload) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getRegionLocation_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.STRUCT, 'success', (THRegionLocation, THRegionLocation.thrift_spec), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.STRUCT: - self.success = THRegionLocation() - self.success.read(iprot) - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('getRegionLocation_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.STRUCT, 0) - self.success.write(oprot) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getAllRegionLocations_args: - """ - Attributes: - - table - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - ) - - def __init__(self, table=None,): - self.table = table - - 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.table = 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('getAllRegionLocations_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class getAllRegionLocations_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.LIST, 'success', (TType.STRUCT,(THRegionLocation, THRegionLocation.thrift_spec)), None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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 = [] - (_etype192, _size189) = iprot.readListBegin() - for _i193 in xrange(_size189): - _elem194 = THRegionLocation() - _elem194.read(iprot) - self.success.append(_elem194) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('getAllRegionLocations_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.LIST, 0) - oprot.writeListBegin(TType.STRUCT, len(self.success)) - for iter195 in self.success: - iter195.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndMutate_args: - """ - Attributes: - - table: to check in and delete from - - row: row to check - - family: column family to check - - qualifier: column qualifier to check - - compareOp: comparison to make on the value - - value: the expected value to be compared against, if not provided the - check is for the non-existence of the column in question - - rowMutations: row mutations to execute if the value matches - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'table', None, None, ), # 1 - (2, TType.STRING, 'row', None, None, ), # 2 - (3, TType.STRING, 'family', None, None, ), # 3 - (4, TType.STRING, 'qualifier', None, None, ), # 4 - (5, TType.I32, 'compareOp', None, None, ), # 5 - (6, TType.STRING, 'value', None, None, ), # 6 - (7, TType.STRUCT, 'rowMutations', (TRowMutations, TRowMutations.thrift_spec), None, ), # 7 - ) - - def __init__(self, table=None, row=None, family=None, qualifier=None, compareOp=None, value=None, rowMutations=None,): - self.table = table - self.row = row - self.family = family - self.qualifier = qualifier - self.compareOp = compareOp - self.value = value - self.rowMutations = rowMutations - - 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.table = 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.qualifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.compareOp = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.value = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.rowMutations = TRowMutations() - self.rowMutations.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('checkAndMutate_args') - if self.table is not None: - oprot.writeFieldBegin('table', TType.STRING, 1) - oprot.writeString(self.table) - oprot.writeFieldEnd() - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 2) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 3) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 4) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.compareOp is not None: - oprot.writeFieldBegin('compareOp', TType.I32, 5) - oprot.writeI32(self.compareOp) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 6) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.rowMutations is not None: - oprot.writeFieldBegin('rowMutations', TType.STRUCT, 7) - self.rowMutations.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.table is None: - raise TProtocol.TProtocolException(message='Required field table is unset!') - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - if self.qualifier is None: - raise TProtocol.TProtocolException(message='Required field qualifier is unset!') - if self.compareOp is None: - raise TProtocol.TProtocolException(message='Required field compareOp is unset!') - if self.rowMutations is None: - raise TProtocol.TProtocolException(message='Required field rowMutations is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.table) - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.compareOp) - value = (value * 31) ^ hash(self.value) - value = (value * 31) ^ hash(self.rowMutations) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class checkAndMutate_result: - """ - Attributes: - - success - - io - """ - - thrift_spec = ( - (0, TType.BOOL, 'success', None, None, ), # 0 - (1, TType.STRUCT, 'io', (TIOError, TIOError.thrift_spec), None, ), # 1 - ) - - def __init__(self, success=None, io=None,): - self.success = success - self.io = 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.BOOL: - self.success = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 1: - if ftype == TType.STRUCT: - self.io = TIOError() - 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('checkAndMutate_result') - if self.success is not None: - oprot.writeFieldBegin('success', TType.BOOL, 0) - oprot.writeBool(self.success) - oprot.writeFieldEnd() - if self.io is not None: - oprot.writeFieldBegin('io', TType.STRUCT, 1) - self.io.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.success) - value = (value * 31) ^ hash(self.io) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) + + + def __init__(self, table=None, row=None, family=None, qualifier=None, compareOperator=None, value=None, rowMutations=None,): + self.table = table + self.row = row + self.family = family + self.qualifier = qualifier + self.compareOperator = compareOperator + self.value = value + self.rowMutations = rowMutations + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.compareOperator = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.value = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.rowMutations = TRowMutations() + self.rowMutations.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndMutate_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeBinary(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 3) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 4) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.compareOperator is not None: + oprot.writeFieldBegin('compareOperator', TType.I32, 5) + oprot.writeI32(self.compareOperator) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 6) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.rowMutations is not None: + oprot.writeFieldBegin('rowMutations', TType.STRUCT, 7) + self.rowMutations.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + if self.compareOperator is None: + raise TProtocolException(message='Required field compareOperator is unset!') + if self.rowMutations is None: + raise TProtocolException(message='Required field rowMutations is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndMutate_args) +checkAndMutate_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', 'BINARY', None, ), # 1 + (2, TType.STRING, 'row', 'BINARY', None, ), # 2 + (3, TType.STRING, 'family', 'BINARY', None, ), # 3 + (4, TType.STRING, 'qualifier', 'BINARY', None, ), # 4 + (5, TType.I32, 'compareOperator', None, None, ), # 5 + (6, TType.STRING, 'value', 'BINARY', None, ), # 6 + (7, TType.STRUCT, 'rowMutations', [TRowMutations, None], None, ), # 7 +) + + +class checkAndMutate_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('checkAndMutate_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(checkAndMutate_result) +checkAndMutate_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableDescriptor_args(object): + """ + Attributes: + - table: the tablename of the table to get tableDescriptor + + """ + + + def __init__(self, table=None,): + self.table = table + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.table = TTableName() + self.table.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptor_args') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRUCT, 1) + self.table.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.table is None: + raise TProtocolException(message='Required field table is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptor_args) +getTableDescriptor_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'table', [TTableName, None], None, ), # 1 +) + + +class getTableDescriptor_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TTableDescriptor() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptor_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptor_result) +getTableDescriptor_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TTableDescriptor, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableDescriptors_args(object): + """ + Attributes: + - tables: the tablename list of the tables to get tableDescriptor + + """ + + + def __init__(self, tables=None,): + self.tables = tables + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.LIST: + self.tables = [] + (_etype242, _size239) = iprot.readListBegin() + for _i243 in range(_size239): + _elem244 = TTableName() + _elem244.read(iprot) + self.tables.append(_elem244) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptors_args') + if self.tables is not None: + oprot.writeFieldBegin('tables', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.tables)) + for iter245 in self.tables: + iter245.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tables is None: + raise TProtocolException(message='Required field tables is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptors_args) +getTableDescriptors_args.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'tables', (TType.STRUCT, [TTableName, None], False), None, ), # 1 +) + + +class getTableDescriptors_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype249, _size246) = iprot.readListBegin() + for _i250 in range(_size246): + _elem251 = TTableDescriptor() + _elem251.read(iprot) + self.success.append(_elem251) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptors_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter252 in self.success: + iter252.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptors_result) +getTableDescriptors_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TTableDescriptor, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class tableExists_args(object): + """ + Attributes: + - tableName: the tablename of the tables to check + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('tableExists_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(tableExists_args) +tableExists_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class tableExists_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('tableExists_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(tableExists_result) +tableExists_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableDescriptorsByPattern_args(object): + """ + Attributes: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + + + def __init__(self, regex=None, includeSysTables=None,): + self.regex = regex + self.includeSysTables = includeSysTables + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.regex = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.includeSysTables = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptorsByPattern_args') + if self.regex is not None: + oprot.writeFieldBegin('regex', TType.STRING, 1) + oprot.writeString(self.regex.encode('utf-8') if sys.version_info[0] == 2 else self.regex) + oprot.writeFieldEnd() + if self.includeSysTables is not None: + oprot.writeFieldBegin('includeSysTables', TType.BOOL, 2) + oprot.writeBool(self.includeSysTables) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.includeSysTables is None: + raise TProtocolException(message='Required field includeSysTables is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptorsByPattern_args) +getTableDescriptorsByPattern_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'regex', 'UTF8', None, ), # 1 + (2, TType.BOOL, 'includeSysTables', None, None, ), # 2 +) + + +class getTableDescriptorsByPattern_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype256, _size253) = iprot.readListBegin() + for _i257 in range(_size253): + _elem258 = TTableDescriptor() + _elem258.read(iprot) + self.success.append(_elem258) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptorsByPattern_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter259 in self.success: + iter259.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptorsByPattern_result) +getTableDescriptorsByPattern_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TTableDescriptor, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableDescriptorsByNamespace_args(object): + """ + Attributes: + - name: The namesapce's name + + """ + + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptorsByNamespace_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptorsByNamespace_args) +getTableDescriptorsByNamespace_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 +) + + +class getTableDescriptorsByNamespace_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype263, _size260) = iprot.readListBegin() + for _i264 in range(_size260): + _elem265 = TTableDescriptor() + _elem265.read(iprot) + self.success.append(_elem265) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableDescriptorsByNamespace_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter266 in self.success: + iter266.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableDescriptorsByNamespace_result) +getTableDescriptorsByNamespace_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TTableDescriptor, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableNamesByPattern_args(object): + """ + Attributes: + - regex: The regular expression to match against + - includeSysTables: set to false if match only against userspace tables + + """ + + + def __init__(self, regex=None, includeSysTables=None,): + self.regex = regex + self.includeSysTables = includeSysTables + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.regex = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.includeSysTables = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNamesByPattern_args') + if self.regex is not None: + oprot.writeFieldBegin('regex', TType.STRING, 1) + oprot.writeString(self.regex.encode('utf-8') if sys.version_info[0] == 2 else self.regex) + oprot.writeFieldEnd() + if self.includeSysTables is not None: + oprot.writeFieldBegin('includeSysTables', TType.BOOL, 2) + oprot.writeBool(self.includeSysTables) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.includeSysTables is None: + raise TProtocolException(message='Required field includeSysTables is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNamesByPattern_args) +getTableNamesByPattern_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'regex', 'UTF8', None, ), # 1 + (2, TType.BOOL, 'includeSysTables', None, None, ), # 2 +) + + +class getTableNamesByPattern_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype270, _size267) = iprot.readListBegin() + for _i271 in range(_size267): + _elem272 = TTableName() + _elem272.read(iprot) + self.success.append(_elem272) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNamesByPattern_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter273 in self.success: + iter273.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNamesByPattern_result) +getTableNamesByPattern_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TTableName, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getTableNamesByNamespace_args(object): + """ + Attributes: + - name: The namesapce's name + + """ + + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNamesByNamespace_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNamesByNamespace_args) +getTableNamesByNamespace_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 +) + + +class getTableNamesByNamespace_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype277, _size274) = iprot.readListBegin() + for _i278 in range(_size274): + _elem279 = TTableName() + _elem279.read(iprot) + self.success.append(_elem279) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getTableNamesByNamespace_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter280 in self.success: + iter280.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getTableNamesByNamespace_result) +getTableNamesByNamespace_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TTableName, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class createTable_args(object): + """ + Attributes: + - desc: table descriptor for table + - splitKeys: rray of split keys for the initial regions of the table + + """ + + + def __init__(self, desc=None, splitKeys=None,): + self.desc = desc + self.splitKeys = splitKeys + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.desc = TTableDescriptor() + self.desc.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.splitKeys = [] + (_etype284, _size281) = iprot.readListBegin() + for _i285 in range(_size281): + _elem286 = iprot.readBinary() + self.splitKeys.append(_elem286) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createTable_args') + if self.desc is not None: + oprot.writeFieldBegin('desc', TType.STRUCT, 1) + self.desc.write(oprot) + oprot.writeFieldEnd() + if self.splitKeys is not None: + oprot.writeFieldBegin('splitKeys', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.splitKeys)) + for iter287 in self.splitKeys: + oprot.writeBinary(iter287) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.desc is None: + raise TProtocolException(message='Required field desc is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createTable_args) +createTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'desc', [TTableDescriptor, None], None, ), # 1 + (2, TType.LIST, 'splitKeys', (TType.STRING, 'BINARY', False), None, ), # 2 +) + + +class createTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createTable_result) +createTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class deleteTable_args(object): + """ + Attributes: + - tableName: the tablename to delete + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteTable_args) +deleteTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class deleteTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteTable_result) +deleteTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class truncateTable_args(object): + """ + Attributes: + - tableName: the tablename to truncate + - preserveSplits: whether to preserve previous splits + + """ + + + def __init__(self, tableName=None, preserveSplits=None,): + self.tableName = tableName + self.preserveSplits = preserveSplits + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.BOOL: + self.preserveSplits = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('truncateTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.preserveSplits is not None: + oprot.writeFieldBegin('preserveSplits', TType.BOOL, 2) + oprot.writeBool(self.preserveSplits) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + if self.preserveSplits is None: + raise TProtocolException(message='Required field preserveSplits is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(truncateTable_args) +truncateTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.BOOL, 'preserveSplits', None, None, ), # 2 +) + + +class truncateTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('truncateTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(truncateTable_result) +truncateTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class enableTable_args(object): + """ + Attributes: + - tableName: the tablename to enable + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('enableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(enableTable_args) +enableTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class enableTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('enableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(enableTable_result) +enableTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class disableTable_args(object): + """ + Attributes: + - tableName: the tablename to disable + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('disableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(disableTable_args) +disableTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class disableTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('disableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(disableTable_result) +disableTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class isTableEnabled_args(object): + """ + Attributes: + - tableName: the tablename to check + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableEnabled_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableEnabled_args) +isTableEnabled_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class isTableEnabled_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableEnabled_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableEnabled_result) +isTableEnabled_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class isTableDisabled_args(object): + """ + Attributes: + - tableName: the tablename to check + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableDisabled_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableDisabled_args) +isTableDisabled_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class isTableDisabled_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableDisabled_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableDisabled_result) +isTableDisabled_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class isTableAvailable_args(object): + """ + Attributes: + - tableName: the tablename to check + + """ + + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableAvailable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableAvailable_args) +isTableAvailable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 +) + + +class isTableAvailable_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableAvailable_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableAvailable_result) +isTableAvailable_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class isTableAvailableWithSplit_args(object): + """ + Attributes: + - tableName: the tablename to check + - splitKeys: keys to check if the table has been created with all split keys + + """ + + + def __init__(self, tableName=None, splitKeys=None,): + self.tableName = tableName + self.splitKeys = splitKeys + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.splitKeys = [] + (_etype291, _size288) = iprot.readListBegin() + for _i292 in range(_size288): + _elem293 = iprot.readBinary() + self.splitKeys.append(_elem293) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableAvailableWithSplit_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.splitKeys is not None: + oprot.writeFieldBegin('splitKeys', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.splitKeys)) + for iter294 in self.splitKeys: + oprot.writeBinary(iter294) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableAvailableWithSplit_args) +isTableAvailableWithSplit_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.LIST, 'splitKeys', (TType.STRING, 'BINARY', False), None, ), # 2 +) + + +class isTableAvailableWithSplit_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.BOOL: + self.success = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('isTableAvailableWithSplit_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(isTableAvailableWithSplit_result) +isTableAvailableWithSplit_result.thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class addColumnFamily_args(object): + """ + Attributes: + - tableName: the tablename to add column family to + - column: column family descriptor of column family to be added + + """ + + + def __init__(self, tableName=None, column=None,): + self.tableName = tableName + self.column = column + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.column = TColumnFamilyDescriptor() + self.column.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('addColumnFamily_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRUCT, 2) + self.column.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + if self.column is None: + raise TProtocolException(message='Required field column is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(addColumnFamily_args) +addColumnFamily_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.STRUCT, 'column', [TColumnFamilyDescriptor, None], None, ), # 2 +) + + +class addColumnFamily_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('addColumnFamily_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(addColumnFamily_result) +addColumnFamily_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class deleteColumnFamily_args(object): + """ + Attributes: + - tableName: the tablename to delete column family from + - column: name of column family to be deleted + + """ + + + def __init__(self, tableName=None, column=None,): + self.tableName = tableName + self.column = column + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.column = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteColumnFamily_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 2) + oprot.writeBinary(self.column) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + if self.column is None: + raise TProtocolException(message='Required field column is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteColumnFamily_args) +deleteColumnFamily_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.STRING, 'column', 'BINARY', None, ), # 2 +) + + +class deleteColumnFamily_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteColumnFamily_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteColumnFamily_result) +deleteColumnFamily_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class modifyColumnFamily_args(object): + """ + Attributes: + - tableName: the tablename to modify column family + - column: column family descriptor of column family to be modified + + """ + + + def __init__(self, tableName=None, column=None,): + self.tableName = tableName + self.column = column + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.column = TColumnFamilyDescriptor() + self.column.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyColumnFamily_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRUCT, 2) + self.column.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + if self.column is None: + raise TProtocolException(message='Required field column is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyColumnFamily_args) +modifyColumnFamily_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.STRUCT, 'column', [TColumnFamilyDescriptor, None], None, ), # 2 +) + + +class modifyColumnFamily_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyColumnFamily_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyColumnFamily_result) +modifyColumnFamily_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class modifyTable_args(object): + """ + Attributes: + - desc: the descriptor of the table to modify + + """ + + + def __init__(self, desc=None,): + self.desc = desc + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.desc = TTableDescriptor() + self.desc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyTable_args') + if self.desc is not None: + oprot.writeFieldBegin('desc', TType.STRUCT, 1) + self.desc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.desc is None: + raise TProtocolException(message='Required field desc is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyTable_args) +modifyTable_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'desc', [TTableDescriptor, None], None, ), # 1 +) + + +class modifyTable_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyTable_result) +modifyTable_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class createNamespace_args(object): + """ + Attributes: + - namespaceDesc: descriptor which describes the new namespace + + """ + + + def __init__(self, namespaceDesc=None,): + self.namespaceDesc = namespaceDesc + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.namespaceDesc = TNamespaceDescriptor() + self.namespaceDesc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createNamespace_args') + if self.namespaceDesc is not None: + oprot.writeFieldBegin('namespaceDesc', TType.STRUCT, 1) + self.namespaceDesc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.namespaceDesc is None: + raise TProtocolException(message='Required field namespaceDesc is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createNamespace_args) +createNamespace_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'namespaceDesc', [TNamespaceDescriptor, None], None, ), # 1 +) + + +class createNamespace_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('createNamespace_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(createNamespace_result) +createNamespace_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class modifyNamespace_args(object): + """ + Attributes: + - namespaceDesc: descriptor which describes the new namespace + + """ + + + def __init__(self, namespaceDesc=None,): + self.namespaceDesc = namespaceDesc + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.namespaceDesc = TNamespaceDescriptor() + self.namespaceDesc.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyNamespace_args') + if self.namespaceDesc is not None: + oprot.writeFieldBegin('namespaceDesc', TType.STRUCT, 1) + self.namespaceDesc.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.namespaceDesc is None: + raise TProtocolException(message='Required field namespaceDesc is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyNamespace_args) +modifyNamespace_args.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'namespaceDesc', [TNamespaceDescriptor, None], None, ), # 1 +) + + +class modifyNamespace_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('modifyNamespace_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(modifyNamespace_result) +modifyNamespace_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class deleteNamespace_args(object): + """ + Attributes: + - name: namespace name + + """ + + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteNamespace_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteNamespace_args) +deleteNamespace_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 +) + + +class deleteNamespace_result(object): + """ + Attributes: + - io + + """ + + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('deleteNamespace_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(deleteNamespace_result) +deleteNamespace_result.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getNamespaceDescriptor_args(object): + """ + Attributes: + - name: name of namespace descriptor + + """ + + + def __init__(self, name=None,): + self.name = name + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getNamespaceDescriptor_args') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getNamespaceDescriptor_args) +getNamespaceDescriptor_args.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 +) + + +class getNamespaceDescriptor_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = TNamespaceDescriptor() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getNamespaceDescriptor_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getNamespaceDescriptor_result) +getNamespaceDescriptor_result.thrift_spec = ( + (0, TType.STRUCT, 'success', [TNamespaceDescriptor, None], None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class listNamespaceDescriptors_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('listNamespaceDescriptors_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(listNamespaceDescriptors_args) +listNamespaceDescriptors_args.thrift_spec = ( +) + + +class listNamespaceDescriptors_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype298, _size295) = iprot.readListBegin() + for _i299 in range(_size295): + _elem300 = TNamespaceDescriptor() + _elem300.read(iprot) + self.success.append(_elem300) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('listNamespaceDescriptors_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter301 in self.success: + iter301.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(listNamespaceDescriptors_result) +listNamespaceDescriptors_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT, [TNamespaceDescriptor, None], False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class listNamespaces_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('listNamespaces_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(listNamespaces_args) +listNamespaces_args.thrift_spec = ( +) + + +class listNamespaces_result(object): + """ + Attributes: + - success + - io + + """ + + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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 = [] + (_etype305, _size302) = iprot.readListBegin() + for _i306 in range(_size302): + _elem307 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.success.append(_elem307) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = TIOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('listNamespaces_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter308 in self.success: + oprot.writeString(iter308.encode('utf-8') if sys.version_info[0] == 2 else iter308) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(listNamespaces_result) +listNamespaces_result.thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING, 'UTF8', False), None, ), # 0 + (1, TType.STRUCT, 'io', [TIOError, None], None, ), # 1 +) + + +class getThriftServerType_args(object): + + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getThriftServerType_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getThriftServerType_args) +getThriftServerType_args.thrift_spec = ( +) + + +class getThriftServerType_result(object): + """ + Attributes: + - success + + """ + + + def __init__(self, success=None,): + self.success = success + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('getThriftServerType_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(getThriftServerType_result) +getThriftServerType_result.thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 +) +fix_spec(all_structs) +del all_structs + diff --git a/hbase-examples/src/main/python/thrift2/gen-py/hbase/constants.py b/hbase-examples/src/main/python/thrift2/gen-py/hbase/constants.py index 4a6492b8692..c59352d09f1 100644 --- a/hbase-examples/src/main/python/thrift2/gen-py/hbase/constants.py +++ b/hbase-examples/src/main/python/thrift2/gen-py/hbase/constants.py @@ -1,11 +1,14 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException -from ttypes import * +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec +import sys +from .ttypes import * diff --git a/hbase-examples/src/main/python/thrift2/gen-py/hbase/ttypes.py b/hbase-examples/src/main/python/thrift2/gen-py/hbase/ttypes.py index a5695d6e89e..80b268f84f6 100644 --- a/hbase-examples/src/main/python/thrift2/gen-py/hbase/ttypes.py +++ b/hbase-examples/src/main/python/thrift2/gen-py/hbase/ttypes.py @@ -1,2491 +1,3326 @@ # -# Autogenerated by Thrift Compiler (0.9.3) +# Autogenerated by Thrift Compiler (0.12.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # -from thrift.Thrift import TType, TMessageType, TException, TApplicationException +from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException +from thrift.protocol.TProtocol import TProtocolException +from thrift.TRecursive import fix_spec + +import sys from thrift.transport import TTransport -from thrift.protocol import TBinaryProtocol, TProtocol -try: - from thrift.protocol import fastbinary -except: - fastbinary = None - - -class TDeleteType: - """ - Specify type of delete: - - DELETE_COLUMN means exactly one version will be removed, - - DELETE_COLUMNS means previous versions will also be removed. - """ - DELETE_COLUMN = 0 - DELETE_COLUMNS = 1 - - _VALUES_TO_NAMES = { - 0: "DELETE_COLUMN", - 1: "DELETE_COLUMNS", - } - - _NAMES_TO_VALUES = { - "DELETE_COLUMN": 0, - "DELETE_COLUMNS": 1, - } - -class TDurability: - """ - Specify Durability: - - SKIP_WAL means do not write the Mutation to the WAL. - - ASYNC_WAL means write the Mutation to the WAL asynchronously, - - SYNC_WAL means write the Mutation to the WAL synchronously, - - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. - """ - SKIP_WAL = 1 - ASYNC_WAL = 2 - SYNC_WAL = 3 - FSYNC_WAL = 4 - - _VALUES_TO_NAMES = { - 1: "SKIP_WAL", - 2: "ASYNC_WAL", - 3: "SYNC_WAL", - 4: "FSYNC_WAL", - } - - _NAMES_TO_VALUES = { - "SKIP_WAL": 1, - "ASYNC_WAL": 2, - "SYNC_WAL": 3, - "FSYNC_WAL": 4, - } - -class TReadType: - DEFAULT = 1 - STREAM = 2 - PREAD = 3 - - _VALUES_TO_NAMES = { - 1: "DEFAULT", - 2: "STREAM", - 3: "PREAD", - } - - _NAMES_TO_VALUES = { - "DEFAULT": 1, - "STREAM": 2, - "PREAD": 3, - } - -class TCompareOp: - """ - Thrift wrapper around - org.apache.hadoop.hbase.filter.CompareFilter$CompareOp. - """ - LESS = 0 - LESS_OR_EQUAL = 1 - EQUAL = 2 - NOT_EQUAL = 3 - GREATER_OR_EQUAL = 4 - GREATER = 5 - NO_OP = 6 - - _VALUES_TO_NAMES = { - 0: "LESS", - 1: "LESS_OR_EQUAL", - 2: "EQUAL", - 3: "NOT_EQUAL", - 4: "GREATER_OR_EQUAL", - 5: "GREATER", - 6: "NO_OP", - } - - _NAMES_TO_VALUES = { - "LESS": 0, - "LESS_OR_EQUAL": 1, - "EQUAL": 2, - "NOT_EQUAL": 3, - "GREATER_OR_EQUAL": 4, - "GREATER": 5, - "NO_OP": 6, - } - - -class TTimeRange: - """ - Attributes: - - minStamp - - maxStamp - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'minStamp', None, None, ), # 1 - (2, TType.I64, 'maxStamp', None, None, ), # 2 - ) - - def __init__(self, minStamp=None, maxStamp=None,): - self.minStamp = minStamp - self.maxStamp = maxStamp - - 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.I64: - self.minStamp = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I64: - self.maxStamp = 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('TTimeRange') - if self.minStamp is not None: - oprot.writeFieldBegin('minStamp', TType.I64, 1) - oprot.writeI64(self.minStamp) - oprot.writeFieldEnd() - if self.maxStamp is not None: - oprot.writeFieldBegin('maxStamp', TType.I64, 2) - oprot.writeI64(self.maxStamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.minStamp is None: - raise TProtocol.TProtocolException(message='Required field minStamp is unset!') - if self.maxStamp is None: - raise TProtocol.TProtocolException(message='Required field maxStamp is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.minStamp) - value = (value * 31) ^ hash(self.maxStamp) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TColumn: - """ - Addresses a single cell or multiple cells - in a HBase table by column family and optionally - a column qualifier and timestamp - - Attributes: - - family - - qualifier - - timestamp - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'family', None, None, ), # 1 - (2, TType.STRING, 'qualifier', None, None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - ) - - def __init__(self, family=None, qualifier=None, timestamp=None,): - self.family = family - self.qualifier = qualifier - self.timestamp = 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.qualifier = 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('TColumn') - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 1) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 2) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.timestamp) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TColumnValue: - """ - Represents a single cell and its value. - - Attributes: - - family - - qualifier - - value - - timestamp - - tags - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'family', None, None, ), # 1 - (2, TType.STRING, 'qualifier', None, None, ), # 2 - (3, TType.STRING, 'value', None, None, ), # 3 - (4, TType.I64, 'timestamp', None, None, ), # 4 - (5, TType.STRING, 'tags', None, None, ), # 5 - ) - - def __init__(self, family=None, qualifier=None, value=None, timestamp=None, tags=None,): - self.family = family - self.qualifier = qualifier - self.value = value - self.timestamp = timestamp - self.tags = tags - - 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.qualifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.value = 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.STRING: - self.tags = 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('TColumnValue') - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 1) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 2) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.value is not None: - oprot.writeFieldBegin('value', TType.STRING, 3) - oprot.writeString(self.value) - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 4) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.tags is not None: - oprot.writeFieldBegin('tags', TType.STRING, 5) - oprot.writeString(self.tags) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - if self.qualifier is None: - raise TProtocol.TProtocolException(message='Required field qualifier is unset!') - if self.value is None: - raise TProtocol.TProtocolException(message='Required field value is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.value) - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.tags) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TColumnIncrement: - """ - Represents a single cell and the amount to increment it by - - Attributes: - - family - - qualifier - - amount - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'family', None, None, ), # 1 - (2, TType.STRING, 'qualifier', None, None, ), # 2 - (3, TType.I64, 'amount', None, 1, ), # 3 - ) - - def __init__(self, family=None, qualifier=None, amount=thrift_spec[3][4],): - self.family = family - self.qualifier = qualifier - self.amount = amount - - 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.family = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.qualifier = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.amount = 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('TColumnIncrement') - if self.family is not None: - oprot.writeFieldBegin('family', TType.STRING, 1) - oprot.writeString(self.family) - oprot.writeFieldEnd() - if self.qualifier is not None: - oprot.writeFieldBegin('qualifier', TType.STRING, 2) - oprot.writeString(self.qualifier) - oprot.writeFieldEnd() - if self.amount is not None: - oprot.writeFieldBegin('amount', TType.I64, 3) - oprot.writeI64(self.amount) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.family is None: - raise TProtocol.TProtocolException(message='Required field family is unset!') - if self.qualifier is None: - raise TProtocol.TProtocolException(message='Required field qualifier is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.family) - value = (value * 31) ^ hash(self.qualifier) - value = (value * 31) ^ hash(self.amount) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TResult: - """ - if no Result is found, row and columnValues will not be set. - - Attributes: - - row - - columnValues - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columnValues', (TType.STRUCT,(TColumnValue, TColumnValue.thrift_spec)), None, ), # 2 - ) - - def __init__(self, row=None, columnValues=None,): - self.row = row - self.columnValues = columnValues - - 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.columnValues = [] - (_etype3, _size0) = iprot.readListBegin() - for _i4 in xrange(_size0): - _elem5 = TColumnValue() - _elem5.read(iprot) - self.columnValues.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('TResult') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columnValues is not None: - oprot.writeFieldBegin('columnValues', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columnValues)) - for iter6 in self.columnValues: - iter6.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.columnValues is None: - raise TProtocol.TProtocolException(message='Required field columnValues is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columnValues) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TAuthorization: - """ - Attributes: - - labels - """ - - thrift_spec = ( - None, # 0 - (1, TType.LIST, 'labels', (TType.STRING,None), None, ), # 1 - ) - - def __init__(self, labels=None,): - self.labels = labels - - 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.LIST: - self.labels = [] - (_etype10, _size7) = iprot.readListBegin() - for _i11 in xrange(_size7): - _elem12 = iprot.readString() - self.labels.append(_elem12) - 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('TAuthorization') - if self.labels is not None: - oprot.writeFieldBegin('labels', TType.LIST, 1) - oprot.writeListBegin(TType.STRING, len(self.labels)) - for iter13 in self.labels: - oprot.writeString(iter13) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.labels) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TCellVisibility: - """ - Attributes: - - expression - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'expression', None, None, ), # 1 - ) - - def __init__(self, expression=None,): - self.expression = expression - - 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.expression = 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('TCellVisibility') - if self.expression is not None: - oprot.writeFieldBegin('expression', TType.STRING, 1) - oprot.writeString(self.expression) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.expression) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TGet: - """ - Used to perform Get operations on a single row. - - The scope can be further narrowed down by specifying a list of - columns or column families. - - To get everything for a row, instantiate a Get object with just the row to get. - To further define the scope of what to get you can add a timestamp or time range - with an optional maximum number of versions to return. - - If you specify a time range and a timestamp the range is ignored. - Timestamps on TColumns are ignored. - - Attributes: - - row - - columns - - timestamp - - timeRange - - maxVersions - - filterString - - attributes - - authorizations - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columns', (TType.STRUCT,(TColumn, TColumn.thrift_spec)), None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - (4, TType.STRUCT, 'timeRange', (TTimeRange, TTimeRange.thrift_spec), None, ), # 4 - (5, TType.I32, 'maxVersions', None, None, ), # 5 - (6, TType.STRING, 'filterString', None, None, ), # 6 - (7, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 7 - (8, TType.STRUCT, 'authorizations', (TAuthorization, TAuthorization.thrift_spec), None, ), # 8 - ) - - def __init__(self, row=None, columns=None, timestamp=None, timeRange=None, maxVersions=None, filterString=None, attributes=None, authorizations=None,): - self.row = row - self.columns = columns - self.timestamp = timestamp - self.timeRange = timeRange - self.maxVersions = maxVersions - self.filterString = filterString - self.attributes = attributes - self.authorizations = authorizations - - 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.columns = [] - (_etype17, _size14) = iprot.readListBegin() - for _i18 in xrange(_size14): - _elem19 = TColumn() - _elem19.read(iprot) - self.columns.append(_elem19) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRUCT: - self.timeRange = TTimeRange() - self.timeRange.read(iprot) - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.maxVersions = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRING: - self.filterString = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.MAP: - self.attributes = {} - (_ktype21, _vtype22, _size20 ) = iprot.readMapBegin() - for _i24 in xrange(_size20): - _key25 = iprot.readString() - _val26 = iprot.readString() - self.attributes[_key25] = _val26 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.STRUCT: - self.authorizations = TAuthorization() - self.authorizations.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('TGet') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columns)) - for iter27 in self.columns: - iter27.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.timeRange is not None: - oprot.writeFieldBegin('timeRange', TType.STRUCT, 4) - self.timeRange.write(oprot) - oprot.writeFieldEnd() - if self.maxVersions is not None: - oprot.writeFieldBegin('maxVersions', TType.I32, 5) - oprot.writeI32(self.maxVersions) - oprot.writeFieldEnd() - if self.filterString is not None: - oprot.writeFieldBegin('filterString', TType.STRING, 6) - oprot.writeString(self.filterString) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 7) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter28,viter29 in self.attributes.items(): - oprot.writeString(kiter28) - oprot.writeString(viter29) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.authorizations is not None: - oprot.writeFieldBegin('authorizations', TType.STRUCT, 8) - self.authorizations.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columns) - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.timeRange) - value = (value * 31) ^ hash(self.maxVersions) - value = (value * 31) ^ hash(self.filterString) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.authorizations) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TPut: - """ - Used to perform Put operations for a single row. - - Add column values to this object and they'll be added. - You can provide a default timestamp if the column values - don't have one. If you don't provide a default timestamp - the current time is inserted. - - You can specify how this Put should be written to the write-ahead Log (WAL) - by changing the durability. If you don't provide durability, it defaults to - column family's default setting for durability. - - Attributes: - - row - - columnValues - - timestamp - - attributes - - durability - - cellVisibility - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columnValues', (TType.STRUCT,(TColumnValue, TColumnValue.thrift_spec)), None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - None, # 4 - (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 - (6, TType.I32, 'durability', None, None, ), # 6 - (7, TType.STRUCT, 'cellVisibility', (TCellVisibility, TCellVisibility.thrift_spec), None, ), # 7 - ) - - def __init__(self, row=None, columnValues=None, timestamp=None, attributes=None, durability=None, cellVisibility=None,): - self.row = row - self.columnValues = columnValues - self.timestamp = timestamp - self.attributes = attributes - self.durability = durability - self.cellVisibility = cellVisibility - - 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.columnValues = [] - (_etype33, _size30) = iprot.readListBegin() - for _i34 in xrange(_size30): - _elem35 = TColumnValue() - _elem35.read(iprot) - self.columnValues.append(_elem35) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.MAP: - self.attributes = {} - (_ktype37, _vtype38, _size36 ) = iprot.readMapBegin() - for _i40 in xrange(_size36): - _key41 = iprot.readString() - _val42 = iprot.readString() - self.attributes[_key41] = _val42 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.I32: - self.durability = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRUCT: - self.cellVisibility = TCellVisibility() - self.cellVisibility.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('TPut') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columnValues is not None: - oprot.writeFieldBegin('columnValues', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columnValues)) - for iter43 in self.columnValues: - iter43.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 5) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter44,viter45 in self.attributes.items(): - oprot.writeString(kiter44) - oprot.writeString(viter45) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.durability is not None: - oprot.writeFieldBegin('durability', TType.I32, 6) - oprot.writeI32(self.durability) - oprot.writeFieldEnd() - if self.cellVisibility is not None: - oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 7) - self.cellVisibility.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.columnValues is None: - raise TProtocol.TProtocolException(message='Required field columnValues is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columnValues) - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.durability) - value = (value * 31) ^ hash(self.cellVisibility) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TDelete: - """ - Used to perform Delete operations on a single row. - - The scope can be further narrowed down by specifying a list of - columns or column families as TColumns. - - Specifying only a family in a TColumn will delete the whole family. - If a timestamp is specified all versions with a timestamp less than - or equal to this will be deleted. If no timestamp is specified the - current time will be used. - - Specifying a family and a column qualifier in a TColumn will delete only - this qualifier. If a timestamp is specified only versions equal - to this timestamp will be deleted. If no timestamp is specified the - most recent version will be deleted. To delete all previous versions, - specify the DELETE_COLUMNS TDeleteType. - - The top level timestamp is only used if a complete row should be deleted - (i.e. no columns are passed) and if it is specified it works the same way - as if you had added a TColumn for every column family and this timestamp - (i.e. all versions older than or equal in all column families will be deleted) - - You can specify how this Delete should be written to the write-ahead Log (WAL) - by changing the durability. If you don't provide durability, it defaults to - column family's default setting for durability. - - Attributes: - - row - - columns - - timestamp - - deleteType - - attributes - - durability - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columns', (TType.STRUCT,(TColumn, TColumn.thrift_spec)), None, ), # 2 - (3, TType.I64, 'timestamp', None, None, ), # 3 - (4, TType.I32, 'deleteType', None, 1, ), # 4 - None, # 5 - (6, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 6 - (7, TType.I32, 'durability', None, None, ), # 7 - ) - - def __init__(self, row=None, columns=None, timestamp=None, deleteType=thrift_spec[4][4], attributes=None, durability=None,): - self.row = row - self.columns = columns - self.timestamp = timestamp - self.deleteType = deleteType - self.attributes = attributes - self.durability = durability - - 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.columns = [] - (_etype49, _size46) = iprot.readListBegin() - for _i50 in xrange(_size46): - _elem51 = TColumn() - _elem51.read(iprot) - self.columns.append(_elem51) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.timestamp = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.deleteType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.MAP: - self.attributes = {} - (_ktype53, _vtype54, _size52 ) = iprot.readMapBegin() - for _i56 in xrange(_size52): - _key57 = iprot.readString() - _val58 = iprot.readString() - self.attributes[_key57] = _val58 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.durability = 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('TDelete') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columns)) - for iter59 in self.columns: - iter59.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.timestamp is not None: - oprot.writeFieldBegin('timestamp', TType.I64, 3) - oprot.writeI64(self.timestamp) - oprot.writeFieldEnd() - if self.deleteType is not None: - oprot.writeFieldBegin('deleteType', TType.I32, 4) - oprot.writeI32(self.deleteType) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 6) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter60,viter61 in self.attributes.items(): - oprot.writeString(kiter60) - oprot.writeString(viter61) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.durability is not None: - oprot.writeFieldBegin('durability', TType.I32, 7) - oprot.writeI32(self.durability) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columns) - value = (value * 31) ^ hash(self.timestamp) - value = (value * 31) ^ hash(self.deleteType) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.durability) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TIncrement: - """ - Used to perform Increment operations for a single row. - - You can specify how this Increment should be written to the write-ahead Log (WAL) - by changing the durability. If you don't provide durability, it defaults to - column family's default setting for durability. - - Attributes: - - row - - columns - - attributes - - durability - - cellVisibility - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columns', (TType.STRUCT,(TColumnIncrement, TColumnIncrement.thrift_spec)), None, ), # 2 - None, # 3 - (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 - (5, TType.I32, 'durability', None, None, ), # 5 - (6, TType.STRUCT, 'cellVisibility', (TCellVisibility, TCellVisibility.thrift_spec), None, ), # 6 - ) - - def __init__(self, row=None, columns=None, attributes=None, durability=None, cellVisibility=None,): - self.row = row - self.columns = columns - self.attributes = attributes - self.durability = durability - self.cellVisibility = cellVisibility - - 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.columns = [] - (_etype65, _size62) = iprot.readListBegin() - for _i66 in xrange(_size62): - _elem67 = TColumnIncrement() - _elem67.read(iprot) - self.columns.append(_elem67) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.MAP: - self.attributes = {} - (_ktype69, _vtype70, _size68 ) = iprot.readMapBegin() - for _i72 in xrange(_size68): - _key73 = iprot.readString() - _val74 = iprot.readString() - self.attributes[_key73] = _val74 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.durability = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.cellVisibility = TCellVisibility() - self.cellVisibility.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('TIncrement') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columns)) - for iter75 in self.columns: - iter75.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 4) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter76,viter77 in self.attributes.items(): - oprot.writeString(kiter76) - oprot.writeString(viter77) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.durability is not None: - oprot.writeFieldBegin('durability', TType.I32, 5) - oprot.writeI32(self.durability) - oprot.writeFieldEnd() - if self.cellVisibility is not None: - oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 6) - self.cellVisibility.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.columns is None: - raise TProtocol.TProtocolException(message='Required field columns is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columns) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.durability) - value = (value * 31) ^ hash(self.cellVisibility) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TAppend: - """ - Attributes: - - row - - columns - - attributes - - durability - - cellVisibility - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'columns', (TType.STRUCT,(TColumnValue, TColumnValue.thrift_spec)), None, ), # 2 - (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 - (4, TType.I32, 'durability', None, None, ), # 4 - (5, TType.STRUCT, 'cellVisibility', (TCellVisibility, TCellVisibility.thrift_spec), None, ), # 5 - ) - - def __init__(self, row=None, columns=None, attributes=None, durability=None, cellVisibility=None,): - self.row = row - self.columns = columns - self.attributes = attributes - self.durability = durability - self.cellVisibility = cellVisibility - - 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.columns = [] - (_etype81, _size78) = iprot.readListBegin() - for _i82 in xrange(_size78): - _elem83 = TColumnValue() - _elem83.read(iprot) - self.columns.append(_elem83) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.MAP: - self.attributes = {} - (_ktype85, _vtype86, _size84 ) = iprot.readMapBegin() - for _i88 in xrange(_size84): - _key89 = iprot.readString() - _val90 = iprot.readString() - self.attributes[_key89] = _val90 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.durability = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.STRUCT: - self.cellVisibility = TCellVisibility() - self.cellVisibility.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('TAppend') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.columns)) - for iter91 in self.columns: - iter91.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 3) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter92,viter93 in self.attributes.items(): - oprot.writeString(kiter92) - oprot.writeString(viter93) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.durability is not None: - oprot.writeFieldBegin('durability', TType.I32, 4) - oprot.writeI32(self.durability) - oprot.writeFieldEnd() - if self.cellVisibility is not None: - oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 5) - self.cellVisibility.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.columns is None: - raise TProtocol.TProtocolException(message='Required field columns is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.columns) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.durability) - value = (value * 31) ^ hash(self.cellVisibility) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TScan: - """ - Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. - Max versions defaults to 1. - - Attributes: - - startRow - - stopRow - - columns - - caching - - maxVersions - - timeRange - - filterString - - batchSize - - attributes - - authorizations - - reversed - - cacheBlocks - - colFamTimeRangeMap - - readType - - limit - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'startRow', None, None, ), # 1 - (2, TType.STRING, 'stopRow', None, None, ), # 2 - (3, TType.LIST, 'columns', (TType.STRUCT,(TColumn, TColumn.thrift_spec)), None, ), # 3 - (4, TType.I32, 'caching', None, None, ), # 4 - (5, TType.I32, 'maxVersions', None, 1, ), # 5 - (6, TType.STRUCT, 'timeRange', (TTimeRange, TTimeRange.thrift_spec), None, ), # 6 - (7, TType.STRING, 'filterString', None, None, ), # 7 - (8, TType.I32, 'batchSize', None, None, ), # 8 - (9, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 9 - (10, TType.STRUCT, 'authorizations', (TAuthorization, TAuthorization.thrift_spec), None, ), # 10 - (11, TType.BOOL, 'reversed', None, None, ), # 11 - (12, TType.BOOL, 'cacheBlocks', None, None, ), # 12 - (13, TType.MAP, 'colFamTimeRangeMap', (TType.STRING,None,TType.STRUCT,(TTimeRange, TTimeRange.thrift_spec)), None, ), # 13 - (14, TType.I32, 'readType', None, None, ), # 14 - (15, TType.I32, 'limit', None, None, ), # 15 - ) - - def __init__(self, startRow=None, stopRow=None, columns=None, caching=None, maxVersions=thrift_spec[5][4], timeRange=None, filterString=None, batchSize=None, attributes=None, authorizations=None, reversed=None, cacheBlocks=None, colFamTimeRangeMap=None, readType=None, limit=None,): - self.startRow = startRow - self.stopRow = stopRow - self.columns = columns - self.caching = caching - self.maxVersions = maxVersions - self.timeRange = timeRange - self.filterString = filterString - self.batchSize = batchSize - self.attributes = attributes - self.authorizations = authorizations - self.reversed = reversed - self.cacheBlocks = cacheBlocks - self.colFamTimeRangeMap = colFamTimeRangeMap - self.readType = readType - self.limit = limit - - 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.startRow = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.stopRow = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.LIST: - self.columns = [] - (_etype97, _size94) = iprot.readListBegin() - for _i98 in xrange(_size94): - _elem99 = TColumn() - _elem99.read(iprot) - self.columns.append(_elem99) - iprot.readListEnd() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.I32: - self.caching = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.I32: - self.maxVersions = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.STRUCT: - self.timeRange = TTimeRange() - self.timeRange.read(iprot) - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.STRING: - self.filterString = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 8: - if ftype == TType.I32: - self.batchSize = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 9: - if ftype == TType.MAP: - self.attributes = {} - (_ktype101, _vtype102, _size100 ) = iprot.readMapBegin() - for _i104 in xrange(_size100): - _key105 = iprot.readString() - _val106 = iprot.readString() - self.attributes[_key105] = _val106 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 10: - if ftype == TType.STRUCT: - self.authorizations = TAuthorization() - self.authorizations.read(iprot) - else: - iprot.skip(ftype) - elif fid == 11: - if ftype == TType.BOOL: - self.reversed = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 12: - if ftype == TType.BOOL: - self.cacheBlocks = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 13: - if ftype == TType.MAP: - self.colFamTimeRangeMap = {} - (_ktype108, _vtype109, _size107 ) = iprot.readMapBegin() - for _i111 in xrange(_size107): - _key112 = iprot.readString() - _val113 = TTimeRange() - _val113.read(iprot) - self.colFamTimeRangeMap[_key112] = _val113 - iprot.readMapEnd() - else: - iprot.skip(ftype) - elif fid == 14: - if ftype == TType.I32: - self.readType = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 15: - if ftype == TType.I32: - self.limit = 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('TScan') - if self.startRow is not None: - oprot.writeFieldBegin('startRow', TType.STRING, 1) - oprot.writeString(self.startRow) - oprot.writeFieldEnd() - if self.stopRow is not None: - oprot.writeFieldBegin('stopRow', TType.STRING, 2) - oprot.writeString(self.stopRow) - oprot.writeFieldEnd() - if self.columns is not None: - oprot.writeFieldBegin('columns', TType.LIST, 3) - oprot.writeListBegin(TType.STRUCT, len(self.columns)) - for iter114 in self.columns: - iter114.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - if self.caching is not None: - oprot.writeFieldBegin('caching', TType.I32, 4) - oprot.writeI32(self.caching) - oprot.writeFieldEnd() - if self.maxVersions is not None: - oprot.writeFieldBegin('maxVersions', TType.I32, 5) - oprot.writeI32(self.maxVersions) - oprot.writeFieldEnd() - if self.timeRange is not None: - oprot.writeFieldBegin('timeRange', TType.STRUCT, 6) - self.timeRange.write(oprot) - oprot.writeFieldEnd() - if self.filterString is not None: - oprot.writeFieldBegin('filterString', TType.STRING, 7) - oprot.writeString(self.filterString) - oprot.writeFieldEnd() - if self.batchSize is not None: - oprot.writeFieldBegin('batchSize', TType.I32, 8) - oprot.writeI32(self.batchSize) - oprot.writeFieldEnd() - if self.attributes is not None: - oprot.writeFieldBegin('attributes', TType.MAP, 9) - oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) - for kiter115,viter116 in self.attributes.items(): - oprot.writeString(kiter115) - oprot.writeString(viter116) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.authorizations is not None: - oprot.writeFieldBegin('authorizations', TType.STRUCT, 10) - self.authorizations.write(oprot) - oprot.writeFieldEnd() - if self.reversed is not None: - oprot.writeFieldBegin('reversed', TType.BOOL, 11) - oprot.writeBool(self.reversed) - oprot.writeFieldEnd() - if self.cacheBlocks is not None: - oprot.writeFieldBegin('cacheBlocks', TType.BOOL, 12) - oprot.writeBool(self.cacheBlocks) - oprot.writeFieldEnd() - if self.colFamTimeRangeMap is not None: - oprot.writeFieldBegin('colFamTimeRangeMap', TType.MAP, 13) - oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.colFamTimeRangeMap)) - for kiter117,viter118 in self.colFamTimeRangeMap.items(): - oprot.writeString(kiter117) - viter118.write(oprot) - oprot.writeMapEnd() - oprot.writeFieldEnd() - if self.readType is not None: - oprot.writeFieldBegin('readType', TType.I32, 14) - oprot.writeI32(self.readType) - oprot.writeFieldEnd() - if self.limit is not None: - oprot.writeFieldBegin('limit', TType.I32, 15) - oprot.writeI32(self.limit) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.startRow) - value = (value * 31) ^ hash(self.stopRow) - value = (value * 31) ^ hash(self.columns) - value = (value * 31) ^ hash(self.caching) - value = (value * 31) ^ hash(self.maxVersions) - value = (value * 31) ^ hash(self.timeRange) - value = (value * 31) ^ hash(self.filterString) - value = (value * 31) ^ hash(self.batchSize) - value = (value * 31) ^ hash(self.attributes) - value = (value * 31) ^ hash(self.authorizations) - value = (value * 31) ^ hash(self.reversed) - value = (value * 31) ^ hash(self.cacheBlocks) - value = (value * 31) ^ hash(self.colFamTimeRangeMap) - value = (value * 31) ^ hash(self.readType) - value = (value * 31) ^ hash(self.limit) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TMutation: - """ - Atomic mutation for the specified row. It can be either Put or Delete. - - Attributes: - - put - - deleteSingle - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'put', (TPut, TPut.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'deleteSingle', (TDelete, TDelete.thrift_spec), None, ), # 2 - ) - - def __init__(self, put=None, deleteSingle=None,): - self.put = put - self.deleteSingle = deleteSingle - - 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.put = TPut() - self.put.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.deleteSingle = TDelete() - self.deleteSingle.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('TMutation') - if self.put is not None: - oprot.writeFieldBegin('put', TType.STRUCT, 1) - self.put.write(oprot) - oprot.writeFieldEnd() - if self.deleteSingle is not None: - oprot.writeFieldBegin('deleteSingle', TType.STRUCT, 2) - self.deleteSingle.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.put) - value = (value * 31) ^ hash(self.deleteSingle) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TRowMutations: - """ - A TRowMutations object is used to apply a number of Mutations to a single row. - - Attributes: - - row - - mutations - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'row', None, None, ), # 1 - (2, TType.LIST, 'mutations', (TType.STRUCT,(TMutation, TMutation.thrift_spec)), None, ), # 2 - ) - - def __init__(self, row=None, mutations=None,): - self.row = row - self.mutations = 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 = [] - (_etype122, _size119) = iprot.readListBegin() - for _i123 in xrange(_size119): - _elem124 = TMutation() - _elem124.read(iprot) - self.mutations.append(_elem124) - 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('TRowMutations') - if self.row is not None: - oprot.writeFieldBegin('row', TType.STRING, 1) - oprot.writeString(self.row) - oprot.writeFieldEnd() - if self.mutations is not None: - oprot.writeFieldBegin('mutations', TType.LIST, 2) - oprot.writeListBegin(TType.STRUCT, len(self.mutations)) - for iter125 in self.mutations: - iter125.write(oprot) - oprot.writeListEnd() - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.row is None: - raise TProtocol.TProtocolException(message='Required field row is unset!') - if self.mutations is None: - raise TProtocol.TProtocolException(message='Required field mutations is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.row) - value = (value * 31) ^ hash(self.mutations) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class THRegionInfo: - """ - Attributes: - - regionId - - tableName - - startKey - - endKey - - offline - - split - - replicaId - """ - - thrift_spec = ( - None, # 0 - (1, TType.I64, 'regionId', None, None, ), # 1 - (2, TType.STRING, 'tableName', None, None, ), # 2 - (3, TType.STRING, 'startKey', None, None, ), # 3 - (4, TType.STRING, 'endKey', None, None, ), # 4 - (5, TType.BOOL, 'offline', None, None, ), # 5 - (6, TType.BOOL, 'split', None, None, ), # 6 - (7, TType.I32, 'replicaId', None, None, ), # 7 - ) - - def __init__(self, regionId=None, tableName=None, startKey=None, endKey=None, offline=None, split=None, replicaId=None,): - self.regionId = regionId - self.tableName = tableName - self.startKey = startKey - self.endKey = endKey - self.offline = offline - self.split = split - self.replicaId = replicaId - - 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.I64: - self.regionId = iprot.readI64() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRING: - self.tableName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.STRING: - self.startKey = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 4: - if ftype == TType.STRING: - self.endKey = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 5: - if ftype == TType.BOOL: - self.offline = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 6: - if ftype == TType.BOOL: - self.split = iprot.readBool() - else: - iprot.skip(ftype) - elif fid == 7: - if ftype == TType.I32: - self.replicaId = 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('THRegionInfo') - if self.regionId is not None: - oprot.writeFieldBegin('regionId', TType.I64, 1) - oprot.writeI64(self.regionId) - oprot.writeFieldEnd() - if self.tableName is not None: - oprot.writeFieldBegin('tableName', TType.STRING, 2) - oprot.writeString(self.tableName) - oprot.writeFieldEnd() - if self.startKey is not None: - oprot.writeFieldBegin('startKey', TType.STRING, 3) - oprot.writeString(self.startKey) - oprot.writeFieldEnd() - if self.endKey is not None: - oprot.writeFieldBegin('endKey', TType.STRING, 4) - oprot.writeString(self.endKey) - oprot.writeFieldEnd() - if self.offline is not None: - oprot.writeFieldBegin('offline', TType.BOOL, 5) - oprot.writeBool(self.offline) - oprot.writeFieldEnd() - if self.split is not None: - oprot.writeFieldBegin('split', TType.BOOL, 6) - oprot.writeBool(self.split) - oprot.writeFieldEnd() - if self.replicaId is not None: - oprot.writeFieldBegin('replicaId', TType.I32, 7) - oprot.writeI32(self.replicaId) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.regionId is None: - raise TProtocol.TProtocolException(message='Required field regionId is unset!') - if self.tableName is None: - raise TProtocol.TProtocolException(message='Required field tableName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.regionId) - value = (value * 31) ^ hash(self.tableName) - value = (value * 31) ^ hash(self.startKey) - value = (value * 31) ^ hash(self.endKey) - value = (value * 31) ^ hash(self.offline) - value = (value * 31) ^ hash(self.split) - value = (value * 31) ^ hash(self.replicaId) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class TServerName: - """ - Attributes: - - hostName - - port - - startCode - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'hostName', None, None, ), # 1 - (2, TType.I32, 'port', None, None, ), # 2 - (3, TType.I64, 'startCode', None, None, ), # 3 - ) - - def __init__(self, hostName=None, port=None, startCode=None,): - self.hostName = hostName - self.port = port - self.startCode = startCode - - 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.hostName = iprot.readString() - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.I32: - self.port = iprot.readI32() - else: - iprot.skip(ftype) - elif fid == 3: - if ftype == TType.I64: - self.startCode = 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('TServerName') - if self.hostName is not None: - oprot.writeFieldBegin('hostName', TType.STRING, 1) - oprot.writeString(self.hostName) - oprot.writeFieldEnd() - if self.port is not None: - oprot.writeFieldBegin('port', TType.I32, 2) - oprot.writeI32(self.port) - oprot.writeFieldEnd() - if self.startCode is not None: - oprot.writeFieldBegin('startCode', TType.I64, 3) - oprot.writeI64(self.startCode) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.hostName is None: - raise TProtocol.TProtocolException(message='Required field hostName is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.hostName) - value = (value * 31) ^ hash(self.port) - value = (value * 31) ^ hash(self.startCode) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) - -class THRegionLocation: - """ - Attributes: - - serverName - - regionInfo - """ - - thrift_spec = ( - None, # 0 - (1, TType.STRUCT, 'serverName', (TServerName, TServerName.thrift_spec), None, ), # 1 - (2, TType.STRUCT, 'regionInfo', (THRegionInfo, THRegionInfo.thrift_spec), None, ), # 2 - ) - - def __init__(self, serverName=None, regionInfo=None,): - self.serverName = serverName - self.regionInfo = regionInfo - - 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.serverName = TServerName() - self.serverName.read(iprot) - else: - iprot.skip(ftype) - elif fid == 2: - if ftype == TType.STRUCT: - self.regionInfo = THRegionInfo() - self.regionInfo.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('THRegionLocation') - if self.serverName is not None: - oprot.writeFieldBegin('serverName', TType.STRUCT, 1) - self.serverName.write(oprot) - oprot.writeFieldEnd() - if self.regionInfo is not None: - oprot.writeFieldBegin('regionInfo', TType.STRUCT, 2) - self.regionInfo.write(oprot) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - if self.serverName is None: - raise TProtocol.TProtocolException(message='Required field serverName is unset!') - if self.regionInfo is None: - raise TProtocol.TProtocolException(message='Required field regionInfo is unset!') - return - - - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.serverName) - value = (value * 31) ^ hash(self.regionInfo) - return value - - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) - - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ - - def __ne__(self, other): - return not (self == other) +all_structs = [] + + +class TDeleteType(object): + """ + Specify type of delete: + - DELETE_COLUMN means exactly one version will be removed, + - DELETE_COLUMNS means previous versions will also be removed. + + """ + DELETE_COLUMN = 0 + DELETE_COLUMNS = 1 + DELETE_FAMILY = 2 + DELETE_FAMILY_VERSION = 3 + + _VALUES_TO_NAMES = { + 0: "DELETE_COLUMN", + 1: "DELETE_COLUMNS", + 2: "DELETE_FAMILY", + 3: "DELETE_FAMILY_VERSION", + } + + _NAMES_TO_VALUES = { + "DELETE_COLUMN": 0, + "DELETE_COLUMNS": 1, + "DELETE_FAMILY": 2, + "DELETE_FAMILY_VERSION": 3, + } + + +class TDurability(object): + """ + Specify Durability: + - SKIP_WAL means do not write the Mutation to the WAL. + - ASYNC_WAL means write the Mutation to the WAL asynchronously, + - SYNC_WAL means write the Mutation to the WAL synchronously, + - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. + + """ + USE_DEFAULT = 0 + SKIP_WAL = 1 + ASYNC_WAL = 2 + SYNC_WAL = 3 + FSYNC_WAL = 4 + + _VALUES_TO_NAMES = { + 0: "USE_DEFAULT", + 1: "SKIP_WAL", + 2: "ASYNC_WAL", + 3: "SYNC_WAL", + 4: "FSYNC_WAL", + } + + _NAMES_TO_VALUES = { + "USE_DEFAULT": 0, + "SKIP_WAL": 1, + "ASYNC_WAL": 2, + "SYNC_WAL": 3, + "FSYNC_WAL": 4, + } + + +class TConsistency(object): + """ + Specify Consistency: + - STRONG means reads only from primary region + - TIMELINE means reads might return values from secondary region replicas + + """ + STRONG = 1 + TIMELINE = 2 + + _VALUES_TO_NAMES = { + 1: "STRONG", + 2: "TIMELINE", + } + + _NAMES_TO_VALUES = { + "STRONG": 1, + "TIMELINE": 2, + } + + +class TReadType(object): + DEFAULT = 1 + STREAM = 2 + PREAD = 3 + + _VALUES_TO_NAMES = { + 1: "DEFAULT", + 2: "STREAM", + 3: "PREAD", + } + + _NAMES_TO_VALUES = { + "DEFAULT": 1, + "STREAM": 2, + "PREAD": 3, + } + + +class TCompareOperator(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.CompareOperator. + + """ + LESS = 0 + LESS_OR_EQUAL = 1 + EQUAL = 2 + NOT_EQUAL = 3 + GREATER_OR_EQUAL = 4 + GREATER = 5 + NO_OP = 6 + + _VALUES_TO_NAMES = { + 0: "LESS", + 1: "LESS_OR_EQUAL", + 2: "EQUAL", + 3: "NOT_EQUAL", + 4: "GREATER_OR_EQUAL", + 5: "GREATER", + 6: "NO_OP", + } + + _NAMES_TO_VALUES = { + "LESS": 0, + "LESS_OR_EQUAL": 1, + "EQUAL": 2, + "NOT_EQUAL": 3, + "GREATER_OR_EQUAL": 4, + "GREATER": 5, + "NO_OP": 6, + } + + +class TBloomFilterType(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.regionserver.BloomType + + """ + NONE = 0 + ROW = 1 + ROWCOL = 2 + ROWPREFIX_FIXED_LENGTH = 3 + + _VALUES_TO_NAMES = { + 0: "NONE", + 1: "ROW", + 2: "ROWCOL", + 3: "ROWPREFIX_FIXED_LENGTH", + } + + _NAMES_TO_VALUES = { + "NONE": 0, + "ROW": 1, + "ROWCOL": 2, + "ROWPREFIX_FIXED_LENGTH": 3, + } + + +class TCompressionAlgorithm(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.io.compress.Algorithm + + """ + LZO = 0 + GZ = 1 + NONE = 2 + SNAPPY = 3 + LZ4 = 4 + BZIP2 = 5 + ZSTD = 6 + + _VALUES_TO_NAMES = { + 0: "LZO", + 1: "GZ", + 2: "NONE", + 3: "SNAPPY", + 4: "LZ4", + 5: "BZIP2", + 6: "ZSTD", + } + + _NAMES_TO_VALUES = { + "LZO": 0, + "GZ": 1, + "NONE": 2, + "SNAPPY": 3, + "LZ4": 4, + "BZIP2": 5, + "ZSTD": 6, + } + + +class TDataBlockEncoding(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.io.encoding.DataBlockEncoding + + """ + NONE = 0 + PREFIX = 2 + DIFF = 3 + FAST_DIFF = 4 + ROW_INDEX_V1 = 7 + + _VALUES_TO_NAMES = { + 0: "NONE", + 2: "PREFIX", + 3: "DIFF", + 4: "FAST_DIFF", + 7: "ROW_INDEX_V1", + } + + _NAMES_TO_VALUES = { + "NONE": 0, + "PREFIX": 2, + "DIFF": 3, + "FAST_DIFF": 4, + "ROW_INDEX_V1": 7, + } + + +class TKeepDeletedCells(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.KeepDeletedCells + + """ + FALSE = 0 + TRUE = 1 + TTL = 2 + + _VALUES_TO_NAMES = { + 0: "FALSE", + 1: "TRUE", + 2: "TTL", + } + + _NAMES_TO_VALUES = { + "FALSE": 0, + "TRUE": 1, + "TTL": 2, + } + + +class TThriftServerType(object): + """ + Specify type of thrift server: thrift and thrift2 + + """ + ONE = 1 + TWO = 2 + + _VALUES_TO_NAMES = { + 1: "ONE", + 2: "TWO", + } + + _NAMES_TO_VALUES = { + "ONE": 1, + "TWO": 2, + } + + +class TTimeRange(object): + """ + Attributes: + - minStamp + - maxStamp + + """ + + + def __init__(self, minStamp=None, maxStamp=None,): + self.minStamp = minStamp + self.maxStamp = maxStamp + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.I64: + self.minStamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.maxStamp = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TTimeRange') + if self.minStamp is not None: + oprot.writeFieldBegin('minStamp', TType.I64, 1) + oprot.writeI64(self.minStamp) + oprot.writeFieldEnd() + if self.maxStamp is not None: + oprot.writeFieldBegin('maxStamp', TType.I64, 2) + oprot.writeI64(self.maxStamp) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.minStamp is None: + raise TProtocolException(message='Required field minStamp is unset!') + if self.maxStamp is None: + raise TProtocolException(message='Required field maxStamp is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TColumn(object): + """ + Addresses a single cell or multiple cells + in a HBase table by column family and optionally + a column qualifier and timestamp + + Attributes: + - family + - qualifier + - timestamp + + """ + + + def __init__(self, family=None, qualifier=None, timestamp=None,): + self.family = family + self.qualifier = qualifier + self.timestamp = timestamp + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + 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._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TColumn') + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 1) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 2) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TColumnValue(object): + """ + Represents a single cell and its value. + + Attributes: + - family + - qualifier + - value + - timestamp + - tags + - type + + """ + + + def __init__(self, family=None, qualifier=None, value=None, timestamp=None, tags=None, type=None,): + self.family = family + self.qualifier = qualifier + self.value = value + self.timestamp = timestamp + self.tags = tags + self.type = type + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.value = iprot.readBinary() + 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.STRING: + self.tags = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BYTE: + self.type = iprot.readByte() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TColumnValue') + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 1) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 2) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 3) + oprot.writeBinary(self.value) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.tags is not None: + oprot.writeFieldBegin('tags', TType.STRING, 5) + oprot.writeBinary(self.tags) + oprot.writeFieldEnd() + if self.type is not None: + oprot.writeFieldBegin('type', TType.BYTE, 6) + oprot.writeByte(self.type) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + if self.value is None: + raise TProtocolException(message='Required field value is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TColumnIncrement(object): + """ + Represents a single cell and the amount to increment it by + + Attributes: + - family + - qualifier + - amount + + """ + + + def __init__(self, family=None, qualifier=None, amount=1,): + self.family = family + self.qualifier = qualifier + self.amount = amount + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.family = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.amount = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TColumnIncrement') + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 1) + oprot.writeBinary(self.family) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 2) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + if self.amount is not None: + oprot.writeFieldBegin('amount', TType.I64, 3) + oprot.writeI64(self.amount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.family is None: + raise TProtocolException(message='Required field family is unset!') + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TResult(object): + """ + if no Result is found, row and columnValues will not be set. + + Attributes: + - row + - columnValues + - stale + - partial + + """ + + + def __init__(self, row=None, columnValues=None, stale=False, partial=False,): + self.row = row + self.columnValues = columnValues + self.stale = stale + self.partial = partial + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columnValues = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in range(_size0): + _elem5 = TColumnValue() + _elem5.read(iprot) + self.columnValues.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.BOOL: + self.stale = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.partial = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TResult') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columnValues is not None: + oprot.writeFieldBegin('columnValues', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columnValues)) + for iter6 in self.columnValues: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.stale is not None: + oprot.writeFieldBegin('stale', TType.BOOL, 3) + oprot.writeBool(self.stale) + oprot.writeFieldEnd() + if self.partial is not None: + oprot.writeFieldBegin('partial', TType.BOOL, 4) + oprot.writeBool(self.partial) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.columnValues is None: + raise TProtocolException(message='Required field columnValues is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TAuthorization(object): + """ + Attributes: + - labels + + """ + + + def __init__(self, labels=None,): + self.labels = labels + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.LIST: + self.labels = [] + (_etype10, _size7) = iprot.readListBegin() + for _i11 in range(_size7): + _elem12 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.labels.append(_elem12) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TAuthorization') + if self.labels is not None: + oprot.writeFieldBegin('labels', TType.LIST, 1) + oprot.writeListBegin(TType.STRING, len(self.labels)) + for iter13 in self.labels: + oprot.writeString(iter13.encode('utf-8') if sys.version_info[0] == 2 else iter13) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TCellVisibility(object): + """ + Attributes: + - expression + + """ + + + def __init__(self, expression=None,): + self.expression = expression + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.expression = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TCellVisibility') + if self.expression is not None: + oprot.writeFieldBegin('expression', TType.STRING, 1) + oprot.writeString(self.expression.encode('utf-8') if sys.version_info[0] == 2 else self.expression) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TGet(object): + """ + Used to perform Get operations on a single row. + + The scope can be further narrowed down by specifying a list of + columns or column families. + + To get everything for a row, instantiate a Get object with just the row to get. + To further define the scope of what to get you can add a timestamp or time range + with an optional maximum number of versions to return. + + If you specify a time range and a timestamp the range is ignored. + Timestamps on TColumns are ignored. + + Attributes: + - row + - columns + - timestamp + - timeRange + - maxVersions + - filterString + - attributes + - authorizations + - consistency + - targetReplicaId + - cacheBlocks + - storeLimit + - storeOffset + - existence_only + - filterBytes + + """ + + + def __init__(self, row=None, columns=None, timestamp=None, timeRange=None, maxVersions=None, filterString=None, attributes=None, authorizations=None, consistency=None, targetReplicaId=None, cacheBlocks=None, storeLimit=None, storeOffset=None, existence_only=None, filterBytes=None,): + self.row = row + self.columns = columns + self.timestamp = timestamp + self.timeRange = timeRange + self.maxVersions = maxVersions + self.filterString = filterString + self.attributes = attributes + self.authorizations = authorizations + self.consistency = consistency + self.targetReplicaId = targetReplicaId + self.cacheBlocks = cacheBlocks + self.storeLimit = storeLimit + self.storeOffset = storeOffset + self.existence_only = existence_only + self.filterBytes = filterBytes + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columns = [] + (_etype17, _size14) = iprot.readListBegin() + for _i18 in range(_size14): + _elem19 = TColumn() + _elem19.read(iprot) + self.columns.append(_elem19) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRUCT: + self.timeRange = TTimeRange() + self.timeRange.read(iprot) + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.maxVersions = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.filterString = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.MAP: + self.attributes = {} + (_ktype21, _vtype22, _size20) = iprot.readMapBegin() + for _i24 in range(_size20): + _key25 = iprot.readBinary() + _val26 = iprot.readBinary() + self.attributes[_key25] = _val26 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.STRUCT: + self.authorizations = TAuthorization() + self.authorizations.read(iprot) + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.consistency = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I32: + self.targetReplicaId = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.BOOL: + self.cacheBlocks = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I32: + self.storeLimit = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I32: + self.storeOffset = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.existence_only = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.STRING: + self.filterBytes = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TGet') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter27 in self.columns: + iter27.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.timeRange is not None: + oprot.writeFieldBegin('timeRange', TType.STRUCT, 4) + self.timeRange.write(oprot) + oprot.writeFieldEnd() + if self.maxVersions is not None: + oprot.writeFieldBegin('maxVersions', TType.I32, 5) + oprot.writeI32(self.maxVersions) + oprot.writeFieldEnd() + if self.filterString is not None: + oprot.writeFieldBegin('filterString', TType.STRING, 6) + oprot.writeBinary(self.filterString) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 7) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter28, viter29 in self.attributes.items(): + oprot.writeBinary(kiter28) + oprot.writeBinary(viter29) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.authorizations is not None: + oprot.writeFieldBegin('authorizations', TType.STRUCT, 8) + self.authorizations.write(oprot) + oprot.writeFieldEnd() + if self.consistency is not None: + oprot.writeFieldBegin('consistency', TType.I32, 9) + oprot.writeI32(self.consistency) + oprot.writeFieldEnd() + if self.targetReplicaId is not None: + oprot.writeFieldBegin('targetReplicaId', TType.I32, 10) + oprot.writeI32(self.targetReplicaId) + oprot.writeFieldEnd() + if self.cacheBlocks is not None: + oprot.writeFieldBegin('cacheBlocks', TType.BOOL, 11) + oprot.writeBool(self.cacheBlocks) + oprot.writeFieldEnd() + if self.storeLimit is not None: + oprot.writeFieldBegin('storeLimit', TType.I32, 12) + oprot.writeI32(self.storeLimit) + oprot.writeFieldEnd() + if self.storeOffset is not None: + oprot.writeFieldBegin('storeOffset', TType.I32, 13) + oprot.writeI32(self.storeOffset) + oprot.writeFieldEnd() + if self.existence_only is not None: + oprot.writeFieldBegin('existence_only', TType.BOOL, 14) + oprot.writeBool(self.existence_only) + oprot.writeFieldEnd() + if self.filterBytes is not None: + oprot.writeFieldBegin('filterBytes', TType.STRING, 15) + oprot.writeBinary(self.filterBytes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TPut(object): + """ + Used to perform Put operations for a single row. + + Add column values to this object and they'll be added. + You can provide a default timestamp if the column values + don't have one. If you don't provide a default timestamp + the current time is inserted. + + You can specify how this Put should be written to the write-ahead Log (WAL) + by changing the durability. If you don't provide durability, it defaults to + column family's default setting for durability. + + Attributes: + - row + - columnValues + - timestamp + - attributes + - durability + - cellVisibility + + """ + + + def __init__(self, row=None, columnValues=None, timestamp=None, attributes=None, durability=None, cellVisibility=None,): + self.row = row + self.columnValues = columnValues + self.timestamp = timestamp + self.attributes = attributes + self.durability = durability + self.cellVisibility = cellVisibility + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columnValues = [] + (_etype33, _size30) = iprot.readListBegin() + for _i34 in range(_size30): + _elem35 = TColumnValue() + _elem35.read(iprot) + self.columnValues.append(_elem35) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype37, _vtype38, _size36) = iprot.readMapBegin() + for _i40 in range(_size36): + _key41 = iprot.readBinary() + _val42 = iprot.readBinary() + self.attributes[_key41] = _val42 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.durability = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRUCT: + self.cellVisibility = TCellVisibility() + self.cellVisibility.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TPut') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columnValues is not None: + oprot.writeFieldBegin('columnValues', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columnValues)) + for iter43 in self.columnValues: + iter43.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter44, viter45 in self.attributes.items(): + oprot.writeBinary(kiter44) + oprot.writeBinary(viter45) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.durability is not None: + oprot.writeFieldBegin('durability', TType.I32, 6) + oprot.writeI32(self.durability) + oprot.writeFieldEnd() + if self.cellVisibility is not None: + oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 7) + self.cellVisibility.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.columnValues is None: + raise TProtocolException(message='Required field columnValues is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TDelete(object): + """ + Used to perform Delete operations on a single row. + + The scope can be further narrowed down by specifying a list of + columns or column families as TColumns. + + Specifying only a family in a TColumn will delete the whole family. + If a timestamp is specified all versions with a timestamp less than + or equal to this will be deleted. If no timestamp is specified the + current time will be used. + + Specifying a family and a column qualifier in a TColumn will delete only + this qualifier. If a timestamp is specified only versions equal + to this timestamp will be deleted. If no timestamp is specified the + most recent version will be deleted. To delete all previous versions, + specify the DELETE_COLUMNS TDeleteType. + + The top level timestamp is only used if a complete row should be deleted + (i.e. no columns are passed) and if it is specified it works the same way + as if you had added a TColumn for every column family and this timestamp + (i.e. all versions older than or equal in all column families will be deleted) + + You can specify how this Delete should be written to the write-ahead Log (WAL) + by changing the durability. If you don't provide durability, it defaults to + column family's default setting for durability. + + Attributes: + - row + - columns + - timestamp + - deleteType + - attributes + - durability + + """ + + + def __init__(self, row=None, columns=None, timestamp=None, deleteType=1, attributes=None, durability=None,): + self.row = row + self.columns = columns + self.timestamp = timestamp + self.deleteType = deleteType + self.attributes = attributes + self.durability = durability + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columns = [] + (_etype49, _size46) = iprot.readListBegin() + for _i50 in range(_size46): + _elem51 = TColumn() + _elem51.read(iprot) + self.columns.append(_elem51) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.deleteType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.attributes = {} + (_ktype53, _vtype54, _size52) = iprot.readMapBegin() + for _i56 in range(_size52): + _key57 = iprot.readBinary() + _val58 = iprot.readBinary() + self.attributes[_key57] = _val58 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.durability = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TDelete') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter59 in self.columns: + iter59.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.deleteType is not None: + oprot.writeFieldBegin('deleteType', TType.I32, 4) + oprot.writeI32(self.deleteType) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter60, viter61 in self.attributes.items(): + oprot.writeBinary(kiter60) + oprot.writeBinary(viter61) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.durability is not None: + oprot.writeFieldBegin('durability', TType.I32, 7) + oprot.writeI32(self.durability) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TIncrement(object): + """ + Used to perform Increment operations for a single row. + + You can specify how this Increment should be written to the write-ahead Log (WAL) + by changing the durability. If you don't provide durability, it defaults to + column family's default setting for durability. + + Attributes: + - row + - columns + - attributes + - durability + - cellVisibility + - returnResults + + """ + + + def __init__(self, row=None, columns=None, attributes=None, durability=None, cellVisibility=None, returnResults=None,): + self.row = row + self.columns = columns + self.attributes = attributes + self.durability = durability + self.cellVisibility = cellVisibility + self.returnResults = returnResults + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columns = [] + (_etype65, _size62) = iprot.readListBegin() + for _i66 in range(_size62): + _elem67 = TColumnIncrement() + _elem67.read(iprot) + self.columns.append(_elem67) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype69, _vtype70, _size68) = iprot.readMapBegin() + for _i72 in range(_size68): + _key73 = iprot.readBinary() + _val74 = iprot.readBinary() + self.attributes[_key73] = _val74 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.durability = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.cellVisibility = TCellVisibility() + self.cellVisibility.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.BOOL: + self.returnResults = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TIncrement') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter75 in self.columns: + iter75.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter76, viter77 in self.attributes.items(): + oprot.writeBinary(kiter76) + oprot.writeBinary(viter77) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.durability is not None: + oprot.writeFieldBegin('durability', TType.I32, 5) + oprot.writeI32(self.durability) + oprot.writeFieldEnd() + if self.cellVisibility is not None: + oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 6) + self.cellVisibility.write(oprot) + oprot.writeFieldEnd() + if self.returnResults is not None: + oprot.writeFieldBegin('returnResults', TType.BOOL, 7) + oprot.writeBool(self.returnResults) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.columns is None: + raise TProtocolException(message='Required field columns is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TAppend(object): + """ + Attributes: + - row + - columns + - attributes + - durability + - cellVisibility + - returnResults + + """ + + + def __init__(self, row=None, columns=None, attributes=None, durability=None, cellVisibility=None, returnResults=None,): + self.row = row + self.columns = columns + self.attributes = attributes + self.durability = durability + self.cellVisibility = cellVisibility + self.returnResults = returnResults + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columns = [] + (_etype81, _size78) = iprot.readListBegin() + for _i82 in range(_size78): + _elem83 = TColumnValue() + _elem83.read(iprot) + self.columns.append(_elem83) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype85, _vtype86, _size84) = iprot.readMapBegin() + for _i88 in range(_size84): + _key89 = iprot.readBinary() + _val90 = iprot.readBinary() + self.attributes[_key89] = _val90 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.durability = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRUCT: + self.cellVisibility = TCellVisibility() + self.cellVisibility.read(iprot) + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.returnResults = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TAppend') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter91 in self.columns: + iter91.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter92, viter93 in self.attributes.items(): + oprot.writeBinary(kiter92) + oprot.writeBinary(viter93) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.durability is not None: + oprot.writeFieldBegin('durability', TType.I32, 4) + oprot.writeI32(self.durability) + oprot.writeFieldEnd() + if self.cellVisibility is not None: + oprot.writeFieldBegin('cellVisibility', TType.STRUCT, 5) + self.cellVisibility.write(oprot) + oprot.writeFieldEnd() + if self.returnResults is not None: + oprot.writeFieldBegin('returnResults', TType.BOOL, 6) + oprot.writeBool(self.returnResults) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.columns is None: + raise TProtocolException(message='Required field columns is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TScan(object): + """ + Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. + Max versions defaults to 1. + + Attributes: + - startRow + - stopRow + - columns + - caching + - maxVersions + - timeRange + - filterString + - batchSize + - attributes + - authorizations + - reversed + - cacheBlocks + - colFamTimeRangeMap + - readType + - limit + - consistency + - targetReplicaId + - filterBytes + + """ + + + def __init__(self, startRow=None, stopRow=None, columns=None, caching=None, maxVersions=1, timeRange=None, filterString=None, batchSize=None, attributes=None, authorizations=None, reversed=None, cacheBlocks=None, colFamTimeRangeMap=None, readType=None, limit=None, consistency=None, targetReplicaId=None, filterBytes=None,): + self.startRow = startRow + self.stopRow = stopRow + self.columns = columns + self.caching = caching + self.maxVersions = maxVersions + self.timeRange = timeRange + self.filterString = filterString + self.batchSize = batchSize + self.attributes = attributes + self.authorizations = authorizations + self.reversed = reversed + self.cacheBlocks = cacheBlocks + self.colFamTimeRangeMap = colFamTimeRangeMap + self.readType = readType + self.limit = limit + self.consistency = consistency + self.targetReplicaId = targetReplicaId + self.filterBytes = filterBytes + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.startRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.stopRow = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype97, _size94) = iprot.readListBegin() + for _i98 in range(_size94): + _elem99 = TColumn() + _elem99.read(iprot) + self.columns.append(_elem99) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.caching = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.maxVersions = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRUCT: + self.timeRange = TTimeRange() + self.timeRange.read(iprot) + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.STRING: + self.filterString = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.batchSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.MAP: + self.attributes = {} + (_ktype101, _vtype102, _size100) = iprot.readMapBegin() + for _i104 in range(_size100): + _key105 = iprot.readBinary() + _val106 = iprot.readBinary() + self.attributes[_key105] = _val106 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.STRUCT: + self.authorizations = TAuthorization() + self.authorizations.read(iprot) + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.BOOL: + self.reversed = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.BOOL: + self.cacheBlocks = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.MAP: + self.colFamTimeRangeMap = {} + (_ktype108, _vtype109, _size107) = iprot.readMapBegin() + for _i111 in range(_size107): + _key112 = iprot.readBinary() + _val113 = TTimeRange() + _val113.read(iprot) + self.colFamTimeRangeMap[_key112] = _val113 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.I32: + self.readType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.I32: + self.limit = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.I32: + self.consistency = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.I32: + self.targetReplicaId = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.STRING: + self.filterBytes = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TScan') + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 1) + oprot.writeBinary(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 2) + oprot.writeBinary(self.stopRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter114 in self.columns: + iter114.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.caching is not None: + oprot.writeFieldBegin('caching', TType.I32, 4) + oprot.writeI32(self.caching) + oprot.writeFieldEnd() + if self.maxVersions is not None: + oprot.writeFieldBegin('maxVersions', TType.I32, 5) + oprot.writeI32(self.maxVersions) + oprot.writeFieldEnd() + if self.timeRange is not None: + oprot.writeFieldBegin('timeRange', TType.STRUCT, 6) + self.timeRange.write(oprot) + oprot.writeFieldEnd() + if self.filterString is not None: + oprot.writeFieldBegin('filterString', TType.STRING, 7) + oprot.writeBinary(self.filterString) + oprot.writeFieldEnd() + if self.batchSize is not None: + oprot.writeFieldBegin('batchSize', TType.I32, 8) + oprot.writeI32(self.batchSize) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 9) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter115, viter116 in self.attributes.items(): + oprot.writeBinary(kiter115) + oprot.writeBinary(viter116) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.authorizations is not None: + oprot.writeFieldBegin('authorizations', TType.STRUCT, 10) + self.authorizations.write(oprot) + oprot.writeFieldEnd() + if self.reversed is not None: + oprot.writeFieldBegin('reversed', TType.BOOL, 11) + oprot.writeBool(self.reversed) + oprot.writeFieldEnd() + if self.cacheBlocks is not None: + oprot.writeFieldBegin('cacheBlocks', TType.BOOL, 12) + oprot.writeBool(self.cacheBlocks) + oprot.writeFieldEnd() + if self.colFamTimeRangeMap is not None: + oprot.writeFieldBegin('colFamTimeRangeMap', TType.MAP, 13) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.colFamTimeRangeMap)) + for kiter117, viter118 in self.colFamTimeRangeMap.items(): + oprot.writeBinary(kiter117) + viter118.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.readType is not None: + oprot.writeFieldBegin('readType', TType.I32, 14) + oprot.writeI32(self.readType) + oprot.writeFieldEnd() + if self.limit is not None: + oprot.writeFieldBegin('limit', TType.I32, 15) + oprot.writeI32(self.limit) + oprot.writeFieldEnd() + if self.consistency is not None: + oprot.writeFieldBegin('consistency', TType.I32, 16) + oprot.writeI32(self.consistency) + oprot.writeFieldEnd() + if self.targetReplicaId is not None: + oprot.writeFieldBegin('targetReplicaId', TType.I32, 17) + oprot.writeI32(self.targetReplicaId) + oprot.writeFieldEnd() + if self.filterBytes is not None: + oprot.writeFieldBegin('filterBytes', TType.STRING, 18) + oprot.writeBinary(self.filterBytes) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TMutation(object): + """ + Atomic mutation for the specified row. It can be either Put or Delete. + + Attributes: + - put + - deleteSingle + + """ + + + def __init__(self, put=None, deleteSingle=None,): + self.put = put + self.deleteSingle = deleteSingle + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.put = TPut() + self.put.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.deleteSingle = TDelete() + self.deleteSingle.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TMutation') + if self.put is not None: + oprot.writeFieldBegin('put', TType.STRUCT, 1) + self.put.write(oprot) + oprot.writeFieldEnd() + if self.deleteSingle is not None: + oprot.writeFieldBegin('deleteSingle', TType.STRUCT, 2) + self.deleteSingle.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TRowMutations(object): + """ + A TRowMutations object is used to apply a number of Mutations to a single row. + + Attributes: + - row + - mutations + + """ + + + def __init__(self, row=None, mutations=None,): + self.row = row + self.mutations = mutations + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.mutations = [] + (_etype122, _size119) = iprot.readListBegin() + for _i123 in range(_size119): + _elem124 = TMutation() + _elem124.read(iprot) + self.mutations.append(_elem124) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TRowMutations') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeBinary(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter125 in self.mutations: + iter125.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.row is None: + raise TProtocolException(message='Required field row is unset!') + if self.mutations is None: + raise TProtocolException(message='Required field mutations is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class THRegionInfo(object): + """ + Attributes: + - regionId + - tableName + - startKey + - endKey + - offline + - split + - replicaId + + """ + + + def __init__(self, regionId=None, tableName=None, startKey=None, endKey=None, offline=None, split=None, replicaId=None,): + self.regionId = regionId + self.tableName = tableName + self.startKey = startKey + self.endKey = endKey + self.offline = offline + self.split = split + self.replicaId = replicaId + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.I64: + self.regionId = iprot.readI64() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.tableName = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.startKey = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.endKey = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BOOL: + self.offline = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.BOOL: + self.split = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.replicaId = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('THRegionInfo') + if self.regionId is not None: + oprot.writeFieldBegin('regionId', TType.I64, 1) + oprot.writeI64(self.regionId) + oprot.writeFieldEnd() + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 2) + oprot.writeBinary(self.tableName) + oprot.writeFieldEnd() + if self.startKey is not None: + oprot.writeFieldBegin('startKey', TType.STRING, 3) + oprot.writeBinary(self.startKey) + oprot.writeFieldEnd() + if self.endKey is not None: + oprot.writeFieldBegin('endKey', TType.STRING, 4) + oprot.writeBinary(self.endKey) + oprot.writeFieldEnd() + if self.offline is not None: + oprot.writeFieldBegin('offline', TType.BOOL, 5) + oprot.writeBool(self.offline) + oprot.writeFieldEnd() + if self.split is not None: + oprot.writeFieldBegin('split', TType.BOOL, 6) + oprot.writeBool(self.split) + oprot.writeFieldEnd() + if self.replicaId is not None: + oprot.writeFieldBegin('replicaId', TType.I32, 7) + oprot.writeI32(self.replicaId) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.regionId is None: + raise TProtocolException(message='Required field regionId is unset!') + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TServerName(object): + """ + Attributes: + - hostName + - port + - startCode + + """ + + + def __init__(self, hostName=None, port=None, startCode=None,): + self.hostName = hostName + self.port = port + self.startCode = startCode + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.hostName = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.port = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.startCode = iprot.readI64() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TServerName') + if self.hostName is not None: + oprot.writeFieldBegin('hostName', TType.STRING, 1) + oprot.writeString(self.hostName.encode('utf-8') if sys.version_info[0] == 2 else self.hostName) + oprot.writeFieldEnd() + if self.port is not None: + oprot.writeFieldBegin('port', TType.I32, 2) + oprot.writeI32(self.port) + oprot.writeFieldEnd() + if self.startCode is not None: + oprot.writeFieldBegin('startCode', TType.I64, 3) + oprot.writeI64(self.startCode) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.hostName is None: + raise TProtocolException(message='Required field hostName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class THRegionLocation(object): + """ + Attributes: + - serverName + - regionInfo + + """ + + + def __init__(self, serverName=None, regionInfo=None,): + self.serverName = serverName + self.regionInfo = regionInfo + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.serverName = TServerName() + self.serverName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.regionInfo = THRegionInfo() + self.regionInfo.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('THRegionLocation') + if self.serverName is not None: + oprot.writeFieldBegin('serverName', TType.STRUCT, 1) + self.serverName.write(oprot) + oprot.writeFieldEnd() + if self.regionInfo is not None: + oprot.writeFieldBegin('regionInfo', TType.STRUCT, 2) + self.regionInfo.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.serverName is None: + raise TProtocolException(message='Required field serverName is unset!') + if self.regionInfo is None: + raise TProtocolException(message='Required field regionInfo is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TTableName(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.TableName + + Attributes: + - ns: namespace name + - qualifier: tablename + + """ + + + def __init__(self, ns=None, qualifier=None,): + self.ns = ns + self.qualifier = qualifier + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.ns = iprot.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.qualifier = iprot.readBinary() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TTableName') + if self.ns is not None: + oprot.writeFieldBegin('ns', TType.STRING, 1) + oprot.writeBinary(self.ns) + oprot.writeFieldEnd() + if self.qualifier is not None: + oprot.writeFieldBegin('qualifier', TType.STRING, 2) + oprot.writeBinary(self.qualifier) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.qualifier is None: + raise TProtocolException(message='Required field qualifier is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TColumnFamilyDescriptor(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.client.ColumnFamilyDescriptor + + Attributes: + - name + - attributes + - configuration + - blockSize + - bloomnFilterType + - compressionType + - dfsReplication + - dataBlockEncoding + - keepDeletedCells + - maxVersions + - minVersions + - scope + - timeToLive + - blockCacheEnabled + - cacheBloomsOnWrite + - cacheDataOnWrite + - cacheIndexesOnWrite + - compressTags + - evictBlocksOnClose + - inMemory + + """ + + + def __init__(self, name=None, attributes=None, configuration=None, blockSize=None, bloomnFilterType=None, compressionType=None, dfsReplication=None, dataBlockEncoding=None, keepDeletedCells=None, maxVersions=None, minVersions=None, scope=None, timeToLive=None, blockCacheEnabled=None, cacheBloomsOnWrite=None, cacheDataOnWrite=None, cacheIndexesOnWrite=None, compressTags=None, evictBlocksOnClose=None, inMemory=None,): + self.name = name + self.attributes = attributes + self.configuration = configuration + self.blockSize = blockSize + self.bloomnFilterType = bloomnFilterType + self.compressionType = compressionType + self.dfsReplication = dfsReplication + self.dataBlockEncoding = dataBlockEncoding + self.keepDeletedCells = keepDeletedCells + self.maxVersions = maxVersions + self.minVersions = minVersions + self.scope = scope + self.timeToLive = timeToLive + self.blockCacheEnabled = blockCacheEnabled + self.cacheBloomsOnWrite = cacheBloomsOnWrite + self.cacheDataOnWrite = cacheDataOnWrite + self.cacheIndexesOnWrite = cacheIndexesOnWrite + self.compressTags = compressTags + self.evictBlocksOnClose = evictBlocksOnClose + self.inMemory = inMemory + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.readBinary() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.attributes = {} + (_ktype127, _vtype128, _size126) = iprot.readMapBegin() + for _i130 in range(_size126): + _key131 = iprot.readBinary() + _val132 = iprot.readBinary() + self.attributes[_key131] = _val132 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.configuration = {} + (_ktype134, _vtype135, _size133) = iprot.readMapBegin() + for _i137 in range(_size133): + _key138 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val139 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.configuration[_key138] = _val139 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.blockSize = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.bloomnFilterType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.compressionType = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I16: + self.dfsReplication = iprot.readI16() + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.I32: + self.dataBlockEncoding = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.keepDeletedCells = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 10: + if ftype == TType.I32: + self.maxVersions = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 11: + if ftype == TType.I32: + self.minVersions = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 12: + if ftype == TType.I32: + self.scope = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 13: + if ftype == TType.I32: + self.timeToLive = iprot.readI32() + else: + iprot.skip(ftype) + elif fid == 14: + if ftype == TType.BOOL: + self.blockCacheEnabled = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 15: + if ftype == TType.BOOL: + self.cacheBloomsOnWrite = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 16: + if ftype == TType.BOOL: + self.cacheDataOnWrite = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 17: + if ftype == TType.BOOL: + self.cacheIndexesOnWrite = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 18: + if ftype == TType.BOOL: + self.compressTags = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 19: + if ftype == TType.BOOL: + self.evictBlocksOnClose = iprot.readBool() + else: + iprot.skip(ftype) + elif fid == 20: + if ftype == TType.BOOL: + self.inMemory = iprot.readBool() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TColumnFamilyDescriptor') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeBinary(self.name) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter140, viter141 in self.attributes.items(): + oprot.writeBinary(kiter140) + oprot.writeBinary(viter141) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.configuration is not None: + oprot.writeFieldBegin('configuration', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configuration)) + for kiter142, viter143 in self.configuration.items(): + oprot.writeString(kiter142.encode('utf-8') if sys.version_info[0] == 2 else kiter142) + oprot.writeString(viter143.encode('utf-8') if sys.version_info[0] == 2 else viter143) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.blockSize is not None: + oprot.writeFieldBegin('blockSize', TType.I32, 4) + oprot.writeI32(self.blockSize) + oprot.writeFieldEnd() + if self.bloomnFilterType is not None: + oprot.writeFieldBegin('bloomnFilterType', TType.I32, 5) + oprot.writeI32(self.bloomnFilterType) + oprot.writeFieldEnd() + if self.compressionType is not None: + oprot.writeFieldBegin('compressionType', TType.I32, 6) + oprot.writeI32(self.compressionType) + oprot.writeFieldEnd() + if self.dfsReplication is not None: + oprot.writeFieldBegin('dfsReplication', TType.I16, 7) + oprot.writeI16(self.dfsReplication) + oprot.writeFieldEnd() + if self.dataBlockEncoding is not None: + oprot.writeFieldBegin('dataBlockEncoding', TType.I32, 8) + oprot.writeI32(self.dataBlockEncoding) + oprot.writeFieldEnd() + if self.keepDeletedCells is not None: + oprot.writeFieldBegin('keepDeletedCells', TType.I32, 9) + oprot.writeI32(self.keepDeletedCells) + oprot.writeFieldEnd() + if self.maxVersions is not None: + oprot.writeFieldBegin('maxVersions', TType.I32, 10) + oprot.writeI32(self.maxVersions) + oprot.writeFieldEnd() + if self.minVersions is not None: + oprot.writeFieldBegin('minVersions', TType.I32, 11) + oprot.writeI32(self.minVersions) + oprot.writeFieldEnd() + if self.scope is not None: + oprot.writeFieldBegin('scope', TType.I32, 12) + oprot.writeI32(self.scope) + oprot.writeFieldEnd() + if self.timeToLive is not None: + oprot.writeFieldBegin('timeToLive', TType.I32, 13) + oprot.writeI32(self.timeToLive) + oprot.writeFieldEnd() + if self.blockCacheEnabled is not None: + oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 14) + oprot.writeBool(self.blockCacheEnabled) + oprot.writeFieldEnd() + if self.cacheBloomsOnWrite is not None: + oprot.writeFieldBegin('cacheBloomsOnWrite', TType.BOOL, 15) + oprot.writeBool(self.cacheBloomsOnWrite) + oprot.writeFieldEnd() + if self.cacheDataOnWrite is not None: + oprot.writeFieldBegin('cacheDataOnWrite', TType.BOOL, 16) + oprot.writeBool(self.cacheDataOnWrite) + oprot.writeFieldEnd() + if self.cacheIndexesOnWrite is not None: + oprot.writeFieldBegin('cacheIndexesOnWrite', TType.BOOL, 17) + oprot.writeBool(self.cacheIndexesOnWrite) + oprot.writeFieldEnd() + if self.compressTags is not None: + oprot.writeFieldBegin('compressTags', TType.BOOL, 18) + oprot.writeBool(self.compressTags) + oprot.writeFieldEnd() + if self.evictBlocksOnClose is not None: + oprot.writeFieldBegin('evictBlocksOnClose', TType.BOOL, 19) + oprot.writeBool(self.evictBlocksOnClose) + oprot.writeFieldEnd() + if self.inMemory is not None: + oprot.writeFieldBegin('inMemory', TType.BOOL, 20) + oprot.writeBool(self.inMemory) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TTableDescriptor(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.client.TableDescriptor + + Attributes: + - tableName + - columns + - attributes + - durability + + """ + + + def __init__(self, tableName=None, columns=None, attributes=None, durability=None,): + self.tableName = tableName + self.columns = columns + self.attributes = attributes + self.durability = durability + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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.tableName = TTableName() + self.tableName.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columns = [] + (_etype147, _size144) = iprot.readListBegin() + for _i148 in range(_size144): + _elem149 = TColumnFamilyDescriptor() + _elem149.read(iprot) + self.columns.append(_elem149) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype151, _vtype152, _size150) = iprot.readMapBegin() + for _i154 in range(_size150): + _key155 = iprot.readBinary() + _val156 = iprot.readBinary() + self.attributes[_key155] = _val156 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.durability = iprot.readI32() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TTableDescriptor') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRUCT, 1) + self.tableName.write(oprot) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columns)) + for iter157 in self.columns: + iter157.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter158, viter159 in self.attributes.items(): + oprot.writeBinary(kiter158) + oprot.writeBinary(viter159) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.durability is not None: + oprot.writeFieldBegin('durability', TType.I32, 4) + oprot.writeI32(self.durability) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.tableName is None: + raise TProtocolException(message='Required field tableName is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + + +class TNamespaceDescriptor(object): + """ + Thrift wrapper around + org.apache.hadoop.hbase.NamespaceDescriptor + + Attributes: + - name + - configuration + + """ + + + def __init__(self, name=None, configuration=None,): + self.name = name + self.configuration = configuration + + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.configuration = {} + (_ktype161, _vtype162, _size160) = iprot.readMapBegin() + for _i164 in range(_size160): + _key165 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + _val166 = iprot.readString().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + self.configuration[_key165] = _val166 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TNamespaceDescriptor') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name.encode('utf-8') if sys.version_info[0] == 2 else self.name) + oprot.writeFieldEnd() + if self.configuration is not None: + oprot.writeFieldBegin('configuration', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.configuration)) + for kiter167, viter168 in self.configuration.items(): + oprot.writeString(kiter167.encode('utf-8') if sys.version_info[0] == 2 else kiter167) + oprot.writeString(viter168.encode('utf-8') if sys.version_info[0] == 2 else viter168) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + if self.name is None: + raise TProtocolException(message='Required field name is unset!') + return + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + class TIOError(TException): - """ - A TIOError exception signals that an error occurred communicating - to the HBase master or a HBase region server. Also used to return - more general HBase error conditions. + """ + A TIOError exception signals that an error occurred communicating + to the HBase master or a HBase region server. Also used to return + more general HBase error conditions. - Attributes: - - message - """ + Attributes: + - message - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = 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('TIOError') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return + """ - def __str__(self): - return repr(self) + def __init__(self, message=None,): + self.message = message - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TIOError') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + def validate(self): + return + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) - def __ne__(self, other): - return not (self == other) class TIllegalArgument(TException): - """ - A TIllegalArgument exception indicates an illegal or invalid - argument was passed into a procedure. + """ + A TIllegalArgument exception indicates an illegal or invalid + argument was passed into a procedure. - Attributes: - - message - """ + Attributes: + - message - thrift_spec = ( - None, # 0 - (1, TType.STRING, 'message', None, None, ), # 1 - ) - - def __init__(self, message=None,): - self.message = 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('TIllegalArgument') - if self.message is not None: - oprot.writeFieldBegin('message', TType.STRING, 1) - oprot.writeString(self.message) - oprot.writeFieldEnd() - oprot.writeFieldStop() - oprot.writeStructEnd() - - def validate(self): - return + """ - def __str__(self): - return repr(self) + def __init__(self, message=None,): + self.message = message - def __hash__(self): - value = 17 - value = (value * 31) ^ hash(self.message) - return value + def read(self, iprot): + if iprot._fast_decode is not None and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None: + iprot._fast_decode(self, iprot, [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().decode('utf-8') if sys.version_info[0] == 2 else iprot.readString() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() - def __repr__(self): - L = ['%s=%r' % (key, value) - for key, value in self.__dict__.iteritems()] - return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + def write(self, oprot): + if oprot._fast_encode is not None and self.thrift_spec is not None: + oprot.trans.write(oprot._fast_encode(self, [self.__class__, self.thrift_spec])) + return + oprot.writeStructBegin('TIllegalArgument') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message.encode('utf-8') if sys.version_info[0] == 2 else self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() - def __eq__(self, other): - return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + def validate(self): + return - def __ne__(self, other): - return not (self == other) + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.items()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) +all_structs.append(TTimeRange) +TTimeRange.thrift_spec = ( + None, # 0 + (1, TType.I64, 'minStamp', None, None, ), # 1 + (2, TType.I64, 'maxStamp', None, None, ), # 2 +) +all_structs.append(TColumn) +TColumn.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'family', 'BINARY', None, ), # 1 + (2, TType.STRING, 'qualifier', 'BINARY', None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 +) +all_structs.append(TColumnValue) +TColumnValue.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'family', 'BINARY', None, ), # 1 + (2, TType.STRING, 'qualifier', 'BINARY', None, ), # 2 + (3, TType.STRING, 'value', 'BINARY', None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.STRING, 'tags', 'BINARY', None, ), # 5 + (6, TType.BYTE, 'type', None, None, ), # 6 +) +all_structs.append(TColumnIncrement) +TColumnIncrement.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'family', 'BINARY', None, ), # 1 + (2, TType.STRING, 'qualifier', 'BINARY', None, ), # 2 + (3, TType.I64, 'amount', None, 1, ), # 3 +) +all_structs.append(TResult) +TResult.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columnValues', (TType.STRUCT, [TColumnValue, None], False), None, ), # 2 + (3, TType.BOOL, 'stale', None, False, ), # 3 + (4, TType.BOOL, 'partial', None, False, ), # 4 +) +all_structs.append(TAuthorization) +TAuthorization.thrift_spec = ( + None, # 0 + (1, TType.LIST, 'labels', (TType.STRING, 'UTF8', False), None, ), # 1 +) +all_structs.append(TCellVisibility) +TCellVisibility.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'expression', 'UTF8', None, ), # 1 +) +all_structs.append(TGet) +TGet.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columns', (TType.STRUCT, [TColumn, None], False), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.STRUCT, 'timeRange', [TTimeRange, None], None, ), # 4 + (5, TType.I32, 'maxVersions', None, None, ), # 5 + (6, TType.STRING, 'filterString', 'BINARY', None, ), # 6 + (7, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 7 + (8, TType.STRUCT, 'authorizations', [TAuthorization, None], None, ), # 8 + (9, TType.I32, 'consistency', None, None, ), # 9 + (10, TType.I32, 'targetReplicaId', None, None, ), # 10 + (11, TType.BOOL, 'cacheBlocks', None, None, ), # 11 + (12, TType.I32, 'storeLimit', None, None, ), # 12 + (13, TType.I32, 'storeOffset', None, None, ), # 13 + (14, TType.BOOL, 'existence_only', None, None, ), # 14 + (15, TType.STRING, 'filterBytes', 'BINARY', None, ), # 15 +) +all_structs.append(TPut) +TPut.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columnValues', (TType.STRUCT, [TColumnValue, None], False), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + None, # 4 + (5, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 5 + (6, TType.I32, 'durability', None, None, ), # 6 + (7, TType.STRUCT, 'cellVisibility', [TCellVisibility, None], None, ), # 7 +) +all_structs.append(TDelete) +TDelete.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columns', (TType.STRUCT, [TColumn, None], False), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.I32, 'deleteType', None, 1, ), # 4 + None, # 5 + (6, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 6 + (7, TType.I32, 'durability', None, None, ), # 7 +) +all_structs.append(TIncrement) +TIncrement.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columns', (TType.STRUCT, [TColumnIncrement, None], False), None, ), # 2 + None, # 3 + (4, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 4 + (5, TType.I32, 'durability', None, None, ), # 5 + (6, TType.STRUCT, 'cellVisibility', [TCellVisibility, None], None, ), # 6 + (7, TType.BOOL, 'returnResults', None, None, ), # 7 +) +all_structs.append(TAppend) +TAppend.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'columns', (TType.STRUCT, [TColumnValue, None], False), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.I32, 'durability', None, None, ), # 4 + (5, TType.STRUCT, 'cellVisibility', [TCellVisibility, None], None, ), # 5 + (6, TType.BOOL, 'returnResults', None, None, ), # 6 +) +all_structs.append(TScan) +TScan.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'startRow', 'BINARY', None, ), # 1 + (2, TType.STRING, 'stopRow', 'BINARY', None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRUCT, [TColumn, None], False), None, ), # 3 + (4, TType.I32, 'caching', None, None, ), # 4 + (5, TType.I32, 'maxVersions', None, 1, ), # 5 + (6, TType.STRUCT, 'timeRange', [TTimeRange, None], None, ), # 6 + (7, TType.STRING, 'filterString', 'BINARY', None, ), # 7 + (8, TType.I32, 'batchSize', None, None, ), # 8 + (9, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 9 + (10, TType.STRUCT, 'authorizations', [TAuthorization, None], None, ), # 10 + (11, TType.BOOL, 'reversed', None, None, ), # 11 + (12, TType.BOOL, 'cacheBlocks', None, None, ), # 12 + (13, TType.MAP, 'colFamTimeRangeMap', (TType.STRING, 'BINARY', TType.STRUCT, [TTimeRange, None], False), None, ), # 13 + (14, TType.I32, 'readType', None, None, ), # 14 + (15, TType.I32, 'limit', None, None, ), # 15 + (16, TType.I32, 'consistency', None, None, ), # 16 + (17, TType.I32, 'targetReplicaId', None, None, ), # 17 + (18, TType.STRING, 'filterBytes', 'BINARY', None, ), # 18 +) +all_structs.append(TMutation) +TMutation.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'put', [TPut, None], None, ), # 1 + (2, TType.STRUCT, 'deleteSingle', [TDelete, None], None, ), # 2 +) +all_structs.append(TRowMutations) +TRowMutations.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', 'BINARY', None, ), # 1 + (2, TType.LIST, 'mutations', (TType.STRUCT, [TMutation, None], False), None, ), # 2 +) +all_structs.append(THRegionInfo) +THRegionInfo.thrift_spec = ( + None, # 0 + (1, TType.I64, 'regionId', None, None, ), # 1 + (2, TType.STRING, 'tableName', 'BINARY', None, ), # 2 + (3, TType.STRING, 'startKey', 'BINARY', None, ), # 3 + (4, TType.STRING, 'endKey', 'BINARY', None, ), # 4 + (5, TType.BOOL, 'offline', None, None, ), # 5 + (6, TType.BOOL, 'split', None, None, ), # 6 + (7, TType.I32, 'replicaId', None, None, ), # 7 +) +all_structs.append(TServerName) +TServerName.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'hostName', 'UTF8', None, ), # 1 + (2, TType.I32, 'port', None, None, ), # 2 + (3, TType.I64, 'startCode', None, None, ), # 3 +) +all_structs.append(THRegionLocation) +THRegionLocation.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'serverName', [TServerName, None], None, ), # 1 + (2, TType.STRUCT, 'regionInfo', [THRegionInfo, None], None, ), # 2 +) +all_structs.append(TTableName) +TTableName.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'ns', 'BINARY', None, ), # 1 + (2, TType.STRING, 'qualifier', 'BINARY', None, ), # 2 +) +all_structs.append(TColumnFamilyDescriptor) +TColumnFamilyDescriptor.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'BINARY', None, ), # 1 + (2, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 2 + (3, TType.MAP, 'configuration', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 3 + (4, TType.I32, 'blockSize', None, None, ), # 4 + (5, TType.I32, 'bloomnFilterType', None, None, ), # 5 + (6, TType.I32, 'compressionType', None, None, ), # 6 + (7, TType.I16, 'dfsReplication', None, None, ), # 7 + (8, TType.I32, 'dataBlockEncoding', None, None, ), # 8 + (9, TType.I32, 'keepDeletedCells', None, None, ), # 9 + (10, TType.I32, 'maxVersions', None, None, ), # 10 + (11, TType.I32, 'minVersions', None, None, ), # 11 + (12, TType.I32, 'scope', None, None, ), # 12 + (13, TType.I32, 'timeToLive', None, None, ), # 13 + (14, TType.BOOL, 'blockCacheEnabled', None, None, ), # 14 + (15, TType.BOOL, 'cacheBloomsOnWrite', None, None, ), # 15 + (16, TType.BOOL, 'cacheDataOnWrite', None, None, ), # 16 + (17, TType.BOOL, 'cacheIndexesOnWrite', None, None, ), # 17 + (18, TType.BOOL, 'compressTags', None, None, ), # 18 + (19, TType.BOOL, 'evictBlocksOnClose', None, None, ), # 19 + (20, TType.BOOL, 'inMemory', None, None, ), # 20 +) +all_structs.append(TTableDescriptor) +TTableDescriptor.thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'tableName', [TTableName, None], None, ), # 1 + (2, TType.LIST, 'columns', (TType.STRUCT, [TColumnFamilyDescriptor, None], False), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING, 'BINARY', TType.STRING, 'BINARY', False), None, ), # 3 + (4, TType.I32, 'durability', None, None, ), # 4 +) +all_structs.append(TNamespaceDescriptor) +TNamespaceDescriptor.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', 'UTF8', None, ), # 1 + (2, TType.MAP, 'configuration', (TType.STRING, 'UTF8', TType.STRING, 'UTF8', False), None, ), # 2 +) +all_structs.append(TIOError) +TIOError.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +all_structs.append(TIllegalArgument) +TIllegalArgument.thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', 'UTF8', None, ), # 1 +) +fix_spec(all_structs) +del all_structs diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/HBaseServiceHandler.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/HBaseServiceHandler.java index 799087149c1..ccb071cc593 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/HBaseServiceHandler.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/HBaseServiceHandler.java @@ -85,6 +85,4 @@ public abstract class HBaseServiceHandler { protected Table getTable(final ByteBuffer tableName) throws IOException { return getTable(Bytes.getBytes(tableName)); } - - } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java index 34bf5e8705b..973a03d1517 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHBaseServiceHandler.java @@ -77,6 +77,7 @@ import org.apache.hadoop.hbase.thrift.generated.TIncrement; import org.apache.hadoop.hbase.thrift.generated.TRegionInfo; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.thrift.generated.TScan; +import org.apache.hadoop.hbase.thrift.generated.TThriftServerType; import org.apache.hadoop.hbase.util.Bytes; import org.apache.thrift.TException; import org.apache.yetus.audience.InterfaceAudience; @@ -1270,6 +1271,11 @@ public class ThriftHBaseServiceHandler extends HBaseServiceHandler implements Hb } } + @Override + public TThriftServerType getThriftServerType() { + return TThriftServerType.ONE; + } + private static IOError getIOError(Throwable throwable) { IOError error = new IOErrorWithCause(throwable); error.setMessage(Throwables.getStackTraceAsString(throwable)); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java index ddd7072cbb6..5cc3d493f92 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftMetrics.java @@ -61,11 +61,11 @@ public class ThriftMetrics { public static final String SLOW_RESPONSE_NANO_SEC = "hbase.thrift.slow.response.nano.second"; public static final long DEFAULT_SLOW_RESPONSE_NANO_SEC = 10 * 1000 * 1000; - + private final ThriftServerType thriftServerType; public ThriftMetrics(Configuration conf, ThriftServerType t) { - slowResponseTime = conf.getLong( SLOW_RESPONSE_NANO_SEC, DEFAULT_SLOW_RESPONSE_NANO_SEC); - + slowResponseTime = conf.getLong(SLOW_RESPONSE_NANO_SEC, DEFAULT_SLOW_RESPONSE_NANO_SEC); + thriftServerType = t; if (t == ThriftServerType.ONE) { source = CompatibilitySingletonFactory.getInstance(MetricsThriftServerSourceFactory.class).createThriftOneSource(); } else if (t == ThriftServerType.TWO) { @@ -156,4 +156,8 @@ public class ThriftMetrics { } return ClientExceptionsUtil.findException(t); } + + public ThriftServerType getThriftServerType() { + return thriftServerType; + } } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java index fc58054876b..626dfd394a5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java @@ -304,6 +304,7 @@ public class ThriftServer extends Configured implements Tool { .get(THRIFT_INFO_SERVER_BINDING_ADDRESS, THRIFT_INFO_SERVER_BINDING_ADDRESS_DEFAULT); infoServer = new InfoServer("thrift", a, port, false, conf); infoServer.setAttribute("hbase.conf", conf); + infoServer.setAttribute("hbase.thrift.server.type", metrics.getThriftServerType()); infoServer.start(); } } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java index 1a5b6c1c591..fb7fa11c20e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift.generated; * An AlreadyExists exceptions signals that a table with the specified * name already exists */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class AlreadyExists extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java index e79263e9c9d..a756c9cc921 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * A BatchMutation object is used to apply a number of Mutations to a single row. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class BatchMutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java index 6db1d28099a..6aeb5e25a9d 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift.generated; * such as the number of versions, compression settings, etc. It is * used as input when creating a table or adding a column. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class ColumnDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java index 497be658699..1530535ad3f 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class Hbase { public interface Iface { @@ -615,6 +615,13 @@ public class Hbase { */ public boolean checkAndPut(java.nio.ByteBuffer tableName, java.nio.ByteBuffer row, java.nio.ByteBuffer column, java.nio.ByteBuffer value, Mutation mput, java.util.Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException; + /** + * Get the type of this thrift server. + * + * @return the type of this thrift server + */ + public TThriftServerType getThriftServerType() throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -707,6 +714,8 @@ public class Hbase { public void checkAndPut(java.nio.ByteBuffer tableName, java.nio.ByteBuffer row, java.nio.ByteBuffer column, java.nio.ByteBuffer value, Mutation mput, java.util.Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void getThriftServerType(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -1945,6 +1954,28 @@ public class Hbase { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "checkAndPut failed: unknown result"); } + public TThriftServerType getThriftServerType() throws org.apache.thrift.TException + { + send_getThriftServerType(); + return recv_getThriftServerType(); + } + + public void send_getThriftServerType() throws org.apache.thrift.TException + { + getThriftServerType_args args = new getThriftServerType_args(); + sendBase("getThriftServerType", args); + } + + public TThriftServerType recv_getThriftServerType() throws org.apache.thrift.TException + { + getThriftServerType_result result = new getThriftServerType_result(); + receiveBase(result, "getThriftServerType"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getThriftServerType failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -3641,6 +3672,35 @@ public class Hbase { } } + public void getThriftServerType(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getThriftServerType_call method_call = new getThriftServerType_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getThriftServerType_call extends org.apache.thrift.async.TAsyncMethodCall { + public getThriftServerType_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getThriftServerType", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getThriftServerType_args args = new getThriftServerType_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public TThriftServerType getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getThriftServerType(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -3698,6 +3758,7 @@ public class Hbase { processMap.put("getRegionInfo", new getRegionInfo()); processMap.put("append", new append()); processMap.put("checkAndPut", new checkAndPut()); + processMap.put("getThriftServerType", new getThriftServerType()); return processMap; } @@ -5008,6 +5069,31 @@ public class Hbase { } } + public static class getThriftServerType extends org.apache.thrift.ProcessFunction { + public getThriftServerType() { + super("getThriftServerType"); + } + + public getThriftServerType_args getEmptyArgsInstance() { + return new getThriftServerType_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + public getThriftServerType_result getResult(I iface, getThriftServerType_args args) throws org.apache.thrift.TException { + getThriftServerType_result result = new getThriftServerType_result(); + result.success = iface.getThriftServerType(); + return result; + } + } + } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -5065,6 +5151,7 @@ public class Hbase { processMap.put("getRegionInfo", new getRegionInfo()); processMap.put("append", new append()); processMap.put("checkAndPut", new checkAndPut()); + processMap.put("getThriftServerType", new getThriftServerType()); return processMap; } @@ -7964,6 +8051,67 @@ public class Hbase { } } + public static class getThriftServerType extends org.apache.thrift.AsyncProcessFunction { + public getThriftServerType() { + super("getThriftServerType"); + } + + public getThriftServerType_args getEmptyArgsInstance() { + return new getThriftServerType_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + public void onComplete(TThriftServerType o) { + getThriftServerType_result result = new getThriftServerType_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + getThriftServerType_result result = new getThriftServerType_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getThriftServerType_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.getThriftServerType(resultHandler); + } + } + } public static class enableTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { @@ -59799,4 +59947,641 @@ public class Hbase { } } + public static class getThriftServerType_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftServerType_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getThriftServerType_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getThriftServerType_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getThriftServerType_args.class, metaDataMap); + } + + public getThriftServerType_args() { + } + + /** + * Performs a deep copy on other. + */ + public getThriftServerType_args(getThriftServerType_args other) { + } + + public getThriftServerType_args deepCopy() { + return new getThriftServerType_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof getThriftServerType_args) + return this.equals((getThriftServerType_args)that); + return false; + } + + public boolean equals(getThriftServerType_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(getThriftServerType_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getThriftServerType_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getThriftServerType_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_argsStandardScheme getScheme() { + return new getThriftServerType_argsStandardScheme(); + } + } + + private static class getThriftServerType_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftServerType_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftServerType_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_argsTupleScheme getScheme() { + return new getThriftServerType_argsTupleScheme(); + } + } + + private static class getThriftServerType_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + public static class getThriftServerType_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftServerType_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getThriftServerType_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getThriftServerType_resultTupleSchemeFactory(); + + /** + * + * @see TThriftServerType + */ + public @org.apache.thrift.annotation.Nullable TThriftServerType success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see TThriftServerType + */ + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TThriftServerType.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getThriftServerType_result.class, metaDataMap); + } + + public getThriftServerType_result() { + } + + public getThriftServerType_result( + TThriftServerType success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getThriftServerType_result(getThriftServerType_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + } + + public getThriftServerType_result deepCopy() { + return new getThriftServerType_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + /** + * + * @see TThriftServerType + */ + @org.apache.thrift.annotation.Nullable + public TThriftServerType getSuccess() { + return this.success; + } + + /** + * + * @see TThriftServerType + */ + public getThriftServerType_result setSuccess(@org.apache.thrift.annotation.Nullable TThriftServerType success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TThriftServerType)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof getThriftServerType_result) + return this.equals((getThriftServerType_result)that); + return false; + } + + public boolean equals(getThriftServerType_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.getValue(); + + return hashCode; + } + + @Override + public int compareTo(getThriftServerType_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getThriftServerType_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getThriftServerType_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_resultStandardScheme getScheme() { + return new getThriftServerType_resultStandardScheme(); + } + } + + private static class getThriftServerType_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = org.apache.hadoop.hbase.thrift.generated.TThriftServerType.findByValue(iprot.readI32()); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftServerType_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftServerType_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_resultTupleScheme getScheme() { + return new getThriftServerType_resultTupleScheme(); + } + } + + private static class getThriftServerType_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = org.apache.hadoop.hbase.thrift.generated.TThriftServerType.findByValue(iprot.readI32()); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java index f5aa62c0e16..59ef06c7c81 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift.generated; * to the Hbase master or an Hbase region server. Also used to return * more general Hbase error conditions. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class IOError extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java index cbf311e4e6b..5b635aee7ca 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift.generated; * An IllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class IllegalArgument extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java index a58ab565eca..68bbdd66c1d 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * A Mutation object is used to either update or delete a column-value. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class Mutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java index 29fbc88a9f9..cd70b4a036e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TAppend.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * An Append object is used to specify the parameters for performing the append operation. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TAppend implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java index b1e72bb1fa3..5f54dc0b850 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -13,7 +13,7 @@ package org.apache.hadoop.hbase.thrift.generated; * the timestamp of a cell to a first-class value, making it easy to take * note of temporal data. Cell is used all the way from HStore up to HTable. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TCell implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java index bdf65bfd587..47d62d57391 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TColumn.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * Holds column name and the cell. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java index 3b8c1b62e60..1ca6be3cce4 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift.generated; * For increments that are not incrementColumnValue * equivalents. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java index 48047d343c5..8ae7e4024cb 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * A TRegionInfo contains information about an HTable region. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TRegionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java index 619d705d2c2..bdae4fd85ad 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * Holds row name and then a map of columns to cells. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TRowResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java index a1f57dd61a3..c33d53893d7 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift.generated; /** * A Scan object is used to specify scanner parameters when opening a scanner. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TScan implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TThriftServerType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TThriftServerType.java new file mode 100644 index 00000000000..b376e8faae5 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/generated/TThriftServerType.java @@ -0,0 +1,46 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + + +/** + * Specify type of thrift server: thrift and thrift2 + */ +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") +public enum TThriftServerType implements org.apache.thrift.TEnum { + ONE(1), + TWO(2); + + private final int value; + + private TThriftServerType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TThriftServerType findByValue(int value) { + switch (value) { + case 1: + return ONE; + case 2: + return TWO; + default: + return null; + } + } +} diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java index 6dcbbba2f6d..778869814e8 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/ThriftHBaseServiceHandler.java @@ -84,6 +84,7 @@ import org.apache.hadoop.hbase.thrift2.generated.TRowMutations; import org.apache.hadoop.hbase.thrift2.generated.TScan; import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TTableName; +import org.apache.hadoop.hbase.thrift2.generated.TThriftServerType; import org.apache.hadoop.hbase.util.Bytes; import org.apache.thrift.TException; import org.apache.yetus.audience.InterfaceAudience; @@ -812,6 +813,11 @@ public class ThriftHBaseServiceHandler extends HBaseServiceHandler implements TH } } + @Override + public TThriftServerType getThriftServerType() { + return TThriftServerType.TWO; + } + @Override public List listNamespaceDescriptors() throws TIOError, TException { try { diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java index f72cfc02c3a..51ee872d206 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAppend.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TAppend implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAppend"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java index b5d541b5142..09ced16950d 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TAuthorization.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TAuthorization implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorization"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java index 012675089d9..06b4e5b774e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TBloomFilterType.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.regionserver.BloomType */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TBloomFilterType implements org.apache.thrift.TEnum { /** * Bloomfilters disabled diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java index 77faba98664..2032c6d9139 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCellVisibility.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TCellVisibility implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCellVisibility"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java index 976f219178e..eb3e0a60d5e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumn.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * in a HBase table by column family and optionally * a column qualifier and timestamp */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java index 2e1884abc00..2a6a1845196 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnFamilyDescriptor.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.client.ColumnFamilyDescriptor */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TColumnFamilyDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnFamilyDescriptor"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java index 49404ac0265..47de646e176 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnIncrement.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift2.generated; /** * Represents a single cell and the amount to increment it by */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TColumnIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnIncrement"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java index 7de21889002..c519f28e93c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TColumnValue.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift2.generated; /** * Represents a single cell and its value. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TColumnValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompareOp.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompareOp.java index 65b76f94e46..ca4b40ee882 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompareOp.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompareOp.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.filter.CompareFilter$CompareOp. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TCompareOp implements org.apache.thrift.TEnum { LESS(0), LESS_OR_EQUAL(1), diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompressionAlgorithm.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompressionAlgorithm.java index b5a02fe0712..48c3b7013be 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompressionAlgorithm.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TCompressionAlgorithm.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.io.compress.Algorithm */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TCompressionAlgorithm implements org.apache.thrift.TEnum { LZO(0), GZ(1), diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TConsistency.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TConsistency.java index 8f2ed194803..a724db8f4cc 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TConsistency.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TConsistency.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * - STRONG means reads only from primary region * - TIMELINE means reads might return values from secondary region replicas */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TConsistency implements org.apache.thrift.TEnum { STRONG(1), TIMELINE(2); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDataBlockEncoding.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDataBlockEncoding.java index e9a71bd0145..15fa8c8cf7b 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDataBlockEncoding.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDataBlockEncoding.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.io.encoding.DataBlockEncoding */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TDataBlockEncoding implements org.apache.thrift.TEnum { /** * Disable data block encoding. diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java index acbd807fa93..e865fc2f3c0 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDelete.java @@ -33,7 +33,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TDelete implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDelete"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java index 2301cf0e0b1..8a9d2462b59 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDeleteType.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * - DELETE_COLUMN means exactly one version will be removed, * - DELETE_COLUMNS means previous versions will also be removed. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TDeleteType implements org.apache.thrift.TEnum { DELETE_COLUMN(0), DELETE_COLUMNS(1), diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java index ae341c91bf2..effcb855bd8 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TDurability.java @@ -14,7 +14,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * - SYNC_WAL means write the Mutation to the WAL synchronously, * - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TDurability implements org.apache.thrift.TEnum { USE_DEFAULT(0), SKIP_WAL(1), diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java index 42754d69872..eafc26e99b3 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TGet.java @@ -20,7 +20,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * If you specify a time range and a timestamp the range is ignored. * Timestamps on TColumns are ignored. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TGet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGet"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java index 1cb2c98c805..9c7f3fbae25 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THBaseService.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class THBaseService { public interface Iface { @@ -500,6 +500,13 @@ public class THBaseService { */ public java.util.List listNamespaces() throws TIOError, org.apache.thrift.TException; + /** + * Get the type of this thrift server. + * + * @return the type of this thrift server + */ + public TThriftServerType getThriftServerType() throws org.apache.thrift.TException; + } public interface AsyncIface { @@ -596,6 +603,8 @@ public class THBaseService { public void listNamespaces(org.apache.thrift.async.AsyncMethodCallback> resultHandler) throws org.apache.thrift.TException; + public void getThriftServerType(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + } public static class Client extends org.apache.thrift.TServiceClient implements Iface { @@ -1808,6 +1817,28 @@ public class THBaseService { throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "listNamespaces failed: unknown result"); } + public TThriftServerType getThriftServerType() throws org.apache.thrift.TException + { + send_getThriftServerType(); + return recv_getThriftServerType(); + } + + public void send_getThriftServerType() throws org.apache.thrift.TException + { + getThriftServerType_args args = new getThriftServerType_args(); + sendBase("getThriftServerType", args); + } + + public TThriftServerType recv_getThriftServerType() throws org.apache.thrift.TException + { + getThriftServerType_result result = new getThriftServerType_result(); + receiveBase(result, "getThriftServerType"); + if (result.isSetSuccess()) { + return result.success; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getThriftServerType failed: unknown result"); + } + } public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { @@ -3415,6 +3446,35 @@ public class THBaseService { } } + public void getThriftServerType(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getThriftServerType_call method_call = new getThriftServerType_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getThriftServerType_call extends org.apache.thrift.async.TAsyncMethodCall { + public getThriftServerType_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getThriftServerType", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getThriftServerType_args args = new getThriftServerType_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public TThriftServerType getResult() throws org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new java.lang.IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getThriftServerType(); + } + } + } public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { @@ -3474,6 +3534,7 @@ public class THBaseService { processMap.put("getNamespaceDescriptor", new getNamespaceDescriptor()); processMap.put("listNamespaceDescriptors", new listNamespaceDescriptors()); processMap.put("listNamespaces", new listNamespaces()); + processMap.put("getThriftServerType", new getThriftServerType()); return processMap; } @@ -4825,6 +4886,31 @@ public class THBaseService { } } + public static class getThriftServerType extends org.apache.thrift.ProcessFunction { + public getThriftServerType() { + super("getThriftServerType"); + } + + public getThriftServerType_args getEmptyArgsInstance() { + return new getThriftServerType_args(); + } + + protected boolean isOneway() { + return false; + } + + @Override + protected boolean rethrowUnhandledExceptions() { + return false; + } + + public getThriftServerType_result getResult(I iface, getThriftServerType_args args) throws org.apache.thrift.TException { + getThriftServerType_result result = new getThriftServerType_result(); + result.success = iface.getThriftServerType(); + return result; + } + } + } public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { @@ -4884,6 +4970,7 @@ public class THBaseService { processMap.put("getNamespaceDescriptor", new getNamespaceDescriptor()); processMap.put("listNamespaceDescriptors", new listNamespaceDescriptors()); processMap.put("listNamespaces", new listNamespaces()); + processMap.put("getThriftServerType", new getThriftServerType()); return processMap; } @@ -7878,6 +7965,67 @@ public class THBaseService { } } + public static class getThriftServerType extends org.apache.thrift.AsyncProcessFunction { + public getThriftServerType() { + super("getThriftServerType"); + } + + public getThriftServerType_args getEmptyArgsInstance() { + return new getThriftServerType_args(); + } + + public org.apache.thrift.async.AsyncMethodCallback getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) { + final org.apache.thrift.AsyncProcessFunction fcall = this; + return new org.apache.thrift.async.AsyncMethodCallback() { + public void onComplete(TThriftServerType o) { + getThriftServerType_result result = new getThriftServerType_result(); + result.success = o; + try { + fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); + } catch (org.apache.thrift.transport.TTransportException e) { + _LOGGER.error("TTransportException writing to internal frame buffer", e); + fb.close(); + } catch (java.lang.Exception e) { + _LOGGER.error("Exception writing to internal frame buffer", e); + onError(e); + } + } + public void onError(java.lang.Exception e) { + byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; + org.apache.thrift.TSerializable msg; + getThriftServerType_result result = new getThriftServerType_result(); + if (e instanceof org.apache.thrift.transport.TTransportException) { + _LOGGER.error("TTransportException inside handler", e); + fb.close(); + return; + } else if (e instanceof org.apache.thrift.TApplicationException) { + _LOGGER.error("TApplicationException inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = (org.apache.thrift.TApplicationException)e; + } else { + _LOGGER.error("Exception inside handler", e); + msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; + msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); + } + try { + fcall.sendResponse(fb,msg,msgType,seqid); + } catch (java.lang.Exception ex) { + _LOGGER.error("Exception writing to internal frame buffer", ex); + fb.close(); + } + } + }; + } + + protected boolean isOneway() { + return false; + } + + public void start(I iface, getThriftServerType_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + iface.getThriftServerType(resultHandler); + } + } + } public static class exists_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { @@ -51327,4 +51475,641 @@ public class THBaseService { } } + public static class getThriftServerType_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftServerType_args"); + + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getThriftServerType_argsStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getThriftServerType_argsTupleSchemeFactory(); + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getThriftServerType_args.class, metaDataMap); + } + + public getThriftServerType_args() { + } + + /** + * Performs a deep copy on other. + */ + public getThriftServerType_args(getThriftServerType_args other) { + } + + public getThriftServerType_args deepCopy() { + return new getThriftServerType_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof getThriftServerType_args) + return this.equals((getThriftServerType_args)that); + return false; + } + + public boolean equals(getThriftServerType_args that) { + if (that == null) + return false; + if (this == that) + return true; + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + return hashCode; + } + + @Override + public int compareTo(getThriftServerType_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getThriftServerType_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getThriftServerType_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_argsStandardScheme getScheme() { + return new getThriftServerType_argsStandardScheme(); + } + } + + private static class getThriftServerType_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftServerType_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftServerType_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_argsTupleScheme getScheme() { + return new getThriftServerType_argsTupleScheme(); + } + } + + private static class getThriftServerType_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + + public static class getThriftServerType_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getThriftServerType_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + + private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getThriftServerType_resultStandardSchemeFactory(); + private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getThriftServerType_resultTupleSchemeFactory(); + + /** + * + * @see TThriftServerType + */ + public @org.apache.thrift.annotation.Nullable TThriftServerType success; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * + * @see TThriftServerType + */ + SUCCESS((short)0, "success"); + + private static final java.util.Map byName = new java.util.HashMap(); + + static { + for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + @org.apache.thrift.annotation.Nullable + public static _Fields findByName(java.lang.String name) { + return byName.get(name); + } + + private final short _thriftId; + private final java.lang.String _fieldName; + + _Fields(short thriftId, java.lang.String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public java.lang.String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TThriftServerType.class))); + metaDataMap = java.util.Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getThriftServerType_result.class, metaDataMap); + } + + public getThriftServerType_result() { + } + + public getThriftServerType_result( + TThriftServerType success) + { + this(); + this.success = success; + } + + /** + * Performs a deep copy on other. + */ + public getThriftServerType_result(getThriftServerType_result other) { + if (other.isSetSuccess()) { + this.success = other.success; + } + } + + public getThriftServerType_result deepCopy() { + return new getThriftServerType_result(this); + } + + @Override + public void clear() { + this.success = null; + } + + /** + * + * @see TThriftServerType + */ + @org.apache.thrift.annotation.Nullable + public TThriftServerType getSuccess() { + return this.success; + } + + /** + * + * @see TThriftServerType + */ + public getThriftServerType_result setSuccess(@org.apache.thrift.annotation.Nullable TThriftServerType success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TThriftServerType)value); + } + break; + + } + } + + @org.apache.thrift.annotation.Nullable + public java.lang.Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + } + throw new java.lang.IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new java.lang.IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + } + throw new java.lang.IllegalStateException(); + } + + @Override + public boolean equals(java.lang.Object that) { + if (that == null) + return false; + if (that instanceof getThriftServerType_result) + return this.equals((getThriftServerType_result)that); + return false; + } + + public boolean equals(getThriftServerType_result that) { + if (that == null) + return false; + if (this == that) + return true; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + int hashCode = 1; + + hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287); + if (isSetSuccess()) + hashCode = hashCode * 8191 + success.getValue(); + + return hashCode; + } + + @Override + public int compareTo(getThriftServerType_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + + lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + @org.apache.thrift.annotation.Nullable + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + scheme(iprot).read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + scheme(oprot).write(oprot, this); + } + + @Override + public java.lang.String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder("getThriftServerType_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + // check for sub-struct validity + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getThriftServerType_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_resultStandardScheme getScheme() { + return new getThriftServerType_resultStandardScheme(); + } + } + + private static class getThriftServerType_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = org.apache.hadoop.hbase.thrift2.generated.TThriftServerType.findByValue(iprot.readI32()); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getThriftServerType_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success.getValue()); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getThriftServerType_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory { + public getThriftServerType_resultTupleScheme getScheme() { + return new getThriftServerType_resultTupleScheme(); + } + } + + private static class getThriftServerType_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet optionals = new java.util.BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success.getValue()); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getThriftServerType_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; + java.util.BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.success = org.apache.hadoop.hbase.thrift2.generated.TThriftServerType.findByValue(iprot.readI32()); + struct.setSuccessIsSet(true); + } + } + } + + private static S scheme(org.apache.thrift.protocol.TProtocol proto) { + return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme(); + } + } + } diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java index 19ff3b248e0..7fbea3c0b23 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionInfo.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class THRegionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionInfo"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java index c2c2f2ee3d8..f16e2d723ad 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/THRegionLocation.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class THRegionLocation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THRegionLocation"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java index 5d59b8fbd66..38f5558c5b5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIOError.java @@ -12,7 +12,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * to the HBase master or a HBase region server. Also used to return * more general HBase error conditions. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TIOError extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIOError"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java index 9bcdb023c7c..14d9d3fe13e 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIllegalArgument.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * A TIllegalArgument exception indicates an illegal or invalid * argument was passed into a procedure. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TIllegalArgument extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIllegalArgument"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java index 3915e8ef0ec..64b13258a77 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TIncrement.java @@ -14,7 +14,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java index c3a36ad3b35..aad2d249973 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TKeepDeletedCells.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.KeepDeletedCells */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TKeepDeletedCells implements org.apache.thrift.TEnum { /** * Deleted Cells are not retained. diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TMutation.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TMutation.java index 35aed48dbd3..9b0b8d812aa 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TMutation.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TMutation.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift2.generated; /** * Atomic mutation for the specified row. It can be either Put or Delete. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TMutation extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMutation"); private static final org.apache.thrift.protocol.TField PUT_FIELD_DESC = new org.apache.thrift.protocol.TField("put", org.apache.thrift.protocol.TType.STRUCT, (short)1); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java index ca213b0a1b9..6c2f6349364 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TNamespaceDescriptor.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.NamespaceDescriptor */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TNamespaceDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNamespaceDescriptor"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java index e47a2b0328b..d3632a64b3a 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TPut.java @@ -19,7 +19,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * by changing the durability. If you don't provide durability, it defaults to * column family's default setting for durability. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TPut implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPut"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TReadType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TReadType.java index ee82638ce60..d1dd929bfe3 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TReadType.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TReadType.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public enum TReadType implements org.apache.thrift.TEnum { DEFAULT(1), STREAM(2), diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java index 2f1718f8d6b..bd402b2fcad 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TResult.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift2.generated; /** * if no Result is found, row and columnValues will not be set. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TResult"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java index 7a0f4347739..b16d5baa6a5 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TRowMutations.java @@ -10,7 +10,7 @@ package org.apache.hadoop.hbase.thrift2.generated; /** * A TRowMutations object is used to apply a number of Mutations to a single row. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TRowMutations implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowMutations"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java index 214e28e85e1..5f07106e20d 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TScan.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Any timestamps in the columns are ignored but the colFamTimeRangeMap included, use timeRange to select by timestamp. * Max versions defaults to 1. */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TScan implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java index 7e74ae0e5d1..c4cc687a5a2 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TServerName.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TServerName implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TServerName"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java index efb04c75e42..0f8f916562c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableDescriptor.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.client.TableDescriptor */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TTableDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableDescriptor"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java index 75ef112af2a..55b4dc86a7c 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTableName.java @@ -11,7 +11,7 @@ package org.apache.hadoop.hbase.thrift2.generated; * Thrift wrapper around * org.apache.hadoop.hbase.TableName */ -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TTableName implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableName"); diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TThriftServerType.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TThriftServerType.java new file mode 100644 index 00000000000..0f392c7c5c3 --- /dev/null +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TThriftServerType.java @@ -0,0 +1,46 @@ +/** + * Autogenerated by Thrift Compiler (0.12.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift2.generated; + + +/** + * Specify type of thrift server: thrift and thrift2 + */ +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") +public enum TThriftServerType implements org.apache.thrift.TEnum { + ONE(1), + TWO(2); + + private final int value; + + private TThriftServerType(int value) { + this.value = value; + } + + /** + * Get the integer value of this enum value, as defined in the Thrift IDL. + */ + public int getValue() { + return value; + } + + /** + * Find a the enum type by its integer value, as defined in the Thrift IDL. + * @return null if the value is not found. + */ + @org.apache.thrift.annotation.Nullable + public static TThriftServerType findByValue(int value) { + switch (value) { + case 1: + return ONE; + case 2: + return TWO; + default: + return null; + } + } +} diff --git a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java index e83f5225192..60631e4bf99 100644 --- a/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java +++ b/hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift2/generated/TTimeRange.java @@ -7,7 +7,7 @@ package org.apache.hadoop.hbase.thrift2.generated; @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"}) -@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-05-07") +@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-11-26") public class TTimeRange implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTimeRange"); diff --git a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp index 432b0f4e7a3..dea80e0d584 100644 --- a/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp +++ b/hbase-thrift/src/main/resources/hbase-webapps/thrift/thrift.jsp @@ -27,9 +27,9 @@ <% Configuration conf = (Configuration)getServletContext().getAttribute("hbase.conf"); +String serverType = (String)getServletContext().getAttribute("hbase.thrift.server.type"); long startcode = conf.getLong("startcode", System.currentTimeMillis()); String listenPort = conf.get("hbase.regionserver.thrift.port", "9090"); -String serverInfo = listenPort + "," + String.valueOf(startcode); ImplType implType = ImplType.getServerImpl(conf); String framed = implType.isAlwaysFramed() ? "true" : conf.get("hbase.regionserver.thrift.framed", "false"); @@ -121,6 +121,11 @@ String compact = conf.get("hbase.regionserver.thrift.compact", "false"); <%= framed %> Thrift RPC engine uses framed transport + + Thrift Server Type + <%= serverType %> + The type of this Thrift server + diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift index 13faa8e7c45..91ed9dae0e4 100644 --- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift +++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift @@ -192,6 +192,14 @@ exception AlreadyExists { 1:string message } +/** + * Specify type of thrift server: thrift and thrift2 + */ +enum TThriftServerType { + ONE = 1, + TWO = 2 +} + // // Service // @@ -957,4 +965,11 @@ service Hbase { /** Mutation attributes */ 7:map attributes ) throws (1:IOError io, 2:IllegalArgument ia) + + /** + * Get the type of this thrift server. + * + * @return the type of this thrift server + */ + TThriftServerType getThriftServerType() } diff --git a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift index fcb336e5e5b..e2601bf81a4 100644 --- a/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift +++ b/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift @@ -476,6 +476,14 @@ exception TIllegalArgument { 1: optional string message } +/** + * Specify type of thrift server: thrift and thrift2 + */ +enum TThriftServerType { + ONE = 1, + TWO = 2 +} + service THBaseService { /** @@ -1038,4 +1046,11 @@ service THBaseService { **/ list listNamespaces( ) throws (1: TIOError io) + + /** + * Get the type of this thrift server. + * + * @return the type of this thrift server + */ + TThriftServerType getThriftServerType() } diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java new file mode 100644 index 00000000000..49bbf8c6111 --- /dev/null +++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/HBaseThriftTestingUtility.java @@ -0,0 +1,128 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.thrift; + +import static org.apache.hadoop.hbase.thrift.Constants.INFOPORT_OPTION; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.apache.hbase.thirdparty.com.google.common.base.Joiner; + +public class HBaseThriftTestingUtility { + + private static final Logger LOG = LoggerFactory.getLogger(HBaseThriftTestingUtility.class); + private Thread thriftServerThread; + private volatile Exception thriftServerException; + private ThriftServer thriftServer; + private int port; + + public int getServerPort() { + return port; + } + + /** + * start thrift server + * @param conf configuration + * @param type the type of thrift server + * @throws Exception When starting the thrift server fails. + */ + public void startThriftServer(Configuration conf, ThriftServerType type) throws Exception { + List args = new ArrayList<>(); + port = HBaseTestingUtility.randomFreePort(); + args.add("-" + Constants.PORT_OPTION); + args.add(String.valueOf(port)); + args.add("-" + INFOPORT_OPTION); + int infoPort = HBaseTestingUtility.randomFreePort(); + args.add(String.valueOf(infoPort)); + + LOG.info("Starting Thrift Server {} on port: {} ", type, port); + thriftServer = createThriftServer(conf, type); + startThriftServerThread(args.toArray(new String[args.size()])); + // wait up to 10s for the server to start + waitForThriftServer(); + LOG.info("Started Thrift Server {} on port {}", type, port); + } + + private void startThriftServerThread(final String[] args) { + LOG.info("Starting HBase Thrift server with command line: " + Joiner.on(" ").join(args)); + + thriftServerException = null; + thriftServerThread = new Thread(() -> { + try { + thriftServer.run(args); + } catch (Exception e) { + thriftServerException = e; + } + }); + thriftServerThread.setName(ThriftServer.class.getSimpleName()); + thriftServerThread.start(); + } + + /** + * create a new thrift server + * @param conf configuration + * @param type the type of thrift server + * @return the instance of ThriftServer + */ + private ThriftServer createThriftServer(Configuration conf, ThriftServerType type) { + switch (type) { + case ONE: + return new ThriftServer(conf); + case TWO: + return new org.apache.hadoop.hbase.thrift2.ThriftServer(conf); + default: + throw new IllegalArgumentException("Unknown type: " + type); + } + } + + private void waitForThriftServer() throws Exception { + boolean isServing = false; + int i = 0; + while (i++ < 100) { + if (thriftServer.tserver == null) { + Thread.sleep(100); + } else { + isServing = true; + break; + } + } + + if (!isServing) { + if (thriftServer != null) { + thriftServer.stop(); + } + throw new IOException("Failed to start thrift server "); + } + } + + public void stopThriftServer() throws Exception{ + LOG.debug("Stopping Thrift Server"); + thriftServer.stop(); + thriftServerThread.join(); + if (thriftServerException != null) { + LOG.error("HBase Thrift server threw an exception ", thriftServerException); + throw new Exception(thriftServerException); + } + } +} \ No newline at end of file diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java index 4708463f1a2..794ebe54b74 100644 --- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java +++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftServer.java @@ -25,6 +25,7 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.IOException; +import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collection; @@ -47,6 +48,7 @@ import org.apache.hadoop.hbase.security.UserProvider; import org.apache.hadoop.hbase.test.MetricsAssertHelper; import org.apache.hadoop.hbase.testclassification.ClientTests; import org.apache.hadoop.hbase.testclassification.LargeTests; +import org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType; import org.apache.hadoop.hbase.thrift.generated.BatchMutation; import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; import org.apache.hadoop.hbase.thrift.generated.Hbase; @@ -58,9 +60,14 @@ import org.apache.hadoop.hbase.thrift.generated.TIncrement; import org.apache.hadoop.hbase.thrift.generated.TRegionInfo; import org.apache.hadoop.hbase.thrift.generated.TRowResult; import org.apache.hadoop.hbase.thrift.generated.TScan; +import org.apache.hadoop.hbase.thrift.generated.TThriftServerType; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.TableDescriptorChecker; import org.apache.hadoop.hbase.util.Threads; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; @@ -884,4 +891,35 @@ public class TestThriftServer { handler.scannerGet(scannerId); handler.scannerClose(scannerId); } + + @Test + public void testGetThriftServerType() throws Exception { + ThriftHBaseServiceHandler handler = + new ThriftHBaseServiceHandler(UTIL.getConfiguration(), + UserProvider.instantiate(UTIL.getConfiguration())); + assertEquals(TThriftServerType.ONE, handler.getThriftServerType()); + } + + /** + * Verify that thrift client calling thrift2 server can get the thrift2 server type correctly. + */ + @Test + public void testGetThriftServerOneType() throws Exception { + // start a thrift2 server + HBaseThriftTestingUtility THRIFT_TEST_UTIL = new HBaseThriftTestingUtility(); + + LOG.info("Starting HBase Thrift Server Two"); + THRIFT_TEST_UTIL.startThriftServer(UTIL.getConfiguration(), ThriftServerType.TWO); + try (TTransport transport = new TSocket(InetAddress.getLocalHost().getHostName(), + THRIFT_TEST_UTIL.getServerPort())){ + TProtocol protocol = new TBinaryProtocol(transport); + // This is our thrift client. + Hbase.Client client = new Hbase.Client(protocol); + // open the transport + transport.open(); + assertEquals(TThriftServerType.TWO.name(), client.getThriftServerType().name()); + } finally { + THRIFT_TEST_UTIL.stopThriftServer(); + } + } } diff --git a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java index 407b53fdbcb..27133d4d4a0 100644 --- a/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java +++ b/hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift2/TestThriftHBaseServiceHandler.java @@ -34,6 +34,7 @@ import static org.junit.Assert.fail; import java.io.IOException; import java.io.InterruptedIOException; +import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Arrays; @@ -73,8 +74,10 @@ import org.apache.hadoop.hbase.test.MetricsAssertHelper; import org.apache.hadoop.hbase.testclassification.ClientTests; import org.apache.hadoop.hbase.testclassification.MediumTests; import org.apache.hadoop.hbase.thrift.ErrorThrowingGetObserver; +import org.apache.hadoop.hbase.thrift.HBaseThriftTestingUtility; import org.apache.hadoop.hbase.thrift.HbaseHandlerMetricsProxy; import org.apache.hadoop.hbase.thrift.ThriftMetrics; +import org.apache.hadoop.hbase.thrift.ThriftMetrics.ThriftServerType; import org.apache.hadoop.hbase.thrift2.generated.TAppend; import org.apache.hadoop.hbase.thrift2.generated.TColumn; import org.apache.hadoop.hbase.thrift2.generated.TColumnFamilyDescriptor; @@ -100,9 +103,14 @@ import org.apache.hadoop.hbase.thrift2.generated.TRowMutations; import org.apache.hadoop.hbase.thrift2.generated.TScan; import org.apache.hadoop.hbase.thrift2.generated.TTableDescriptor; import org.apache.hadoop.hbase.thrift2.generated.TTableName; +import org.apache.hadoop.hbase.thrift2.generated.TThriftServerType; import org.apache.hadoop.hbase.thrift2.generated.TTimeRange; import org.apache.hadoop.hbase.util.Bytes; import org.apache.thrift.TException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -1687,6 +1695,36 @@ public class TestThriftHBaseServiceHandler { assertTrue(table.getColumnFamily(familyBname).getMaxVersions() == 2); } + @Test + public void testGetThriftServerType() throws Exception { + ThriftHBaseServiceHandler handler = createHandler(); + assertEquals(TThriftServerType.TWO, handler.getThriftServerType()); + } + + /** + * Verify that thrift2 client calling thrift server can get the thrift server type correctly. + */ + @Test + public void testGetThriftServerOneType() throws Exception { + + // start a thrift server + HBaseThriftTestingUtility THRIFT_TEST_UTIL = new HBaseThriftTestingUtility(); + + LOG.info("Starting HBase Thrift server One"); + THRIFT_TEST_UTIL.startThriftServer(UTIL.getConfiguration(), ThriftServerType.ONE); + try (TTransport transport = new TSocket(InetAddress.getLocalHost().getHostName(), + THRIFT_TEST_UTIL.getServerPort())){ + TProtocol protocol = new TBinaryProtocol(transport); + // This is our thrift2 client. + THBaseService.Iface client = new THBaseService.Client(protocol); + // open the transport + transport.open(); + assertEquals(TThriftServerType.ONE.name(), client.getThriftServerType().name()); + } finally { + THRIFT_TEST_UTIL.stopThriftServer(); + } + } + public static class DelayingRegionObserver implements RegionCoprocessor, RegionObserver { private static final Logger LOG = LoggerFactory.getLogger(DelayingRegionObserver.class); // sleep time in msec