From 55ab862c3962eba22f002498222fc28b4ea60738 Mon Sep 17 00:00:00 2001 From: chris finne Date: Sat, 26 Oct 2013 12:43:02 -0700 Subject: [PATCH 1/3] Upgrade to Thrift 0.9.1 and HBase 0.94.9 --- hbase-rb.gemspec | 4 +- lib/Hbase.thrift | 24 + lib/hbase/hbase.rb | 4890 +++++++++++++++++----------------- lib/hbase/hbase_constants.rb | 17 + lib/hbase/hbase_types.rb | 421 +-- 5 files changed, 2747 insertions(+), 2609 deletions(-) create mode 100644 lib/hbase/hbase_constants.rb diff --git a/hbase-rb.gemspec b/hbase-rb.gemspec index 55cbf99..387f50b 100644 --- a/hbase-rb.gemspec +++ b/hbase-rb.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = "hbase-rb" - s.version = "0.90.4.pre2" + s.version = "0.94.9" s.authors = ["Andy Lindeman"] s.email = ["andy@highgroove.com"] s.homepage = "http://github.com/highgroove/hbase-rb" @@ -14,7 +14,7 @@ Gem::Specification.new do |s| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } s.require_paths = ["lib"] - s.add_dependency "thrift", ">=0.7.0" + s.add_dependency "thrift", ">=0.9.1" s.add_development_dependency "rake" end diff --git a/lib/Hbase.thrift b/lib/Hbase.thrift index 57c7744..57985c1 100644 --- a/lib/Hbase.thrift +++ b/lib/Hbase.thrift @@ -116,6 +116,18 @@ struct TRowResult { 2:map columns } +/** + * A Scan object is used to specify scanner parameters when opening a scanner. + */ +struct TScan { + 1:optional Text startRow, + 2:optional Text stopRow, + 3:optional i64 timestamp, + 4:optional list columns, + 5:optional i32 caching, + 6:optional Text filterString +} + // // Exceptions // @@ -573,6 +585,18 @@ service Hbase { 3:i64 timestamp ) throws (1:IOError io) + /** + * Get a scanner on the current table, using the Scan instance + * for the scan parameters. + */ + ScannerID scannerOpenWithScan( + /** name of table */ + 1:Text tableName, + + /** Scan instance */ + 2:TScan scan + ) throws (1:IOError io) + /** * 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. diff --git a/lib/hbase/hbase.rb b/lib/hbase/hbase.rb index 9828e45..8dacdef 100644 --- a/lib/hbase/hbase.rb +++ b/lib/hbase/hbase.rb @@ -1,2578 +1,2646 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # - module Apache - module Hadoop - module Hbase - module Thrift - module Hbase - class Client - include ::Thrift::Client - - def enableTable(tableName) - send_enableTable(tableName) - recv_enableTable() - end - - def send_enableTable(tableName) - send_message('enableTable', EnableTable_args, :tableName => tableName) - end - - def recv_enableTable() - result = receive_message(EnableTable_result) - raise result.io unless result.io.nil? - return - end - - def disableTable(tableName) - send_disableTable(tableName) - recv_disableTable() - end - - def send_disableTable(tableName) - send_message('disableTable', DisableTable_args, :tableName => tableName) - end - - def recv_disableTable() - result = receive_message(DisableTable_result) - raise result.io unless result.io.nil? - return - end - - def isTableEnabled(tableName) - send_isTableEnabled(tableName) - return recv_isTableEnabled() - end - - def send_isTableEnabled(tableName) - send_message('isTableEnabled', IsTableEnabled_args, :tableName => tableName) - end - - def recv_isTableEnabled() - result = receive_message(IsTableEnabled_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'isTableEnabled failed: unknown result') - end - - def compact(tableNameOrRegionName) - send_compact(tableNameOrRegionName) - recv_compact() - end - - def send_compact(tableNameOrRegionName) - send_message('compact', Compact_args, :tableNameOrRegionName => tableNameOrRegionName) - end - - def recv_compact() - result = receive_message(Compact_result) - raise result.io unless result.io.nil? - return - end - - def majorCompact(tableNameOrRegionName) - send_majorCompact(tableNameOrRegionName) - recv_majorCompact() - end - - def send_majorCompact(tableNameOrRegionName) - send_message('majorCompact', MajorCompact_args, :tableNameOrRegionName => tableNameOrRegionName) - end - - def recv_majorCompact() - result = receive_message(MajorCompact_result) - raise result.io unless result.io.nil? - return - end - - def getTableNames() - send_getTableNames() - return recv_getTableNames() - end - - def send_getTableNames() - send_message('getTableNames', GetTableNames_args) - end - - def recv_getTableNames() - result = receive_message(GetTableNames_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTableNames failed: unknown result') - end - - def getColumnDescriptors(tableName) - send_getColumnDescriptors(tableName) - return recv_getColumnDescriptors() - end - - def send_getColumnDescriptors(tableName) - send_message('getColumnDescriptors', GetColumnDescriptors_args, :tableName => tableName) - end - - def recv_getColumnDescriptors() - result = receive_message(GetColumnDescriptors_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getColumnDescriptors failed: unknown result') - end - - def getTableRegions(tableName) - send_getTableRegions(tableName) - return recv_getTableRegions() - end - - def send_getTableRegions(tableName) - send_message('getTableRegions', GetTableRegions_args, :tableName => tableName) - end - - def recv_getTableRegions() - result = receive_message(GetTableRegions_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTableRegions failed: unknown result') - end - - def createTable(tableName, columnFamilies) - send_createTable(tableName, columnFamilies) - recv_createTable() - end - - def send_createTable(tableName, columnFamilies) - send_message('createTable', CreateTable_args, :tableName => tableName, :columnFamilies => columnFamilies) - end - - def recv_createTable() - result = receive_message(CreateTable_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - raise result.exist unless result.exist.nil? - return - end - - def deleteTable(tableName) - send_deleteTable(tableName) - recv_deleteTable() - end - - def send_deleteTable(tableName) - send_message('deleteTable', DeleteTable_args, :tableName => tableName) - end - - def recv_deleteTable() - result = receive_message(DeleteTable_result) - raise result.io unless result.io.nil? - return - end - - def get(tableName, row, column) - send_get(tableName, row, column) - return recv_get() - end - - def send_get(tableName, row, column) - send_message('get', Get_args, :tableName => tableName, :row => row, :column => column) - end - - def recv_get() - result = receive_message(Get_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result') - end - - def getVer(tableName, row, column, numVersions) - send_getVer(tableName, row, column, numVersions) - return recv_getVer() - end - - def send_getVer(tableName, row, column, numVersions) - send_message('getVer', GetVer_args, :tableName => tableName, :row => row, :column => column, :numVersions => numVersions) - end - - def recv_getVer() - result = receive_message(GetVer_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVer failed: unknown result') - end - - def getVerTs(tableName, row, column, timestamp, numVersions) - send_getVerTs(tableName, row, column, timestamp, numVersions) - return recv_getVerTs() - end - - def send_getVerTs(tableName, row, column, timestamp, numVersions) - send_message('getVerTs', GetVerTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp, :numVersions => numVersions) - end - - def recv_getVerTs() - result = receive_message(GetVerTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVerTs failed: unknown result') - end - - def getRow(tableName, row) - send_getRow(tableName, row) - return recv_getRow() - end - - def send_getRow(tableName, row) - send_message('getRow', GetRow_args, :tableName => tableName, :row => row) - end - - def recv_getRow() - result = receive_message(GetRow_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRow failed: unknown result') - end - - def getRowWithColumns(tableName, row, columns) - send_getRowWithColumns(tableName, row, columns) - return recv_getRowWithColumns() - end - - def send_getRowWithColumns(tableName, row, columns) - send_message('getRowWithColumns', GetRowWithColumns_args, :tableName => tableName, :row => row, :columns => columns) - end - - def recv_getRowWithColumns() - result = receive_message(GetRowWithColumns_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowWithColumns failed: unknown result') - end - - def getRowTs(tableName, row, timestamp) - send_getRowTs(tableName, row, timestamp) - return recv_getRowTs() - end - - def send_getRowTs(tableName, row, timestamp) - send_message('getRowTs', GetRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp) - end - - def recv_getRowTs() - result = receive_message(GetRowTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowTs failed: unknown result') - end - - def getRowWithColumnsTs(tableName, row, columns, timestamp) - send_getRowWithColumnsTs(tableName, row, columns, timestamp) - return recv_getRowWithColumnsTs() - end - - def send_getRowWithColumnsTs(tableName, row, columns, timestamp) - send_message('getRowWithColumnsTs', GetRowWithColumnsTs_args, :tableName => tableName, :row => row, :columns => columns, :timestamp => timestamp) - end - - def recv_getRowWithColumnsTs() - result = receive_message(GetRowWithColumnsTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowWithColumnsTs failed: unknown result') - end - - def getRows(tableName, rows) - send_getRows(tableName, rows) - return recv_getRows() - end - - def send_getRows(tableName, rows) - send_message('getRows', GetRows_args, :tableName => tableName, :rows => rows) - end - - def recv_getRows() - result = receive_message(GetRows_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRows failed: unknown result') - end - - def getRowsWithColumns(tableName, rows, columns) - send_getRowsWithColumns(tableName, rows, columns) - return recv_getRowsWithColumns() - end - - def send_getRowsWithColumns(tableName, rows, columns) - send_message('getRowsWithColumns', GetRowsWithColumns_args, :tableName => tableName, :rows => rows, :columns => columns) - end - - def recv_getRowsWithColumns() - result = receive_message(GetRowsWithColumns_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsWithColumns failed: unknown result') - end - - def getRowsTs(tableName, rows, timestamp) - send_getRowsTs(tableName, rows, timestamp) - return recv_getRowsTs() - end - - def send_getRowsTs(tableName, rows, timestamp) - send_message('getRowsTs', GetRowsTs_args, :tableName => tableName, :rows => rows, :timestamp => timestamp) - end - - def recv_getRowsTs() - result = receive_message(GetRowsTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsTs failed: unknown result') - end - - def getRowsWithColumnsTs(tableName, rows, columns, timestamp) - send_getRowsWithColumnsTs(tableName, rows, columns, timestamp) - return recv_getRowsWithColumnsTs() - end - - def send_getRowsWithColumnsTs(tableName, rows, columns, timestamp) - send_message('getRowsWithColumnsTs', GetRowsWithColumnsTs_args, :tableName => tableName, :rows => rows, :columns => columns, :timestamp => timestamp) - end - - def recv_getRowsWithColumnsTs() - result = receive_message(GetRowsWithColumnsTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsWithColumnsTs failed: unknown result') - end - - def mutateRow(tableName, row, mutations) - send_mutateRow(tableName, row, mutations) - recv_mutateRow() - end - - def send_mutateRow(tableName, row, mutations) - send_message('mutateRow', MutateRow_args, :tableName => tableName, :row => row, :mutations => mutations) - end - - def recv_mutateRow() - result = receive_message(MutateRow_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - return - end - - def mutateRowTs(tableName, row, mutations, timestamp) - send_mutateRowTs(tableName, row, mutations, timestamp) - recv_mutateRowTs() - end - - def send_mutateRowTs(tableName, row, mutations, timestamp) - send_message('mutateRowTs', MutateRowTs_args, :tableName => tableName, :row => row, :mutations => mutations, :timestamp => timestamp) - end - - def recv_mutateRowTs() - result = receive_message(MutateRowTs_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - return - end - - def mutateRows(tableName, rowBatches) - send_mutateRows(tableName, rowBatches) - recv_mutateRows() - end - - def send_mutateRows(tableName, rowBatches) - send_message('mutateRows', MutateRows_args, :tableName => tableName, :rowBatches => rowBatches) - end - - def recv_mutateRows() - result = receive_message(MutateRows_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - return - end - - def mutateRowsTs(tableName, rowBatches, timestamp) - send_mutateRowsTs(tableName, rowBatches, timestamp) - recv_mutateRowsTs() - end - - def send_mutateRowsTs(tableName, rowBatches, timestamp) - send_message('mutateRowsTs', MutateRowsTs_args, :tableName => tableName, :rowBatches => rowBatches, :timestamp => timestamp) - end - - def recv_mutateRowsTs() - result = receive_message(MutateRowsTs_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - return - end - - def atomicIncrement(tableName, row, column, value) - send_atomicIncrement(tableName, row, column, value) - return recv_atomicIncrement() - end - - def send_atomicIncrement(tableName, row, column, value) - send_message('atomicIncrement', AtomicIncrement_args, :tableName => tableName, :row => row, :column => column, :value => value) - end - - def recv_atomicIncrement() - result = receive_message(AtomicIncrement_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'atomicIncrement failed: unknown result') - end - - def deleteAll(tableName, row, column) - send_deleteAll(tableName, row, column) - recv_deleteAll() - end - - def send_deleteAll(tableName, row, column) - send_message('deleteAll', DeleteAll_args, :tableName => tableName, :row => row, :column => column) - end - - def recv_deleteAll() - result = receive_message(DeleteAll_result) - raise result.io unless result.io.nil? - return - end - - def deleteAllTs(tableName, row, column, timestamp) - send_deleteAllTs(tableName, row, column, timestamp) - recv_deleteAllTs() - end - - def send_deleteAllTs(tableName, row, column, timestamp) - send_message('deleteAllTs', DeleteAllTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp) - end - - def recv_deleteAllTs() - result = receive_message(DeleteAllTs_result) - raise result.io unless result.io.nil? - return - end - - def deleteAllRow(tableName, row) - send_deleteAllRow(tableName, row) - recv_deleteAllRow() - end - - def send_deleteAllRow(tableName, row) - send_message('deleteAllRow', DeleteAllRow_args, :tableName => tableName, :row => row) - end - - def recv_deleteAllRow() - result = receive_message(DeleteAllRow_result) - raise result.io unless result.io.nil? - return - end - - def deleteAllRowTs(tableName, row, timestamp) - send_deleteAllRowTs(tableName, row, timestamp) - recv_deleteAllRowTs() - end - - def send_deleteAllRowTs(tableName, row, timestamp) - send_message('deleteAllRowTs', DeleteAllRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp) - end - - def recv_deleteAllRowTs() - result = receive_message(DeleteAllRowTs_result) - raise result.io unless result.io.nil? - return - end - - def scannerOpen(tableName, startRow, columns) - send_scannerOpen(tableName, startRow, columns) - return recv_scannerOpen() - end - - def send_scannerOpen(tableName, startRow, columns) - send_message('scannerOpen', ScannerOpen_args, :tableName => tableName, :startRow => startRow, :columns => columns) - end - - def recv_scannerOpen() - result = receive_message(ScannerOpen_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpen failed: unknown result') - end - - def scannerOpenWithStop(tableName, startRow, stopRow, columns) - send_scannerOpenWithStop(tableName, startRow, stopRow, columns) - return recv_scannerOpenWithStop() - end - - def send_scannerOpenWithStop(tableName, startRow, stopRow, columns) - send_message('scannerOpenWithStop', ScannerOpenWithStop_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns) - end - - def recv_scannerOpenWithStop() - result = receive_message(ScannerOpenWithStop_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithStop failed: unknown result') - end - - def scannerOpenWithPrefix(tableName, startAndPrefix, columns) - send_scannerOpenWithPrefix(tableName, startAndPrefix, columns) - return recv_scannerOpenWithPrefix() - end - - def send_scannerOpenWithPrefix(tableName, startAndPrefix, columns) - send_message('scannerOpenWithPrefix', ScannerOpenWithPrefix_args, :tableName => tableName, :startAndPrefix => startAndPrefix, :columns => columns) - end - - def recv_scannerOpenWithPrefix() - result = receive_message(ScannerOpenWithPrefix_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithPrefix failed: unknown result') - end - - def scannerOpenTs(tableName, startRow, columns, timestamp) - send_scannerOpenTs(tableName, startRow, columns, timestamp) - return recv_scannerOpenTs() - end - - def send_scannerOpenTs(tableName, startRow, columns, timestamp) - send_message('scannerOpenTs', ScannerOpenTs_args, :tableName => tableName, :startRow => startRow, :columns => columns, :timestamp => timestamp) - end - - def recv_scannerOpenTs() - result = receive_message(ScannerOpenTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenTs failed: unknown result') - end - - def scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) - send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) - return recv_scannerOpenWithStopTs() - end - - def send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) - send_message('scannerOpenWithStopTs', ScannerOpenWithStopTs_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns, :timestamp => timestamp) - end - - def recv_scannerOpenWithStopTs() - result = receive_message(ScannerOpenWithStopTs_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithStopTs failed: unknown result') - end - - def scannerGet(id) - send_scannerGet(id) - return recv_scannerGet() - end - - def send_scannerGet(id) - send_message('scannerGet', ScannerGet_args, :id => id) - end - - def recv_scannerGet() - result = receive_message(ScannerGet_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerGet failed: unknown result') - end - - def scannerGetList(id, nbRows) - send_scannerGetList(id, nbRows) - return recv_scannerGetList() - end - - def send_scannerGetList(id, nbRows) - send_message('scannerGetList', ScannerGetList_args, :id => id, :nbRows => nbRows) - end - - def recv_scannerGetList() - result = receive_message(ScannerGetList_result) - return result.success unless result.success.nil? - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerGetList failed: unknown result') - end - - def scannerClose(id) - send_scannerClose(id) - recv_scannerClose() - end - - def send_scannerClose(id) - send_message('scannerClose', ScannerClose_args, :id => id) - end - - def recv_scannerClose() - result = receive_message(ScannerClose_result) - raise result.io unless result.io.nil? - raise result.ia unless result.ia.nil? - return - end - - end - - class Processor - include ::Thrift::Processor - - def process_enableTable(seqid, iprot, oprot) - args = read_args(iprot, EnableTable_args) - result = EnableTable_result.new() - begin - @handler.enableTable(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'enableTable', seqid) - end - - def process_disableTable(seqid, iprot, oprot) - args = read_args(iprot, DisableTable_args) - result = DisableTable_result.new() - begin - @handler.disableTable(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'disableTable', seqid) - end - - def process_isTableEnabled(seqid, iprot, oprot) - args = read_args(iprot, IsTableEnabled_args) - result = IsTableEnabled_result.new() - begin - result.success = @handler.isTableEnabled(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'isTableEnabled', seqid) - end - - def process_compact(seqid, iprot, oprot) - args = read_args(iprot, Compact_args) - result = Compact_result.new() - begin - @handler.compact(args.tableNameOrRegionName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'compact', seqid) - end - - def process_majorCompact(seqid, iprot, oprot) - args = read_args(iprot, MajorCompact_args) - result = MajorCompact_result.new() - begin - @handler.majorCompact(args.tableNameOrRegionName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'majorCompact', seqid) - end - - def process_getTableNames(seqid, iprot, oprot) - args = read_args(iprot, GetTableNames_args) - result = GetTableNames_result.new() - begin - result.success = @handler.getTableNames() - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getTableNames', seqid) - end - - def process_getColumnDescriptors(seqid, iprot, oprot) - args = read_args(iprot, GetColumnDescriptors_args) - result = GetColumnDescriptors_result.new() - begin - result.success = @handler.getColumnDescriptors(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getColumnDescriptors', seqid) - end - - def process_getTableRegions(seqid, iprot, oprot) - args = read_args(iprot, GetTableRegions_args) - result = GetTableRegions_result.new() - begin - result.success = @handler.getTableRegions(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getTableRegions', seqid) - end - - def process_createTable(seqid, iprot, oprot) - args = read_args(iprot, CreateTable_args) - result = CreateTable_result.new() - begin - @handler.createTable(args.tableName, args.columnFamilies) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - rescue Apache::Hadoop::Hbase::Thrift::AlreadyExists => exist - result.exist = exist - end - write_result(result, oprot, 'createTable', seqid) - end - - def process_deleteTable(seqid, iprot, oprot) - args = read_args(iprot, DeleteTable_args) - result = DeleteTable_result.new() - begin - @handler.deleteTable(args.tableName) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'deleteTable', seqid) - end - - def process_get(seqid, iprot, oprot) - args = read_args(iprot, Get_args) - result = Get_result.new() - begin - result.success = @handler.get(args.tableName, args.row, args.column) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'get', seqid) - end - - def process_getVer(seqid, iprot, oprot) - args = read_args(iprot, GetVer_args) - result = GetVer_result.new() - begin - result.success = @handler.getVer(args.tableName, args.row, args.column, args.numVersions) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getVer', seqid) - end - - def process_getVerTs(seqid, iprot, oprot) - args = read_args(iprot, GetVerTs_args) - result = GetVerTs_result.new() - begin - result.success = @handler.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getVerTs', seqid) - end - - def process_getRow(seqid, iprot, oprot) - args = read_args(iprot, GetRow_args) - result = GetRow_result.new() - begin - result.success = @handler.getRow(args.tableName, args.row) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRow', seqid) - end - - def process_getRowWithColumns(seqid, iprot, oprot) - args = read_args(iprot, GetRowWithColumns_args) - result = GetRowWithColumns_result.new() - begin - result.success = @handler.getRowWithColumns(args.tableName, args.row, args.columns) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowWithColumns', seqid) - end - - def process_getRowTs(seqid, iprot, oprot) - args = read_args(iprot, GetRowTs_args) - result = GetRowTs_result.new() - begin - result.success = @handler.getRowTs(args.tableName, args.row, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowTs', seqid) - end - - def process_getRowWithColumnsTs(seqid, iprot, oprot) - args = read_args(iprot, GetRowWithColumnsTs_args) - result = GetRowWithColumnsTs_result.new() - begin - result.success = @handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowWithColumnsTs', seqid) - end - - def process_getRows(seqid, iprot, oprot) - args = read_args(iprot, GetRows_args) - result = GetRows_result.new() - begin - result.success = @handler.getRows(args.tableName, args.rows) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRows', seqid) - end - - def process_getRowsWithColumns(seqid, iprot, oprot) - args = read_args(iprot, GetRowsWithColumns_args) - result = GetRowsWithColumns_result.new() - begin - result.success = @handler.getRowsWithColumns(args.tableName, args.rows, args.columns) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowsWithColumns', seqid) - end - - def process_getRowsTs(seqid, iprot, oprot) - args = read_args(iprot, GetRowsTs_args) - result = GetRowsTs_result.new() - begin - result.success = @handler.getRowsTs(args.tableName, args.rows, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowsTs', seqid) - end - - def process_getRowsWithColumnsTs(seqid, iprot, oprot) - args = read_args(iprot, GetRowsWithColumnsTs_args) - result = GetRowsWithColumnsTs_result.new() - begin - result.success = @handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'getRowsWithColumnsTs', seqid) - end - - def process_mutateRow(seqid, iprot, oprot) - args = read_args(iprot, MutateRow_args) - result = MutateRow_result.new() - begin - @handler.mutateRow(args.tableName, args.row, args.mutations) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'mutateRow', seqid) - end - - def process_mutateRowTs(seqid, iprot, oprot) - args = read_args(iprot, MutateRowTs_args) - result = MutateRowTs_result.new() - begin - @handler.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'mutateRowTs', seqid) - end - - def process_mutateRows(seqid, iprot, oprot) - args = read_args(iprot, MutateRows_args) - result = MutateRows_result.new() - begin - @handler.mutateRows(args.tableName, args.rowBatches) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'mutateRows', seqid) - end - - def process_mutateRowsTs(seqid, iprot, oprot) - args = read_args(iprot, MutateRowsTs_args) - result = MutateRowsTs_result.new() - begin - @handler.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'mutateRowsTs', seqid) - end - - def process_atomicIncrement(seqid, iprot, oprot) - args = read_args(iprot, AtomicIncrement_args) - result = AtomicIncrement_result.new() - begin - result.success = @handler.atomicIncrement(args.tableName, args.row, args.column, args.value) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'atomicIncrement', seqid) - end - - def process_deleteAll(seqid, iprot, oprot) - args = read_args(iprot, DeleteAll_args) - result = DeleteAll_result.new() - begin - @handler.deleteAll(args.tableName, args.row, args.column) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'deleteAll', seqid) - end - - def process_deleteAllTs(seqid, iprot, oprot) - args = read_args(iprot, DeleteAllTs_args) - result = DeleteAllTs_result.new() - begin - @handler.deleteAllTs(args.tableName, args.row, args.column, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'deleteAllTs', seqid) - end - - def process_deleteAllRow(seqid, iprot, oprot) - args = read_args(iprot, DeleteAllRow_args) - result = DeleteAllRow_result.new() - begin - @handler.deleteAllRow(args.tableName, args.row) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'deleteAllRow', seqid) - end - - def process_deleteAllRowTs(seqid, iprot, oprot) - args = read_args(iprot, DeleteAllRowTs_args) - result = DeleteAllRowTs_result.new() - begin - @handler.deleteAllRowTs(args.tableName, args.row, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'deleteAllRowTs', seqid) - end - - def process_scannerOpen(seqid, iprot, oprot) - args = read_args(iprot, ScannerOpen_args) - result = ScannerOpen_result.new() - begin - result.success = @handler.scannerOpen(args.tableName, args.startRow, args.columns) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'scannerOpen', seqid) - end - - def process_scannerOpenWithStop(seqid, iprot, oprot) - args = read_args(iprot, ScannerOpenWithStop_args) - result = ScannerOpenWithStop_result.new() - begin - result.success = @handler.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'scannerOpenWithStop', seqid) - end - - def process_scannerOpenWithPrefix(seqid, iprot, oprot) - args = read_args(iprot, ScannerOpenWithPrefix_args) - result = ScannerOpenWithPrefix_result.new() - begin - result.success = @handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'scannerOpenWithPrefix', seqid) - end - - def process_scannerOpenTs(seqid, iprot, oprot) - args = read_args(iprot, ScannerOpenTs_args) - result = ScannerOpenTs_result.new() - begin - result.success = @handler.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'scannerOpenTs', seqid) - end - - def process_scannerOpenWithStopTs(seqid, iprot, oprot) - args = read_args(iprot, ScannerOpenWithStopTs_args) - result = ScannerOpenWithStopTs_result.new() - begin - result.success = @handler.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - end - write_result(result, oprot, 'scannerOpenWithStopTs', seqid) - end - - def process_scannerGet(seqid, iprot, oprot) - args = read_args(iprot, ScannerGet_args) - result = ScannerGet_result.new() - begin - result.success = @handler.scannerGet(args.id) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'scannerGet', seqid) - end - - def process_scannerGetList(seqid, iprot, oprot) - args = read_args(iprot, ScannerGetList_args) - result = ScannerGetList_result.new() - begin - result.success = @handler.scannerGetList(args.id, args.nbRows) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'scannerGetList', seqid) - end - - def process_scannerClose(seqid, iprot, oprot) - args = read_args(iprot, ScannerClose_args) - result = ScannerClose_result.new() - begin - @handler.scannerClose(args.id) - rescue Apache::Hadoop::Hbase::Thrift::IOError => io - result.io = io - rescue Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia - result.ia = ia - end - write_result(result, oprot, 'scannerClose', seqid) - end - - end - - # HELPER FUNCTIONS AND STRUCTURES - - class EnableTable_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - - FIELDS = { - # name of the table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class EnableTable_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class DisableTable_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - - FIELDS = { - # name of the table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } - - def struct_fields; FIELDS; end +require 'thrift' +require 'hbase_types' + +module Apache + module Hadoop + module Hbase + module Thrift + module Hbase + class Client + include ::Thrift::Client + + def enableTable(tableName) + send_enableTable(tableName) + recv_enableTable() + end + + def send_enableTable(tableName) + send_message('enableTable', EnableTable_args, :tableName => tableName) + end + + def recv_enableTable() + result = receive_message(EnableTable_result) + raise result.io unless result.io.nil? + return + end + + def disableTable(tableName) + send_disableTable(tableName) + recv_disableTable() + end + + def send_disableTable(tableName) + send_message('disableTable', DisableTable_args, :tableName => tableName) + end + + def recv_disableTable() + result = receive_message(DisableTable_result) + raise result.io unless result.io.nil? + return + end + + def isTableEnabled(tableName) + send_isTableEnabled(tableName) + return recv_isTableEnabled() + end + + def send_isTableEnabled(tableName) + send_message('isTableEnabled', IsTableEnabled_args, :tableName => tableName) + end + + def recv_isTableEnabled() + result = receive_message(IsTableEnabled_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'isTableEnabled failed: unknown result') + end + + def compact(tableNameOrRegionName) + send_compact(tableNameOrRegionName) + recv_compact() + end + + def send_compact(tableNameOrRegionName) + send_message('compact', Compact_args, :tableNameOrRegionName => tableNameOrRegionName) + end + + def recv_compact() + result = receive_message(Compact_result) + raise result.io unless result.io.nil? + return + end + + def majorCompact(tableNameOrRegionName) + send_majorCompact(tableNameOrRegionName) + recv_majorCompact() + end + + def send_majorCompact(tableNameOrRegionName) + send_message('majorCompact', MajorCompact_args, :tableNameOrRegionName => tableNameOrRegionName) + end + + def recv_majorCompact() + result = receive_message(MajorCompact_result) + raise result.io unless result.io.nil? + return + end + + def getTableNames() + send_getTableNames() + return recv_getTableNames() + end + + def send_getTableNames() + send_message('getTableNames', GetTableNames_args) + end + + def recv_getTableNames() + result = receive_message(GetTableNames_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTableNames failed: unknown result') + end + + def getColumnDescriptors(tableName) + send_getColumnDescriptors(tableName) + return recv_getColumnDescriptors() + end + + def send_getColumnDescriptors(tableName) + send_message('getColumnDescriptors', GetColumnDescriptors_args, :tableName => tableName) + end + + def recv_getColumnDescriptors() + result = receive_message(GetColumnDescriptors_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getColumnDescriptors failed: unknown result') + end + + def getTableRegions(tableName) + send_getTableRegions(tableName) + return recv_getTableRegions() + end + + def send_getTableRegions(tableName) + send_message('getTableRegions', GetTableRegions_args, :tableName => tableName) + end + + def recv_getTableRegions() + result = receive_message(GetTableRegions_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTableRegions failed: unknown result') + end + + def createTable(tableName, columnFamilies) + send_createTable(tableName, columnFamilies) + recv_createTable() + end + + def send_createTable(tableName, columnFamilies) + send_message('createTable', CreateTable_args, :tableName => tableName, :columnFamilies => columnFamilies) + end + + def recv_createTable() + result = receive_message(CreateTable_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + raise result.exist unless result.exist.nil? + return + end + + def deleteTable(tableName) + send_deleteTable(tableName) + recv_deleteTable() + end + + def send_deleteTable(tableName) + send_message('deleteTable', DeleteTable_args, :tableName => tableName) + end + + def recv_deleteTable() + result = receive_message(DeleteTable_result) + raise result.io unless result.io.nil? + return + end + + def get(tableName, row, column) + send_get(tableName, row, column) + return recv_get() + end + + def send_get(tableName, row, column) + send_message('get', Get_args, :tableName => tableName, :row => row, :column => column) + end + + def recv_get() + result = receive_message(Get_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result') + end + + def getVer(tableName, row, column, numVersions) + send_getVer(tableName, row, column, numVersions) + return recv_getVer() + end + + def send_getVer(tableName, row, column, numVersions) + send_message('getVer', GetVer_args, :tableName => tableName, :row => row, :column => column, :numVersions => numVersions) + end + + def recv_getVer() + result = receive_message(GetVer_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVer failed: unknown result') + end + + def getVerTs(tableName, row, column, timestamp, numVersions) + send_getVerTs(tableName, row, column, timestamp, numVersions) + return recv_getVerTs() + end + + def send_getVerTs(tableName, row, column, timestamp, numVersions) + send_message('getVerTs', GetVerTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp, :numVersions => numVersions) + end + + def recv_getVerTs() + result = receive_message(GetVerTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getVerTs failed: unknown result') + end + + def getRow(tableName, row) + send_getRow(tableName, row) + return recv_getRow() + end + + def send_getRow(tableName, row) + send_message('getRow', GetRow_args, :tableName => tableName, :row => row) + end + + def recv_getRow() + result = receive_message(GetRow_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRow failed: unknown result') + end + + def getRowWithColumns(tableName, row, columns) + send_getRowWithColumns(tableName, row, columns) + return recv_getRowWithColumns() + end + + def send_getRowWithColumns(tableName, row, columns) + send_message('getRowWithColumns', GetRowWithColumns_args, :tableName => tableName, :row => row, :columns => columns) + end + + def recv_getRowWithColumns() + result = receive_message(GetRowWithColumns_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowWithColumns failed: unknown result') + end + + def getRowTs(tableName, row, timestamp) + send_getRowTs(tableName, row, timestamp) + return recv_getRowTs() + end + + def send_getRowTs(tableName, row, timestamp) + send_message('getRowTs', GetRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp) + end + + def recv_getRowTs() + result = receive_message(GetRowTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowTs failed: unknown result') + end + + def getRowWithColumnsTs(tableName, row, columns, timestamp) + send_getRowWithColumnsTs(tableName, row, columns, timestamp) + return recv_getRowWithColumnsTs() + end + + def send_getRowWithColumnsTs(tableName, row, columns, timestamp) + send_message('getRowWithColumnsTs', GetRowWithColumnsTs_args, :tableName => tableName, :row => row, :columns => columns, :timestamp => timestamp) + end + + def recv_getRowWithColumnsTs() + result = receive_message(GetRowWithColumnsTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowWithColumnsTs failed: unknown result') + end + + def getRows(tableName, rows) + send_getRows(tableName, rows) + return recv_getRows() + end + + def send_getRows(tableName, rows) + send_message('getRows', GetRows_args, :tableName => tableName, :rows => rows) + end + + def recv_getRows() + result = receive_message(GetRows_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRows failed: unknown result') + end + + def getRowsWithColumns(tableName, rows, columns) + send_getRowsWithColumns(tableName, rows, columns) + return recv_getRowsWithColumns() + end + + def send_getRowsWithColumns(tableName, rows, columns) + send_message('getRowsWithColumns', GetRowsWithColumns_args, :tableName => tableName, :rows => rows, :columns => columns) + end + + def recv_getRowsWithColumns() + result = receive_message(GetRowsWithColumns_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsWithColumns failed: unknown result') + end + + def getRowsTs(tableName, rows, timestamp) + send_getRowsTs(tableName, rows, timestamp) + return recv_getRowsTs() + end + + def send_getRowsTs(tableName, rows, timestamp) + send_message('getRowsTs', GetRowsTs_args, :tableName => tableName, :rows => rows, :timestamp => timestamp) + end + + def recv_getRowsTs() + result = receive_message(GetRowsTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsTs failed: unknown result') + end + + def getRowsWithColumnsTs(tableName, rows, columns, timestamp) + send_getRowsWithColumnsTs(tableName, rows, columns, timestamp) + return recv_getRowsWithColumnsTs() + end + + def send_getRowsWithColumnsTs(tableName, rows, columns, timestamp) + send_message('getRowsWithColumnsTs', GetRowsWithColumnsTs_args, :tableName => tableName, :rows => rows, :columns => columns, :timestamp => timestamp) + end + + def recv_getRowsWithColumnsTs() + result = receive_message(GetRowsWithColumnsTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowsWithColumnsTs failed: unknown result') + end + + def mutateRow(tableName, row, mutations) + send_mutateRow(tableName, row, mutations) + recv_mutateRow() + end + + def send_mutateRow(tableName, row, mutations) + send_message('mutateRow', MutateRow_args, :tableName => tableName, :row => row, :mutations => mutations) + end + + def recv_mutateRow() + result = receive_message(MutateRow_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + return + end + + def mutateRowTs(tableName, row, mutations, timestamp) + send_mutateRowTs(tableName, row, mutations, timestamp) + recv_mutateRowTs() + end + + def send_mutateRowTs(tableName, row, mutations, timestamp) + send_message('mutateRowTs', MutateRowTs_args, :tableName => tableName, :row => row, :mutations => mutations, :timestamp => timestamp) + end + + def recv_mutateRowTs() + result = receive_message(MutateRowTs_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + return + end + + def mutateRows(tableName, rowBatches) + send_mutateRows(tableName, rowBatches) + recv_mutateRows() + end + + def send_mutateRows(tableName, rowBatches) + send_message('mutateRows', MutateRows_args, :tableName => tableName, :rowBatches => rowBatches) + end + + def recv_mutateRows() + result = receive_message(MutateRows_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + return + end + + def mutateRowsTs(tableName, rowBatches, timestamp) + send_mutateRowsTs(tableName, rowBatches, timestamp) + recv_mutateRowsTs() + end + + def send_mutateRowsTs(tableName, rowBatches, timestamp) + send_message('mutateRowsTs', MutateRowsTs_args, :tableName => tableName, :rowBatches => rowBatches, :timestamp => timestamp) + end + + def recv_mutateRowsTs() + result = receive_message(MutateRowsTs_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + return + end + + def atomicIncrement(tableName, row, column, value) + send_atomicIncrement(tableName, row, column, value) + return recv_atomicIncrement() + end + + def send_atomicIncrement(tableName, row, column, value) + send_message('atomicIncrement', AtomicIncrement_args, :tableName => tableName, :row => row, :column => column, :value => value) + end + + def recv_atomicIncrement() + result = receive_message(AtomicIncrement_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'atomicIncrement failed: unknown result') + end + + def deleteAll(tableName, row, column) + send_deleteAll(tableName, row, column) + recv_deleteAll() + end + + def send_deleteAll(tableName, row, column) + send_message('deleteAll', DeleteAll_args, :tableName => tableName, :row => row, :column => column) + end + + def recv_deleteAll() + result = receive_message(DeleteAll_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllTs(tableName, row, column, timestamp) + send_deleteAllTs(tableName, row, column, timestamp) + recv_deleteAllTs() + end + + def send_deleteAllTs(tableName, row, column, timestamp) + send_message('deleteAllTs', DeleteAllTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp) + end + + def recv_deleteAllTs() + result = receive_message(DeleteAllTs_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllRow(tableName, row) + send_deleteAllRow(tableName, row) + recv_deleteAllRow() + end + + def send_deleteAllRow(tableName, row) + send_message('deleteAllRow', DeleteAllRow_args, :tableName => tableName, :row => row) + end + + def recv_deleteAllRow() + result = receive_message(DeleteAllRow_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllRowTs(tableName, row, timestamp) + send_deleteAllRowTs(tableName, row, timestamp) + recv_deleteAllRowTs() + end + + def send_deleteAllRowTs(tableName, row, timestamp) + send_message('deleteAllRowTs', DeleteAllRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp) + end + + def recv_deleteAllRowTs() + result = receive_message(DeleteAllRowTs_result) + raise result.io unless result.io.nil? + return + end + + def scannerOpenWithScan(tableName, scan) + send_scannerOpenWithScan(tableName, scan) + return recv_scannerOpenWithScan() + end + + def send_scannerOpenWithScan(tableName, scan) + send_message('scannerOpenWithScan', ScannerOpenWithScan_args, :tableName => tableName, :scan => scan) + end + + def recv_scannerOpenWithScan() + result = receive_message(ScannerOpenWithScan_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithScan failed: unknown result') + end + + def scannerOpen(tableName, startRow, columns) + send_scannerOpen(tableName, startRow, columns) + return recv_scannerOpen() + end + + def send_scannerOpen(tableName, startRow, columns) + send_message('scannerOpen', ScannerOpen_args, :tableName => tableName, :startRow => startRow, :columns => columns) + end + + def recv_scannerOpen() + result = receive_message(ScannerOpen_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpen failed: unknown result') + end + + def scannerOpenWithStop(tableName, startRow, stopRow, columns) + send_scannerOpenWithStop(tableName, startRow, stopRow, columns) + return recv_scannerOpenWithStop() + end + + def send_scannerOpenWithStop(tableName, startRow, stopRow, columns) + send_message('scannerOpenWithStop', ScannerOpenWithStop_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns) + end + + def recv_scannerOpenWithStop() + result = receive_message(ScannerOpenWithStop_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithStop failed: unknown result') + end + + def scannerOpenWithPrefix(tableName, startAndPrefix, columns) + send_scannerOpenWithPrefix(tableName, startAndPrefix, columns) + return recv_scannerOpenWithPrefix() + end + + def send_scannerOpenWithPrefix(tableName, startAndPrefix, columns) + send_message('scannerOpenWithPrefix', ScannerOpenWithPrefix_args, :tableName => tableName, :startAndPrefix => startAndPrefix, :columns => columns) + end + + def recv_scannerOpenWithPrefix() + result = receive_message(ScannerOpenWithPrefix_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithPrefix failed: unknown result') + end + + def scannerOpenTs(tableName, startRow, columns, timestamp) + send_scannerOpenTs(tableName, startRow, columns, timestamp) + return recv_scannerOpenTs() + end + + def send_scannerOpenTs(tableName, startRow, columns, timestamp) + send_message('scannerOpenTs', ScannerOpenTs_args, :tableName => tableName, :startRow => startRow, :columns => columns, :timestamp => timestamp) + end + + def recv_scannerOpenTs() + result = receive_message(ScannerOpenTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenTs failed: unknown result') + end + + def scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) + send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) + return recv_scannerOpenWithStopTs() + end + + def send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp) + send_message('scannerOpenWithStopTs', ScannerOpenWithStopTs_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns, :timestamp => timestamp) + end + + def recv_scannerOpenWithStopTs() + result = receive_message(ScannerOpenWithStopTs_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerOpenWithStopTs failed: unknown result') + end + + def scannerGet(id) + send_scannerGet(id) + return recv_scannerGet() + end + + def send_scannerGet(id) + send_message('scannerGet', ScannerGet_args, :id => id) + end + + def recv_scannerGet() + result = receive_message(ScannerGet_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerGet failed: unknown result') + end + + def scannerGetList(id, nbRows) + send_scannerGetList(id, nbRows) + return recv_scannerGetList() + end + + def send_scannerGetList(id, nbRows) + send_message('scannerGetList', ScannerGetList_args, :id => id, :nbRows => nbRows) + end + + def recv_scannerGetList() + result = receive_message(ScannerGetList_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'scannerGetList failed: unknown result') + end + + def scannerClose(id) + send_scannerClose(id) + recv_scannerClose() + end + + def send_scannerClose(id) + send_message('scannerClose', ScannerClose_args, :id => id) + end + + def recv_scannerClose() + result = receive_message(ScannerClose_result) + raise result.io unless result.io.nil? + raise result.ia unless result.ia.nil? + return + end + + end + + class Processor + include ::Thrift::Processor + + def process_enableTable(seqid, iprot, oprot) + args = read_args(iprot, EnableTable_args) + result = EnableTable_result.new() + begin + @handler.enableTable(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'enableTable', seqid) + end + + def process_disableTable(seqid, iprot, oprot) + args = read_args(iprot, DisableTable_args) + result = DisableTable_result.new() + begin + @handler.disableTable(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'disableTable', seqid) + end + + def process_isTableEnabled(seqid, iprot, oprot) + args = read_args(iprot, IsTableEnabled_args) + result = IsTableEnabled_result.new() + begin + result.success = @handler.isTableEnabled(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'isTableEnabled', seqid) + end + + def process_compact(seqid, iprot, oprot) + args = read_args(iprot, Compact_args) + result = Compact_result.new() + begin + @handler.compact(args.tableNameOrRegionName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'compact', seqid) + end + + def process_majorCompact(seqid, iprot, oprot) + args = read_args(iprot, MajorCompact_args) + result = MajorCompact_result.new() + begin + @handler.majorCompact(args.tableNameOrRegionName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'majorCompact', seqid) + end + + def process_getTableNames(seqid, iprot, oprot) + args = read_args(iprot, GetTableNames_args) + result = GetTableNames_result.new() + begin + result.success = @handler.getTableNames() + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getTableNames', seqid) + end + + def process_getColumnDescriptors(seqid, iprot, oprot) + args = read_args(iprot, GetColumnDescriptors_args) + result = GetColumnDescriptors_result.new() + begin + result.success = @handler.getColumnDescriptors(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getColumnDescriptors', seqid) + end + + def process_getTableRegions(seqid, iprot, oprot) + args = read_args(iprot, GetTableRegions_args) + result = GetTableRegions_result.new() + begin + result.success = @handler.getTableRegions(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getTableRegions', seqid) + end + + def process_createTable(seqid, iprot, oprot) + args = read_args(iprot, CreateTable_args) + result = CreateTable_result.new() + begin + @handler.createTable(args.tableName, args.columnFamilies) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + rescue ::Apache::Hadoop::Hbase::Thrift::AlreadyExists => exist + result.exist = exist + end + write_result(result, oprot, 'createTable', seqid) + end + + def process_deleteTable(seqid, iprot, oprot) + args = read_args(iprot, DeleteTable_args) + result = DeleteTable_result.new() + begin + @handler.deleteTable(args.tableName) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteTable', seqid) + end + + def process_get(seqid, iprot, oprot) + args = read_args(iprot, Get_args) + result = Get_result.new() + begin + result.success = @handler.get(args.tableName, args.row, args.column) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'get', seqid) + end + + def process_getVer(seqid, iprot, oprot) + args = read_args(iprot, GetVer_args) + result = GetVer_result.new() + begin + result.success = @handler.getVer(args.tableName, args.row, args.column, args.numVersions) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getVer', seqid) + end + + def process_getVerTs(seqid, iprot, oprot) + args = read_args(iprot, GetVerTs_args) + result = GetVerTs_result.new() + begin + result.success = @handler.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getVerTs', seqid) + end + + def process_getRow(seqid, iprot, oprot) + args = read_args(iprot, GetRow_args) + result = GetRow_result.new() + begin + result.success = @handler.getRow(args.tableName, args.row) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRow', seqid) + end + + def process_getRowWithColumns(seqid, iprot, oprot) + args = read_args(iprot, GetRowWithColumns_args) + result = GetRowWithColumns_result.new() + begin + result.success = @handler.getRowWithColumns(args.tableName, args.row, args.columns) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowWithColumns', seqid) + end + + def process_getRowTs(seqid, iprot, oprot) + args = read_args(iprot, GetRowTs_args) + result = GetRowTs_result.new() + begin + result.success = @handler.getRowTs(args.tableName, args.row, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowTs', seqid) + end + + def process_getRowWithColumnsTs(seqid, iprot, oprot) + args = read_args(iprot, GetRowWithColumnsTs_args) + result = GetRowWithColumnsTs_result.new() + begin + result.success = @handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowWithColumnsTs', seqid) + end + + def process_getRows(seqid, iprot, oprot) + args = read_args(iprot, GetRows_args) + result = GetRows_result.new() + begin + result.success = @handler.getRows(args.tableName, args.rows) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRows', seqid) + end + + def process_getRowsWithColumns(seqid, iprot, oprot) + args = read_args(iprot, GetRowsWithColumns_args) + result = GetRowsWithColumns_result.new() + begin + result.success = @handler.getRowsWithColumns(args.tableName, args.rows, args.columns) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowsWithColumns', seqid) + end + + def process_getRowsTs(seqid, iprot, oprot) + args = read_args(iprot, GetRowsTs_args) + result = GetRowsTs_result.new() + begin + result.success = @handler.getRowsTs(args.tableName, args.rows, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowsTs', seqid) + end + + def process_getRowsWithColumnsTs(seqid, iprot, oprot) + args = read_args(iprot, GetRowsWithColumnsTs_args) + result = GetRowsWithColumnsTs_result.new() + begin + result.success = @handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowsWithColumnsTs', seqid) + end + + def process_mutateRow(seqid, iprot, oprot) + args = read_args(iprot, MutateRow_args) + result = MutateRow_result.new() + begin + @handler.mutateRow(args.tableName, args.row, args.mutations) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'mutateRow', seqid) + end + + def process_mutateRowTs(seqid, iprot, oprot) + args = read_args(iprot, MutateRowTs_args) + result = MutateRowTs_result.new() + begin + @handler.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'mutateRowTs', seqid) + end + + def process_mutateRows(seqid, iprot, oprot) + args = read_args(iprot, MutateRows_args) + result = MutateRows_result.new() + begin + @handler.mutateRows(args.tableName, args.rowBatches) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'mutateRows', seqid) + end + + def process_mutateRowsTs(seqid, iprot, oprot) + args = read_args(iprot, MutateRowsTs_args) + result = MutateRowsTs_result.new() + begin + @handler.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'mutateRowsTs', seqid) + end + + def process_atomicIncrement(seqid, iprot, oprot) + args = read_args(iprot, AtomicIncrement_args) + result = AtomicIncrement_result.new() + begin + result.success = @handler.atomicIncrement(args.tableName, args.row, args.column, args.value) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'atomicIncrement', seqid) + end + + def process_deleteAll(seqid, iprot, oprot) + args = read_args(iprot, DeleteAll_args) + result = DeleteAll_result.new() + begin + @handler.deleteAll(args.tableName, args.row, args.column) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteAll', seqid) + end + + def process_deleteAllTs(seqid, iprot, oprot) + args = read_args(iprot, DeleteAllTs_args) + result = DeleteAllTs_result.new() + begin + @handler.deleteAllTs(args.tableName, args.row, args.column, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteAllTs', seqid) + end + + def process_deleteAllRow(seqid, iprot, oprot) + args = read_args(iprot, DeleteAllRow_args) + result = DeleteAllRow_result.new() + begin + @handler.deleteAllRow(args.tableName, args.row) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteAllRow', seqid) + end + + def process_deleteAllRowTs(seqid, iprot, oprot) + args = read_args(iprot, DeleteAllRowTs_args) + result = DeleteAllRowTs_result.new() + begin + @handler.deleteAllRowTs(args.tableName, args.row, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteAllRowTs', seqid) + end + + def process_scannerOpenWithScan(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpenWithScan_args) + result = ScannerOpenWithScan_result.new() + begin + result.success = @handler.scannerOpenWithScan(args.tableName, args.scan) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpenWithScan', seqid) + end + + def process_scannerOpen(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpen_args) + result = ScannerOpen_result.new() + begin + result.success = @handler.scannerOpen(args.tableName, args.startRow, args.columns) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpen', seqid) + end + + def process_scannerOpenWithStop(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpenWithStop_args) + result = ScannerOpenWithStop_result.new() + begin + result.success = @handler.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpenWithStop', seqid) + end + + def process_scannerOpenWithPrefix(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpenWithPrefix_args) + result = ScannerOpenWithPrefix_result.new() + begin + result.success = @handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpenWithPrefix', seqid) + end + + def process_scannerOpenTs(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpenTs_args) + result = ScannerOpenTs_result.new() + begin + result.success = @handler.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpenTs', seqid) + end + + def process_scannerOpenWithStopTs(seqid, iprot, oprot) + args = read_args(iprot, ScannerOpenWithStopTs_args) + result = ScannerOpenWithStopTs_result.new() + begin + result.success = @handler.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'scannerOpenWithStopTs', seqid) + end + + def process_scannerGet(seqid, iprot, oprot) + args = read_args(iprot, ScannerGet_args) + result = ScannerGet_result.new() + begin + result.success = @handler.scannerGet(args.id) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'scannerGet', seqid) + end + + def process_scannerGetList(seqid, iprot, oprot) + args = read_args(iprot, ScannerGetList_args) + result = ScannerGetList_result.new() + begin + result.success = @handler.scannerGetList(args.id, args.nbRows) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'scannerGetList', seqid) + end + + def process_scannerClose(seqid, iprot, oprot) + args = read_args(iprot, ScannerClose_args) + result = ScannerClose_result.new() + begin + @handler.scannerClose(args.id) + rescue ::Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + rescue ::Apache::Hadoop::Hbase::Thrift::IllegalArgument => ia + result.ia = ia + end + write_result(result, oprot, 'scannerClose', seqid) + end + + end + + # HELPER FUNCTIONS AND STRUCTURES + + class EnableTable_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + + FIELDS = { + # name of the table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class EnableTable_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class DisableTable_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + + FIELDS = { + # name of the table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } + + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class DisableTable_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class DisableTable_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class IsTableEnabled_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 + class IsTableEnabled_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 - FIELDS = { - # name of the table to check - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } + FIELDS = { + # name of the table to check + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class IsTableEnabled_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + class IsTableEnabled_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::BOOL, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class Compact_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAMEORREGIONNAME = 1 + class Compact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAMEORREGIONNAME = 1 - FIELDS = { - TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} - } + FIELDS = { + TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class Compact_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class Compact_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class MajorCompact_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAMEORREGIONNAME = 1 + class MajorCompact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAMEORREGIONNAME = 1 - FIELDS = { - TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} - } + FIELDS = { + TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class MajorCompact_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class MajorCompact_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetTableNames_args - include ::Thrift::Struct, ::Thrift::Struct_Union + class GetTableNames_args + include ::Thrift::Struct, ::Thrift::Struct_Union - FIELDS = { + FIELDS = { - } + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetTableNames_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + class GetTableNames_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetColumnDescriptors_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 + class GetColumnDescriptors_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 - FIELDS = { - # table name - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } + FIELDS = { + # table name + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetColumnDescriptors_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + class GetColumnDescriptors_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::ColumnDescriptor}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::ColumnDescriptor}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetTableRegions_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 + class GetTableRegions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 - FIELDS = { - # table name - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } + FIELDS = { + # table name + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetTableRegions_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + class GetTableRegions_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRegionInfo}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRegionInfo}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class CreateTable_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - COLUMNFAMILIES = 2 + class CreateTable_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + COLUMNFAMILIES = 2 - FIELDS = { - # name of table to create - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # list of column family descriptors - COLUMNFAMILIES => {:type => ::Thrift::Types::LIST, :name => 'columnFamilies', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::ColumnDescriptor}} - } + FIELDS = { + # name of table to create + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # list of column family descriptors + COLUMNFAMILIES => {:type => ::Thrift::Types::LIST, :name => 'columnFamilies', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::ColumnDescriptor}} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class CreateTable_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 - EXIST = 3 + class CreateTable_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 + EXIST = 3 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument}, - EXIST => {:type => ::Thrift::Types::STRUCT, :name => 'exist', :class => Apache::Hadoop::Hbase::Thrift::AlreadyExists} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument}, + EXIST => {:type => ::Thrift::Types::STRUCT, :name => 'exist', :class => ::Apache::Hadoop::Hbase::Thrift::AlreadyExists} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class DeleteTable_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 + class DeleteTable_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 - FIELDS = { - # name of table to delete - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} - } + FIELDS = { + # name of table to delete + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class DeleteTable_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class DeleteTable_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class Get_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # column name - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class Get_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TCell}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end + class Get_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # column name + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end - ::Thrift::Struct.generate_accessors self - end - - class GetVer_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - NUMVERSIONS = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # column name - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, - # number of versions to retrieve - NUMVERSIONS => {:type => ::Thrift::Types::I32, :name => 'numVersions'} - } + ::Thrift::Struct.generate_accessors self + end + + class GetVer_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + NUMVERSIONS = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # column name + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + # number of versions to retrieve + NUMVERSIONS => {:type => ::Thrift::Types::I32, :name => 'numVersions'} + } - def struct_fields; FIELDS; end - - def validate - end + def struct_fields; FIELDS; end + + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetVer_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TCell}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetVerTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - TIMESTAMP = 4 - NUMVERSIONS = 5 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # column name - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}, - # number of versions to retrieve - NUMVERSIONS => {:type => ::Thrift::Types::I32, :name => 'numVersions'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetVerTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TCell}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRow_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRow_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowWithColumns_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMNS = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # List of columns to return, null for all columns - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowWithColumns_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + class GetVer_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetVerTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + TIMESTAMP = 4 + NUMVERSIONS = 5 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # column name + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}, + # number of versions to retrieve + NUMVERSIONS => {:type => ::Thrift::Types::I32, :name => 'numVersions'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetVerTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRow_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRow_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowWithColumns_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMNS = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # List of columns to return, null for all columns + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowWithColumns_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetRowTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - TIMESTAMP = 3 + class GetRowTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + TIMESTAMP = 3 - FIELDS = { - # name of the table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } + FIELDS = { + # name of the table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class GetRowTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + class GetRowTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowWithColumnsTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMNS = 3 - TIMESTAMP = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # List of columns to return, null for all columns - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowWithColumnsTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMNS = 3 + TIMESTAMP = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # List of columns to return, null for all columns + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end - ::Thrift::Struct.generate_accessors self - end - - class GetRowWithColumnsTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 + ::Thrift::Struct.generate_accessors self + end + + class GetRowWithColumnsTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRows_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWS = 2 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row keys - ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRows_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWS = 2 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row keys + ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end - class GetRows_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + class GetRows_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsWithColumns_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWS = 2 - COLUMNS = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row keys - ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - # List of columns to return, null for all columns - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsWithColumns_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsWithColumns_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWS = 2 + COLUMNS = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row keys + ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + # List of columns to return, null for all columns + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsWithColumns_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWS = 2 - TIMESTAMP = 3 - - FIELDS = { - # name of the table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row keys - ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWS = 2 + TIMESTAMP = 3 + + FIELDS = { + # name of the table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row keys + ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsWithColumnsTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWS = 2 - COLUMNS = 3 - TIMESTAMP = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row keys - ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - # List of columns to return, null for all columns - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class GetRowsWithColumnsTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRow_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - MUTATIONS = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # list of mutation commands - MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::Mutation}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRow_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 - - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRowTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - MUTATIONS = 3 - TIMESTAMP = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row key - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # list of mutation commands - MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::Mutation}}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsWithColumnsTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWS = 2 + COLUMNS = 3 + TIMESTAMP = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row keys + ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + # List of columns to return, null for all columns + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowsWithColumnsTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRow_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + MUTATIONS = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # list of mutation commands + MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::Mutation}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRow_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 + + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRowTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + MUTATIONS = 3 + TIMESTAMP = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row key + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # list of mutation commands + MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::Mutation}}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end - ::Thrift::Struct.generate_accessors self - end - - class MutateRowTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 + ::Thrift::Struct.generate_accessors self + end + + class MutateRowTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRows_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWBATCHES = 2 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # list of row batches - ROWBATCHES => {:type => ::Thrift::Types::LIST, :name => 'rowBatches', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::BatchMutation}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRows_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 - - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRowsTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROWBATCHES = 2 - TIMESTAMP = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # list of row batches - ROWBATCHES => {:type => ::Thrift::Types::LIST, :name => 'rowBatches', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::BatchMutation}}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class MutateRowsTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 - - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRows_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWBATCHES = 2 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # list of row batches + ROWBATCHES => {:type => ::Thrift::Types::LIST, :name => 'rowBatches', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::BatchMutation}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRows_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 + + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRowsTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWBATCHES = 2 + TIMESTAMP = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # list of row batches + ROWBATCHES => {:type => ::Thrift::Types::LIST, :name => 'rowBatches', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::BatchMutation}}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MutateRowsTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 + + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class AtomicIncrement_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - VALUE = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # row to increment - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # name of column - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, - # amount to increment by - VALUE => {:type => ::Thrift::Types::I64, :name => 'value'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class AtomicIncrement_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - IA = 2 + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class AtomicIncrement_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + VALUE = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # row to increment + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # name of column + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + # amount to increment by + VALUE => {:type => ::Thrift::Types::I64, :name => 'value'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class AtomicIncrement_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + IA = 2 - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class DeleteAll_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Row to update - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # name of column whose value is to be deleted - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true} - } - - def struct_fields; FIELDS; end + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I64, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class DeleteAll_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Row to update + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # name of column whose value is to be deleted + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true} + } + + def struct_fields; FIELDS; end - def validate - end - - ::Thrift::Struct.generate_accessors self - end + def validate + end + + ::Thrift::Struct.generate_accessors self + end - class DeleteAll_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class DeleteAll_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class DeleteAllTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - COLUMN = 3 - TIMESTAMP = 4 + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class DeleteAllTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + TIMESTAMP = 4 - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Row to update - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # name of column whose value is to be deleted - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Row to update + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # name of column whose value is to be deleted + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } - def struct_fields; FIELDS; end + def struct_fields; FIELDS; end - def validate - end + def validate + end - ::Thrift::Struct.generate_accessors self - end + ::Thrift::Struct.generate_accessors self + end - class DeleteAllTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + class DeleteAllTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class DeleteAllRow_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # key of the row to be completely deleted. - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true} - } + def struct_fields; FIELDS; end - def struct_fields; FIELDS; end + def validate + end - def validate - end + ::Thrift::Struct.generate_accessors self + end - ::Thrift::Struct.generate_accessors self - end + class DeleteAllRow_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 - class DeleteAllRow_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # key of the row to be completely deleted. + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true} + } - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } + def struct_fields; FIELDS; end - def struct_fields; FIELDS; end + def validate + end - def validate - end + ::Thrift::Struct.generate_accessors self + end - ::Thrift::Struct.generate_accessors self - end - - class DeleteAllRowTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - ROW = 2 - TIMESTAMP = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # key of the row to be completely deleted. - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class DeleteAllRowTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end + class DeleteAllRow_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - class ScannerOpen_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - STARTROW = 2 - COLUMNS = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Starting row in table to scan. - # Send "" (empty string) to start at the first row. - STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, - # 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. - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpen_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithStop_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - STARTROW = 2 - STOPROW = 3 - COLUMNS = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Starting row in table to scan. - # Send "" (empty string) to start at the first row. - STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, - # row to stop scanning on. This row is *not* included in the - # scanner's results - STOPROW => {:type => ::Thrift::Types::STRING, :name => 'stopRow', :binary => true}, - # 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. - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithStop_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithPrefix_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - STARTANDPREFIX = 2 - COLUMNS = 3 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # the prefix (and thus start row) of the keys you want - STARTANDPREFIX => {:type => ::Thrift::Types::STRING, :name => 'startAndPrefix', :binary => true}, - # the columns you want returned - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithPrefix_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - STARTROW = 2 - COLUMNS = 3 - TIMESTAMP = 4 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Starting row in table to scan. - # Send "" (empty string) to start at the first row. - STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, - # 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. - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithStopTs_args - include ::Thrift::Struct, ::Thrift::Struct_Union - TABLENAME = 1 - STARTROW = 2 - STOPROW = 3 - COLUMNS = 4 - TIMESTAMP = 5 - - FIELDS = { - # name of table - TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, - # Starting row in table to scan. - # Send "" (empty string) to start at the first row. - STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, - # row to stop scanning on. This row is *not* included in the - # scanner's results - STOPROW => {:type => ::Thrift::Types::STRING, :name => 'stopRow', :binary => true}, - # 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. - COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, - # timestamp - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerOpenWithStopTs_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - class ScannerGet_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 - - FIELDS = { - # id of a scanner returned by scannerOpen - ID => {:type => ::Thrift::Types::I32, :name => 'id'} - } - - def struct_fields; FIELDS; end - - def validate - end + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - ::Thrift::Struct.generate_accessors self - end + def struct_fields; FIELDS; end - class ScannerGet_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - IA = 2 + def validate + end - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } + ::Thrift::Struct.generate_accessors self + end - def struct_fields; FIELDS; end + class DeleteAllRowTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + TIMESTAMP = 3 - def validate - end + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # key of the row to be completely deleted. + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } - ::Thrift::Struct.generate_accessors self - end + def struct_fields; FIELDS; end - class ScannerGetList_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 - NBROWS = 2 + def validate + end - FIELDS = { - # id of a scanner returned by scannerOpen - ID => {:type => ::Thrift::Types::I32, :name => 'id'}, - # number of results to return - NBROWS => {:type => ::Thrift::Types::I32, :name => 'nbRows'} - } + ::Thrift::Struct.generate_accessors self + end - def struct_fields; FIELDS; end - - def validate - end + class DeleteAllRowTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 - ::Thrift::Struct.generate_accessors self - end + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - class ScannerGetList_result - include ::Thrift::Struct, ::Thrift::Struct_Union - SUCCESS = 0 - IO = 1 - IA = 2 + def struct_fields; FIELDS; end - FIELDS = { - SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TRowResult}}, - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } + def validate + end - def struct_fields; FIELDS; end + ::Thrift::Struct.generate_accessors self + end - def validate - end + class ScannerOpenWithScan_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + SCAN = 2 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Scan instance + SCAN => {:type => ::Thrift::Types::STRUCT, :name => 'scan', :class => ::Apache::Hadoop::Hbase::Thrift::TScan} + } - ::Thrift::Struct.generate_accessors self - end + def struct_fields; FIELDS; end + + def validate + end - class ScannerClose_args - include ::Thrift::Struct, ::Thrift::Struct_Union - ID = 1 + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithScan_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } - FIELDS = { - # id of a scanner returned by scannerOpen - ID => {:type => ::Thrift::Types::I32, :name => 'id'} - } + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpen_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + STARTROW = 2 + COLUMNS = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Starting row in table to scan. +# Send "" (empty string) to start at the first row. + STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, + # 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. + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpen_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithStop_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + STARTROW = 2 + STOPROW = 3 + COLUMNS = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Starting row in table to scan. +# Send "" (empty string) to start at the first row. + STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, + # row to stop scanning on. This row is *not* included in the +# scanner's results + STOPROW => {:type => ::Thrift::Types::STRING, :name => 'stopRow', :binary => true}, + # 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. + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithStop_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithPrefix_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + STARTANDPREFIX = 2 + COLUMNS = 3 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # the prefix (and thus start row) of the keys you want + STARTANDPREFIX => {:type => ::Thrift::Types::STRING, :name => 'startAndPrefix', :binary => true}, + # the columns you want returned + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithPrefix_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + STARTROW = 2 + COLUMNS = 3 + TIMESTAMP = 4 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Starting row in table to scan. +# Send "" (empty string) to start at the first row. + STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, + # 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. + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithStopTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + STARTROW = 2 + STOPROW = 3 + COLUMNS = 4 + TIMESTAMP = 5 + + FIELDS = { + # name of table + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true}, + # Starting row in table to scan. +# Send "" (empty string) to start at the first row. + STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true}, + # row to stop scanning on. This row is *not* included in the +# scanner's results + STOPROW => {:type => ::Thrift::Types::STRING, :name => 'stopRow', :binary => true}, + # 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. + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}}, + # timestamp + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerOpenWithStopTs_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerGet_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + + FIELDS = { + # id of a scanner returned by scannerOpen + ID => {:type => ::Thrift::Types::I32, :name => 'id'} + } + + def struct_fields; FIELDS; end + + def validate + end - def struct_fields; FIELDS; end + ::Thrift::Struct.generate_accessors self + end - def validate - end + class ScannerGet_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + IA = 2 - ::Thrift::Struct.generate_accessors self - end + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } - class ScannerClose_result - include ::Thrift::Struct, ::Thrift::Struct_Union - IO = 1 - IA = 2 + def struct_fields; FIELDS; end - FIELDS = { - IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => Apache::Hadoop::Hbase::Thrift::IOError}, - IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => Apache::Hadoop::Hbase::Thrift::IllegalArgument} - } + def validate + end - def struct_fields; FIELDS; end + ::Thrift::Struct.generate_accessors self + end - def validate - end + class ScannerGetList_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + NBROWS = 2 - ::Thrift::Struct.generate_accessors self - end + FIELDS = { + # id of a scanner returned by scannerOpen + ID => {:type => ::Thrift::Types::I32, :name => 'id'}, + # number of results to return + NBROWS => {:type => ::Thrift::Types::I32, :name => 'nbRows'} + } - end + def struct_fields; FIELDS; end + + def validate + end - end - end - end - end + ::Thrift::Struct.generate_accessors self + end + + class ScannerGetList_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + IA = 2 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TRowResult}}, + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerClose_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + + FIELDS = { + # id of a scanner returned by scannerOpen + ID => {:type => ::Thrift::Types::I32, :name => 'id'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class ScannerClose_result + include ::Thrift::Struct, ::Thrift::Struct_Union + IO = 1 + IA = 2 + + FIELDS = { + IO => {:type => ::Thrift::Types::STRUCT, :name => 'io', :class => ::Apache::Hadoop::Hbase::Thrift::IOError}, + IA => {:type => ::Thrift::Types::STRUCT, :name => 'ia', :class => ::Apache::Hadoop::Hbase::Thrift::IllegalArgument} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + end + + end + end + end +end diff --git a/lib/hbase/hbase_constants.rb b/lib/hbase/hbase_constants.rb new file mode 100644 index 0000000..4116e27 --- /dev/null +++ b/lib/hbase/hbase_constants.rb @@ -0,0 +1,17 @@ +# +# Autogenerated by Thrift Compiler (0.9.1) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'thrift' +require 'hbase_types' + +module Apache + module Hadoop + module Hbase + module Thrift + end + end + end +end diff --git a/lib/hbase/hbase_types.rb b/lib/hbase/hbase_types.rb index 36cc37c..490b1b1 100644 --- a/lib/hbase/hbase_types.rb +++ b/lib/hbase/hbase_types.rb @@ -1,225 +1,254 @@ # -# Autogenerated by Thrift Compiler (0.7.0) +# Autogenerated by Thrift Compiler (0.9.1) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # +require 'thrift' + module Apache module Hadoop module Hbase module Thrift - # 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. - class TCell - include ::Thrift::Struct, ::Thrift::Struct_Union - VALUE = 1 - TIMESTAMP = 2 - - FIELDS = { - VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}, - TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # 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. - class ColumnDescriptor - include ::Thrift::Struct, ::Thrift::Struct_Union - NAME = 1 - MAXVERSIONS = 2 - COMPRESSION = 3 - INMEMORY = 4 - BLOOMFILTERTYPE = 5 - BLOOMFILTERVECTORSIZE = 6 - BLOOMFILTERNBHASHES = 7 - BLOCKCACHEENABLED = 8 - TIMETOLIVE = 9 - - FIELDS = { - NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true}, - MAXVERSIONS => {:type => ::Thrift::Types::I32, :name => 'maxVersions', :default => 3}, - COMPRESSION => {:type => ::Thrift::Types::STRING, :name => 'compression', :default => %q"NONE"}, - INMEMORY => {:type => ::Thrift::Types::BOOL, :name => 'inMemory', :default => false}, - BLOOMFILTERTYPE => {:type => ::Thrift::Types::STRING, :name => 'bloomFilterType', :default => %q"NONE"}, - BLOOMFILTERVECTORSIZE => {:type => ::Thrift::Types::I32, :name => 'bloomFilterVectorSize', :default => 0}, - BLOOMFILTERNBHASHES => {:type => ::Thrift::Types::I32, :name => 'bloomFilterNbHashes', :default => 0}, - BLOCKCACHEENABLED => {:type => ::Thrift::Types::BOOL, :name => 'blockCacheEnabled', :default => false}, - TIMETOLIVE => {:type => ::Thrift::Types::I32, :name => 'timeToLive', :default => -1} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # A TRegionInfo contains information about an HTable region. - class TRegionInfo - include ::Thrift::Struct, ::Thrift::Struct_Union - STARTKEY = 1 - ENDKEY = 2 - ID = 3 - NAME = 4 - VERSION = 5 - - FIELDS = { - STARTKEY => {:type => ::Thrift::Types::STRING, :name => 'startKey', :binary => true}, - ENDKEY => {:type => ::Thrift::Types::STRING, :name => 'endKey', :binary => true}, - ID => {:type => ::Thrift::Types::I64, :name => 'id'}, - NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true}, - VERSION => {:type => ::Thrift::Types::BYTE, :name => 'version'} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # A Mutation object is used to either update or delete a column-value. - class Mutation - include ::Thrift::Struct, ::Thrift::Struct_Union - ISDELETE = 1 - COLUMN = 2 - VALUE = 3 - - FIELDS = { - ISDELETE => {:type => ::Thrift::Types::BOOL, :name => 'isDelete', :default => false}, - COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, - VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # A BatchMutation object is used to apply a number of Mutations to a single row. - class BatchMutation - include ::Thrift::Struct, ::Thrift::Struct_Union - ROW = 1 - MUTATIONS = 2 - - FIELDS = { - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::Mutation}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # Holds row name and then a map of columns to cells. - class TRowResult - include ::Thrift::Struct, ::Thrift::Struct_Union - ROW = 1 - COLUMNS = 2 - - FIELDS = { - ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, - COLUMNS => {:type => ::Thrift::Types::MAP, :name => 'columns', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TCell}} - } - - def struct_fields; FIELDS; end - - def validate - end - - ::Thrift::Struct.generate_accessors self - end - - # 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. - class IOError < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end + # 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. + class TCell + include ::Thrift::Struct, ::Thrift::Struct_Union + VALUE = 1 + TIMESTAMP = 2 + + FIELDS = { + VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}, + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end - MESSAGE = 1 + # 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. + class ColumnDescriptor + include ::Thrift::Struct, ::Thrift::Struct_Union + NAME = 1 + MAXVERSIONS = 2 + COMPRESSION = 3 + INMEMORY = 4 + BLOOMFILTERTYPE = 5 + BLOOMFILTERVECTORSIZE = 6 + BLOOMFILTERNBHASHES = 7 + BLOCKCACHEENABLED = 8 + TIMETOLIVE = 9 + + FIELDS = { + NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true}, + MAXVERSIONS => {:type => ::Thrift::Types::I32, :name => 'maxVersions', :default => 3}, + COMPRESSION => {:type => ::Thrift::Types::STRING, :name => 'compression', :default => %q"NONE"}, + INMEMORY => {:type => ::Thrift::Types::BOOL, :name => 'inMemory', :default => false}, + BLOOMFILTERTYPE => {:type => ::Thrift::Types::STRING, :name => 'bloomFilterType', :default => %q"NONE"}, + BLOOMFILTERVECTORSIZE => {:type => ::Thrift::Types::I32, :name => 'bloomFilterVectorSize', :default => 0}, + BLOOMFILTERNBHASHES => {:type => ::Thrift::Types::I32, :name => 'bloomFilterNbHashes', :default => 0}, + BLOCKCACHEENABLED => {:type => ::Thrift::Types::BOOL, :name => 'blockCacheEnabled', :default => false}, + TIMETOLIVE => {:type => ::Thrift::Types::I32, :name => 'timeToLive', :default => -1} + } + + def struct_fields; FIELDS; end + + def validate + end - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } + ::Thrift::Struct.generate_accessors self + end - def struct_fields; FIELDS; end + # A TRegionInfo contains information about an HTable region. + class TRegionInfo + include ::Thrift::Struct, ::Thrift::Struct_Union + STARTKEY = 1 + ENDKEY = 2 + ID = 3 + NAME = 4 + VERSION = 5 + + FIELDS = { + STARTKEY => {:type => ::Thrift::Types::STRING, :name => 'startKey', :binary => true}, + ENDKEY => {:type => ::Thrift::Types::STRING, :name => 'endKey', :binary => true}, + ID => {:type => ::Thrift::Types::I64, :name => 'id'}, + NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true}, + VERSION => {:type => ::Thrift::Types::BYTE, :name => 'version'} + } + + def struct_fields; FIELDS; end + + def validate + end - def validate - end + ::Thrift::Struct.generate_accessors self + end - ::Thrift::Struct.generate_accessors self - end + # A Mutation object is used to either update or delete a column-value. + class Mutation + include ::Thrift::Struct, ::Thrift::Struct_Union + ISDELETE = 1 + COLUMN = 2 + VALUE = 3 - # An IllegalArgument exception indicates an illegal or invalid - # argument was passed into a procedure. - class IllegalArgument < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end + FIELDS = { + ISDELETE => {:type => ::Thrift::Types::BOOL, :name => 'isDelete', :default => false}, + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true} + } - MESSAGE = 1 + def struct_fields; FIELDS; end - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } + def validate + end - def struct_fields; FIELDS; end + ::Thrift::Struct.generate_accessors self + end - def validate - end + # A BatchMutation object is used to apply a number of Mutations to a single row. + class BatchMutation + include ::Thrift::Struct, ::Thrift::Struct_Union + ROW = 1 + MUTATIONS = 2 - ::Thrift::Struct.generate_accessors self - end + FIELDS = { + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + MUTATIONS => {:type => ::Thrift::Types::LIST, :name => 'mutations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::Mutation}} + } - # An AlreadyExists exceptions signals that a table with the specified - # name already exists - class AlreadyExists < ::Thrift::Exception - include ::Thrift::Struct, ::Thrift::Struct_Union - def initialize(message=nil) - super() - self.message = message - end + def struct_fields; FIELDS; end - MESSAGE = 1 + def validate + end - FIELDS = { - MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} - } + ::Thrift::Struct.generate_accessors self + end - def struct_fields; FIELDS; end + # Holds row name and then a map of columns to cells. + class TRowResult + include ::Thrift::Struct, ::Thrift::Struct_Union + ROW = 1 + COLUMNS = 2 - def validate - end + FIELDS = { + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + COLUMNS => {:type => ::Thrift::Types::MAP, :name => 'columns', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRUCT, :class => ::Apache::Hadoop::Hbase::Thrift::TCell}} + } - ::Thrift::Struct.generate_accessors self - end + def struct_fields; FIELDS; end - end - end + def validate end + + ::Thrift::Struct.generate_accessors self + end + + # A Scan object is used to specify scanner parameters when opening a scanner. + class TScan + include ::Thrift::Struct, ::Thrift::Struct_Union + STARTROW = 1 + STOPROW = 2 + TIMESTAMP = 3 + COLUMNS = 4 + CACHING = 5 + FILTERSTRING = 6 + + FIELDS = { + STARTROW => {:type => ::Thrift::Types::STRING, :name => 'startRow', :binary => true, :optional => true}, + STOPROW => {:type => ::Thrift::Types::STRING, :name => 'stopRow', :binary => true, :optional => true}, + TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true}, + COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true}, + CACHING => {:type => ::Thrift::Types::I32, :name => 'caching', :optional => true}, + FILTERSTRING => {:type => ::Thrift::Types::STRING, :name => 'filterString', :binary => true, :optional => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self end + + # 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. + class IOError < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + # An IllegalArgument exception indicates an illegal or invalid +# argument was passed into a procedure. + class IllegalArgument < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + # An AlreadyExists exceptions signals that a table with the specified +# name already exists + class AlreadyExists < ::Thrift::Exception + include ::Thrift::Struct, ::Thrift::Struct_Union + def initialize(message=nil) + super() + self.message = message + end + + MESSAGE = 1 + + FIELDS = { + MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + end + end + end +end From 90967239c68808daf41c908a51f84f21564bd19e Mon Sep 17 00:00:00 2001 From: chris finne Date: Sat, 26 Oct 2013 12:58:17 -0700 Subject: [PATCH 2/3] add lib/hbase to require path --- hbase-rb.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-rb.gemspec b/hbase-rb.gemspec index 387f50b..b61c145 100644 --- a/hbase-rb.gemspec +++ b/hbase-rb.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.files = `git ls-files`.split("\n") s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } - s.require_paths = ["lib"] + s.require_paths = ["lib","lib/hbase"] s.add_dependency "thrift", ">=0.9.1" From f981991adeacfe765ccff5e25a18eb1e846c1ca7 Mon Sep 17 00:00:00 2001 From: chris finne Date: Sat, 26 Oct 2013 12:59:17 -0700 Subject: [PATCH 3/3] update readme for HBase 0.94.9 example --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 69e54a9..eee6062 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ For instance, when using HBase 0.90.4: gem 'hbase-rb', '0.90.4' ``` +or HBase 0.94.9: + +```ruby +gem 'hbase-rb', '0.94.9' +``` + ## Usage This library simply exposes the generated Ruby code from Thrift.