diff --git examples/README.txt examples/README.txt index 009c3d8..a72ed7a 100644 --- examples/README.txt +++ examples/README.txt @@ -1,11 +1 @@ -Example code. - -* src/examples/thrift - Examples for interacting with HBase via Thrift from C++, PHP, Python and Ruby. -* org.apache.hadoop.hbase.mapreduce.SampleUploader - Demonstrates uploading data from text files (presumably stored in HDFS) to HBase. -* org.apache.hadoop.hbase.mapreduce.IndexBuilder - Demonstrates map/reduce with a table as the source and other tables as the sink. - -As of 0.20 there is no ant target for building the examples. You can easily build -the Java examples by copying them to the right location in the main source hierarchy. \ No newline at end of file +Example code is being moved into hbase-examples. \ No newline at end of file diff --git examples/mapreduce/index-builder-setup.rb examples/mapreduce/index-builder-setup.rb deleted file mode 100644 index cda7fdd..0000000 --- examples/mapreduce/index-builder-setup.rb +++ /dev/null @@ -1,31 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Set up sample data for IndexBuilder example -create "people", "attributes" -create "people-email", "INDEX" -create "people-phone", "INDEX" -create "people-name", "INDEX" - -[["1", "jenny", "jenny@example.com", "867-5309"], - ["2", "alice", "alice@example.com", "555-1234"], - ["3", "kevin", "kevinpet@example.com", "555-1212"]].each do |fields| - (id, name, email, phone) = *fields - put "people", id, "attributes:name", name - put "people", id, "attributes:email", email - put "people", id, "attributes:phone", phone -end - diff --git examples/mapreduce/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java examples/mapreduce/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java deleted file mode 100644 index 0aab865..0000000 --- examples/mapreduce/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase.mapreduce; - -import java.io.IOException; -import java.util.HashMap; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.hbase.HBaseConfiguration; -import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.client.Result; -import org.apache.hadoop.hbase.client.Scan; -import org.apache.hadoop.hbase.io.ImmutableBytesWritable; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.Writable; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.util.GenericOptionsParser; - -/** - * Example map/reduce job to construct index tables that can be used to quickly - * find a row based on the value of a column. It demonstrates: - * - * - *

Usage

- * - *

- * Modify ${HADOOP_HOME}/conf/hadoop-env.sh to include the hbase jar, the - * zookeeper jar, the examples output directory, and the hbase conf directory in - * HADOOP_CLASSPATH, and then run - * bin/hadoop org.apache.hadoop.hbase.mapreduce.IndexBuilder TABLE_NAME COLUMN_FAMILY ATTR [ATTR ...] - *

- * - *

- * To run with the sample data provided in index-builder-setup.rb, use the - * arguments people attributes name email phone. - *

- * - *

- * This code was written against HBase 0.21 trunk. - *

- */ -public class IndexBuilder { - /** the column family containing the indexed row key */ - public static final byte[] INDEX_COLUMN = Bytes.toBytes("INDEX"); - /** the qualifier containing the indexed row key */ - public static final byte[] INDEX_QUALIFIER = Bytes.toBytes("ROW"); - - /** - * Internal Mapper to be run by Hadoop. - */ - public static class Map extends - Mapper { - private byte[] family; - private HashMap indexes; - - @Override - protected void map(ImmutableBytesWritable rowKey, Result result, Context context) - throws IOException, InterruptedException { - for(java.util.Map.Entry index : indexes.entrySet()) { - byte[] qualifier = index.getKey(); - ImmutableBytesWritable tableName = index.getValue(); - byte[] value = result.getValue(family, qualifier); - if (value != null) { - // original: row 123 attribute:phone 555-1212 - // index: row 555-1212 INDEX:ROW 123 - Put put = new Put(value); - put.add(INDEX_COLUMN, INDEX_QUALIFIER, rowKey.get()); - context.write(tableName, put); - } - } - } - - @Override - protected void setup(Context context) throws IOException, - InterruptedException { - Configuration configuration = context.getConfiguration(); - String tableName = configuration.get("index.tablename"); - String[] fields = configuration.getStrings("index.fields"); - String familyName = configuration.get("index.familyname"); - family = Bytes.toBytes(familyName); - indexes = new HashMap(); - for(String field : fields) { - // if the table is "people" and the field to index is "email", then the - // index table will be called "people-email" - indexes.put(Bytes.toBytes(field), - new ImmutableBytesWritable(Bytes.toBytes(tableName + "-" + field))); - } - } - } - - /** - * Job configuration. - */ - public static Job configureJob(Configuration conf, String [] args) - throws IOException { - String tableName = args[0]; - String columnFamily = args[1]; - System.out.println("****" + tableName); - conf.set(TableInputFormat.SCAN, TableMapReduceUtil.convertScanToString(new Scan())); - conf.set(TableInputFormat.INPUT_TABLE, tableName); - conf.set("index.tablename", tableName); - conf.set("index.familyname", columnFamily); - String[] fields = new String[args.length - 2]; - for(int i = 0; i < fields.length; i++) { - fields[i] = args[i + 2]; - } - conf.setStrings("index.fields", fields); - conf.set("index.familyname", "attributes"); - Job job = new Job(conf, tableName); - job.setJarByClass(IndexBuilder.class); - job.setMapperClass(Map.class); - job.setNumReduceTasks(0); - job.setInputFormatClass(TableInputFormat.class); - job.setOutputFormatClass(MultiTableOutputFormat.class); - return job; - } - - public static void main(String[] args) throws Exception { - Configuration conf = HBaseConfiguration.create(); - String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs(); - if(otherArgs.length < 3) { - System.err.println("Only " + otherArgs.length + " arguments supplied, required: 3"); - System.err.println("Usage: IndexBuilder [ ...]"); - System.exit(-1); - } - Job job = configureJob(conf, otherArgs); - System.exit(job.waitForCompletion(true) ? 0 : 1); - } -} diff --git examples/mapreduce/org/apache/hadoop/hbase/mapreduce/SampleUploader.java examples/mapreduce/org/apache/hadoop/hbase/mapreduce/SampleUploader.java deleted file mode 100644 index 4ccd036..0000000 --- examples/mapreduce/org/apache/hadoop/hbase/mapreduce/SampleUploader.java +++ /dev/null @@ -1,147 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase.mapreduce; - -import java.io.IOException; - -import org.apache.hadoop.conf.Configuration; -import org.apache.hadoop.fs.Path; -import org.apache.hadoop.hbase.HBaseConfiguration; -import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.io.ImmutableBytesWritable; -import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; -import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.io.LongWritable; -import org.apache.hadoop.io.Text; -import org.apache.hadoop.mapreduce.Job; -import org.apache.hadoop.mapreduce.Mapper; -import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; -import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat; -import org.apache.hadoop.util.GenericOptionsParser; - -/** - * Sample Uploader MapReduce - *

- * This is EXAMPLE code. You will need to change it to work for your context. - *

- * Uses {@link TableReducer} to put the data into HBase. Change the InputFormat - * to suit your data. In this example, we are importing a CSV file. - *

- *

row,family,qualifier,value
- *

- * The table and columnfamily we're to insert into must preexist. - *

- * There is no reducer in this example as it is not necessary and adds - * significant overhead. If you need to do any massaging of data before - * inserting into HBase, you can do this in the map as well. - *

Do the following to start the MR job: - *

- * ./bin/hadoop org.apache.hadoop.hbase.mapreduce.SampleUploader /tmp/input.csv TABLE_NAME
- * 
- *

- * This code was written against HBase 0.21 trunk. - */ -public class SampleUploader { - - private static final String NAME = "SampleUploader"; - - static class Uploader - extends Mapper { - - private long checkpoint = 100; - private long count = 0; - - @Override - public void map(LongWritable key, Text line, Context context) - throws IOException { - - // Input is a CSV file - // Each map() is a single line, where the key is the line number - // Each line is comma-delimited; row,family,qualifier,value - - // Split CSV line - String [] values = line.toString().split(","); - if(values.length != 4) { - return; - } - - // Extract each value - byte [] row = Bytes.toBytes(values[0]); - byte [] family = Bytes.toBytes(values[1]); - byte [] qualifier = Bytes.toBytes(values[2]); - byte [] value = Bytes.toBytes(values[3]); - - // Create Put - Put put = new Put(row); - put.add(family, qualifier, value); - - // Uncomment below to disable WAL. This will improve performance but means - // you will experience data loss in the case of a RegionServer crash. - // put.setWriteToWAL(false); - - try { - context.write(new ImmutableBytesWritable(row), put); - } catch (InterruptedException e) { - e.printStackTrace(); - } - - // Set status every checkpoint lines - if(++count % checkpoint == 0) { - context.setStatus("Emitting Put " + count); - } - } - } - - /** - * Job configuration. - */ - public static Job configureJob(Configuration conf, String [] args) - throws IOException { - Path inputPath = new Path(args[0]); - String tableName = args[1]; - Job job = new Job(conf, NAME + "_" + tableName); - job.setJarByClass(Uploader.class); - FileInputFormat.setInputPaths(job, inputPath); - job.setInputFormatClass(SequenceFileInputFormat.class); - job.setMapperClass(Uploader.class); - // No reducers. Just write straight to table. Call initTableReducerJob - // because it sets up the TableOutputFormat. - TableMapReduceUtil.initTableReducerJob(tableName, null, job); - job.setNumReduceTasks(0); - return job; - } - - /** - * Main entry point. - * - * @param args The command line parameters. - * @throws Exception When running the job fails. - */ - public static void main(String[] args) throws Exception { - Configuration conf = HBaseConfiguration.create(); - String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs(); - if(otherArgs.length != 2) { - System.err.println("Wrong number of arguments: " + otherArgs.length); - System.err.println("Usage: " + NAME + " "); - System.exit(-1); - } - Job job = configureJob(conf, otherArgs); - System.exit(job.waitForCompletion(true) ? 0 : 1); - } -} diff --git examples/thrift/DemoClient.cpp examples/thrift/DemoClient.cpp deleted file mode 100644 index cf9dded..0000000 --- examples/thrift/DemoClient.cpp +++ /dev/null @@ -1,322 +0,0 @@ -/** - * Copyright 2008 The Apache Software Foundation - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* - * Instructions: - * 1. Run Thrift to generate the cpp module HBase - * thrift --gen cpp ../../../src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift - * 2. Execute {make}. - * 3. Execute {./DemoClient}. - */ - -#include -#include -#include -#include - -#include - -#include -#include -#include -#include - -#include "Hbase.h" - -using namespace apache::thrift; -using namespace apache::thrift::protocol; -using namespace apache::thrift::transport; - -using namespace apache::hadoop::hbase::thrift; - -namespace { - -typedef std::vector StrVec; -typedef std::map StrMap; -typedef std::vector ColVec; -typedef std::map ColMap; -typedef std::vector CellVec; -typedef std::map CellMap; - - -static void -printRow(const std::vector &rowResult) -{ - for (size_t i = 0; i < rowResult.size(); i++) { - std::cout << "row: " << rowResult[i].row << ", cols: "; - for (CellMap::const_iterator it = rowResult[i].columns.begin(); - it != rowResult[i].columns.end(); ++it) { - std::cout << it->first << " => " << it->second.value << "; "; - } - std::cout << std::endl; - } -} - -static void -printVersions(const std::string &row, const CellVec &versions) -{ - std::cout << "row: " << row << ", values: "; - for (CellVec::const_iterator it = versions.begin(); it != versions.end(); ++it) { - std::cout << (*it).value << "; "; - } - std::cout << std::endl; -} - -} - -int -main(int argc, char** argv) -{ - if (argc < 3) { - std::cerr << "Invalid arguments!\n" << "Usage: DemoClient host port" << std::endl; - return -1; - } - bool isFramed = false; - boost::shared_ptr socket(new TSocket(argv[1], boost::lexical_cast(argv[2]))); - boost::shared_ptr transport; - - if (isFramed) { - transport.reset(new TFramedTransport(socket)); - } else { - transport.reset(new TBufferedTransport(socket)); - } - boost::shared_ptr protocol(new TBinaryProtocol(transport)); - - const std::map dummyAttributes; // see HBASE-6806 HBASE-4658 - HbaseClient client(protocol); - try { - transport->open(); - - std::string t("demo_table"); - - // - // Scan all tables, look for the demo table and delete it. - // - std::cout << "scanning tables..." << std::endl; - StrVec tables; - client.getTableNames(tables); - for (StrVec::const_iterator it = tables.begin(); it != tables.end(); ++it) { - std::cout << " found: " << *it << std::endl; - if (t == *it) { - if (client.isTableEnabled(*it)) { - std::cout << " disabling table: " << *it << std::endl; - client.disableTable(*it); - } - std::cout << " deleting table: " << *it << std::endl; - client.deleteTable(*it); - } - } - - // - // Create the demo table with two column families, entry: and unused: - // - ColVec columns; - columns.push_back(ColumnDescriptor()); - columns.back().name = "entry:"; - columns.back().maxVersions = 10; - columns.push_back(ColumnDescriptor()); - columns.back().name = "unused:"; - - std::cout << "creating table: " << t << std::endl; - try { - client.createTable(t, columns); - } catch (const AlreadyExists &ae) { - std::cerr << "WARN: " << ae.message << std::endl; - } - - ColMap columnMap; - client.getColumnDescriptors(columnMap, t); - std::cout << "column families in " << t << ": " << std::endl; - for (ColMap::const_iterator it = columnMap.begin(); it != columnMap.end(); ++it) { - std::cout << " column: " << it->second.name << ", maxVer: " << it->second.maxVersions << std::endl; - } - - // - // Test UTF-8 handling - // - std::string invalid("foo-\xfc\xa1\xa1\xa1\xa1\xa1"); - std::string valid("foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"); - - // non-utf8 is fine for data - std::vector mutations; - mutations.push_back(Mutation()); - mutations.back().column = "entry:foo"; - mutations.back().value = invalid; - client.mutateRow(t, "foo", mutations, dummyAttributes); - - // try empty strings - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:"; - mutations.back().value = ""; - client.mutateRow(t, "", mutations, dummyAttributes); - - // this row name is valid utf8 - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:foo"; - mutations.back().value = valid; - client.mutateRow(t, valid, mutations, dummyAttributes); - - // non-utf8 is now allowed in row names because HBase stores values as binary - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:foo"; - mutations.back().value = invalid; - client.mutateRow(t, invalid, mutations, dummyAttributes); - - // Run a scanner on the rows we just created - StrVec columnNames; - columnNames.push_back("entry:"); - - std::cout << "Starting scanner..." << std::endl; - int scanner = client.scannerOpen(t, "", columnNames, dummyAttributes); - try { - while (true) { - std::vector value; - client.scannerGet(value, scanner); - if (value.size() == 0) - break; - printRow(value); - } - } catch (const IOError &ioe) { - std::cerr << "FATAL: Scanner raised IOError" << std::endl; - } - - client.scannerClose(scanner); - std::cout << "Scanner finished" << std::endl; - - // - // Run some operations on a bunch of rows. - // - for (int i = 100; i >= 0; --i) { - // format row keys as "00000" to "00100" - char buf[32]; - sprintf(buf, "%05d", i); - std::string row(buf); - std::vector rowResult; - - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "unused:"; - mutations.back().value = "DELETE_ME"; - client.mutateRow(t, row, mutations, dummyAttributes); - client.getRow(rowResult, t, row, dummyAttributes); - printRow(rowResult); - client.deleteAllRow(t, row, dummyAttributes); - - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:num"; - mutations.back().value = "0"; - mutations.push_back(Mutation()); - mutations.back().column = "entry:foo"; - mutations.back().value = "FOO"; - client.mutateRow(t, row, mutations, dummyAttributes); - client.getRow(rowResult, t, row, dummyAttributes); - printRow(rowResult); - - // sleep to force later timestamp - poll(0, 0, 50); - - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:foo"; - mutations.back().isDelete = true; - mutations.push_back(Mutation()); - mutations.back().column = "entry:num"; - mutations.back().value = "-1"; - client.mutateRow(t, row, mutations, dummyAttributes); - client.getRow(rowResult, t, row, dummyAttributes); - printRow(rowResult); - - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:num"; - mutations.back().value = boost::lexical_cast(i); - mutations.push_back(Mutation()); - mutations.back().column = "entry:sqr"; - mutations.back().value = boost::lexical_cast(i*i); - client.mutateRow(t, row, mutations, dummyAttributes); - client.getRow(rowResult, t, row, dummyAttributes); - printRow(rowResult); - - mutations.clear(); - mutations.push_back(Mutation()); - mutations.back().column = "entry:num"; - mutations.back().value = "-999"; - mutations.push_back(Mutation()); - mutations.back().column = "entry:sqr"; - mutations.back().isDelete = true; - client.mutateRowTs(t, row, mutations, 1, dummyAttributes); // shouldn't override latest - client.getRow(rowResult, t, row, dummyAttributes); - printRow(rowResult); - - CellVec versions; - client.getVer(versions, t, row, "entry:num", 10, dummyAttributes); - printVersions(row, versions); - assert(versions.size()); - std::cout << std::endl; - - try { - std::vector value; - client.get(value, t, row, "entry:foo", dummyAttributes); - if (value.size()) { - std::cerr << "FATAL: shouldn't get here!" << std::endl; - return -1; - } - } catch (const IOError &ioe) { - // blank - } - } - - // scan all rows/columns - - columnNames.clear(); - client.getColumnDescriptors(columnMap, t); - std::cout << "The number of columns: " << columnMap.size() << std::endl; - for (ColMap::const_iterator it = columnMap.begin(); it != columnMap.end(); ++it) { - std::cout << " column with name: " + it->second.name << std::endl; - columnNames.push_back(it->second.name); - } - std::cout << std::endl; - - std::cout << "Starting scanner..." << std::endl; - scanner = client.scannerOpenWithStop(t, "00020", "00040", columnNames, dummyAttributes); - try { - while (true) { - std::vector value; - client.scannerGet(value, scanner); - if (value.size() == 0) - break; - printRow(value); - } - } catch (const IOError &ioe) { - std::cerr << "FATAL: Scanner raised IOError" << std::endl; - } - - client.scannerClose(scanner); - std::cout << "Scanner finished" << std::endl; - - transport->close(); - } catch (const TException &tx) { - std::cerr << "ERROR: " << tx.what() << std::endl; - } -} diff --git examples/thrift/DemoClient.java examples/thrift/DemoClient.java deleted file mode 100644 index b2941dd..0000000 --- examples/thrift/DemoClient.java +++ /dev/null @@ -1,347 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.hadoop.hbase.thrift; - -import java.io.UnsupportedEncodingException; -import java.nio.ByteBuffer; -import java.nio.charset.CharacterCodingException; -import java.nio.charset.Charset; -import java.nio.charset.CharsetDecoder; -import java.text.NumberFormat; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; -import java.util.SortedMap; - -import org.apache.hadoop.hbase.thrift.generated.AlreadyExists; -import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; -import org.apache.hadoop.hbase.thrift.generated.Hbase; -import org.apache.hadoop.hbase.thrift.generated.IOError; -import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; -import org.apache.hadoop.hbase.thrift.generated.Mutation; -import org.apache.hadoop.hbase.thrift.generated.TCell; -import org.apache.hadoop.hbase.thrift.generated.TRowResult; - -import org.apache.thrift.TException; -import org.apache.thrift.protocol.TBinaryProtocol; -import org.apache.thrift.protocol.TProtocol; -import org.apache.thrift.transport.TSocket; -import org.apache.thrift.transport.TTransport; - -/* - * Instructions: - * 1. Run Thrift to generate the java module HBase - * thrift --gen java ../../../src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift - * 2. Acquire a jar of compiled Thrift java classes. As of this writing, HBase ships - * with this jar (libthrift-[VERSION].jar). If this jar is not present, or it is - * out-of-date with your current version of thrift, you can compile the jar - * yourself by executing {ant} in {$THRIFT_HOME}/lib/java. - * 3. Compile and execute this file with both the libthrift jar and the gen-java/ - * directory in the classpath. This can be done on the command-line with the - * following lines: (from the directory containing this file and gen-java/) - * - * javac -cp /path/to/libthrift/jar.jar:gen-java/ DemoClient.java - * mv DemoClient.class gen-java/org/apache/hadoop/hbase/thrift/ - * java -cp /path/to/libthrift/jar.jar:gen-java/ org.apache.hadoop.hbase.thrift.DemoClient - * - */ -public class DemoClient { - - static protected int port; - static protected String host; - CharsetDecoder decoder = null; - - public static void main(String[] args) - throws IOError, TException, UnsupportedEncodingException, IllegalArgument, AlreadyExists { - - if (args.length != 2) { - - System.out.println("Invalid arguments!"); - System.out.println("Usage: DemoClient host port"); - - System.exit(-1); - } - - port = Integer.parseInt(args[1]); - host = args[0]; - - - DemoClient client = new DemoClient(); - client.run(); - } - - DemoClient() { - decoder = Charset.forName("UTF-8").newDecoder(); - } - - // Helper to translate byte[]'s to UTF8 strings - private String utf8(byte[] buf) { - try { - return decoder.decode(ByteBuffer.wrap(buf)).toString(); - } catch (CharacterCodingException e) { - return "[INVALID UTF-8]"; - } - } - - // Helper to translate strings to UTF8 bytes - private byte[] bytes(String s) { - try { - return s.getBytes("UTF-8"); - } catch (UnsupportedEncodingException e) { - e.printStackTrace(); - return null; - } - } - - private void run() throws IOError, TException, IllegalArgument, - AlreadyExists { - - TTransport transport = new TSocket(host, port); - TProtocol protocol = new TBinaryProtocol(transport, true, true); - Hbase.Client client = new Hbase.Client(protocol); - - transport.open(); - - byte[] t = bytes("demo_table"); - - // - // Scan all tables, look for the demo table and delete it. - // - System.out.println("scanning tables..."); - for (ByteBuffer name : client.getTableNames()) { - System.out.println(" found: " + utf8(name.array())); - if (utf8(name.array()).equals(utf8(t))) { - if (client.isTableEnabled(name)) { - System.out.println(" disabling table: " + utf8(name.array())); - client.disableTable(name); - } - System.out.println(" deleting table: " + utf8(name.array())); - client.deleteTable(name); - } - } - - // - // Create the demo table with two column families, entry: and unused: - // - ArrayList columns = new ArrayList(); - ColumnDescriptor col = null; - col = new ColumnDescriptor(); - col.name = ByteBuffer.wrap(bytes("entry:")); - col.maxVersions = 10; - columns.add(col); - col = new ColumnDescriptor(); - col.name = ByteBuffer.wrap(bytes("unused:")); - columns.add(col); - - System.out.println("creating table: " + utf8(t)); - try { - client.createTable(ByteBuffer.wrap(t), columns); - } catch (AlreadyExists ae) { - System.out.println("WARN: " + ae.message); - } - - System.out.println("column families in " + utf8(t) + ": "); - Map columnMap = client.getColumnDescriptors(ByteBuffer.wrap(t)); - for (ColumnDescriptor col2 : columnMap.values()) { - System.out.println(" column: " + utf8(col2.name.array()) + ", maxVer: " + Integer.toString(col2.maxVersions)); - } - - Map dummyAttributes = null; - boolean writeToWal = false; - - // - // Test UTF-8 handling - // - byte[] invalid = {(byte) 'f', (byte) 'o', (byte) 'o', (byte) '-', (byte) 0xfc, (byte) 0xa1, (byte) 0xa1, (byte) 0xa1, (byte) 0xa1}; - byte[] valid = {(byte) 'f', (byte) 'o', (byte) 'o', (byte) '-', (byte) 0xE7, (byte) 0x94, (byte) 0x9F, (byte) 0xE3, (byte) 0x83, (byte) 0x93, (byte) 0xE3, (byte) 0x83, (byte) 0xBC, (byte) 0xE3, (byte) 0x83, (byte) 0xAB}; - - ArrayList mutations; - // non-utf8 is fine for data - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(invalid), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("foo")), mutations, dummyAttributes); - - // try empty strings - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:")), ByteBuffer.wrap(bytes("")), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("")), mutations, dummyAttributes); - - // this row name is valid utf8 - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(valid), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(valid), mutations, dummyAttributes); - - // non-utf8 is now allowed in row names because HBase stores values as binary - ByteBuffer bf = ByteBuffer.wrap(invalid); - - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(invalid), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(invalid), mutations, dummyAttributes); - - - // Run a scanner on the rows we just created - ArrayList columnNames = new ArrayList(); - columnNames.add(ByteBuffer.wrap(bytes("entry:"))); - - System.out.println("Starting scanner..."); - int scanner = client.scannerOpen(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("")), columnNames, dummyAttributes); - - while (true) { - List entry = client.scannerGet(scanner); - if (entry.isEmpty()) { - break; - } - printRow(entry); - } - - // - // Run some operations on a bunch of rows - // - for (int i = 100; i >= 0; --i) { - // format row keys as "00000" to "00100" - NumberFormat nf = NumberFormat.getInstance(); - nf.setMinimumIntegerDigits(5); - nf.setGroupingUsed(false); - byte[] row = bytes(nf.format(i)); - - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("unused:")), ByteBuffer.wrap(bytes("DELETE_ME")), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); - printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); - client.deleteAllRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes); - - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:num")), ByteBuffer.wrap(bytes("0")), writeToWal)); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(bytes("FOO")), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); - printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); - - Mutation m = null; - mutations = new ArrayList(); - m = new Mutation(); - m.column = ByteBuffer.wrap(bytes("entry:foo")); - m.isDelete = true; - mutations.add(m); - m = new Mutation(); - m.column = ByteBuffer.wrap(bytes("entry:num")); - m.value = ByteBuffer.wrap(bytes("-1")); - mutations.add(m); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); - printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); - - mutations = new ArrayList(); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:num")), ByteBuffer.wrap(bytes(Integer.toString(i))), writeToWal)); - mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:sqr")), ByteBuffer.wrap(bytes(Integer.toString(i * i))), writeToWal)); - client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); - printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); - - // sleep to force later timestamp - try { - Thread.sleep(50); - } catch (InterruptedException e) { - // no-op - } - - mutations.clear(); - m = new Mutation(); - m.column = ByteBuffer.wrap(bytes("entry:num")); - m.value= ByteBuffer.wrap(bytes("-999")); - mutations.add(m); - m = new Mutation(); - m.column = ByteBuffer.wrap(bytes("entry:sqr")); - m.isDelete = true; - client.mutateRowTs(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, 1, dummyAttributes); // shouldn't override latest - printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); - - List versions = client.getVer(ByteBuffer.wrap(t), ByteBuffer.wrap(row), ByteBuffer.wrap(bytes("entry:num")), 10, dummyAttributes); - printVersions(ByteBuffer.wrap(row), versions); - if (versions.isEmpty()) { - System.out.println("FATAL: wrong # of versions"); - System.exit(-1); - } - - - List result = client.get(ByteBuffer.wrap(t), ByteBuffer.wrap(row), ByteBuffer.wrap(bytes("entry:foo")), dummyAttributes); - if (result.isEmpty() == false) { - System.out.println("FATAL: shouldn't get here"); - System.exit(-1); - } - - System.out.println(""); - } - - // scan all rows/columnNames - - columnNames.clear(); - for (ColumnDescriptor col2 : client.getColumnDescriptors(ByteBuffer.wrap(t)).values()) { - System.out.println("column with name: " + new String(col2.name.array())); - System.out.println(col2.toString()); - - columnNames.add(col2.name); - } - - System.out.println("Starting scanner..."); - scanner = client.scannerOpenWithStop(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("00020")), ByteBuffer.wrap(bytes("00040")), columnNames, dummyAttributes); - - while (true) { - List entry = client.scannerGet(scanner); - if (entry.isEmpty()) { - System.out.println("Scanner finished"); - break; - } - printRow(entry); - } - - transport.close(); - } - - private final void printVersions(ByteBuffer row, List versions) { - StringBuilder rowStr = new StringBuilder(); - for (TCell cell : versions) { - rowStr.append(utf8(cell.value.array())); - rowStr.append("; "); - } - System.out.println("row: " + utf8(row.array()) + ", values: " + rowStr); - } - - private final void printRow(TRowResult rowResult) { - // copy values into a TreeMap to get them in sorted order - - TreeMap sorted = new TreeMap(); - for (Map.Entry column : rowResult.columns.entrySet()) { - sorted.put(utf8(column.getKey().array()), column.getValue()); - } - - StringBuilder rowStr = new StringBuilder(); - for (SortedMap.Entry entry : sorted.entrySet()) { - rowStr.append(entry.getKey()); - rowStr.append(" => "); - rowStr.append(utf8(entry.getValue().value.array())); - rowStr.append("; "); - } - System.out.println("row: " + utf8(rowResult.row.array()) + ", cols: " + rowStr); - } - - private void printRow(List rows) { - for (TRowResult rowResult : rows) { - printRow(rowResult); - } - } -} diff --git examples/thrift/DemoClient.php examples/thrift/DemoClient.php deleted file mode 100644 index 26c75c4..0000000 --- examples/thrift/DemoClient.php +++ /dev/null @@ -1,277 +0,0 @@ -row}, cols: \n" ); - $values = $rowresult->columns; - asort( $values ); - foreach ( $values as $k=>$v ) { - echo( " {$k} => {$v->value}\n" ); - } -} - -$socket = new TSocket( 'localhost', 9090 ); -$socket->setSendTimeout( 10000 ); // Ten seconds (too long for production, but this is just a demo ;) -$socket->setRecvTimeout( 20000 ); // Twenty seconds -$transport = new TBufferedTransport( $socket ); -$protocol = new TBinaryProtocol( $transport ); -$client = new HbaseClient( $protocol ); - -$transport->open(); - -$t = 'demo_table'; - -?> - -DemoClient - - -

-getTableNames();
-sort( $tables );
-foreach ( $tables as $name ) {
-  echo( "  found: {$name}\n" );
-  if ( $name == $t ) {
-    if ($client->isTableEnabled( $name )) {
-      echo( "    disabling table: {$name}\n");
-      $client->disableTable( $name );
-    }
-    echo( "    deleting table: {$name}\n" );
-    $client->deleteTable( $name );
-  }
-}
-
-#
-# Create the demo table with two column families, entry: and unused:
-#
-$columns = array(
-  new ColumnDescriptor( array(
-    'name' => 'entry:',
-    'maxVersions' => 10
-  ) ),
-  new ColumnDescriptor( array(
-    'name' => 'unused:'
-  ) )
-);
-
-echo( "creating table: {$t}\n" );
-try {
-  $client->createTable( $t, $columns );
-} catch ( AlreadyExists $ae ) {
-  echo( "WARN: {$ae->message}\n" );
-}
-
-echo( "column families in {$t}:\n" );
-$descriptors = $client->getColumnDescriptors( $t );
-asort( $descriptors );
-foreach ( $descriptors as $col ) {
-  echo( "  column: {$col->name}, maxVer: {$col->maxVersions}\n" );
-}
-$dummy_attributes = array();
-#
-# Test UTF-8 handling
-#
-$invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1";
-$valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB";
-
-# non-utf8 is fine for data
-$mutations = array(
-  new Mutation( array(
-    'column' => 'entry:foo',
-    'value' => $invalid
-  ) ),
-);
-$client->mutateRow( $t, "foo", $mutations, $dummy_attributes );
-
-# try empty strings
-$mutations = array(
-  new Mutation( array(
-    'column' => 'entry:',
-    'value' => ""
-  ) ),
-);
-$client->mutateRow( $t, "", $mutations, $dummy_attributes );
-
-# this row name is valid utf8
-$mutations = array(
-  new Mutation( array(
-    'column' => 'entry:foo',
-    'value' => $valid
-  ) ),
-);
-$client->mutateRow( $t, $valid, $mutations, $dummy_attributes );
-
-# non-utf8 is not allowed in row names
-try {
-  $mutations = array(
-    new Mutation( array(
-      'column' => 'entry:foo',
-      'value' => $invalid
-    ) ),
-  );
-  $client->mutateRow( $t, $invalid, $mutations, $dummy_attributes );
-  throw new Exception( "shouldn't get here!" );
-} catch ( IOError $e ) {
-  echo( "expected error: {$e->message}\n" );
-}
-
-# Run a scanner on the rows we just created
-echo( "Starting scanner...\n" );
-$scanner = $client->scannerOpen( $t, "", array( "entry:" ), $dummy_attributes );
-try {
-  while (true) printRow( $client->scannerGet( $scanner ) );
-} catch ( NotFound $nf ) {
-  $client->scannerClose( $scanner );
-  echo( "Scanner finished\n" );
-}
-
-#
-# Run some operations on a bunch of rows.
-#
-for ($e=100; $e>=0; $e--) {
-
-  # format row keys as "00000" to "00100"
-  $row = str_pad( $e, 5, '0', STR_PAD_LEFT );
-
-  $mutations = array(
-    new Mutation( array(
-      'column' => 'unused:',
-      'value' => "DELETE_ME"
-    ) ),
-  );
-  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
-  printRow( $client->getRow( $t, $row, $dummy_attributes ));
-  $client->deleteAllRow( $t, $row, $dummy_attributes );
-
-  $mutations = array(
-    new Mutation( array(
-      'column' => 'entry:num',
-      'value' => "0"
-    ) ),
-    new Mutation( array(
-      'column' => 'entry:foo',
-      'value' => "FOO"
-    ) ),
-  );
-  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
-  printRow( $client->getRow( $t, $row, $dummy_attributes ));
-
-  $mutations = array(
-    new Mutation( array(
-      'column' => 'entry:foo',
-      'isDelete' => 1
-    ) ),
-    new Mutation( array(
-      'column' => 'entry:num',
-      'value' => '-1'
-    ) ),
-  );
-  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
-  printRow( $client->getRow( $t, $row, $dummy_attributes ) );
-
-  $mutations = array(
-    new Mutation( array(
-      'column' => "entry:num",
-      'value' => $e
-    ) ),
-    new Mutation( array(
-      'column' => "entry:sqr",
-      'value' => $e * $e
-    ) ),
-  );
-  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
-  printRow( $client->getRow( $t, $row, $dummy_attributes ));
-  
-  $mutations = array(
-    new Mutation( array(
-      'column' => 'entry:num',
-      'value' => '-999'
-    ) ),
-    new Mutation( array(
-      'column' => 'entry:sqr',
-      'isDelete' => 1
-    ) ),
-  );
-  $client->mutateRowTs( $t, $row, $mutations, 1, $dummy_attributes ); # shouldn't override latest
-  printRow( $client->getRow( $t, $row, $dummy_attributes ) );
-
-  $versions = $client->getVer( $t, $row, "entry:num", 10, $dummy_attributes );
-  echo( "row: {$row}, values: \n" );
-  foreach ( $versions as $v ) echo( "  {$v->value};\n" );
-  
-  try {
-    $client->get( $t, $row, "entry:foo", $dummy_attributes );
-    throw new Exception ( "shouldn't get here! " );
-  } catch ( NotFound $nf ) {
-    # blank
-  }
-
-}
-
-$columns = array();
-foreach ( $client->getColumnDescriptors($t) as $col=>$desc ) {
-  echo("column with name: {$desc->name}\n");
-  $columns[] = $desc->name.":";
-}
-
-echo( "Starting scanner...\n" );
-$scanner = $client->scannerOpenWithStop( $t, "00020", "00040", $columns, $dummy_attributes );
-try {
-  while (true) printRow( $client->scannerGet( $scanner ) );
-} catch ( NotFound $nf ) {
-  $client->scannerClose( $scanner );
-  echo( "Scanner finished\n" );
-}
-  
-$transport->close();
-
-?>
-
- - - diff --git examples/thrift/DemoClient.pl examples/thrift/DemoClient.pl deleted file mode 100644 index d9e7587..0000000 --- examples/thrift/DemoClient.pl +++ /dev/null @@ -1,295 +0,0 @@ -#!/usr/bin/perl -# Copyright 2011 The Apache Software Foundation -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -# Instructions: -# 1. Run Thrift to generate the perl module HBase -# thrift --gen perl ../../../src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift -# 2. Add the gen-perl/Hbase directory to your perl's @INC path: -# a. This is one of the paths listed in: perl -e 'print join ("\n", @INC) . "\n"' -# -OR- -# b. set PERL5LIB to include the gen-perl/ directory -# 3. Execute perl DemoClient.pl. - -use strict; -use warnings; - -use Thrift::Socket; -use Thrift::BufferedTransport; -use Thrift::BinaryProtocol; -use Hbase::Hbase; -use Data::Dumper; - -sub printRow($) -{ - my $rowresult = shift; - - return if (!$rowresult || @{$rowresult} < 1); - # rowresult is presummed to be a Hbase::TRowResult object - - printf ("row: {%s}, cols: \n", $rowresult->[0]->{row}); - my $values = $rowresult->[0]->{columns}; - foreach my $key ( sort ( keys %{$values} ) ) - { - printf ("{%s} => {%s}\n", $key, $values->{$key}->{value}); - } -} - -my $host = $ARGV[0] || "localhost"; -my $port = $ARGV[1] || 9090; - -my $socket = Thrift::Socket->new ($host, $port); -$socket->setSendTimeout (10000); # Ten seconds (value is in millisec) -$socket->setRecvTimeout (20000); # Twenty seconds (value is in millisec) - -my $transport = Thrift::BufferedTransport->new ($socket); -my $protocol = Thrift::BinaryProtocol->new ($transport); -my $client = Hbase::HbaseClient->new ($protocol); - -eval { - $transport->open (); -}; -if ($@) -{ - print "Unable to connect: $@->{message}\n"; - exit 1; -} - -my $demo_table = "demo_table"; - -print "scanning tables...\n"; - -# -# Search for all the tables in the HBase DB, return value is an arrayref -# -my $tables = $client->getTableNames(); -foreach my $table (sort @{$tables}) -{ - print " found {$table}\n"; - # This client will re-create the $demo_table, so we need to drop it first - if ($table eq $demo_table) - { - # Before we can drop a table, it has to be disabled first - if ($client->isTableEnabled ($table)) - { - print " disabling table: {$table}\n"; - $client->disableTable ($table); - } - # We assume the table has been disabled at this point - print " deleting table: {$table}\n"; - $client->deleteTable ($table); - } -} - -# -# Create the demo table with two column families, entry: and unused: -# -my $columns = [ - Hbase::ColumnDescriptor->new ( { name => "entry:", maxVersions => 10 } ), - Hbase::ColumnDescriptor->new ( { name => "unused:" } ), - ]; - -print "creating table: {$demo_table}\n"; -eval { - # This can throw Hbase::IllegalArgument (HASH) - $client->createTable ( $demo_table, $columns ); -}; -if ($@) -{ - die "ERROR: Unable to create table {$demo_table}: $@->{message}\n"; -} - -print "column families in {$demo_table}:\n"; -my $descriptors = $client->getColumnDescriptors ($demo_table); -foreach my $col (sort keys %{$descriptors}) -{ - printf (" column: {%s}, maxVer: {%s}\n", $descriptors->{$col}->{name}, $descriptors->{$col}->{maxVersions} ); -} - -my %dummy_attributes = (); - -# -# Test UTF-8 handling -# -my $invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1"; -my $valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; - -# non-utf8 is fine for data -my $key = "foo"; -my $mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => $invalid } ) ]; -$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); - -# try emptry strings -$key = ""; -$mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => "" } ) ]; -$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); - -# this row name is valid utf8 -$key = "foo"; -# This is another way to use the Mutation class -my $mutation = Hbase::Mutation->new (); -$mutation->{column} = "entry:$key"; -$mutation->{value} = $valid; -$mutations = [ $mutation ]; -$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); - -# non-utf8 is not allowed in row names -eval { - $mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => $invalid } ) ]; - # this can throw a TApplicationException (HASH) error - $client->mutateRow ($demo_table, $key, $mutations, %dummy_attributes); - die ("shouldn't get here!"); -}; -if ($@) -{ - print "expected error: $@->{message}\n"; -} - -# -# Run a scanner on the rows we just created -# -print "Starting scanner...\n"; -$key = ""; -# scannerOpen expects ( table, key, ) -# if key is empty, it searches for all entries in the table -# if column descriptors is empty, it searches for all column descriptors within the table -my $scanner = $client->scannerOpen ( $demo_table, $key, [ "entry:" ], %dummy_attributes ); -eval { - - # scannerGet returns an empty arrayref (instead of an undef) to indicate no results - my $result = $client->scannerGet ( $scanner ); - while ( $result && @{$result} > 0 ) - { - printRow ( $result ); - $result = $client->scannerGet ( $scanner ); - } - - $client->scannerClose ( $scanner ); - print "Scanner finished\n"; -}; -if ($@) -{ - $client->scannerClose ( $scanner ); - print "Scanner finished\n"; -} - -# -# Run some operations on a bunch of rows -# -for (my $e = 100; $e > 0; $e--) -{ - # format row keys as "00000" to "00100"; - my $row = sprintf ("%05d", $e); - - $mutations = [ Hbase::Mutation->new ( { column => "unused:", value => "DELETE_ME" } ) ]; - $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); - printRow ( $client->getRow ( $demo_table, $row ) ); - $client->deleteAllRow ( $demo_table, $row ); - - $mutations = [ - Hbase::Mutation->new ( { column => "entry:num", value => "0" } ), - Hbase::Mutation->new ( { column => "entry:foo", value => "FOO" } ), - ]; - $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); - printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); - - $mutations = [ - Hbase::Mutation->new ( { column => "entry:foo", isDelete => 1 } ), - Hbase::Mutation->new ( { column => "entry:num", value => -1 } ), - ]; - $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); - printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); - - $mutations = [ - Hbase::Mutation->new ( { column => "entry:num", value => $e } ), - Hbase::Mutation->new ( { column => "entry:sqr", value => $e * $e } ), - ]; - $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); - printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); - - $mutations = [ - Hbase::Mutation->new ( { column => "entry:num", value => -999 } ), - Hbase::Mutation->new ( { column => "entry:sqr", isDelete => 1 } ), - ]; - - # mutateRowTs => modify the row entry at the specified timestamp (ts) - $client->mutateRowTs ( $demo_table, $row, $mutations, 1, %dummy_attributes ); # shouldn't override latest - printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); - - my $versions = $client->getVer ( $demo_table, $row, "entry:num", 10, %dummy_attributes ); - printf ( "row: {%s}, values: \n", $row ); - foreach my $v ( @{$versions} ) - { - printf ( " {%s} @ {%s}\n", $v->{value}, $v->{timestamp} ); - } - - eval { - - my $result = $client->get ( $demo_table, $row, "entry:foo", %dummy_attributes ); - - # Unfortunately, the API returns an empty arrayref instead of undef - # to signify a "not found", which makes it slightly inconvenient. - die "shouldn't get here!" if ($result && @{$result} > 0); - - if (!$result || ($result && @{$result} < 1)) - { - print "expected: {$row} not found in {$demo_table}\n"; - } - }; - if ($@) - { - print "expected error: $@\n"; - } -} - -my $column_descriptor = $client->getColumnDescriptors ( $demo_table ); -$columns = []; -foreach my $col ( keys %{$column_descriptor} ) -{ - my $colname = $column_descriptor->{$col}->{name}; - print "column with name: {$colname}\n"; - push ( @{$columns}, $colname); -} - -print "Starting scanner...\n"; -$scanner = $client->scannerOpenWithStop ( $demo_table, "00020", "00040", $columns, %dummy_attributes ); -eval { - - # scannerGet returns an empty arrayref (instead of an undef) to indicate no results - my $result = $client->scannerGet ( $scanner ); - while ( $result && @$result > 0 ) - { - printRow ( $result ); - $result = $client->scannerGet ( $scanner ); - } - - $client->scannerClose ( $scanner ); - print "Scanner finished\n"; -}; -if ($@) -{ - $client->scannerClose ( $scanner ); - print "Scanner finished\n"; -} - -$transport->close (); - -exit 0; - diff --git examples/thrift/DemoClient.py examples/thrift/DemoClient.py deleted file mode 100644 index a92d674..0000000 --- examples/thrift/DemoClient.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/python -''' - Licensed to the Apache Software Foundation (ASF) under one - or more contributor license agreements. See the NOTICE file - distributed with this work for additional information - regarding copyright ownership. The ASF licenses this file - to you under the Apache License, Version 2.0 (the - "License"); you may not use this file except in compliance - with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -''' -# Instructions: -# 1. Run Thrift to generate the python module HBase -# thrift --gen py ../../../src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift -# 2. Create a directory of your choosing that contains: -# a. This file (DemoClient.py). -# b. The directory gen-py/hbase (generated by instruction step 1). -# c. The directory {$THRIFT_HOME}/lib/py/build/lib.{YOUR_SYSTEM}/thrift. -# Or, modify the import statements below such that this file can access the -# directories from steps 3b and 3c. -# 3. Execute {python DemoClient.py}. - -import sys -import time - -from thrift import Thrift -from thrift.transport import TSocket, TTransport -from thrift.protocol import TBinaryProtocol -from hbase import ttypes -from hbase.Hbase import Client, ColumnDescriptor, Mutation - -def printVersions(row, versions): - print "row: " + row + ", values: ", - for cell in versions: - print cell.value + "; ", - print - -def printRow(entry): - print "row: " + entry.row + ", cols:", - for k in sorted(entry.columns): - print k + " => " + entry.columns[k].value, - print - - -def demo_client(host, port, is_framed_transport): - - # Make socket - socket = TSocket.TSocket(host, port) - - # Make transport - if is_framed_transport: - transport = TTransport.TFramedTransport(socket) - else: - transport = TTransport.TBufferedTransport(socket) - - # Wrap in a protocol - protocol = TBinaryProtocol.TBinaryProtocol(transport) - - # Create a client to use the protocol encoder - client = Client(protocol) - - # Connect! - transport.open() - - t = "demo_table" - - # - # Scan all tables, look for the demo table and delete it. - # - print "scanning tables..." - for table in client.getTableNames(): - print " found: %s" %(table) - if table == t: - if client.isTableEnabled(table): - print " disabling table: %s" %(t) - client.disableTable(table) - print " deleting table: %s" %(t) - client.deleteTable(table) - - columns = [] - col = ColumnDescriptor() - col.name = 'entry:' - col.maxVersions = 10 - columns.append(col) - col = ColumnDescriptor() - col.name = 'unused:' - columns.append(col) - - try: - print "creating table: %s" %(t) - client.createTable(t, columns) - except AlreadyExists, ae: - print "WARN: " + ae.message - - cols = client.getColumnDescriptors(t) - print "column families in %s" %(t) - for col_name in cols.keys(): - col = cols[col_name] - print " column: %s, maxVer: %d" % (col.name, col.maxVersions) - - dummy_attributes = {} - # - # Test UTF-8 handling - # - invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1" - valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; - - # non-utf8 is fine for data - mutations = [Mutation(column="entry:foo",value=invalid)] - print str(mutations) - client.mutateRow(t, "foo", mutations, dummy_attributes) - - # try empty strings - mutations = [Mutation(column="entry:", value="")] - client.mutateRow(t, "", mutations, dummy_attributes) - - # this row name is valid utf8 - mutations = [Mutation(column="entry:foo", value=valid)] - client.mutateRow(t, valid, mutations, dummy_attributes) - - # non-utf8 is not allowed in row names - try: - mutations = [Mutation(column="entry:foo", value=invalid)] - client.mutateRow(t, invalid, mutations, dummy_attributes) - except ttypes.IOError, e: - print 'expected exception: %s' %(e.message) - - # Run a scanner on the rows we just created - print "Starting scanner..." - scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes) - - r = client.scannerGet(scanner) - while r: - printRow(r[0]) - r = client.scannerGet(scanner) - print "Scanner finished" - - # - # Run some operations on a bunch of rows. - # - for e in range(100, 0, -1): - # format row keys as "00000" to "00100" - row = "%0.5d" % (e) - - mutations = [Mutation(column="unused:", value="DELETE_ME")] - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)[0]) - client.deleteAllRow(t, row, dummy_attributes) - - mutations = [Mutation(column="entry:num", value="0"), - Mutation(column="entry:foo", value="FOO")] - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)[0]); - - mutations = [Mutation(column="entry:foo",isDelete=True), - Mutation(column="entry:num",value="-1")] - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)[0]) - - mutations = [Mutation(column="entry:num", value=str(e)), - Mutation(column="entry:sqr", value=str(e*e))] - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)[0]) - - time.sleep(0.05) - - mutations = [Mutation(column="entry:num",value="-999"), - Mutation(column="entry:sqr",isDelete=True)] - client.mutateRowTs(t, row, mutations, 1, dummy_attributes) # shouldn't override latest - printRow(client.getRow(t, row, dummy_attributes)[0]) - - versions = client.getVer(t, row, "entry:num", 10, dummy_attributes) - printVersions(row, versions) - if len(versions) != 3: - print("FATAL: wrong # of versions") - sys.exit(-1) - - r = client.get(t, row, "entry:foo", dummy_attributes) - # just to be explicit, we get lists back, if it's empty there was no matching row. - if len(r) > 0: - raise "shouldn't get here!" - - columnNames = [] - for (col, desc) in client.getColumnDescriptors(t).items(): - print "column with name: "+desc.name - print desc - columnNames.append(desc.name+":") - - print "Starting scanner..." - scanner = client.scannerOpenWithStop(t, "00020", "00040", columnNames, dummy_attributes) - - r = client.scannerGet(scanner) - while r: - printRow(r[0]) - r = client.scannerGet(scanner) - - client.scannerClose(scanner) - print "Scanner finished" - - transport.close() - - -if __name__ == '__main__': - - import sys - if len(sys.argv) < 3: - print 'usage: %s ' % __file__ - sys.exit(1) - - host = sys.argv[1] - port = sys.argv[2] - is_framed_transport = False - demo_client(host, port, is_framed_transport) - diff --git examples/thrift/DemoClient.rb examples/thrift/DemoClient.rb deleted file mode 100644 index ec6b4cf..0000000 --- examples/thrift/DemoClient.rb +++ /dev/null @@ -1,246 +0,0 @@ -#!/usr/bin/ruby - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Instructions: -# 1. Run Thrift to generate the ruby module HBase -# thrift --gen rb ../../../src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift -# 2. Modify the import string below to point to {$THRIFT_HOME}/lib/rb/lib. -# 3. Execute {ruby DemoClient.rb}. - -# You will need to modify this import string: -$:.push('~/Thrift/thrift-20080411p1/lib/rb/lib') -$:.push('./gen-rb') - -require 'thrift/transport/tsocket' -require 'thrift/protocol/tbinaryprotocol' - -require 'Hbase' - -def printRow(rowresult) - print "row: #{rowresult.row}, cols: " - rowresult.columns.sort.each do |k,v| - print "#{k} => #{v.value}; " - end - puts "" -end - -transport = TBufferedTransport.new(TSocket.new("localhost", 9090)) -protocol = TBinaryProtocol.new(transport) -client = Apache::Hadoop::Hbase::Thrift::Hbase::Client.new(protocol) - -transport.open() - -t = "demo_table" - -# -# Scan all tables, look for the demo table and delete it. -# -puts "scanning tables..." -client.getTableNames().sort.each do |name| - puts " found: #{name}" - if (name == t) - if (client.isTableEnabled(name)) - puts " disabling table: #{name}" - client.disableTable(name) - end - puts " deleting table: #{name}" - client.deleteTable(name) - end -end - -# -# Create the demo table with two column families, entry: and unused: -# -columns = [] -col = Apache::Hadoop::Hbase::Thrift::ColumnDescriptor.new -col.name = "entry:" -col.maxVersions = 10 -columns << col; -col = Apache::Hadoop::Hbase::Thrift::ColumnDescriptor.new -col.name = "unused:" -columns << col; - -puts "creating table: #{t}" -begin - client.createTable(t, columns) -rescue Apache::Hadoop::Hbase::Thrift::AlreadyExists => ae - puts "WARN: #{ae.message}" -end - -puts "column families in #{t}: " -client.getColumnDescriptors(t).sort.each do |key, col| - puts " column: #{col.name}, maxVer: #{col.maxVersions}" -end - -dummy_attributes = {} - -# -# Test UTF-8 handling -# -invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1" -valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; - -# non-utf8 is fine for data -mutations = [] -m = Apache::Hadoop::Hbase::Thrift::Mutation.new -m.column = "entry:foo" -m.value = invalid -mutations << m -client.mutateRow(t, "foo", mutations, dummy_attributes) - -# try empty strings -mutations = [] -m = Apache::Hadoop::Hbase::Thrift::Mutation.new -m.column = "entry:" -m.value = "" -mutations << m -client.mutateRow(t, "", mutations, dummy_attributes) - -# this row name is valid utf8 -mutations = [] -m = Apache::Hadoop::Hbase::Thrift::Mutation.new -m.column = "entry:foo" -m.value = valid -mutations << m -client.mutateRow(t, valid, mutations, dummy_attributes) - -# non-utf8 is not allowed in row names -begin - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:foo" - m.value = invalid - mutations << m - client.mutateRow(t, invalid, mutations, dummy_attributes) - raise "shouldn't get here!" -rescue Apache::Hadoop::Hbase::Thrift::IOError => e - puts "expected error: #{e.message}" -end - -# Run a scanner on the rows we just created -puts "Starting scanner..." -scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes) -begin - while (true) - printRow(client.scannerGet(scanner)) - end -rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf - client.scannerClose(scanner) - puts "Scanner finished" -end - -# -# Run some operations on a bunch of rows. -# -(0..100).to_a.reverse.each do |e| - # format row keys as "00000" to "00100" - row = format("%0.5d", e) - - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "unused:" - m.value = "DELETE_ME" - mutations << m - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)) - client.deleteAllRow(t, row, dummy_attributes) - - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:num" - m.value = "0" - mutations << m - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:foo" - m.value = "FOO" - mutations << m - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)) - - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:foo" - m.isDelete = 1 - mutations << m - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:num" - m.value = "-1" - mutations << m - client.mutateRow(t, row, mutations, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)); - - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:num" - m.value = e.to_s - mutations << m - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:sqr" - m.value = (e*e).to_s - mutations << m - client.mutateRow(t, row, mutations, dummy_attributes, dummy_attributes) - printRow(client.getRow(t, row, dummy_attributes)) - - mutations = [] - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:num" - m.value = "-999" - mutations << m - m = Apache::Hadoop::Hbase::Thrift::Mutation.new - m.column = "entry:sqr" - m.isDelete = 1 - mutations << m - client.mutateRowTs(t, row, mutations, 1, dummy_attributes) # shouldn't override latest - printRow(client.getRow(t, row, dummy_attributes, dummy_attributes)); - - versions = client.getVer(t, row, "entry:num", 10, dummy_attributes) - print "row: #{row}, values: " - versions.each do |v| - print "#{v.value}; " - end - puts "" - - begin - client.get(t, row, "entry:foo", dummy_attributes) - raise "shouldn't get here!" - rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf - # blank - end - - puts "" -end - -columns = [] -client.getColumnDescriptors(t).each do |col, desc| - puts "column with name: #{desc.name}" - columns << desc.name + ":" -end - -puts "Starting scanner..." -scanner = client.scannerOpenWithStop(t, "00020", "00040", columns, dummy_attributes) -begin - while (true) - printRow(client.scannerGet(scanner, dummy_attributes)) - end -rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf - client.scannerClose(scanner) - puts "Scanner finished" -end - -transport.close() diff --git examples/thrift/Makefile examples/thrift/Makefile deleted file mode 100644 index 0aa803d..0000000 --- examples/thrift/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2008 The Apache Software Foundation -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Makefile for C++ Hbase Thrift DemoClient -# NOTE: run 'thrift -cpp Hbase.thrift' first - -THRIFT_DIR = /usr/local/include/thrift -LIB_DIR = /usr/local/lib - -GEN_SRC = ./gen-cpp/Hbase.cpp \ - ./gen-cpp/Hbase_types.cpp \ - ./gen-cpp/Hbase_constants.cpp - -default: DemoClient - -DemoClient: DemoClient.cpp - g++ -o DemoClient -I${THRIFT_DIR} -I./gen-cpp -L${LIB_DIR} -Wl,-rpath,${LIB_DIR} -lthrift DemoClient.cpp ${GEN_SRC} - -clean: - rm -rf DemoClient diff --git examples/thrift/README.txt examples/thrift/README.txt deleted file mode 100644 index c742f8d..0000000 --- examples/thrift/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -Hbase Thrift Client Examples -============================ - -Included in this directory are sample clients of the HBase ThriftServer. They -all perform the same actions but are implemented in C++, Java, Ruby, PHP, and -Python respectively. - -To run/compile this clients, you will first need to install the thrift package -(from http://developers.facebook.com/thrift/) and then run thrift to generate -the language files: - -thrift --gen cpp --gen java --gen rb --gen py -php \ - ../../../src/java/org/apache/hadoop/hbase/thrift/Hbase.thrift - -See the individual DemoClient test files for more specific instructions on -running each test. diff --git hbase-examples/README.txt hbase-examples/README.txt new file mode 100644 index 0000000..33d5e49 --- /dev/null +++ hbase-examples/README.txt @@ -0,0 +1,52 @@ +Example code. + +* org.apache.hadoop.hbase.mapreduce.SampleUploader + Demonstrates uploading data from text files (presumably stored in HDFS) to HBase. + +* org.apache.hadoop.hbase.mapreduce.IndexBuilder + Demonstrates map/reduce with a table as the source and other tables as the sink. + You can generate sample data for this MR job via examples/ruby/index-builder-setup.rb. + + +* Thrift examples + Sample clients of the HBase ThriftServer. They perform the same actions, implemented in + C++, Java, Ruby, PHP, and Python. Pre-generated Thrift code for HBase is included to be + able to compile the examples without Thrift installed. + If desired, the code can be re-generated as follows: + thrift --gen cpp --gen java --gen rb --gen py --gen php \ + ../hbase-server/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift + and re-placed at the corresponding paths. + + Before you run any Thrift examples, find a running HBase Thrift server. + If you start one locally (bin/hbase thrift start), the default port is 9090. + + * Java: org.apache.hadoop.hbase.thrift.DemoClient (jar under lib/). + 1. Set up the classpath with all the necessary jars, for example: + for f in `find . -name "libthrift-*.jar" -or -name "slf4j-*.jar" -or -name "log4j-*.jar"`; do + HBASE_EXAMPLE_CLASSPATH=${HBASE_EXAMPLE_CLASSPATH}:$f; + done + 2. Execute: + {java -cp hbase-examples-[VERSION].jar:${HBASE_EXAMPLE_CLASSPATH} org.apache.hadoop.hbase.thrift.DemoClient } + + * Ruby: examples/ruby/DemoClient.rb + 1. Modify the import path in the file to point to {$THRIFT_HOME}/lib/rb/lib. + 2. Execute {ruby DemoClient.rb} (or {ruby DemoClient.rb }). + + * Python: examples/python/DemoClient.py + 1. Modify the added system path in the file to point to {$THRIFT_HOME}/lib/py/build/lib.[YOUR SYSTEM] + 2. Execute {python DemoClient.py }. + + * PHP: examples/php/DemoClient.php + 1. Modify the THRIFT_HOME path in the file to point to actual {$THRIFT_HOME}. + 2. Execute {php DemoClient.php}. + + * Perl: examples/perl/DemoClient.pl + 1. Modify the "use lib" path in the file to point to {$THRIFT_HOME}/lib/perl/lib. + 2. Use CPAN to get Bit::Vector and Class::Accessor modules if not present (see thrift perl README if more modules are missing). + 3. Execute {perl DemoClient.pl}. + + * CPP: examples/cpp/DemoClient.cpp + 1. Make sure you have boost and Thrift C++ libraries; modify Makefile if necessary. + 2. Execute {make}. + 3. Execute {./DemoClient}. + diff --git hbase-examples/pom.xml hbase-examples/pom.xml new file mode 100644 index 0000000..1831617 --- /dev/null +++ hbase-examples/pom.xml @@ -0,0 +1,91 @@ + + + + 4.0.0 + + hbase + org.apache.hbase + 0.95-SNAPSHOT + .. + + hbase-examples + HBase - Examples + Examples of HBase usage + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + secondPartTestsExecution + none + + + + + org.apache.maven.plugins + maven-jar-plugin + + true + + + + + test-jar + + + + + + + + + + org.apache.hbase + hbase-server + + + org.apache.thrift + libthrift + + + org.slf4j + slf4j-api + + + org.slf4j + slf4j-log4j12 + + + + + diff --git hbase-examples/src/main/cpp/DemoClient.cpp hbase-examples/src/main/cpp/DemoClient.cpp new file mode 100644 index 0000000..bae6dbf --- /dev/null +++ hbase-examples/src/main/cpp/DemoClient.cpp @@ -0,0 +1,314 @@ +/** + * Copyright 2008 The Apache Software Foundation + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "Hbase.h" + +using namespace apache::thrift; +using namespace apache::thrift::protocol; +using namespace apache::thrift::transport; + +using namespace apache::hadoop::hbase::thrift; + +namespace { + +typedef std::vector StrVec; +typedef std::map StrMap; +typedef std::vector ColVec; +typedef std::map ColMap; +typedef std::vector CellVec; +typedef std::map CellMap; + + +static void +printRow(const std::vector &rowResult) +{ + for (size_t i = 0; i < rowResult.size(); i++) { + std::cout << "row: " << rowResult[i].row << ", cols: "; + for (CellMap::const_iterator it = rowResult[i].columns.begin(); + it != rowResult[i].columns.end(); ++it) { + std::cout << it->first << " => " << it->second.value << "; "; + } + std::cout << std::endl; + } +} + +static void +printVersions(const std::string &row, const CellVec &versions) +{ + std::cout << "row: " << row << ", values: "; + for (CellVec::const_iterator it = versions.begin(); it != versions.end(); ++it) { + std::cout << (*it).value << "; "; + } + std::cout << std::endl; +} + +} + +int +main(int argc, char** argv) +{ + if (argc < 3) { + std::cerr << "Invalid arguments!\n" << "Usage: DemoClient host port" << std::endl; + return -1; + } + bool isFramed = false; + boost::shared_ptr socket(new TSocket(argv[1], boost::lexical_cast(argv[2]))); + boost::shared_ptr transport; + + if (isFramed) { + transport.reset(new TFramedTransport(socket)); + } else { + transport.reset(new TBufferedTransport(socket)); + } + boost::shared_ptr protocol(new TBinaryProtocol(transport)); + + const std::map dummyAttributes; // see HBASE-6806 HBASE-4658 + HbaseClient client(protocol); + try { + transport->open(); + + std::string t("demo_table"); + + // + // Scan all tables, look for the demo table and delete it. + // + std::cout << "scanning tables..." << std::endl; + StrVec tables; + client.getTableNames(tables); + for (StrVec::const_iterator it = tables.begin(); it != tables.end(); ++it) { + std::cout << " found: " << *it << std::endl; + if (t == *it) { + if (client.isTableEnabled(*it)) { + std::cout << " disabling table: " << *it << std::endl; + client.disableTable(*it); + } + std::cout << " deleting table: " << *it << std::endl; + client.deleteTable(*it); + } + } + + // + // Create the demo table with two column families, entry: and unused: + // + ColVec columns; + columns.push_back(ColumnDescriptor()); + columns.back().name = "entry:"; + columns.back().maxVersions = 10; + columns.push_back(ColumnDescriptor()); + columns.back().name = "unused:"; + + std::cout << "creating table: " << t << std::endl; + try { + client.createTable(t, columns); + } catch (const AlreadyExists &ae) { + std::cerr << "WARN: " << ae.message << std::endl; + } + + ColMap columnMap; + client.getColumnDescriptors(columnMap, t); + std::cout << "column families in " << t << ": " << std::endl; + for (ColMap::const_iterator it = columnMap.begin(); it != columnMap.end(); ++it) { + std::cout << " column: " << it->second.name << ", maxVer: " << it->second.maxVersions << std::endl; + } + + // + // Test UTF-8 handling + // + std::string invalid("foo-\xfc\xa1\xa1\xa1\xa1\xa1"); + std::string valid("foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"); + + // non-utf8 is fine for data + std::vector mutations; + mutations.push_back(Mutation()); + mutations.back().column = "entry:foo"; + mutations.back().value = invalid; + client.mutateRow(t, "foo", mutations, dummyAttributes); + + // try empty strings + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:"; + mutations.back().value = ""; + client.mutateRow(t, "", mutations, dummyAttributes); + + // this row name is valid utf8 + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:foo"; + mutations.back().value = valid; + client.mutateRow(t, valid, mutations, dummyAttributes); + + // non-utf8 is now allowed in row names because HBase stores values as binary + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:foo"; + mutations.back().value = invalid; + client.mutateRow(t, invalid, mutations, dummyAttributes); + + // Run a scanner on the rows we just created + StrVec columnNames; + columnNames.push_back("entry:"); + + std::cout << "Starting scanner..." << std::endl; + int scanner = client.scannerOpen(t, "", columnNames, dummyAttributes); + try { + while (true) { + std::vector value; + client.scannerGet(value, scanner); + if (value.size() == 0) + break; + printRow(value); + } + } catch (const IOError &ioe) { + std::cerr << "FATAL: Scanner raised IOError" << std::endl; + } + + client.scannerClose(scanner); + std::cout << "Scanner finished" << std::endl; + + // + // Run some operations on a bunch of rows. + // + for (int i = 100; i >= 0; --i) { + // format row keys as "00000" to "00100" + char buf[32]; + sprintf(buf, "%05d", i); + std::string row(buf); + std::vector rowResult; + + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "unused:"; + mutations.back().value = "DELETE_ME"; + client.mutateRow(t, row, mutations, dummyAttributes); + client.getRow(rowResult, t, row, dummyAttributes); + printRow(rowResult); + client.deleteAllRow(t, row, dummyAttributes); + + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:num"; + mutations.back().value = "0"; + mutations.push_back(Mutation()); + mutations.back().column = "entry:foo"; + mutations.back().value = "FOO"; + client.mutateRow(t, row, mutations, dummyAttributes); + client.getRow(rowResult, t, row, dummyAttributes); + printRow(rowResult); + + // sleep to force later timestamp + poll(0, 0, 50); + + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:foo"; + mutations.back().isDelete = true; + mutations.push_back(Mutation()); + mutations.back().column = "entry:num"; + mutations.back().value = "-1"; + client.mutateRow(t, row, mutations, dummyAttributes); + client.getRow(rowResult, t, row, dummyAttributes); + printRow(rowResult); + + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:num"; + mutations.back().value = boost::lexical_cast(i); + mutations.push_back(Mutation()); + mutations.back().column = "entry:sqr"; + mutations.back().value = boost::lexical_cast(i*i); + client.mutateRow(t, row, mutations, dummyAttributes); + client.getRow(rowResult, t, row, dummyAttributes); + printRow(rowResult); + + mutations.clear(); + mutations.push_back(Mutation()); + mutations.back().column = "entry:num"; + mutations.back().value = "-999"; + mutations.push_back(Mutation()); + mutations.back().column = "entry:sqr"; + mutations.back().isDelete = true; + client.mutateRowTs(t, row, mutations, 1, dummyAttributes); // shouldn't override latest + client.getRow(rowResult, t, row, dummyAttributes); + printRow(rowResult); + + CellVec versions; + client.getVer(versions, t, row, "entry:num", 10, dummyAttributes); + printVersions(row, versions); + assert(versions.size()); + std::cout << std::endl; + + try { + std::vector value; + client.get(value, t, row, "entry:foo", dummyAttributes); + if (value.size()) { + std::cerr << "FATAL: shouldn't get here!" << std::endl; + return -1; + } + } catch (const IOError &ioe) { + // blank + } + } + + // scan all rows/columns + + columnNames.clear(); + client.getColumnDescriptors(columnMap, t); + std::cout << "The number of columns: " << columnMap.size() << std::endl; + for (ColMap::const_iterator it = columnMap.begin(); it != columnMap.end(); ++it) { + std::cout << " column with name: " + it->second.name << std::endl; + columnNames.push_back(it->second.name); + } + std::cout << std::endl; + + std::cout << "Starting scanner..." << std::endl; + scanner = client.scannerOpenWithStop(t, "00020", "00040", columnNames, dummyAttributes); + try { + while (true) { + std::vector value; + client.scannerGet(value, scanner); + if (value.size() == 0) + break; + printRow(value); + } + } catch (const IOError &ioe) { + std::cerr << "FATAL: Scanner raised IOError" << std::endl; + } + + client.scannerClose(scanner); + std::cout << "Scanner finished" << std::endl; + + transport->close(); + } catch (const TException &tx) { + std::cerr << "ERROR: " << tx.what() << std::endl; + } +} diff --git hbase-examples/src/main/cpp/Makefile hbase-examples/src/main/cpp/Makefile new file mode 100644 index 0000000..0aa803d --- /dev/null +++ hbase-examples/src/main/cpp/Makefile @@ -0,0 +1,35 @@ +# Copyright 2008 The Apache Software Foundation +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Makefile for C++ Hbase Thrift DemoClient +# NOTE: run 'thrift -cpp Hbase.thrift' first + +THRIFT_DIR = /usr/local/include/thrift +LIB_DIR = /usr/local/lib + +GEN_SRC = ./gen-cpp/Hbase.cpp \ + ./gen-cpp/Hbase_types.cpp \ + ./gen-cpp/Hbase_constants.cpp + +default: DemoClient + +DemoClient: DemoClient.cpp + g++ -o DemoClient -I${THRIFT_DIR} -I./gen-cpp -L${LIB_DIR} -Wl,-rpath,${LIB_DIR} -lthrift DemoClient.cpp ${GEN_SRC} + +clean: + rm -rf DemoClient diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase.cpp hbase-examples/src/main/cpp/gen-cpp/Hbase.cpp new file mode 100644 index 0000000..e41421b --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase.cpp @@ -0,0 +1,15822 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "Hbase.h" + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +uint32_t Hbase_enableTable_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_enableTable_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_enableTable_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_enableTable_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_enableTable_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_enableTable_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_enableTable_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_enableTable_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_enableTable_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_disableTable_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_disableTable_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_disableTable_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_disableTable_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_disableTable_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_disableTable_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_disableTable_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_disableTable_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_disableTable_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_isTableEnabled_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_isTableEnabled_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_isTableEnabled_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_isTableEnabled_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_isTableEnabled_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_isTableEnabled_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_isTableEnabled_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_isTableEnabled_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_BOOL, 0); + xfer += oprot->writeBool(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_isTableEnabled_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_compact_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableNameOrRegionName); + this->__isset.tableNameOrRegionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_compact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_compact_args"); + xfer += oprot->writeFieldBegin("tableNameOrRegionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableNameOrRegionName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_compact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_compact_pargs"); + xfer += oprot->writeFieldBegin("tableNameOrRegionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableNameOrRegionName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_compact_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_compact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_compact_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_compact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_majorCompact_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableNameOrRegionName); + this->__isset.tableNameOrRegionName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_majorCompact_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_majorCompact_args"); + xfer += oprot->writeFieldBegin("tableNameOrRegionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableNameOrRegionName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_majorCompact_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_majorCompact_pargs"); + xfer += oprot->writeFieldBegin("tableNameOrRegionName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableNameOrRegionName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_majorCompact_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_majorCompact_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_majorCompact_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_majorCompact_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableNames_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableNames_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getTableNames_args"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableNames_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getTableNames_pargs"); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableNames_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size20; + ::apache::thrift::protocol::TType _etype23; + iprot->readListBegin(_etype23, _size20); + this->success.resize(_size20); + uint32_t _i24; + for (_i24 = 0; _i24 < _size20; ++_i24) + { + xfer += iprot->readBinary(this->success[_i24]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableNames_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getTableNames_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->success.size())); + std::vector ::const_iterator _iter25; + for (_iter25 = this->success.begin(); _iter25 != this->success.end(); ++_iter25) + { + xfer += oprot->writeBinary((*_iter25)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableNames_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size26; + ::apache::thrift::protocol::TType _etype29; + iprot->readListBegin(_etype29, _size26); + (*(this->success)).resize(_size26); + uint32_t _i30; + for (_i30 = 0; _i30 < _size26; ++_i30) + { + xfer += iprot->readBinary((*(this->success))[_i30]); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getColumnDescriptors_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getColumnDescriptors_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->success.clear(); + uint32_t _size31; + ::apache::thrift::protocol::TType _ktype32; + ::apache::thrift::protocol::TType _vtype33; + iprot->readMapBegin(_ktype32, _vtype33, _size31); + uint32_t _i35; + for (_i35 = 0; _i35 < _size31; ++_i35) + { + Text _key36; + xfer += iprot->readBinary(_key36); + ColumnDescriptor& _val37 = this->success[_key36]; + xfer += _val37.read(iprot); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getColumnDescriptors_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_MAP, 0); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::map ::const_iterator _iter38; + for (_iter38 = this->success.begin(); _iter38 != this->success.end(); ++_iter38) + { + xfer += oprot->writeBinary(_iter38->first); + xfer += _iter38->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getColumnDescriptors_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + (*(this->success)).clear(); + uint32_t _size39; + ::apache::thrift::protocol::TType _ktype40; + ::apache::thrift::protocol::TType _vtype41; + iprot->readMapBegin(_ktype40, _vtype41, _size39); + uint32_t _i43; + for (_i43 = 0; _i43 < _size39; ++_i43) + { + Text _key44; + xfer += iprot->readBinary(_key44); + ColumnDescriptor& _val45 = (*(this->success))[_key44]; + xfer += _val45.read(iprot); + } + iprot->readMapEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableRegions_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableRegions_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getTableRegions_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableRegions_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getTableRegions_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableRegions_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size46; + ::apache::thrift::protocol::TType _etype49; + iprot->readListBegin(_etype49, _size46); + this->success.resize(_size46); + uint32_t _i50; + for (_i50 = 0; _i50 < _size46; ++_i50) + { + xfer += this->success[_i50].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getTableRegions_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getTableRegions_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter51; + for (_iter51 = this->success.begin(); _iter51 != this->success.end(); ++_iter51) + { + xfer += (*_iter51).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getTableRegions_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size52; + ::apache::thrift::protocol::TType _etype55; + iprot->readListBegin(_etype55, _size52); + (*(this->success)).resize(_size52); + uint32_t _i56; + for (_i56 = 0; _i56 < _size52; ++_i56) + { + xfer += (*(this->success))[_i56].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_createTable_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columnFamilies.clear(); + uint32_t _size57; + ::apache::thrift::protocol::TType _etype60; + iprot->readListBegin(_etype60, _size57); + this->columnFamilies.resize(_size57); + uint32_t _i61; + for (_i61 = 0; _i61 < _size57; ++_i61) + { + xfer += this->columnFamilies[_i61].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.columnFamilies = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_createTable_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_createTable_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnFamilies", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->columnFamilies.size())); + std::vector ::const_iterator _iter62; + for (_iter62 = this->columnFamilies.begin(); _iter62 != this->columnFamilies.end(); ++_iter62) + { + xfer += (*_iter62).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_createTable_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_createTable_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columnFamilies", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->columnFamilies)).size())); + std::vector ::const_iterator _iter63; + for (_iter63 = (*(this->columnFamilies)).begin(); _iter63 != (*(this->columnFamilies)).end(); ++_iter63) + { + xfer += (*_iter63).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_createTable_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->exist.read(iprot); + this->__isset.exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_createTable_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_createTable_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.exist) { + xfer += oprot->writeFieldBegin("exist", ::apache::thrift::protocol::T_STRUCT, 3); + xfer += this->exist.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_createTable_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->exist.read(iprot); + this->__isset.exist = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteTable_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteTable_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteTable_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteTable_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteTable_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteTable_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteTable_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_deleteTable_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteTable_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_get_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size64; + ::apache::thrift::protocol::TType _ktype65; + ::apache::thrift::protocol::TType _vtype66; + iprot->readMapBegin(_ktype65, _vtype66, _size64); + uint32_t _i68; + for (_i68 = 0; _i68 < _size64; ++_i68) + { + Text _key69; + xfer += iprot->readBinary(_key69); + Text& _val70 = this->attributes[_key69]; + xfer += iprot->readBinary(_val70); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_get_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_get_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter71; + for (_iter71 = this->attributes.begin(); _iter71 != this->attributes.end(); ++_iter71) + { + xfer += oprot->writeBinary(_iter71->first); + xfer += oprot->writeBinary(_iter71->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_get_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_get_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter72; + for (_iter72 = (*(this->attributes)).begin(); _iter72 != (*(this->attributes)).end(); ++_iter72) + { + xfer += oprot->writeBinary(_iter72->first); + xfer += oprot->writeBinary(_iter72->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_get_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size73; + ::apache::thrift::protocol::TType _etype76; + iprot->readListBegin(_etype76, _size73); + this->success.resize(_size73); + uint32_t _i77; + for (_i77 = 0; _i77 < _size73; ++_i77) + { + xfer += this->success[_i77].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_get_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_get_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter78; + for (_iter78 = this->success.begin(); _iter78 != this->success.end(); ++_iter78) + { + xfer += (*_iter78).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_get_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size79; + ::apache::thrift::protocol::TType _etype82; + iprot->readListBegin(_etype82, _size79); + (*(this->success)).resize(_size79); + uint32_t _i83; + for (_i83 = 0; _i83 < _size79; ++_i83) + { + xfer += (*(this->success))[_i83].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVer_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->numVersions); + this->__isset.numVersions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size84; + ::apache::thrift::protocol::TType _ktype85; + ::apache::thrift::protocol::TType _vtype86; + iprot->readMapBegin(_ktype85, _vtype86, _size84); + uint32_t _i88; + for (_i88 = 0; _i88 < _size84; ++_i88) + { + Text _key89; + xfer += iprot->readBinary(_key89); + Text& _val90 = this->attributes[_key89]; + xfer += iprot->readBinary(_val90); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVer_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getVer_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numVersions", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32(this->numVersions); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter91; + for (_iter91 = this->attributes.begin(); _iter91 != this->attributes.end(); ++_iter91) + { + xfer += oprot->writeBinary(_iter91->first); + xfer += oprot->writeBinary(_iter91->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVer_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getVer_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numVersions", ::apache::thrift::protocol::T_I32, 4); + xfer += oprot->writeI32((*(this->numVersions))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter92; + for (_iter92 = (*(this->attributes)).begin(); _iter92 != (*(this->attributes)).end(); ++_iter92) + { + xfer += oprot->writeBinary(_iter92->first); + xfer += oprot->writeBinary(_iter92->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVer_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size93; + ::apache::thrift::protocol::TType _etype96; + iprot->readListBegin(_etype96, _size93); + this->success.resize(_size93); + uint32_t _i97; + for (_i97 = 0; _i97 < _size93; ++_i97) + { + xfer += this->success[_i97].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVer_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getVer_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter98; + for (_iter98 = this->success.begin(); _iter98 != this->success.end(); ++_iter98) + { + xfer += (*_iter98).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVer_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size99; + ::apache::thrift::protocol::TType _etype102; + iprot->readListBegin(_etype102, _size99); + (*(this->success)).resize(_size99); + uint32_t _i103; + for (_i103 = 0; _i103 < _size99; ++_i103) + { + xfer += (*(this->success))[_i103].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVerTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->numVersions); + this->__isset.numVersions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size104; + ::apache::thrift::protocol::TType _ktype105; + ::apache::thrift::protocol::TType _vtype106; + iprot->readMapBegin(_ktype105, _vtype106, _size104); + uint32_t _i108; + for (_i108 = 0; _i108 < _size104; ++_i108) + { + Text _key109; + xfer += iprot->readBinary(_key109); + Text& _val110 = this->attributes[_key109]; + xfer += iprot->readBinary(_val110); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVerTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getVerTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numVersions", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->numVersions); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter111; + for (_iter111 = this->attributes.begin(); _iter111 != this->attributes.end(); ++_iter111) + { + xfer += oprot->writeBinary(_iter111->first); + xfer += oprot->writeBinary(_iter111->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVerTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getVerTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("numVersions", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32((*(this->numVersions))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter112; + for (_iter112 = (*(this->attributes)).begin(); _iter112 != (*(this->attributes)).end(); ++_iter112) + { + xfer += oprot->writeBinary(_iter112->first); + xfer += oprot->writeBinary(_iter112->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVerTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size113; + ::apache::thrift::protocol::TType _etype116; + iprot->readListBegin(_etype116, _size113); + this->success.resize(_size113); + uint32_t _i117; + for (_i117 = 0; _i117 < _size113; ++_i117) + { + xfer += this->success[_i117].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getVerTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getVerTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter118; + for (_iter118 = this->success.begin(); _iter118 != this->success.end(); ++_iter118) + { + xfer += (*_iter118).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getVerTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size119; + ::apache::thrift::protocol::TType _etype122; + iprot->readListBegin(_etype122, _size119); + (*(this->success)).resize(_size119); + uint32_t _i123; + for (_i123 = 0; _i123 < _size119; ++_i123) + { + xfer += (*(this->success))[_i123].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRow_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size124; + ::apache::thrift::protocol::TType _ktype125; + ::apache::thrift::protocol::TType _vtype126; + iprot->readMapBegin(_ktype125, _vtype126, _size124); + uint32_t _i128; + for (_i128 = 0; _i128 < _size124; ++_i128) + { + Text _key129; + xfer += iprot->readBinary(_key129); + Text& _val130 = this->attributes[_key129]; + xfer += iprot->readBinary(_val130); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRow_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRow_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter131; + for (_iter131 = this->attributes.begin(); _iter131 != this->attributes.end(); ++_iter131) + { + xfer += oprot->writeBinary(_iter131->first); + xfer += oprot->writeBinary(_iter131->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRow_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter132; + for (_iter132 = (*(this->attributes)).begin(); _iter132 != (*(this->attributes)).end(); ++_iter132) + { + xfer += oprot->writeBinary(_iter132->first); + xfer += oprot->writeBinary(_iter132->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRow_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size133; + ::apache::thrift::protocol::TType _etype136; + iprot->readListBegin(_etype136, _size133); + this->success.resize(_size133); + uint32_t _i137; + for (_i137 = 0; _i137 < _size133; ++_i137) + { + xfer += this->success[_i137].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRow_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRow_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter138; + for (_iter138 = this->success.begin(); _iter138 != this->success.end(); ++_iter138) + { + xfer += (*_iter138).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRow_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size139; + ::apache::thrift::protocol::TType _etype142; + iprot->readListBegin(_etype142, _size139); + (*(this->success)).resize(_size139); + uint32_t _i143; + for (_i143 = 0; _i143 < _size139; ++_i143) + { + xfer += (*(this->success))[_i143].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumns_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size144; + ::apache::thrift::protocol::TType _etype147; + iprot->readListBegin(_etype147, _size144); + this->columns.resize(_size144); + uint32_t _i148; + for (_i148 = 0; _i148 < _size144; ++_i148) + { + xfer += iprot->readBinary(this->columns[_i148]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size149; + ::apache::thrift::protocol::TType _ktype150; + ::apache::thrift::protocol::TType _vtype151; + iprot->readMapBegin(_ktype150, _vtype151, _size149); + uint32_t _i153; + for (_i153 = 0; _i153 < _size149; ++_i153) + { + Text _key154; + xfer += iprot->readBinary(_key154); + Text& _val155 = this->attributes[_key154]; + xfer += iprot->readBinary(_val155); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowWithColumns_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter156; + for (_iter156 = this->columns.begin(); _iter156 != this->columns.end(); ++_iter156) + { + xfer += oprot->writeBinary((*_iter156)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter157; + for (_iter157 = this->attributes.begin(); _iter157 != this->attributes.end(); ++_iter157) + { + xfer += oprot->writeBinary(_iter157->first); + xfer += oprot->writeBinary(_iter157->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowWithColumns_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter158; + for (_iter158 = (*(this->columns)).begin(); _iter158 != (*(this->columns)).end(); ++_iter158) + { + xfer += oprot->writeBinary((*_iter158)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter159; + for (_iter159 = (*(this->attributes)).begin(); _iter159 != (*(this->attributes)).end(); ++_iter159) + { + xfer += oprot->writeBinary(_iter159->first); + xfer += oprot->writeBinary(_iter159->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumns_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size160; + ::apache::thrift::protocol::TType _etype163; + iprot->readListBegin(_etype163, _size160); + this->success.resize(_size160); + uint32_t _i164; + for (_i164 = 0; _i164 < _size160; ++_i164) + { + xfer += this->success[_i164].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowWithColumns_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter165; + for (_iter165 = this->success.begin(); _iter165 != this->success.end(); ++_iter165) + { + xfer += (*_iter165).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size166; + ::apache::thrift::protocol::TType _etype169; + iprot->readListBegin(_etype169, _size166); + (*(this->success)).resize(_size166); + uint32_t _i170; + for (_i170 = 0; _i170 < _size166; ++_i170) + { + xfer += (*(this->success))[_i170].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size171; + ::apache::thrift::protocol::TType _ktype172; + ::apache::thrift::protocol::TType _vtype173; + iprot->readMapBegin(_ktype172, _vtype173, _size171); + uint32_t _i175; + for (_i175 = 0; _i175 < _size171; ++_i175) + { + Text _key176; + xfer += iprot->readBinary(_key176); + Text& _val177 = this->attributes[_key176]; + xfer += iprot->readBinary(_val177); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter178; + for (_iter178 = this->attributes.begin(); _iter178 != this->attributes.end(); ++_iter178) + { + xfer += oprot->writeBinary(_iter178->first); + xfer += oprot->writeBinary(_iter178->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter179; + for (_iter179 = (*(this->attributes)).begin(); _iter179 != (*(this->attributes)).end(); ++_iter179) + { + xfer += oprot->writeBinary(_iter179->first); + xfer += oprot->writeBinary(_iter179->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size180; + ::apache::thrift::protocol::TType _etype183; + iprot->readListBegin(_etype183, _size180); + this->success.resize(_size180); + uint32_t _i184; + for (_i184 = 0; _i184 < _size180; ++_i184) + { + xfer += this->success[_i184].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter185; + for (_iter185 = this->success.begin(); _iter185 != this->success.end(); ++_iter185) + { + xfer += (*_iter185).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size186; + ::apache::thrift::protocol::TType _etype189; + iprot->readListBegin(_etype189, _size186); + (*(this->success)).resize(_size186); + uint32_t _i190; + for (_i190 = 0; _i190 < _size186; ++_i190) + { + xfer += (*(this->success))[_i190].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size191; + ::apache::thrift::protocol::TType _etype194; + iprot->readListBegin(_etype194, _size191); + this->columns.resize(_size191); + uint32_t _i195; + for (_i195 = 0; _i195 < _size191; ++_i195) + { + xfer += iprot->readBinary(this->columns[_i195]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size196; + ::apache::thrift::protocol::TType _ktype197; + ::apache::thrift::protocol::TType _vtype198; + iprot->readMapBegin(_ktype197, _vtype198, _size196); + uint32_t _i200; + for (_i200 = 0; _i200 < _size196; ++_i200) + { + Text _key201; + xfer += iprot->readBinary(_key201); + Text& _val202 = this->attributes[_key201]; + xfer += iprot->readBinary(_val202); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowWithColumnsTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter203; + for (_iter203 = this->columns.begin(); _iter203 != this->columns.end(); ++_iter203) + { + xfer += oprot->writeBinary((*_iter203)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter204; + for (_iter204 = this->attributes.begin(); _iter204 != this->attributes.end(); ++_iter204) + { + xfer += oprot->writeBinary(_iter204->first); + xfer += oprot->writeBinary(_iter204->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowWithColumnsTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter205; + for (_iter205 = (*(this->columns)).begin(); _iter205 != (*(this->columns)).end(); ++_iter205) + { + xfer += oprot->writeBinary((*_iter205)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter206; + for (_iter206 = (*(this->attributes)).begin(); _iter206 != (*(this->attributes)).end(); ++_iter206) + { + xfer += oprot->writeBinary(_iter206->first); + xfer += oprot->writeBinary(_iter206->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size207; + ::apache::thrift::protocol::TType _etype210; + iprot->readListBegin(_etype210, _size207); + this->success.resize(_size207); + uint32_t _i211; + for (_i211 = 0; _i211 < _size207; ++_i211) + { + xfer += this->success[_i211].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowWithColumnsTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter212; + for (_iter212 = this->success.begin(); _iter212 != this->success.end(); ++_iter212) + { + xfer += (*_iter212).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowWithColumnsTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size213; + ::apache::thrift::protocol::TType _etype216; + iprot->readListBegin(_etype216, _size213); + (*(this->success)).resize(_size213); + uint32_t _i217; + for (_i217 = 0; _i217 < _size213; ++_i217) + { + xfer += (*(this->success))[_i217].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRows_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rows.clear(); + uint32_t _size218; + ::apache::thrift::protocol::TType _etype221; + iprot->readListBegin(_etype221, _size218); + this->rows.resize(_size218); + uint32_t _i222; + for (_i222 = 0; _i222 < _size218; ++_i222) + { + xfer += iprot->readBinary(this->rows[_i222]); + } + iprot->readListEnd(); + } + this->__isset.rows = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size223; + ::apache::thrift::protocol::TType _ktype224; + ::apache::thrift::protocol::TType _vtype225; + iprot->readMapBegin(_ktype224, _vtype225, _size223); + uint32_t _i227; + for (_i227 = 0; _i227 < _size223; ++_i227) + { + Text _key228; + xfer += iprot->readBinary(_key228); + Text& _val229 = this->attributes[_key228]; + xfer += iprot->readBinary(_val229); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRows_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRows_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->rows.size())); + std::vector ::const_iterator _iter230; + for (_iter230 = this->rows.begin(); _iter230 != this->rows.end(); ++_iter230) + { + xfer += oprot->writeBinary((*_iter230)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter231; + for (_iter231 = this->attributes.begin(); _iter231 != this->attributes.end(); ++_iter231) + { + xfer += oprot->writeBinary(_iter231->first); + xfer += oprot->writeBinary(_iter231->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRows_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRows_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->rows)).size())); + std::vector ::const_iterator _iter232; + for (_iter232 = (*(this->rows)).begin(); _iter232 != (*(this->rows)).end(); ++_iter232) + { + xfer += oprot->writeBinary((*_iter232)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter233; + for (_iter233 = (*(this->attributes)).begin(); _iter233 != (*(this->attributes)).end(); ++_iter233) + { + xfer += oprot->writeBinary(_iter233->first); + xfer += oprot->writeBinary(_iter233->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRows_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size234; + ::apache::thrift::protocol::TType _etype237; + iprot->readListBegin(_etype237, _size234); + this->success.resize(_size234); + uint32_t _i238; + for (_i238 = 0; _i238 < _size234; ++_i238) + { + xfer += this->success[_i238].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRows_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRows_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter239; + for (_iter239 = this->success.begin(); _iter239 != this->success.end(); ++_iter239) + { + xfer += (*_iter239).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRows_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size240; + ::apache::thrift::protocol::TType _etype243; + iprot->readListBegin(_etype243, _size240); + (*(this->success)).resize(_size240); + uint32_t _i244; + for (_i244 = 0; _i244 < _size240; ++_i244) + { + xfer += (*(this->success))[_i244].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rows.clear(); + uint32_t _size245; + ::apache::thrift::protocol::TType _etype248; + iprot->readListBegin(_etype248, _size245); + this->rows.resize(_size245); + uint32_t _i249; + for (_i249 = 0; _i249 < _size245; ++_i249) + { + xfer += iprot->readBinary(this->rows[_i249]); + } + iprot->readListEnd(); + } + this->__isset.rows = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size250; + ::apache::thrift::protocol::TType _etype253; + iprot->readListBegin(_etype253, _size250); + this->columns.resize(_size250); + uint32_t _i254; + for (_i254 = 0; _i254 < _size250; ++_i254) + { + xfer += iprot->readBinary(this->columns[_i254]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size255; + ::apache::thrift::protocol::TType _ktype256; + ::apache::thrift::protocol::TType _vtype257; + iprot->readMapBegin(_ktype256, _vtype257, _size255); + uint32_t _i259; + for (_i259 = 0; _i259 < _size255; ++_i259) + { + Text _key260; + xfer += iprot->readBinary(_key260); + Text& _val261 = this->attributes[_key260]; + xfer += iprot->readBinary(_val261); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumns_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->rows.size())); + std::vector ::const_iterator _iter262; + for (_iter262 = this->rows.begin(); _iter262 != this->rows.end(); ++_iter262) + { + xfer += oprot->writeBinary((*_iter262)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter263; + for (_iter263 = this->columns.begin(); _iter263 != this->columns.end(); ++_iter263) + { + xfer += oprot->writeBinary((*_iter263)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter264; + for (_iter264 = this->attributes.begin(); _iter264 != this->attributes.end(); ++_iter264) + { + xfer += oprot->writeBinary(_iter264->first); + xfer += oprot->writeBinary(_iter264->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumns_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->rows)).size())); + std::vector ::const_iterator _iter265; + for (_iter265 = (*(this->rows)).begin(); _iter265 != (*(this->rows)).end(); ++_iter265) + { + xfer += oprot->writeBinary((*_iter265)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter266; + for (_iter266 = (*(this->columns)).begin(); _iter266 != (*(this->columns)).end(); ++_iter266) + { + xfer += oprot->writeBinary((*_iter266)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter267; + for (_iter267 = (*(this->attributes)).begin(); _iter267 != (*(this->attributes)).end(); ++_iter267) + { + xfer += oprot->writeBinary(_iter267->first); + xfer += oprot->writeBinary(_iter267->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size268; + ::apache::thrift::protocol::TType _etype271; + iprot->readListBegin(_etype271, _size268); + this->success.resize(_size268); + uint32_t _i272; + for (_i272 = 0; _i272 < _size268; ++_i272) + { + xfer += this->success[_i272].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumns_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter273; + for (_iter273 = this->success.begin(); _iter273 != this->success.end(); ++_iter273) + { + xfer += (*_iter273).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumns_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size274; + ::apache::thrift::protocol::TType _etype277; + iprot->readListBegin(_etype277, _size274); + (*(this->success)).resize(_size274); + uint32_t _i278; + for (_i278 = 0; _i278 < _size274; ++_i278) + { + xfer += (*(this->success))[_i278].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rows.clear(); + uint32_t _size279; + ::apache::thrift::protocol::TType _etype282; + iprot->readListBegin(_etype282, _size279); + this->rows.resize(_size279); + uint32_t _i283; + for (_i283 = 0; _i283 < _size279; ++_i283) + { + xfer += iprot->readBinary(this->rows[_i283]); + } + iprot->readListEnd(); + } + this->__isset.rows = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size284; + ::apache::thrift::protocol::TType _ktype285; + ::apache::thrift::protocol::TType _vtype286; + iprot->readMapBegin(_ktype285, _vtype286, _size284); + uint32_t _i288; + for (_i288 = 0; _i288 < _size284; ++_i288) + { + Text _key289; + xfer += iprot->readBinary(_key289); + Text& _val290 = this->attributes[_key289]; + xfer += iprot->readBinary(_val290); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->rows.size())); + std::vector ::const_iterator _iter291; + for (_iter291 = this->rows.begin(); _iter291 != this->rows.end(); ++_iter291) + { + xfer += oprot->writeBinary((*_iter291)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter292; + for (_iter292 = this->attributes.begin(); _iter292 != this->attributes.end(); ++_iter292) + { + xfer += oprot->writeBinary(_iter292->first); + xfer += oprot->writeBinary(_iter292->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->rows)).size())); + std::vector ::const_iterator _iter293; + for (_iter293 = (*(this->rows)).begin(); _iter293 != (*(this->rows)).end(); ++_iter293) + { + xfer += oprot->writeBinary((*_iter293)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter294; + for (_iter294 = (*(this->attributes)).begin(); _iter294 != (*(this->attributes)).end(); ++_iter294) + { + xfer += oprot->writeBinary(_iter294->first); + xfer += oprot->writeBinary(_iter294->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size295; + ::apache::thrift::protocol::TType _etype298; + iprot->readListBegin(_etype298, _size295); + this->success.resize(_size295); + uint32_t _i299; + for (_i299 = 0; _i299 < _size295; ++_i299) + { + xfer += this->success[_i299].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowsTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter300; + for (_iter300 = this->success.begin(); _iter300 != this->success.end(); ++_iter300) + { + xfer += (*_iter300).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size301; + ::apache::thrift::protocol::TType _etype304; + iprot->readListBegin(_etype304, _size301); + (*(this->success)).resize(_size301); + uint32_t _i305; + for (_i305 = 0; _i305 < _size301; ++_i305) + { + xfer += (*(this->success))[_i305].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rows.clear(); + uint32_t _size306; + ::apache::thrift::protocol::TType _etype309; + iprot->readListBegin(_etype309, _size306); + this->rows.resize(_size306); + uint32_t _i310; + for (_i310 = 0; _i310 < _size306; ++_i310) + { + xfer += iprot->readBinary(this->rows[_i310]); + } + iprot->readListEnd(); + } + this->__isset.rows = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size311; + ::apache::thrift::protocol::TType _etype314; + iprot->readListBegin(_etype314, _size311); + this->columns.resize(_size311); + uint32_t _i315; + for (_i315 = 0; _i315 < _size311; ++_i315) + { + xfer += iprot->readBinary(this->columns[_i315]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size316; + ::apache::thrift::protocol::TType _ktype317; + ::apache::thrift::protocol::TType _vtype318; + iprot->readMapBegin(_ktype317, _vtype318, _size316); + uint32_t _i320; + for (_i320 = 0; _i320 < _size316; ++_i320) + { + Text _key321; + xfer += iprot->readBinary(_key321); + Text& _val322 = this->attributes[_key321]; + xfer += iprot->readBinary(_val322); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumnsTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->rows.size())); + std::vector ::const_iterator _iter323; + for (_iter323 = this->rows.begin(); _iter323 != this->rows.end(); ++_iter323) + { + xfer += oprot->writeBinary((*_iter323)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter324; + for (_iter324 = this->columns.begin(); _iter324 != this->columns.end(); ++_iter324) + { + xfer += oprot->writeBinary((*_iter324)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter325; + for (_iter325 = this->attributes.begin(); _iter325 != this->attributes.end(); ++_iter325) + { + xfer += oprot->writeBinary(_iter325->first); + xfer += oprot->writeBinary(_iter325->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumnsTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rows", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->rows)).size())); + std::vector ::const_iterator _iter326; + for (_iter326 = (*(this->rows)).begin(); _iter326 != (*(this->rows)).end(); ++_iter326) + { + xfer += oprot->writeBinary((*_iter326)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter327; + for (_iter327 = (*(this->columns)).begin(); _iter327 != (*(this->columns)).end(); ++_iter327) + { + xfer += oprot->writeBinary((*_iter327)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter328; + for (_iter328 = (*(this->attributes)).begin(); _iter328 != (*(this->attributes)).end(); ++_iter328) + { + xfer += oprot->writeBinary(_iter328->first); + xfer += oprot->writeBinary(_iter328->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size329; + ::apache::thrift::protocol::TType _etype332; + iprot->readListBegin(_etype332, _size329); + this->success.resize(_size329); + uint32_t _i333; + for (_i333 = 0; _i333 < _size329; ++_i333) + { + xfer += this->success[_i333].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowsWithColumnsTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter334; + for (_iter334 = this->success.begin(); _iter334 != this->success.end(); ++_iter334) + { + xfer += (*_iter334).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowsWithColumnsTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size335; + ::apache::thrift::protocol::TType _etype338; + iprot->readListBegin(_etype338, _size335); + (*(this->success)).resize(_size335); + uint32_t _i339; + for (_i339 = 0; _i339 < _size335; ++_i339) + { + xfer += (*(this->success))[_i339].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRow_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->mutations.clear(); + uint32_t _size340; + ::apache::thrift::protocol::TType _etype343; + iprot->readListBegin(_etype343, _size340); + this->mutations.resize(_size340); + uint32_t _i344; + for (_i344 = 0; _i344 < _size340; ++_i344) + { + xfer += this->mutations[_i344].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.mutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size345; + ::apache::thrift::protocol::TType _ktype346; + ::apache::thrift::protocol::TType _vtype347; + iprot->readMapBegin(_ktype346, _vtype347, _size345); + uint32_t _i349; + for (_i349 = 0; _i349 < _size345; ++_i349) + { + Text _key350; + xfer += iprot->readBinary(_key350); + Text& _val351 = this->attributes[_key350]; + xfer += iprot->readBinary(_val351); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRow_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRow_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->mutations.size())); + std::vector ::const_iterator _iter352; + for (_iter352 = this->mutations.begin(); _iter352 != this->mutations.end(); ++_iter352) + { + xfer += (*_iter352).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter353; + for (_iter353 = this->attributes.begin(); _iter353 != this->attributes.end(); ++_iter353) + { + xfer += oprot->writeBinary(_iter353->first); + xfer += oprot->writeBinary(_iter353->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRow_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->mutations)).size())); + std::vector ::const_iterator _iter354; + for (_iter354 = (*(this->mutations)).begin(); _iter354 != (*(this->mutations)).end(); ++_iter354) + { + xfer += (*_iter354).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter355; + for (_iter355 = (*(this->attributes)).begin(); _iter355 != (*(this->attributes)).end(); ++_iter355) + { + xfer += oprot->writeBinary(_iter355->first); + xfer += oprot->writeBinary(_iter355->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRow_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRow_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_mutateRow_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRow_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->mutations.clear(); + uint32_t _size356; + ::apache::thrift::protocol::TType _etype359; + iprot->readListBegin(_etype359, _size356); + this->mutations.resize(_size356); + uint32_t _i360; + for (_i360 = 0; _i360 < _size356; ++_i360) + { + xfer += this->mutations[_i360].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.mutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size361; + ::apache::thrift::protocol::TType _ktype362; + ::apache::thrift::protocol::TType _vtype363; + iprot->readMapBegin(_ktype362, _vtype363, _size361); + uint32_t _i365; + for (_i365 = 0; _i365 < _size361; ++_i365) + { + Text _key366; + xfer += iprot->readBinary(_key366); + Text& _val367 = this->attributes[_key366]; + xfer += iprot->readBinary(_val367); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRowTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->mutations.size())); + std::vector ::const_iterator _iter368; + for (_iter368 = this->mutations.begin(); _iter368 != this->mutations.end(); ++_iter368) + { + xfer += (*_iter368).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter369; + for (_iter369 = this->attributes.begin(); _iter369 != this->attributes.end(); ++_iter369) + { + xfer += oprot->writeBinary(_iter369->first); + xfer += oprot->writeBinary(_iter369->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRowTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->mutations)).size())); + std::vector ::const_iterator _iter370; + for (_iter370 = (*(this->mutations)).begin(); _iter370 != (*(this->mutations)).end(); ++_iter370) + { + xfer += (*_iter370).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter371; + for (_iter371 = (*(this->attributes)).begin(); _iter371 != (*(this->attributes)).end(); ++_iter371) + { + xfer += oprot->writeBinary(_iter371->first); + xfer += oprot->writeBinary(_iter371->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_mutateRowTs_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRows_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rowBatches.clear(); + uint32_t _size372; + ::apache::thrift::protocol::TType _etype375; + iprot->readListBegin(_etype375, _size372); + this->rowBatches.resize(_size372); + uint32_t _i376; + for (_i376 = 0; _i376 < _size372; ++_i376) + { + xfer += this->rowBatches[_i376].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.rowBatches = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size377; + ::apache::thrift::protocol::TType _ktype378; + ::apache::thrift::protocol::TType _vtype379; + iprot->readMapBegin(_ktype378, _vtype379, _size377); + uint32_t _i381; + for (_i381 = 0; _i381 < _size377; ++_i381) + { + Text _key382; + xfer += iprot->readBinary(_key382); + Text& _val383 = this->attributes[_key382]; + xfer += iprot->readBinary(_val383); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRows_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRows_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rowBatches", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->rowBatches.size())); + std::vector ::const_iterator _iter384; + for (_iter384 = this->rowBatches.begin(); _iter384 != this->rowBatches.end(); ++_iter384) + { + xfer += (*_iter384).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter385; + for (_iter385 = this->attributes.begin(); _iter385 != this->attributes.end(); ++_iter385) + { + xfer += oprot->writeBinary(_iter385->first); + xfer += oprot->writeBinary(_iter385->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRows_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRows_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rowBatches", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->rowBatches)).size())); + std::vector ::const_iterator _iter386; + for (_iter386 = (*(this->rowBatches)).begin(); _iter386 != (*(this->rowBatches)).end(); ++_iter386) + { + xfer += (*_iter386).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter387; + for (_iter387 = (*(this->attributes)).begin(); _iter387 != (*(this->attributes)).end(); ++_iter387) + { + xfer += oprot->writeBinary(_iter387->first); + xfer += oprot->writeBinary(_iter387->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRows_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRows_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_mutateRows_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRows_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowsTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->rowBatches.clear(); + uint32_t _size388; + ::apache::thrift::protocol::TType _etype391; + iprot->readListBegin(_etype391, _size388); + this->rowBatches.resize(_size388); + uint32_t _i392; + for (_i392 = 0; _i392 < _size388; ++_i392) + { + xfer += this->rowBatches[_i392].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.rowBatches = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size393; + ::apache::thrift::protocol::TType _ktype394; + ::apache::thrift::protocol::TType _vtype395; + iprot->readMapBegin(_ktype394, _vtype395, _size393); + uint32_t _i397; + for (_i397 = 0; _i397 < _size393; ++_i397) + { + Text _key398; + xfer += iprot->readBinary(_key398); + Text& _val399 = this->attributes[_key398]; + xfer += iprot->readBinary(_val399); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowsTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRowsTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rowBatches", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->rowBatches.size())); + std::vector ::const_iterator _iter400; + for (_iter400 = this->rowBatches.begin(); _iter400 != this->rowBatches.end(); ++_iter400) + { + xfer += (*_iter400).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter401; + for (_iter401 = this->attributes.begin(); _iter401 != this->attributes.end(); ++_iter401) + { + xfer += oprot->writeBinary(_iter401->first); + xfer += oprot->writeBinary(_iter401->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowsTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_mutateRowsTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("rowBatches", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->rowBatches)).size())); + std::vector ::const_iterator _iter402; + for (_iter402 = (*(this->rowBatches)).begin(); _iter402 != (*(this->rowBatches)).end(); ++_iter402) + { + xfer += (*_iter402).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter403; + for (_iter403 = (*(this->attributes)).begin(); _iter403 != (*(this->attributes)).end(); ++_iter403) + { + xfer += oprot->writeBinary(_iter403->first); + xfer += oprot->writeBinary(_iter403->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowsTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_mutateRowsTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_mutateRowsTs_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_mutateRowsTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_atomicIncrement_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_atomicIncrement_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_atomicIncrement_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->value); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_atomicIncrement_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_atomicIncrement_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->value))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_atomicIncrement_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_atomicIncrement_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_atomicIncrement_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I64, 0); + xfer += oprot->writeI64(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_atomicIncrement_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAll_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size404; + ::apache::thrift::protocol::TType _ktype405; + ::apache::thrift::protocol::TType _vtype406; + iprot->readMapBegin(_ktype405, _vtype406, _size404); + uint32_t _i408; + for (_i408 = 0; _i408 < _size404; ++_i408) + { + Text _key409; + xfer += iprot->readBinary(_key409); + Text& _val410 = this->attributes[_key409]; + xfer += iprot->readBinary(_val410); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAll_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAll_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter411; + for (_iter411 = this->attributes.begin(); _iter411 != this->attributes.end(); ++_iter411) + { + xfer += oprot->writeBinary(_iter411->first); + xfer += oprot->writeBinary(_iter411->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAll_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAll_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter412; + for (_iter412 = (*(this->attributes)).begin(); _iter412 != (*(this->attributes)).end(); ++_iter412) + { + xfer += oprot->writeBinary(_iter412->first); + xfer += oprot->writeBinary(_iter412->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAll_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAll_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_deleteAll_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAll_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size413; + ::apache::thrift::protocol::TType _ktype414; + ::apache::thrift::protocol::TType _vtype415; + iprot->readMapBegin(_ktype414, _vtype415, _size413); + uint32_t _i417; + for (_i417 = 0; _i417 < _size413; ++_i417) + { + Text _key418; + xfer += iprot->readBinary(_key418); + Text& _val419 = this->attributes[_key418]; + xfer += iprot->readBinary(_val419); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter420; + for (_iter420 = this->attributes.begin(); _iter420 != this->attributes.end(); ++_iter420) + { + xfer += oprot->writeBinary(_iter420->first); + xfer += oprot->writeBinary(_iter420->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->column))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter421; + for (_iter421 = (*(this->attributes)).begin(); _iter421 != (*(this->attributes)).end(); ++_iter421) + { + xfer += oprot->writeBinary(_iter421->first); + xfer += oprot->writeBinary(_iter421->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_deleteAllTs_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRow_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size422; + ::apache::thrift::protocol::TType _ktype423; + ::apache::thrift::protocol::TType _vtype424; + iprot->readMapBegin(_ktype423, _vtype424, _size422); + uint32_t _i426; + for (_i426 = 0; _i426 < _size422; ++_i426) + { + Text _key427; + xfer += iprot->readBinary(_key427); + Text& _val428 = this->attributes[_key427]; + xfer += iprot->readBinary(_val428); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRow_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllRow_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter429; + for (_iter429 = this->attributes.begin(); _iter429 != this->attributes.end(); ++_iter429) + { + xfer += oprot->writeBinary(_iter429->first); + xfer += oprot->writeBinary(_iter429->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRow_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllRow_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter430; + for (_iter430 = (*(this->attributes)).begin(); _iter430 != (*(this->attributes)).end(); ++_iter430) + { + xfer += oprot->writeBinary(_iter430->first); + xfer += oprot->writeBinary(_iter430->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRow_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRow_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_deleteAllRow_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRow_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_increment_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->increment.read(iprot); + this->__isset.increment = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_increment_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_increment_args"); + xfer += oprot->writeFieldBegin("increment", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->increment.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_increment_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_increment_pargs"); + xfer += oprot->writeFieldBegin("increment", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += (*(this->increment)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_increment_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_increment_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_increment_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_increment_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_incrementRows_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->increments.clear(); + uint32_t _size431; + ::apache::thrift::protocol::TType _etype434; + iprot->readListBegin(_etype434, _size431); + this->increments.resize(_size431); + uint32_t _i435; + for (_i435 = 0; _i435 < _size431; ++_i435) + { + xfer += this->increments[_i435].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.increments = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_incrementRows_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_incrementRows_args"); + xfer += oprot->writeFieldBegin("increments", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->increments.size())); + std::vector ::const_iterator _iter436; + for (_iter436 = this->increments.begin(); _iter436 != this->increments.end(); ++_iter436) + { + xfer += (*_iter436).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_incrementRows_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_incrementRows_pargs"); + xfer += oprot->writeFieldBegin("increments", ::apache::thrift::protocol::T_LIST, 1); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast((*(this->increments)).size())); + std::vector ::const_iterator _iter437; + for (_iter437 = (*(this->increments)).begin(); _iter437 != (*(this->increments)).end(); ++_iter437) + { + xfer += (*_iter437).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_incrementRows_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_incrementRows_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_incrementRows_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_incrementRows_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size438; + ::apache::thrift::protocol::TType _ktype439; + ::apache::thrift::protocol::TType _vtype440; + iprot->readMapBegin(_ktype439, _vtype440, _size438); + uint32_t _i442; + for (_i442 = 0; _i442 < _size438; ++_i442) + { + Text _key443; + xfer += iprot->readBinary(_key443); + Text& _val444 = this->attributes[_key443]; + xfer += iprot->readBinary(_val444); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllRowTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter445; + for (_iter445 = this->attributes.begin(); _iter445 != this->attributes.end(); ++_iter445) + { + xfer += oprot->writeBinary(_iter445->first); + xfer += oprot->writeBinary(_iter445->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_deleteAllRowTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter446; + for (_iter446 = (*(this->attributes)).begin(); _iter446 != (*(this->attributes)).end(); ++_iter446) + { + xfer += oprot->writeBinary(_iter446->first); + xfer += oprot->writeBinary(_iter446->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_deleteAllRowTs_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_deleteAllRowTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->scan.read(iprot); + this->__isset.scan = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size447; + ::apache::thrift::protocol::TType _ktype448; + ::apache::thrift::protocol::TType _vtype449; + iprot->readMapBegin(_ktype448, _vtype449, _size447); + uint32_t _i451; + for (_i451 = 0; _i451 < _size447; ++_i451) + { + Text _key452; + xfer += iprot->readBinary(_key452); + Text& _val453 = this->attributes[_key452]; + xfer += iprot->readBinary(_val453); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithScan_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("scan", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->scan.write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter454; + for (_iter454 = this->attributes.begin(); _iter454 != this->attributes.end(); ++_iter454) + { + xfer += oprot->writeBinary(_iter454->first); + xfer += oprot->writeBinary(_iter454->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithScan_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("scan", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += (*(this->scan)).write(oprot); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 3); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter455; + for (_iter455 = (*(this->attributes)).begin(); _iter455 != (*(this->attributes)).end(); ++_iter455) + { + xfer += oprot->writeBinary(_iter455->first); + xfer += oprot->writeBinary(_iter455->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithScan_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithScan_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpen_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size456; + ::apache::thrift::protocol::TType _etype459; + iprot->readListBegin(_etype459, _size456); + this->columns.resize(_size456); + uint32_t _i460; + for (_i460 = 0; _i460 < _size456; ++_i460) + { + xfer += iprot->readBinary(this->columns[_i460]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size461; + ::apache::thrift::protocol::TType _ktype462; + ::apache::thrift::protocol::TType _vtype463; + iprot->readMapBegin(_ktype462, _vtype463, _size461); + uint32_t _i465; + for (_i465 = 0; _i465 < _size461; ++_i465) + { + Text _key466; + xfer += iprot->readBinary(_key466); + Text& _val467 = this->attributes[_key466]; + xfer += iprot->readBinary(_val467); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpen_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpen_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter468; + for (_iter468 = this->columns.begin(); _iter468 != this->columns.end(); ++_iter468) + { + xfer += oprot->writeBinary((*_iter468)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter469; + for (_iter469 = this->attributes.begin(); _iter469 != this->attributes.end(); ++_iter469) + { + xfer += oprot->writeBinary(_iter469->first); + xfer += oprot->writeBinary(_iter469->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpen_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpen_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter470; + for (_iter470 = (*(this->columns)).begin(); _iter470 != (*(this->columns)).end(); ++_iter470) + { + xfer += oprot->writeBinary((*_iter470)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter471; + for (_iter471 = (*(this->attributes)).begin(); _iter471 != (*(this->attributes)).end(); ++_iter471) + { + xfer += oprot->writeBinary(_iter471->first); + xfer += oprot->writeBinary(_iter471->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpen_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpen_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpen_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpen_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->stopRow); + this->__isset.stopRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size472; + ::apache::thrift::protocol::TType _etype475; + iprot->readListBegin(_etype475, _size472); + this->columns.resize(_size472); + uint32_t _i476; + for (_i476 = 0; _i476 < _size472; ++_i476) + { + xfer += iprot->readBinary(this->columns[_i476]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size477; + ::apache::thrift::protocol::TType _ktype478; + ::apache::thrift::protocol::TType _vtype479; + iprot->readMapBegin(_ktype478, _vtype479, _size477); + uint32_t _i481; + for (_i481 = 0; _i481 < _size477; ++_i481) + { + Text _key482; + xfer += iprot->readBinary(_key482); + Text& _val483 = this->attributes[_key482]; + xfer += iprot->readBinary(_val483); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStop_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stopRow", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->stopRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter484; + for (_iter484 = this->columns.begin(); _iter484 != this->columns.end(); ++_iter484) + { + xfer += oprot->writeBinary((*_iter484)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter485; + for (_iter485 = this->attributes.begin(); _iter485 != this->attributes.end(); ++_iter485) + { + xfer += oprot->writeBinary(_iter485->first); + xfer += oprot->writeBinary(_iter485->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStop_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stopRow", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->stopRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter486; + for (_iter486 = (*(this->columns)).begin(); _iter486 != (*(this->columns)).end(); ++_iter486) + { + xfer += oprot->writeBinary((*_iter486)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter487; + for (_iter487 = (*(this->attributes)).begin(); _iter487 != (*(this->attributes)).end(); ++_iter487) + { + xfer += oprot->writeBinary(_iter487->first); + xfer += oprot->writeBinary(_iter487->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStop_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStop_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startAndPrefix); + this->__isset.startAndPrefix = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size488; + ::apache::thrift::protocol::TType _etype491; + iprot->readListBegin(_etype491, _size488); + this->columns.resize(_size488); + uint32_t _i492; + for (_i492 = 0; _i492 < _size488; ++_i492) + { + xfer += iprot->readBinary(this->columns[_i492]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size493; + ::apache::thrift::protocol::TType _ktype494; + ::apache::thrift::protocol::TType _vtype495; + iprot->readMapBegin(_ktype494, _vtype495, _size493); + uint32_t _i497; + for (_i497 = 0; _i497 < _size493; ++_i497) + { + Text _key498; + xfer += iprot->readBinary(_key498); + Text& _val499 = this->attributes[_key498]; + xfer += iprot->readBinary(_val499); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithPrefix_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startAndPrefix", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->startAndPrefix); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter500; + for (_iter500 = this->columns.begin(); _iter500 != this->columns.end(); ++_iter500) + { + xfer += oprot->writeBinary((*_iter500)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter501; + for (_iter501 = this->attributes.begin(); _iter501 != this->attributes.end(); ++_iter501) + { + xfer += oprot->writeBinary(_iter501->first); + xfer += oprot->writeBinary(_iter501->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithPrefix_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startAndPrefix", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->startAndPrefix))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter502; + for (_iter502 = (*(this->columns)).begin(); _iter502 != (*(this->columns)).end(); ++_iter502) + { + xfer += oprot->writeBinary((*_iter502)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 4); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter503; + for (_iter503 = (*(this->attributes)).begin(); _iter503 != (*(this->attributes)).end(); ++_iter503) + { + xfer += oprot->writeBinary(_iter503->first); + xfer += oprot->writeBinary(_iter503->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithPrefix_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithPrefix_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size504; + ::apache::thrift::protocol::TType _etype507; + iprot->readListBegin(_etype507, _size504); + this->columns.resize(_size504); + uint32_t _i508; + for (_i508 = 0; _i508 < _size504; ++_i508) + { + xfer += iprot->readBinary(this->columns[_i508]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size509; + ::apache::thrift::protocol::TType _ktype510; + ::apache::thrift::protocol::TType _vtype511; + iprot->readMapBegin(_ktype510, _vtype511, _size509); + uint32_t _i513; + for (_i513 = 0; _i513 < _size509; ++_i513) + { + Text _key514; + xfer += iprot->readBinary(_key514); + Text& _val515 = this->attributes[_key514]; + xfer += iprot->readBinary(_val515); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter516; + for (_iter516 = this->columns.begin(); _iter516 != this->columns.end(); ++_iter516) + { + xfer += oprot->writeBinary((*_iter516)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter517; + for (_iter517 = this->attributes.begin(); _iter517 != this->attributes.end(); ++_iter517) + { + xfer += oprot->writeBinary(_iter517->first); + xfer += oprot->writeBinary(_iter517->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 3); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter518; + for (_iter518 = (*(this->columns)).begin(); _iter518 != (*(this->columns)).end(); ++_iter518) + { + xfer += oprot->writeBinary((*_iter518)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 5); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter519; + for (_iter519 = (*(this->attributes)).begin(); _iter519 != (*(this->attributes)).end(); ++_iter519) + { + xfer += oprot->writeBinary(_iter519->first); + xfer += oprot->writeBinary(_iter519->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpenTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->stopRow); + this->__isset.stopRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size520; + ::apache::thrift::protocol::TType _etype523; + iprot->readListBegin(_etype523, _size520); + this->columns.resize(_size520); + uint32_t _i524; + for (_i524 = 0; _i524 < _size520; ++_i524) + { + xfer += iprot->readBinary(this->columns[_i524]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->attributes.clear(); + uint32_t _size525; + ::apache::thrift::protocol::TType _ktype526; + ::apache::thrift::protocol::TType _vtype527; + iprot->readMapBegin(_ktype526, _vtype527, _size525); + uint32_t _i529; + for (_i529 = 0; _i529 < _size525; ++_i529) + { + Text _key530; + xfer += iprot->readBinary(_key530); + Text& _val531 = this->attributes[_key530]; + xfer += iprot->readBinary(_val531); + } + iprot->readMapEnd(); + } + this->__isset.attributes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStopTs_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stopRow", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->stopRow); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter532; + for (_iter532 = this->columns.begin(); _iter532 != this->columns.end(); ++_iter532) + { + xfer += oprot->writeBinary((*_iter532)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast(this->attributes.size())); + std::map ::const_iterator _iter533; + for (_iter533 = this->attributes.begin(); _iter533 != this->attributes.end(); ++_iter533) + { + xfer += oprot->writeBinary(_iter533->first); + xfer += oprot->writeBinary(_iter533->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStopTs_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->startRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("stopRow", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->stopRow))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast((*(this->columns)).size())); + std::vector ::const_iterator _iter534; + for (_iter534 = (*(this->columns)).begin(); _iter534 != (*(this->columns)).end(); ++_iter534) + { + xfer += oprot->writeBinary((*_iter534)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 5); + xfer += oprot->writeI64((*(this->timestamp))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("attributes", ::apache::thrift::protocol::T_MAP, 6); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRING, static_cast((*(this->attributes)).size())); + std::map ::const_iterator _iter535; + for (_iter535 = (*(this->attributes)).begin(); _iter535 != (*(this->attributes)).end(); ++_iter535) + { + xfer += oprot->writeBinary(_iter535->first); + xfer += oprot->writeBinary(_iter535->second); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->success); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerOpenWithStopTs_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_I32, 0); + xfer += oprot->writeI32(this->success); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerOpenWithStopTs_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32((*(this->success))); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGet_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGet_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerGet_args"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGet_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerGet_pargs"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((*(this->id))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGet_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size536; + ::apache::thrift::protocol::TType _etype539; + iprot->readListBegin(_etype539, _size536); + this->success.resize(_size536); + uint32_t _i540; + for (_i540 = 0; _i540 < _size536; ++_i540) + { + xfer += this->success[_i540].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGet_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerGet_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter541; + for (_iter541 = this->success.begin(); _iter541 != this->success.end(); ++_iter541) + { + xfer += (*_iter541).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGet_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size542; + ::apache::thrift::protocol::TType _etype545; + iprot->readListBegin(_etype545, _size542); + (*(this->success)).resize(_size542); + uint32_t _i546; + for (_i546 = 0; _i546 < _size542; ++_i546) + { + xfer += (*(this->success))[_i546].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGetList_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->nbRows); + this->__isset.nbRows = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGetList_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerGetList_args"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("nbRows", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->nbRows); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGetList_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerGetList_pargs"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((*(this->id))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("nbRows", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((*(this->nbRows))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGetList_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size547; + ::apache::thrift::protocol::TType _etype550; + iprot->readListBegin(_etype550, _size547); + this->success.resize(_size547); + uint32_t _i551; + for (_i551 = 0; _i551 < _size547; ++_i551) + { + xfer += this->success[_i551].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerGetList_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerGetList_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter552; + for (_iter552 = this->success.begin(); _iter552 != this->success.end(); ++_iter552) + { + xfer += (*_iter552).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerGetList_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size553; + ::apache::thrift::protocol::TType _etype556; + iprot->readListBegin(_etype556, _size553); + (*(this->success)).resize(_size553); + uint32_t _i557; + for (_i557 = 0; _i557 < _size553; ++_i557) + { + xfer += (*(this->success))[_i557].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerClose_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerClose_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerClose_args"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32(this->id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerClose_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_scannerClose_pargs"); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((*(this->id))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerClose_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_scannerClose_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_scannerClose_result"); + + if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.ia) { + xfer += oprot->writeFieldBegin("ia", ::apache::thrift::protocol::T_STRUCT, 2); + xfer += this->ia.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_scannerClose_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->ia.read(iprot); + this->__isset.ia = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowOrBefore_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->tableName); + this->__isset.tableName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->family); + this->__isset.family = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowOrBefore_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowOrBefore_args"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->tableName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("family", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->family); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowOrBefore_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRowOrBefore_pargs"); + xfer += oprot->writeFieldBegin("tableName", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->tableName))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("family", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary((*(this->family))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowOrBefore_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->success.clear(); + uint32_t _size558; + ::apache::thrift::protocol::TType _etype561; + iprot->readListBegin(_etype561, _size558); + this->success.resize(_size558); + uint32_t _i562; + for (_i562 = 0; _i562 < _size558; ++_i562) + { + xfer += this->success[_i562].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRowOrBefore_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRowOrBefore_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_LIST, 0); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->success.size())); + std::vector ::const_iterator _iter563; + for (_iter563 = this->success.begin(); _iter563 != this->success.end(); ++_iter563) + { + xfer += (*_iter563).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRowOrBefore_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + (*(this->success)).clear(); + uint32_t _size564; + ::apache::thrift::protocol::TType _etype567; + iprot->readListBegin(_etype567, _size564); + (*(this->success)).resize(_size564); + uint32_t _i568; + for (_i568 = 0; _i568 < _size564; ++_i568) + { + xfer += (*(this->success))[_i568].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRegionInfo_args::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRegionInfo_args::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRegionInfo_args"); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRegionInfo_pargs::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Hbase_getRegionInfo_pargs"); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary((*(this->row))); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRegionInfo_result::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->success.read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Hbase_getRegionInfo_result::write(::apache::thrift::protocol::TProtocol* oprot) const { + + uint32_t xfer = 0; + + xfer += oprot->writeStructBegin("Hbase_getRegionInfo_result"); + + if (this->__isset.success) { + xfer += oprot->writeFieldBegin("success", ::apache::thrift::protocol::T_STRUCT, 0); + xfer += this->success.write(oprot); + xfer += oprot->writeFieldEnd(); + } else if (this->__isset.io) { + xfer += oprot->writeFieldBegin("io", ::apache::thrift::protocol::T_STRUCT, 1); + xfer += this->io.write(oprot); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +uint32_t Hbase_getRegionInfo_presult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 0: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += (*(this->success)).read(iprot); + this->__isset.success = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 1: + if (ftype == ::apache::thrift::protocol::T_STRUCT) { + xfer += this->io.read(iprot); + this->__isset.io = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +void HbaseClient::enableTable(const Bytes& tableName) +{ + send_enableTable(tableName); + recv_enableTable(); +} + +void HbaseClient::send_enableTable(const Bytes& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("enableTable", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_enableTable_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_enableTable() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("enableTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_enableTable_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::disableTable(const Bytes& tableName) +{ + send_disableTable(tableName); + recv_disableTable(); +} + +void HbaseClient::send_disableTable(const Bytes& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("disableTable", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_disableTable_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_disableTable() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("disableTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_disableTable_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +bool HbaseClient::isTableEnabled(const Bytes& tableName) +{ + send_isTableEnabled(tableName); + return recv_isTableEnabled(); +} + +void HbaseClient::send_isTableEnabled(const Bytes& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("isTableEnabled", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_isTableEnabled_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +bool HbaseClient::recv_isTableEnabled() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("isTableEnabled") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + bool _return; + Hbase_isTableEnabled_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "isTableEnabled failed: unknown result"); +} + +void HbaseClient::compact(const Bytes& tableNameOrRegionName) +{ + send_compact(tableNameOrRegionName); + recv_compact(); +} + +void HbaseClient::send_compact(const Bytes& tableNameOrRegionName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("compact", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_compact_pargs args; + args.tableNameOrRegionName = &tableNameOrRegionName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_compact() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("compact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_compact_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::majorCompact(const Bytes& tableNameOrRegionName) +{ + send_majorCompact(tableNameOrRegionName); + recv_majorCompact(); +} + +void HbaseClient::send_majorCompact(const Bytes& tableNameOrRegionName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("majorCompact", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_majorCompact_pargs args; + args.tableNameOrRegionName = &tableNameOrRegionName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_majorCompact() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("majorCompact") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_majorCompact_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::getTableNames(std::vector & _return) +{ + send_getTableNames(); + recv_getTableNames(_return); +} + +void HbaseClient::send_getTableNames() +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getTableNames", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getTableNames_pargs args; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getTableNames(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTableNames") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getTableNames_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTableNames failed: unknown result"); +} + +void HbaseClient::getColumnDescriptors(std::map & _return, const Text& tableName) +{ + send_getColumnDescriptors(tableName); + recv_getColumnDescriptors(_return); +} + +void HbaseClient::send_getColumnDescriptors(const Text& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getColumnDescriptors", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getColumnDescriptors_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getColumnDescriptors(std::map & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getColumnDescriptors") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getColumnDescriptors_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getColumnDescriptors failed: unknown result"); +} + +void HbaseClient::getTableRegions(std::vector & _return, const Text& tableName) +{ + send_getTableRegions(tableName); + recv_getTableRegions(_return); +} + +void HbaseClient::send_getTableRegions(const Text& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getTableRegions", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getTableRegions_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getTableRegions(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getTableRegions") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getTableRegions_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getTableRegions failed: unknown result"); +} + +void HbaseClient::createTable(const Text& tableName, const std::vector & columnFamilies) +{ + send_createTable(tableName, columnFamilies); + recv_createTable(); +} + +void HbaseClient::send_createTable(const Text& tableName, const std::vector & columnFamilies) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("createTable", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_createTable_pargs args; + args.tableName = &tableName; + args.columnFamilies = &columnFamilies; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_createTable() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("createTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_createTable_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + if (result.__isset.exist) { + throw result.exist; + } + return; +} + +void HbaseClient::deleteTable(const Text& tableName) +{ + send_deleteTable(tableName); + recv_deleteTable(); +} + +void HbaseClient::send_deleteTable(const Text& tableName) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("deleteTable", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_deleteTable_pargs args; + args.tableName = &tableName; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_deleteTable() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("deleteTable") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_deleteTable_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::get(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const std::map & attributes) +{ + send_get(tableName, row, column, attributes); + recv_get(_return); +} + +void HbaseClient::send_get(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("get", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_get_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_get(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("get") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_get_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "get failed: unknown result"); +} + +void HbaseClient::getVer(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes) +{ + send_getVer(tableName, row, column, numVersions, attributes); + recv_getVer(_return); +} + +void HbaseClient::send_getVer(const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getVer", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getVer_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.numVersions = &numVersions; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getVer(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getVer") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getVer_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getVer failed: unknown result"); +} + +void HbaseClient::getVerTs(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes) +{ + send_getVerTs(tableName, row, column, timestamp, numVersions, attributes); + recv_getVerTs(_return); +} + +void HbaseClient::send_getVerTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getVerTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getVerTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.timestamp = ×tamp; + args.numVersions = &numVersions; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getVerTs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getVerTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getVerTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getVerTs failed: unknown result"); +} + +void HbaseClient::getRow(std::vector & _return, const Text& tableName, const Text& row, const std::map & attributes) +{ + send_getRow(tableName, row, attributes); + recv_getRow(_return); +} + +void HbaseClient::send_getRow(const Text& tableName, const Text& row, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRow", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRow_pargs args; + args.tableName = &tableName; + args.row = &row; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRow(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRow") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRow_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRow failed: unknown result"); +} + +void HbaseClient::getRowWithColumns(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes) +{ + send_getRowWithColumns(tableName, row, columns, attributes); + recv_getRowWithColumns(_return); +} + +void HbaseClient::send_getRowWithColumns(const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowWithColumns", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowWithColumns_pargs args; + args.tableName = &tableName; + args.row = &row; + args.columns = &columns; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowWithColumns(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowWithColumns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowWithColumns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowWithColumns failed: unknown result"); +} + +void HbaseClient::getRowTs(std::vector & _return, const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) +{ + send_getRowTs(tableName, row, timestamp, attributes); + recv_getRowTs(_return); +} + +void HbaseClient::send_getRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowTs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowTs failed: unknown result"); +} + +void HbaseClient::getRowWithColumnsTs(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes); + recv_getRowWithColumnsTs(_return); +} + +void HbaseClient::send_getRowWithColumnsTs(const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowWithColumnsTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowWithColumnsTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.columns = &columns; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowWithColumnsTs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowWithColumnsTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowWithColumnsTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); +} + +void HbaseClient::getRows(std::vector & _return, const Text& tableName, const std::vector & rows, const std::map & attributes) +{ + send_getRows(tableName, rows, attributes); + recv_getRows(_return); +} + +void HbaseClient::send_getRows(const Text& tableName, const std::vector & rows, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRows", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRows_pargs args; + args.tableName = &tableName; + args.rows = &rows; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRows(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRows") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRows_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRows failed: unknown result"); +} + +void HbaseClient::getRowsWithColumns(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes) +{ + send_getRowsWithColumns(tableName, rows, columns, attributes); + recv_getRowsWithColumns(_return); +} + +void HbaseClient::send_getRowsWithColumns(const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowsWithColumns", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowsWithColumns_pargs args; + args.tableName = &tableName; + args.rows = &rows; + args.columns = &columns; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowsWithColumns(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowsWithColumns") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowsWithColumns_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowsWithColumns failed: unknown result"); +} + +void HbaseClient::getRowsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes) +{ + send_getRowsTs(tableName, rows, timestamp, attributes); + recv_getRowsTs(_return); +} + +void HbaseClient::send_getRowsTs(const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowsTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowsTs_pargs args; + args.tableName = &tableName; + args.rows = &rows; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowsTs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowsTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowsTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowsTs failed: unknown result"); +} + +void HbaseClient::getRowsWithColumnsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes); + recv_getRowsWithColumnsTs(_return); +} + +void HbaseClient::send_getRowsWithColumnsTs(const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowsWithColumnsTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowsWithColumnsTs_pargs args; + args.tableName = &tableName; + args.rows = &rows; + args.columns = &columns; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowsWithColumnsTs(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowsWithColumnsTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowsWithColumnsTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowsWithColumnsTs failed: unknown result"); +} + +void HbaseClient::mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes) +{ + send_mutateRow(tableName, row, mutations, attributes); + recv_mutateRow(); +} + +void HbaseClient::send_mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("mutateRow", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_mutateRow_pargs args; + args.tableName = &tableName; + args.row = &row; + args.mutations = &mutations; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_mutateRow() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("mutateRow") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_mutateRow_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + return; +} + +void HbaseClient::mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes) +{ + send_mutateRowTs(tableName, row, mutations, timestamp, attributes); + recv_mutateRowTs(); +} + +void HbaseClient::send_mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("mutateRowTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_mutateRowTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.mutations = &mutations; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_mutateRowTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("mutateRowTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_mutateRowTs_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + return; +} + +void HbaseClient::mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes) +{ + send_mutateRows(tableName, rowBatches, attributes); + recv_mutateRows(); +} + +void HbaseClient::send_mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("mutateRows", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_mutateRows_pargs args; + args.tableName = &tableName; + args.rowBatches = &rowBatches; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_mutateRows() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("mutateRows") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_mutateRows_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + return; +} + +void HbaseClient::mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes) +{ + send_mutateRowsTs(tableName, rowBatches, timestamp, attributes); + recv_mutateRowsTs(); +} + +void HbaseClient::send_mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("mutateRowsTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_mutateRowsTs_pargs args; + args.tableName = &tableName; + args.rowBatches = &rowBatches; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_mutateRowsTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("mutateRowsTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_mutateRowsTs_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + return; +} + +int64_t HbaseClient::atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value) +{ + send_atomicIncrement(tableName, row, column, value); + return recv_atomicIncrement(); +} + +void HbaseClient::send_atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("atomicIncrement", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_atomicIncrement_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.value = &value; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +int64_t HbaseClient::recv_atomicIncrement() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("atomicIncrement") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + int64_t _return; + Hbase_atomicIncrement_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "atomicIncrement failed: unknown result"); +} + +void HbaseClient::deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) +{ + send_deleteAll(tableName, row, column, attributes); + recv_deleteAll(); +} + +void HbaseClient::send_deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("deleteAll", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_deleteAll_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_deleteAll() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("deleteAll") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_deleteAll_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes) +{ + send_deleteAllTs(tableName, row, column, timestamp, attributes); + recv_deleteAllTs(); +} + +void HbaseClient::send_deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("deleteAllTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_deleteAllTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.column = &column; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_deleteAllTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("deleteAllTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_deleteAllTs_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes) +{ + send_deleteAllRow(tableName, row, attributes); + recv_deleteAllRow(); +} + +void HbaseClient::send_deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("deleteAllRow", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_deleteAllRow_pargs args; + args.tableName = &tableName; + args.row = &row; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_deleteAllRow() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("deleteAllRow") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_deleteAllRow_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::increment(const TIncrement& increment) +{ + send_increment(increment); + recv_increment(); +} + +void HbaseClient::send_increment(const TIncrement& increment) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("increment", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_increment_pargs args; + args.increment = &increment; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_increment() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("increment") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_increment_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::incrementRows(const std::vector & increments) +{ + send_incrementRows(increments); + recv_incrementRows(); +} + +void HbaseClient::send_incrementRows(const std::vector & increments) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("incrementRows", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_incrementRows_pargs args; + args.increments = &increments; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_incrementRows() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("incrementRows") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_incrementRows_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +void HbaseClient::deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) +{ + send_deleteAllRowTs(tableName, row, timestamp, attributes); + recv_deleteAllRowTs(); +} + +void HbaseClient::send_deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("deleteAllRowTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_deleteAllRowTs_pargs args; + args.tableName = &tableName; + args.row = &row; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_deleteAllRowTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("deleteAllRowTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_deleteAllRowTs_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + return; +} + +ScannerID HbaseClient::scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes) +{ + send_scannerOpenWithScan(tableName, scan, attributes); + return recv_scannerOpenWithScan(); +} + +void HbaseClient::send_scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpenWithScan", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpenWithScan_pargs args; + args.tableName = &tableName; + args.scan = &scan; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpenWithScan() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpenWithScan") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpenWithScan_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpenWithScan failed: unknown result"); +} + +ScannerID HbaseClient::scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes) +{ + send_scannerOpen(tableName, startRow, columns, attributes); + return recv_scannerOpen(); +} + +void HbaseClient::send_scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpen", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpen_pargs args; + args.tableName = &tableName; + args.startRow = &startRow; + args.columns = &columns; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpen() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpen") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpen_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpen failed: unknown result"); +} + +ScannerID HbaseClient::scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes) +{ + send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes); + return recv_scannerOpenWithStop(); +} + +void HbaseClient::send_scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpenWithStop", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpenWithStop_pargs args; + args.tableName = &tableName; + args.startRow = &startRow; + args.stopRow = &stopRow; + args.columns = &columns; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpenWithStop() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpenWithStop") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpenWithStop_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); +} + +ScannerID HbaseClient::scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes) +{ + send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes); + return recv_scannerOpenWithPrefix(); +} + +void HbaseClient::send_scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpenWithPrefix", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpenWithPrefix_pargs args; + args.tableName = &tableName; + args.startAndPrefix = &startAndPrefix; + args.columns = &columns; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpenWithPrefix() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpenWithPrefix") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpenWithPrefix_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); +} + +ScannerID HbaseClient::scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes); + return recv_scannerOpenTs(); +} + +void HbaseClient::send_scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpenTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpenTs_pargs args; + args.tableName = &tableName; + args.startRow = &startRow; + args.columns = &columns; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpenTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpenTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpenTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpenTs failed: unknown result"); +} + +ScannerID HbaseClient::scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes); + return recv_scannerOpenWithStopTs(); +} + +void HbaseClient::send_scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerOpenWithStopTs", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerOpenWithStopTs_pargs args; + args.tableName = &tableName; + args.startRow = &startRow; + args.stopRow = &stopRow; + args.columns = &columns; + args.timestamp = ×tamp; + args.attributes = &attributes; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +ScannerID HbaseClient::recv_scannerOpenWithStopTs() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerOpenWithStopTs") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + ScannerID _return; + Hbase_scannerOpenWithStopTs_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + return _return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); +} + +void HbaseClient::scannerGet(std::vector & _return, const ScannerID id) +{ + send_scannerGet(id); + recv_scannerGet(_return); +} + +void HbaseClient::send_scannerGet(const ScannerID id) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerGet", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerGet_pargs args; + args.id = &id; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_scannerGet(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerGet") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_scannerGet_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerGet failed: unknown result"); +} + +void HbaseClient::scannerGetList(std::vector & _return, const ScannerID id, const int32_t nbRows) +{ + send_scannerGetList(id, nbRows); + recv_scannerGetList(_return); +} + +void HbaseClient::send_scannerGetList(const ScannerID id, const int32_t nbRows) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerGetList", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerGetList_pargs args; + args.id = &id; + args.nbRows = &nbRows; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_scannerGetList(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerGetList") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_scannerGetList_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "scannerGetList failed: unknown result"); +} + +void HbaseClient::scannerClose(const ScannerID id) +{ + send_scannerClose(id); + recv_scannerClose(); +} + +void HbaseClient::send_scannerClose(const ScannerID id) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("scannerClose", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_scannerClose_pargs args; + args.id = &id; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_scannerClose() +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("scannerClose") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_scannerClose_presult result; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.io) { + throw result.io; + } + if (result.__isset.ia) { + throw result.ia; + } + return; +} + +void HbaseClient::getRowOrBefore(std::vector & _return, const Text& tableName, const Text& row, const Text& family) +{ + send_getRowOrBefore(tableName, row, family); + recv_getRowOrBefore(_return); +} + +void HbaseClient::send_getRowOrBefore(const Text& tableName, const Text& row, const Text& family) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRowOrBefore", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRowOrBefore_pargs args; + args.tableName = &tableName; + args.row = &row; + args.family = &family; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRowOrBefore(std::vector & _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRowOrBefore") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRowOrBefore_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRowOrBefore failed: unknown result"); +} + +void HbaseClient::getRegionInfo(TRegionInfo& _return, const Text& row) +{ + send_getRegionInfo(row); + recv_getRegionInfo(_return); +} + +void HbaseClient::send_getRegionInfo(const Text& row) +{ + int32_t cseqid = 0; + oprot_->writeMessageBegin("getRegionInfo", ::apache::thrift::protocol::T_CALL, cseqid); + + Hbase_getRegionInfo_pargs args; + args.row = &row; + args.write(oprot_); + + oprot_->writeMessageEnd(); + oprot_->getTransport()->writeEnd(); + oprot_->getTransport()->flush(); +} + +void HbaseClient::recv_getRegionInfo(TRegionInfo& _return) +{ + + int32_t rseqid = 0; + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + + iprot_->readMessageBegin(fname, mtype, rseqid); + if (mtype == ::apache::thrift::protocol::T_EXCEPTION) { + ::apache::thrift::TApplicationException x; + x.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + throw x; + } + if (mtype != ::apache::thrift::protocol::T_REPLY) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + if (fname.compare("getRegionInfo") != 0) { + iprot_->skip(::apache::thrift::protocol::T_STRUCT); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + } + Hbase_getRegionInfo_presult result; + result.success = &_return; + result.read(iprot_); + iprot_->readMessageEnd(); + iprot_->getTransport()->readEnd(); + + if (result.__isset.success) { + // _return pointer has now been filled + return; + } + if (result.__isset.io) { + throw result.io; + } + throw ::apache::thrift::TApplicationException(::apache::thrift::TApplicationException::MISSING_RESULT, "getRegionInfo failed: unknown result"); +} + +bool HbaseProcessor::process(boost::shared_ptr piprot, boost::shared_ptr poprot, void* callContext) { + + ::apache::thrift::protocol::TProtocol* iprot = piprot.get(); + ::apache::thrift::protocol::TProtocol* oprot = poprot.get(); + std::string fname; + ::apache::thrift::protocol::TMessageType mtype; + int32_t seqid; + + iprot->readMessageBegin(fname, mtype, seqid); + + if (mtype != ::apache::thrift::protocol::T_CALL && mtype != ::apache::thrift::protocol::T_ONEWAY) { + iprot->skip(::apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::INVALID_MESSAGE_TYPE); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + + return process_fn(iprot, oprot, fname, seqid, callContext); +} + +bool HbaseProcessor::process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext) { + std::map::iterator pfn; + pfn = processMap_.find(fname); + if (pfn == processMap_.end()) { + iprot->skip(apache::thrift::protocol::T_STRUCT); + iprot->readMessageEnd(); + iprot->getTransport()->readEnd(); + ::apache::thrift::TApplicationException x(::apache::thrift::TApplicationException::UNKNOWN_METHOD, "Invalid method name: '"+fname+"'"); + oprot->writeMessageBegin(fname, ::apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return true; + } + (this->*(pfn->second))(seqid, iprot, oprot, callContext); + return true; +} + +void HbaseProcessor::process_enableTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.enableTable", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.enableTable"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.enableTable"); + } + + Hbase_enableTable_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.enableTable", bytes); + } + + Hbase_enableTable_result result; + try { + iface_->enableTable(args.tableName); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.enableTable"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("enableTable", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.enableTable"); + } + + oprot->writeMessageBegin("enableTable", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.enableTable", bytes); + } +} + +void HbaseProcessor::process_disableTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.disableTable", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.disableTable"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.disableTable"); + } + + Hbase_disableTable_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.disableTable", bytes); + } + + Hbase_disableTable_result result; + try { + iface_->disableTable(args.tableName); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.disableTable"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("disableTable", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.disableTable"); + } + + oprot->writeMessageBegin("disableTable", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.disableTable", bytes); + } +} + +void HbaseProcessor::process_isTableEnabled(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.isTableEnabled", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.isTableEnabled"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.isTableEnabled"); + } + + Hbase_isTableEnabled_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.isTableEnabled", bytes); + } + + Hbase_isTableEnabled_result result; + try { + result.success = iface_->isTableEnabled(args.tableName); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.isTableEnabled"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("isTableEnabled", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.isTableEnabled"); + } + + oprot->writeMessageBegin("isTableEnabled", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.isTableEnabled", bytes); + } +} + +void HbaseProcessor::process_compact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.compact", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.compact"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.compact"); + } + + Hbase_compact_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.compact", bytes); + } + + Hbase_compact_result result; + try { + iface_->compact(args.tableNameOrRegionName); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.compact"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("compact", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.compact"); + } + + oprot->writeMessageBegin("compact", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.compact", bytes); + } +} + +void HbaseProcessor::process_majorCompact(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.majorCompact", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.majorCompact"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.majorCompact"); + } + + Hbase_majorCompact_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.majorCompact", bytes); + } + + Hbase_majorCompact_result result; + try { + iface_->majorCompact(args.tableNameOrRegionName); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.majorCompact"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("majorCompact", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.majorCompact"); + } + + oprot->writeMessageBegin("majorCompact", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.majorCompact", bytes); + } +} + +void HbaseProcessor::process_getTableNames(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getTableNames", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getTableNames"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getTableNames"); + } + + Hbase_getTableNames_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getTableNames", bytes); + } + + Hbase_getTableNames_result result; + try { + iface_->getTableNames(result.success); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getTableNames"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getTableNames", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getTableNames"); + } + + oprot->writeMessageBegin("getTableNames", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getTableNames", bytes); + } +} + +void HbaseProcessor::process_getColumnDescriptors(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getColumnDescriptors", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getColumnDescriptors"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getColumnDescriptors"); + } + + Hbase_getColumnDescriptors_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getColumnDescriptors", bytes); + } + + Hbase_getColumnDescriptors_result result; + try { + iface_->getColumnDescriptors(result.success, args.tableName); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getColumnDescriptors"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getColumnDescriptors", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getColumnDescriptors"); + } + + oprot->writeMessageBegin("getColumnDescriptors", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getColumnDescriptors", bytes); + } +} + +void HbaseProcessor::process_getTableRegions(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getTableRegions", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getTableRegions"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getTableRegions"); + } + + Hbase_getTableRegions_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getTableRegions", bytes); + } + + Hbase_getTableRegions_result result; + try { + iface_->getTableRegions(result.success, args.tableName); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getTableRegions"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getTableRegions", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getTableRegions"); + } + + oprot->writeMessageBegin("getTableRegions", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getTableRegions", bytes); + } +} + +void HbaseProcessor::process_createTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.createTable", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.createTable"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.createTable"); + } + + Hbase_createTable_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.createTable", bytes); + } + + Hbase_createTable_result result; + try { + iface_->createTable(args.tableName, args.columnFamilies); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (AlreadyExists &exist) { + result.exist = exist; + result.__isset.exist = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.createTable"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("createTable", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.createTable"); + } + + oprot->writeMessageBegin("createTable", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.createTable", bytes); + } +} + +void HbaseProcessor::process_deleteTable(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.deleteTable", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.deleteTable"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.deleteTable"); + } + + Hbase_deleteTable_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.deleteTable", bytes); + } + + Hbase_deleteTable_result result; + try { + iface_->deleteTable(args.tableName); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.deleteTable"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("deleteTable", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.deleteTable"); + } + + oprot->writeMessageBegin("deleteTable", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.deleteTable", bytes); + } +} + +void HbaseProcessor::process_get(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.get", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.get"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.get"); + } + + Hbase_get_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.get", bytes); + } + + Hbase_get_result result; + try { + iface_->get(result.success, args.tableName, args.row, args.column, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.get"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("get", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.get"); + } + + oprot->writeMessageBegin("get", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.get", bytes); + } +} + +void HbaseProcessor::process_getVer(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getVer", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getVer"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getVer"); + } + + Hbase_getVer_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getVer", bytes); + } + + Hbase_getVer_result result; + try { + iface_->getVer(result.success, args.tableName, args.row, args.column, args.numVersions, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getVer"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getVer", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getVer"); + } + + oprot->writeMessageBegin("getVer", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getVer", bytes); + } +} + +void HbaseProcessor::process_getVerTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getVerTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getVerTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getVerTs"); + } + + Hbase_getVerTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getVerTs", bytes); + } + + Hbase_getVerTs_result result; + try { + iface_->getVerTs(result.success, args.tableName, args.row, args.column, args.timestamp, args.numVersions, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getVerTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getVerTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getVerTs"); + } + + oprot->writeMessageBegin("getVerTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getVerTs", bytes); + } +} + +void HbaseProcessor::process_getRow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRow", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRow"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRow"); + } + + Hbase_getRow_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRow", bytes); + } + + Hbase_getRow_result result; + try { + iface_->getRow(result.success, args.tableName, args.row, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRow"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRow", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRow"); + } + + oprot->writeMessageBegin("getRow", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRow", bytes); + } +} + +void HbaseProcessor::process_getRowWithColumns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowWithColumns", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowWithColumns"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowWithColumns"); + } + + Hbase_getRowWithColumns_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowWithColumns", bytes); + } + + Hbase_getRowWithColumns_result result; + try { + iface_->getRowWithColumns(result.success, args.tableName, args.row, args.columns, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowWithColumns"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowWithColumns", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowWithColumns"); + } + + oprot->writeMessageBegin("getRowWithColumns", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowWithColumns", bytes); + } +} + +void HbaseProcessor::process_getRowTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowTs"); + } + + Hbase_getRowTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowTs", bytes); + } + + Hbase_getRowTs_result result; + try { + iface_->getRowTs(result.success, args.tableName, args.row, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowTs"); + } + + oprot->writeMessageBegin("getRowTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowTs", bytes); + } +} + +void HbaseProcessor::process_getRowWithColumnsTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowWithColumnsTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowWithColumnsTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowWithColumnsTs"); + } + + Hbase_getRowWithColumnsTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowWithColumnsTs", bytes); + } + + Hbase_getRowWithColumnsTs_result result; + try { + iface_->getRowWithColumnsTs(result.success, args.tableName, args.row, args.columns, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowWithColumnsTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowWithColumnsTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowWithColumnsTs"); + } + + oprot->writeMessageBegin("getRowWithColumnsTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowWithColumnsTs", bytes); + } +} + +void HbaseProcessor::process_getRows(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRows", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRows"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRows"); + } + + Hbase_getRows_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRows", bytes); + } + + Hbase_getRows_result result; + try { + iface_->getRows(result.success, args.tableName, args.rows, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRows"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRows", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRows"); + } + + oprot->writeMessageBegin("getRows", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRows", bytes); + } +} + +void HbaseProcessor::process_getRowsWithColumns(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowsWithColumns", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowsWithColumns"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowsWithColumns"); + } + + Hbase_getRowsWithColumns_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowsWithColumns", bytes); + } + + Hbase_getRowsWithColumns_result result; + try { + iface_->getRowsWithColumns(result.success, args.tableName, args.rows, args.columns, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowsWithColumns"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowsWithColumns", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowsWithColumns"); + } + + oprot->writeMessageBegin("getRowsWithColumns", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowsWithColumns", bytes); + } +} + +void HbaseProcessor::process_getRowsTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowsTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowsTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowsTs"); + } + + Hbase_getRowsTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowsTs", bytes); + } + + Hbase_getRowsTs_result result; + try { + iface_->getRowsTs(result.success, args.tableName, args.rows, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowsTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowsTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowsTs"); + } + + oprot->writeMessageBegin("getRowsTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowsTs", bytes); + } +} + +void HbaseProcessor::process_getRowsWithColumnsTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowsWithColumnsTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowsWithColumnsTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowsWithColumnsTs"); + } + + Hbase_getRowsWithColumnsTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowsWithColumnsTs", bytes); + } + + Hbase_getRowsWithColumnsTs_result result; + try { + iface_->getRowsWithColumnsTs(result.success, args.tableName, args.rows, args.columns, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowsWithColumnsTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowsWithColumnsTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowsWithColumnsTs"); + } + + oprot->writeMessageBegin("getRowsWithColumnsTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowsWithColumnsTs", bytes); + } +} + +void HbaseProcessor::process_mutateRow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.mutateRow", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.mutateRow"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.mutateRow"); + } + + Hbase_mutateRow_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.mutateRow", bytes); + } + + Hbase_mutateRow_result result; + try { + iface_->mutateRow(args.tableName, args.row, args.mutations, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.mutateRow"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("mutateRow", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.mutateRow"); + } + + oprot->writeMessageBegin("mutateRow", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.mutateRow", bytes); + } +} + +void HbaseProcessor::process_mutateRowTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.mutateRowTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.mutateRowTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.mutateRowTs"); + } + + Hbase_mutateRowTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.mutateRowTs", bytes); + } + + Hbase_mutateRowTs_result result; + try { + iface_->mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.mutateRowTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("mutateRowTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.mutateRowTs"); + } + + oprot->writeMessageBegin("mutateRowTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.mutateRowTs", bytes); + } +} + +void HbaseProcessor::process_mutateRows(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.mutateRows", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.mutateRows"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.mutateRows"); + } + + Hbase_mutateRows_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.mutateRows", bytes); + } + + Hbase_mutateRows_result result; + try { + iface_->mutateRows(args.tableName, args.rowBatches, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.mutateRows"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("mutateRows", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.mutateRows"); + } + + oprot->writeMessageBegin("mutateRows", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.mutateRows", bytes); + } +} + +void HbaseProcessor::process_mutateRowsTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.mutateRowsTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.mutateRowsTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.mutateRowsTs"); + } + + Hbase_mutateRowsTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.mutateRowsTs", bytes); + } + + Hbase_mutateRowsTs_result result; + try { + iface_->mutateRowsTs(args.tableName, args.rowBatches, args.timestamp, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.mutateRowsTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("mutateRowsTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.mutateRowsTs"); + } + + oprot->writeMessageBegin("mutateRowsTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.mutateRowsTs", bytes); + } +} + +void HbaseProcessor::process_atomicIncrement(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.atomicIncrement", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.atomicIncrement"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.atomicIncrement"); + } + + Hbase_atomicIncrement_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.atomicIncrement", bytes); + } + + Hbase_atomicIncrement_result result; + try { + result.success = iface_->atomicIncrement(args.tableName, args.row, args.column, args.value); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.atomicIncrement"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("atomicIncrement", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.atomicIncrement"); + } + + oprot->writeMessageBegin("atomicIncrement", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.atomicIncrement", bytes); + } +} + +void HbaseProcessor::process_deleteAll(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.deleteAll", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.deleteAll"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.deleteAll"); + } + + Hbase_deleteAll_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.deleteAll", bytes); + } + + Hbase_deleteAll_result result; + try { + iface_->deleteAll(args.tableName, args.row, args.column, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.deleteAll"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("deleteAll", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.deleteAll"); + } + + oprot->writeMessageBegin("deleteAll", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.deleteAll", bytes); + } +} + +void HbaseProcessor::process_deleteAllTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.deleteAllTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.deleteAllTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.deleteAllTs"); + } + + Hbase_deleteAllTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.deleteAllTs", bytes); + } + + Hbase_deleteAllTs_result result; + try { + iface_->deleteAllTs(args.tableName, args.row, args.column, args.timestamp, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.deleteAllTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("deleteAllTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.deleteAllTs"); + } + + oprot->writeMessageBegin("deleteAllTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.deleteAllTs", bytes); + } +} + +void HbaseProcessor::process_deleteAllRow(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.deleteAllRow", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.deleteAllRow"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.deleteAllRow"); + } + + Hbase_deleteAllRow_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.deleteAllRow", bytes); + } + + Hbase_deleteAllRow_result result; + try { + iface_->deleteAllRow(args.tableName, args.row, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.deleteAllRow"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("deleteAllRow", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.deleteAllRow"); + } + + oprot->writeMessageBegin("deleteAllRow", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.deleteAllRow", bytes); + } +} + +void HbaseProcessor::process_increment(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.increment", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.increment"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.increment"); + } + + Hbase_increment_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.increment", bytes); + } + + Hbase_increment_result result; + try { + iface_->increment(args.increment); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.increment"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("increment", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.increment"); + } + + oprot->writeMessageBegin("increment", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.increment", bytes); + } +} + +void HbaseProcessor::process_incrementRows(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.incrementRows", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.incrementRows"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.incrementRows"); + } + + Hbase_incrementRows_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.incrementRows", bytes); + } + + Hbase_incrementRows_result result; + try { + iface_->incrementRows(args.increments); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.incrementRows"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("incrementRows", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.incrementRows"); + } + + oprot->writeMessageBegin("incrementRows", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.incrementRows", bytes); + } +} + +void HbaseProcessor::process_deleteAllRowTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.deleteAllRowTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.deleteAllRowTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.deleteAllRowTs"); + } + + Hbase_deleteAllRowTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.deleteAllRowTs", bytes); + } + + Hbase_deleteAllRowTs_result result; + try { + iface_->deleteAllRowTs(args.tableName, args.row, args.timestamp, args.attributes); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.deleteAllRowTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("deleteAllRowTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.deleteAllRowTs"); + } + + oprot->writeMessageBegin("deleteAllRowTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.deleteAllRowTs", bytes); + } +} + +void HbaseProcessor::process_scannerOpenWithScan(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpenWithScan", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpenWithScan"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpenWithScan"); + } + + Hbase_scannerOpenWithScan_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpenWithScan", bytes); + } + + Hbase_scannerOpenWithScan_result result; + try { + result.success = iface_->scannerOpenWithScan(args.tableName, args.scan, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpenWithScan"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpenWithScan", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpenWithScan"); + } + + oprot->writeMessageBegin("scannerOpenWithScan", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpenWithScan", bytes); + } +} + +void HbaseProcessor::process_scannerOpen(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpen", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpen"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpen"); + } + + Hbase_scannerOpen_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpen", bytes); + } + + Hbase_scannerOpen_result result; + try { + result.success = iface_->scannerOpen(args.tableName, args.startRow, args.columns, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpen"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpen", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpen"); + } + + oprot->writeMessageBegin("scannerOpen", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpen", bytes); + } +} + +void HbaseProcessor::process_scannerOpenWithStop(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpenWithStop", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpenWithStop"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpenWithStop"); + } + + Hbase_scannerOpenWithStop_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpenWithStop", bytes); + } + + Hbase_scannerOpenWithStop_result result; + try { + result.success = iface_->scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpenWithStop"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpenWithStop", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpenWithStop"); + } + + oprot->writeMessageBegin("scannerOpenWithStop", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpenWithStop", bytes); + } +} + +void HbaseProcessor::process_scannerOpenWithPrefix(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpenWithPrefix", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpenWithPrefix"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpenWithPrefix"); + } + + Hbase_scannerOpenWithPrefix_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpenWithPrefix", bytes); + } + + Hbase_scannerOpenWithPrefix_result result; + try { + result.success = iface_->scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpenWithPrefix"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpenWithPrefix", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpenWithPrefix"); + } + + oprot->writeMessageBegin("scannerOpenWithPrefix", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpenWithPrefix", bytes); + } +} + +void HbaseProcessor::process_scannerOpenTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpenTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpenTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpenTs"); + } + + Hbase_scannerOpenTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpenTs", bytes); + } + + Hbase_scannerOpenTs_result result; + try { + result.success = iface_->scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpenTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpenTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpenTs"); + } + + oprot->writeMessageBegin("scannerOpenTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpenTs", bytes); + } +} + +void HbaseProcessor::process_scannerOpenWithStopTs(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerOpenWithStopTs", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerOpenWithStopTs"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerOpenWithStopTs"); + } + + Hbase_scannerOpenWithStopTs_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerOpenWithStopTs", bytes); + } + + Hbase_scannerOpenWithStopTs_result result; + try { + result.success = iface_->scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp, args.attributes); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerOpenWithStopTs"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerOpenWithStopTs", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerOpenWithStopTs"); + } + + oprot->writeMessageBegin("scannerOpenWithStopTs", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerOpenWithStopTs", bytes); + } +} + +void HbaseProcessor::process_scannerGet(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerGet", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerGet"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerGet"); + } + + Hbase_scannerGet_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerGet", bytes); + } + + Hbase_scannerGet_result result; + try { + iface_->scannerGet(result.success, args.id); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerGet"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerGet", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerGet"); + } + + oprot->writeMessageBegin("scannerGet", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerGet", bytes); + } +} + +void HbaseProcessor::process_scannerGetList(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerGetList", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerGetList"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerGetList"); + } + + Hbase_scannerGetList_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerGetList", bytes); + } + + Hbase_scannerGetList_result result; + try { + iface_->scannerGetList(result.success, args.id, args.nbRows); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerGetList"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerGetList", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerGetList"); + } + + oprot->writeMessageBegin("scannerGetList", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerGetList", bytes); + } +} + +void HbaseProcessor::process_scannerClose(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.scannerClose", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.scannerClose"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.scannerClose"); + } + + Hbase_scannerClose_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.scannerClose", bytes); + } + + Hbase_scannerClose_result result; + try { + iface_->scannerClose(args.id); + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (IllegalArgument &ia) { + result.ia = ia; + result.__isset.ia = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.scannerClose"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("scannerClose", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.scannerClose"); + } + + oprot->writeMessageBegin("scannerClose", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.scannerClose", bytes); + } +} + +void HbaseProcessor::process_getRowOrBefore(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRowOrBefore", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRowOrBefore"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRowOrBefore"); + } + + Hbase_getRowOrBefore_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRowOrBefore", bytes); + } + + Hbase_getRowOrBefore_result result; + try { + iface_->getRowOrBefore(result.success, args.tableName, args.row, args.family); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRowOrBefore"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRowOrBefore", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRowOrBefore"); + } + + oprot->writeMessageBegin("getRowOrBefore", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRowOrBefore", bytes); + } +} + +void HbaseProcessor::process_getRegionInfo(int32_t seqid, ::apache::thrift::protocol::TProtocol* iprot, ::apache::thrift::protocol::TProtocol* oprot, void* callContext) +{ + void* ctx = NULL; + if (this->eventHandler_.get() != NULL) { + ctx = this->eventHandler_->getContext("Hbase.getRegionInfo", callContext); + } + apache::thrift::TProcessorContextFreer freer(this->eventHandler_.get(), ctx, "Hbase.getRegionInfo"); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preRead(ctx, "Hbase.getRegionInfo"); + } + + Hbase_getRegionInfo_args args; + args.read(iprot); + iprot->readMessageEnd(); + uint32_t bytes = iprot->getTransport()->readEnd(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postRead(ctx, "Hbase.getRegionInfo", bytes); + } + + Hbase_getRegionInfo_result result; + try { + iface_->getRegionInfo(result.success, args.row); + result.__isset.success = true; + } catch (IOError &io) { + result.io = io; + result.__isset.io = true; + } catch (const std::exception& e) { + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->handlerError(ctx, "Hbase.getRegionInfo"); + } + + apache::thrift::TApplicationException x(e.what()); + oprot->writeMessageBegin("getRegionInfo", apache::thrift::protocol::T_EXCEPTION, seqid); + x.write(oprot); + oprot->writeMessageEnd(); + oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + return; + } + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->preWrite(ctx, "Hbase.getRegionInfo"); + } + + oprot->writeMessageBegin("getRegionInfo", apache::thrift::protocol::T_REPLY, seqid); + result.write(oprot); + oprot->writeMessageEnd(); + bytes = oprot->getTransport()->writeEnd(); + oprot->getTransport()->flush(); + + if (this->eventHandler_.get() != NULL) { + this->eventHandler_->postWrite(ctx, "Hbase.getRegionInfo", bytes); + } +} + +::boost::shared_ptr< ::apache::thrift::TProcessor > HbaseProcessorFactory::getProcessor(const ::apache::thrift::TConnectionInfo& connInfo) { + ::apache::thrift::ReleaseHandler< HbaseIfFactory > cleanup(handlerFactory_); + ::boost::shared_ptr< HbaseIf > handler(handlerFactory_->getHandler(connInfo), cleanup); + ::boost::shared_ptr< ::apache::thrift::TProcessor > processor(new HbaseProcessor(handler)); + return processor; +} +}}}} // namespace + diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase.h hbase-examples/src/main/cpp/gen-cpp/Hbase.h new file mode 100644 index 0000000..40adc5b --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase.h @@ -0,0 +1,6718 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef Hbase_H +#define Hbase_H + +#include +#include "Hbase_types.h" + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +class HbaseIf { + public: + virtual ~HbaseIf() {} + virtual void enableTable(const Bytes& tableName) = 0; + virtual void disableTable(const Bytes& tableName) = 0; + virtual bool isTableEnabled(const Bytes& tableName) = 0; + virtual void compact(const Bytes& tableNameOrRegionName) = 0; + virtual void majorCompact(const Bytes& tableNameOrRegionName) = 0; + virtual void getTableNames(std::vector & _return) = 0; + virtual void getColumnDescriptors(std::map & _return, const Text& tableName) = 0; + virtual void getTableRegions(std::vector & _return, const Text& tableName) = 0; + virtual void createTable(const Text& tableName, const std::vector & columnFamilies) = 0; + virtual void deleteTable(const Text& tableName) = 0; + virtual void get(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const std::map & attributes) = 0; + virtual void getVer(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes) = 0; + virtual void getVerTs(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes) = 0; + virtual void getRow(std::vector & _return, const Text& tableName, const Text& row, const std::map & attributes) = 0; + virtual void getRowWithColumns(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes) = 0; + virtual void getRowTs(std::vector & _return, const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) = 0; + virtual void getRowWithColumnsTs(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes) = 0; + virtual void getRows(std::vector & _return, const Text& tableName, const std::vector & rows, const std::map & attributes) = 0; + virtual void getRowsWithColumns(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes) = 0; + virtual void getRowsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes) = 0; + virtual void getRowsWithColumnsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes) = 0; + virtual void mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes) = 0; + virtual void mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes) = 0; + virtual void mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes) = 0; + virtual void mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes) = 0; + virtual int64_t atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value) = 0; + virtual void deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) = 0; + virtual void deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes) = 0; + virtual void deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes) = 0; + virtual void increment(const TIncrement& increment) = 0; + virtual void incrementRows(const std::vector & increments) = 0; + virtual void deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) = 0; + virtual ScannerID scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes) = 0; + virtual ScannerID scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes) = 0; + virtual ScannerID scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes) = 0; + virtual ScannerID scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes) = 0; + virtual ScannerID scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) = 0; + virtual ScannerID scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) = 0; + virtual void scannerGet(std::vector & _return, const ScannerID id) = 0; + virtual void scannerGetList(std::vector & _return, const ScannerID id, const int32_t nbRows) = 0; + virtual void scannerClose(const ScannerID id) = 0; + virtual void getRowOrBefore(std::vector & _return, const Text& tableName, const Text& row, const Text& family) = 0; + virtual void getRegionInfo(TRegionInfo& _return, const Text& row) = 0; +}; + +class HbaseIfFactory { + public: + typedef HbaseIf Handler; + + virtual ~HbaseIfFactory() {} + + virtual HbaseIf* getHandler(const ::apache::thrift::TConnectionInfo& connInfo) = 0; + virtual void releaseHandler(HbaseIf* /* handler */) = 0; +}; + +class HbaseIfSingletonFactory : virtual public HbaseIfFactory { + public: + HbaseIfSingletonFactory(const boost::shared_ptr& iface) : iface_(iface) {} + virtual ~HbaseIfSingletonFactory() {} + + virtual HbaseIf* getHandler(const ::apache::thrift::TConnectionInfo&) { + return iface_.get(); + } + virtual void releaseHandler(HbaseIf* /* handler */) {} + + protected: + boost::shared_ptr iface_; +}; + +class HbaseNull : virtual public HbaseIf { + public: + virtual ~HbaseNull() {} + void enableTable(const Bytes& /* tableName */) { + return; + } + void disableTable(const Bytes& /* tableName */) { + return; + } + bool isTableEnabled(const Bytes& /* tableName */) { + bool _return = false; + return _return; + } + void compact(const Bytes& /* tableNameOrRegionName */) { + return; + } + void majorCompact(const Bytes& /* tableNameOrRegionName */) { + return; + } + void getTableNames(std::vector & /* _return */) { + return; + } + void getColumnDescriptors(std::map & /* _return */, const Text& /* tableName */) { + return; + } + void getTableRegions(std::vector & /* _return */, const Text& /* tableName */) { + return; + } + void createTable(const Text& /* tableName */, const std::vector & /* columnFamilies */) { + return; + } + void deleteTable(const Text& /* tableName */) { + return; + } + void get(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const std::map & /* attributes */) { + return; + } + void getVer(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const int32_t /* numVersions */, const std::map & /* attributes */) { + return; + } + void getVerTs(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const int64_t /* timestamp */, const int32_t /* numVersions */, const std::map & /* attributes */) { + return; + } + void getRow(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const std::map & /* attributes */) { + return; + } + void getRowWithColumns(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const std::vector & /* columns */, const std::map & /* attributes */) { + return; + } + void getRowTs(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void getRowWithColumnsTs(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const std::vector & /* columns */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void getRows(std::vector & /* _return */, const Text& /* tableName */, const std::vector & /* rows */, const std::map & /* attributes */) { + return; + } + void getRowsWithColumns(std::vector & /* _return */, const Text& /* tableName */, const std::vector & /* rows */, const std::vector & /* columns */, const std::map & /* attributes */) { + return; + } + void getRowsTs(std::vector & /* _return */, const Text& /* tableName */, const std::vector & /* rows */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void getRowsWithColumnsTs(std::vector & /* _return */, const Text& /* tableName */, const std::vector & /* rows */, const std::vector & /* columns */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void mutateRow(const Text& /* tableName */, const Text& /* row */, const std::vector & /* mutations */, const std::map & /* attributes */) { + return; + } + void mutateRowTs(const Text& /* tableName */, const Text& /* row */, const std::vector & /* mutations */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void mutateRows(const Text& /* tableName */, const std::vector & /* rowBatches */, const std::map & /* attributes */) { + return; + } + void mutateRowsTs(const Text& /* tableName */, const std::vector & /* rowBatches */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + int64_t atomicIncrement(const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const int64_t /* value */) { + int64_t _return = 0; + return _return; + } + void deleteAll(const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const std::map & /* attributes */) { + return; + } + void deleteAllTs(const Text& /* tableName */, const Text& /* row */, const Text& /* column */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + void deleteAllRow(const Text& /* tableName */, const Text& /* row */, const std::map & /* attributes */) { + return; + } + void increment(const TIncrement& /* increment */) { + return; + } + void incrementRows(const std::vector & /* increments */) { + return; + } + void deleteAllRowTs(const Text& /* tableName */, const Text& /* row */, const int64_t /* timestamp */, const std::map & /* attributes */) { + return; + } + ScannerID scannerOpenWithScan(const Text& /* tableName */, const TScan& /* scan */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + ScannerID scannerOpen(const Text& /* tableName */, const Text& /* startRow */, const std::vector & /* columns */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + ScannerID scannerOpenWithStop(const Text& /* tableName */, const Text& /* startRow */, const Text& /* stopRow */, const std::vector & /* columns */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + ScannerID scannerOpenWithPrefix(const Text& /* tableName */, const Text& /* startAndPrefix */, const std::vector & /* columns */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + ScannerID scannerOpenTs(const Text& /* tableName */, const Text& /* startRow */, const std::vector & /* columns */, const int64_t /* timestamp */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + ScannerID scannerOpenWithStopTs(const Text& /* tableName */, const Text& /* startRow */, const Text& /* stopRow */, const std::vector & /* columns */, const int64_t /* timestamp */, const std::map & /* attributes */) { + ScannerID _return = 0; + return _return; + } + void scannerGet(std::vector & /* _return */, const ScannerID /* id */) { + return; + } + void scannerGetList(std::vector & /* _return */, const ScannerID /* id */, const int32_t /* nbRows */) { + return; + } + void scannerClose(const ScannerID /* id */) { + return; + } + void getRowOrBefore(std::vector & /* _return */, const Text& /* tableName */, const Text& /* row */, const Text& /* family */) { + return; + } + void getRegionInfo(TRegionInfo& /* _return */, const Text& /* row */) { + return; + } +}; + +typedef struct _Hbase_enableTable_args__isset { + _Hbase_enableTable_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_enableTable_args__isset; + +class Hbase_enableTable_args { + public: + + Hbase_enableTable_args() : tableName("") { + } + + virtual ~Hbase_enableTable_args() throw() {} + + Bytes tableName; + + _Hbase_enableTable_args__isset __isset; + + void __set_tableName(const Bytes& val) { + tableName = val; + } + + bool operator == (const Hbase_enableTable_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_enableTable_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_enableTable_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_enableTable_pargs { + public: + + + virtual ~Hbase_enableTable_pargs() throw() {} + + const Bytes* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_enableTable_result__isset { + _Hbase_enableTable_result__isset() : io(false) {} + bool io; +} _Hbase_enableTable_result__isset; + +class Hbase_enableTable_result { + public: + + Hbase_enableTable_result() { + } + + virtual ~Hbase_enableTable_result() throw() {} + + IOError io; + + _Hbase_enableTable_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_enableTable_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_enableTable_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_enableTable_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_enableTable_presult__isset { + _Hbase_enableTable_presult__isset() : io(false) {} + bool io; +} _Hbase_enableTable_presult__isset; + +class Hbase_enableTable_presult { + public: + + + virtual ~Hbase_enableTable_presult() throw() {} + + IOError io; + + _Hbase_enableTable_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_disableTable_args__isset { + _Hbase_disableTable_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_disableTable_args__isset; + +class Hbase_disableTable_args { + public: + + Hbase_disableTable_args() : tableName("") { + } + + virtual ~Hbase_disableTable_args() throw() {} + + Bytes tableName; + + _Hbase_disableTable_args__isset __isset; + + void __set_tableName(const Bytes& val) { + tableName = val; + } + + bool operator == (const Hbase_disableTable_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_disableTable_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_disableTable_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_disableTable_pargs { + public: + + + virtual ~Hbase_disableTable_pargs() throw() {} + + const Bytes* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_disableTable_result__isset { + _Hbase_disableTable_result__isset() : io(false) {} + bool io; +} _Hbase_disableTable_result__isset; + +class Hbase_disableTable_result { + public: + + Hbase_disableTable_result() { + } + + virtual ~Hbase_disableTable_result() throw() {} + + IOError io; + + _Hbase_disableTable_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_disableTable_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_disableTable_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_disableTable_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_disableTable_presult__isset { + _Hbase_disableTable_presult__isset() : io(false) {} + bool io; +} _Hbase_disableTable_presult__isset; + +class Hbase_disableTable_presult { + public: + + + virtual ~Hbase_disableTable_presult() throw() {} + + IOError io; + + _Hbase_disableTable_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_isTableEnabled_args__isset { + _Hbase_isTableEnabled_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_isTableEnabled_args__isset; + +class Hbase_isTableEnabled_args { + public: + + Hbase_isTableEnabled_args() : tableName("") { + } + + virtual ~Hbase_isTableEnabled_args() throw() {} + + Bytes tableName; + + _Hbase_isTableEnabled_args__isset __isset; + + void __set_tableName(const Bytes& val) { + tableName = val; + } + + bool operator == (const Hbase_isTableEnabled_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_isTableEnabled_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_isTableEnabled_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_isTableEnabled_pargs { + public: + + + virtual ~Hbase_isTableEnabled_pargs() throw() {} + + const Bytes* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_isTableEnabled_result__isset { + _Hbase_isTableEnabled_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_isTableEnabled_result__isset; + +class Hbase_isTableEnabled_result { + public: + + Hbase_isTableEnabled_result() : success(0) { + } + + virtual ~Hbase_isTableEnabled_result() throw() {} + + bool success; + IOError io; + + _Hbase_isTableEnabled_result__isset __isset; + + void __set_success(const bool val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_isTableEnabled_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_isTableEnabled_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_isTableEnabled_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_isTableEnabled_presult__isset { + _Hbase_isTableEnabled_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_isTableEnabled_presult__isset; + +class Hbase_isTableEnabled_presult { + public: + + + virtual ~Hbase_isTableEnabled_presult() throw() {} + + bool* success; + IOError io; + + _Hbase_isTableEnabled_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_compact_args__isset { + _Hbase_compact_args__isset() : tableNameOrRegionName(false) {} + bool tableNameOrRegionName; +} _Hbase_compact_args__isset; + +class Hbase_compact_args { + public: + + Hbase_compact_args() : tableNameOrRegionName("") { + } + + virtual ~Hbase_compact_args() throw() {} + + Bytes tableNameOrRegionName; + + _Hbase_compact_args__isset __isset; + + void __set_tableNameOrRegionName(const Bytes& val) { + tableNameOrRegionName = val; + } + + bool operator == (const Hbase_compact_args & rhs) const + { + if (!(tableNameOrRegionName == rhs.tableNameOrRegionName)) + return false; + return true; + } + bool operator != (const Hbase_compact_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_compact_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_compact_pargs { + public: + + + virtual ~Hbase_compact_pargs() throw() {} + + const Bytes* tableNameOrRegionName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_compact_result__isset { + _Hbase_compact_result__isset() : io(false) {} + bool io; +} _Hbase_compact_result__isset; + +class Hbase_compact_result { + public: + + Hbase_compact_result() { + } + + virtual ~Hbase_compact_result() throw() {} + + IOError io; + + _Hbase_compact_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_compact_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_compact_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_compact_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_compact_presult__isset { + _Hbase_compact_presult__isset() : io(false) {} + bool io; +} _Hbase_compact_presult__isset; + +class Hbase_compact_presult { + public: + + + virtual ~Hbase_compact_presult() throw() {} + + IOError io; + + _Hbase_compact_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_majorCompact_args__isset { + _Hbase_majorCompact_args__isset() : tableNameOrRegionName(false) {} + bool tableNameOrRegionName; +} _Hbase_majorCompact_args__isset; + +class Hbase_majorCompact_args { + public: + + Hbase_majorCompact_args() : tableNameOrRegionName("") { + } + + virtual ~Hbase_majorCompact_args() throw() {} + + Bytes tableNameOrRegionName; + + _Hbase_majorCompact_args__isset __isset; + + void __set_tableNameOrRegionName(const Bytes& val) { + tableNameOrRegionName = val; + } + + bool operator == (const Hbase_majorCompact_args & rhs) const + { + if (!(tableNameOrRegionName == rhs.tableNameOrRegionName)) + return false; + return true; + } + bool operator != (const Hbase_majorCompact_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_majorCompact_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_majorCompact_pargs { + public: + + + virtual ~Hbase_majorCompact_pargs() throw() {} + + const Bytes* tableNameOrRegionName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_majorCompact_result__isset { + _Hbase_majorCompact_result__isset() : io(false) {} + bool io; +} _Hbase_majorCompact_result__isset; + +class Hbase_majorCompact_result { + public: + + Hbase_majorCompact_result() { + } + + virtual ~Hbase_majorCompact_result() throw() {} + + IOError io; + + _Hbase_majorCompact_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_majorCompact_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_majorCompact_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_majorCompact_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_majorCompact_presult__isset { + _Hbase_majorCompact_presult__isset() : io(false) {} + bool io; +} _Hbase_majorCompact_presult__isset; + +class Hbase_majorCompact_presult { + public: + + + virtual ~Hbase_majorCompact_presult() throw() {} + + IOError io; + + _Hbase_majorCompact_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + + +class Hbase_getTableNames_args { + public: + + Hbase_getTableNames_args() { + } + + virtual ~Hbase_getTableNames_args() throw() {} + + + bool operator == (const Hbase_getTableNames_args & /* rhs */) const + { + return true; + } + bool operator != (const Hbase_getTableNames_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getTableNames_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getTableNames_pargs { + public: + + + virtual ~Hbase_getTableNames_pargs() throw() {} + + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getTableNames_result__isset { + _Hbase_getTableNames_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getTableNames_result__isset; + +class Hbase_getTableNames_result { + public: + + Hbase_getTableNames_result() { + } + + virtual ~Hbase_getTableNames_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getTableNames_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getTableNames_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getTableNames_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getTableNames_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getTableNames_presult__isset { + _Hbase_getTableNames_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getTableNames_presult__isset; + +class Hbase_getTableNames_presult { + public: + + + virtual ~Hbase_getTableNames_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getTableNames_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getColumnDescriptors_args__isset { + _Hbase_getColumnDescriptors_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_getColumnDescriptors_args__isset; + +class Hbase_getColumnDescriptors_args { + public: + + Hbase_getColumnDescriptors_args() : tableName("") { + } + + virtual ~Hbase_getColumnDescriptors_args() throw() {} + + Text tableName; + + _Hbase_getColumnDescriptors_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + bool operator == (const Hbase_getColumnDescriptors_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_getColumnDescriptors_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getColumnDescriptors_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getColumnDescriptors_pargs { + public: + + + virtual ~Hbase_getColumnDescriptors_pargs() throw() {} + + const Text* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getColumnDescriptors_result__isset { + _Hbase_getColumnDescriptors_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getColumnDescriptors_result__isset; + +class Hbase_getColumnDescriptors_result { + public: + + Hbase_getColumnDescriptors_result() { + } + + virtual ~Hbase_getColumnDescriptors_result() throw() {} + + std::map success; + IOError io; + + _Hbase_getColumnDescriptors_result__isset __isset; + + void __set_success(const std::map & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getColumnDescriptors_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getColumnDescriptors_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getColumnDescriptors_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getColumnDescriptors_presult__isset { + _Hbase_getColumnDescriptors_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getColumnDescriptors_presult__isset; + +class Hbase_getColumnDescriptors_presult { + public: + + + virtual ~Hbase_getColumnDescriptors_presult() throw() {} + + std::map * success; + IOError io; + + _Hbase_getColumnDescriptors_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getTableRegions_args__isset { + _Hbase_getTableRegions_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_getTableRegions_args__isset; + +class Hbase_getTableRegions_args { + public: + + Hbase_getTableRegions_args() : tableName("") { + } + + virtual ~Hbase_getTableRegions_args() throw() {} + + Text tableName; + + _Hbase_getTableRegions_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + bool operator == (const Hbase_getTableRegions_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_getTableRegions_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getTableRegions_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getTableRegions_pargs { + public: + + + virtual ~Hbase_getTableRegions_pargs() throw() {} + + const Text* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getTableRegions_result__isset { + _Hbase_getTableRegions_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getTableRegions_result__isset; + +class Hbase_getTableRegions_result { + public: + + Hbase_getTableRegions_result() { + } + + virtual ~Hbase_getTableRegions_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getTableRegions_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getTableRegions_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getTableRegions_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getTableRegions_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getTableRegions_presult__isset { + _Hbase_getTableRegions_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getTableRegions_presult__isset; + +class Hbase_getTableRegions_presult { + public: + + + virtual ~Hbase_getTableRegions_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getTableRegions_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_createTable_args__isset { + _Hbase_createTable_args__isset() : tableName(false), columnFamilies(false) {} + bool tableName; + bool columnFamilies; +} _Hbase_createTable_args__isset; + +class Hbase_createTable_args { + public: + + Hbase_createTable_args() : tableName("") { + } + + virtual ~Hbase_createTable_args() throw() {} + + Text tableName; + std::vector columnFamilies; + + _Hbase_createTable_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_columnFamilies(const std::vector & val) { + columnFamilies = val; + } + + bool operator == (const Hbase_createTable_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(columnFamilies == rhs.columnFamilies)) + return false; + return true; + } + bool operator != (const Hbase_createTable_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_createTable_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_createTable_pargs { + public: + + + virtual ~Hbase_createTable_pargs() throw() {} + + const Text* tableName; + const std::vector * columnFamilies; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_createTable_result__isset { + _Hbase_createTable_result__isset() : io(false), ia(false), exist(false) {} + bool io; + bool ia; + bool exist; +} _Hbase_createTable_result__isset; + +class Hbase_createTable_result { + public: + + Hbase_createTable_result() { + } + + virtual ~Hbase_createTable_result() throw() {} + + IOError io; + IllegalArgument ia; + AlreadyExists exist; + + _Hbase_createTable_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + void __set_exist(const AlreadyExists& val) { + exist = val; + } + + bool operator == (const Hbase_createTable_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + if (!(exist == rhs.exist)) + return false; + return true; + } + bool operator != (const Hbase_createTable_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_createTable_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_createTable_presult__isset { + _Hbase_createTable_presult__isset() : io(false), ia(false), exist(false) {} + bool io; + bool ia; + bool exist; +} _Hbase_createTable_presult__isset; + +class Hbase_createTable_presult { + public: + + + virtual ~Hbase_createTable_presult() throw() {} + + IOError io; + IllegalArgument ia; + AlreadyExists exist; + + _Hbase_createTable_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_deleteTable_args__isset { + _Hbase_deleteTable_args__isset() : tableName(false) {} + bool tableName; +} _Hbase_deleteTable_args__isset; + +class Hbase_deleteTable_args { + public: + + Hbase_deleteTable_args() : tableName("") { + } + + virtual ~Hbase_deleteTable_args() throw() {} + + Text tableName; + + _Hbase_deleteTable_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + bool operator == (const Hbase_deleteTable_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + return true; + } + bool operator != (const Hbase_deleteTable_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteTable_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_deleteTable_pargs { + public: + + + virtual ~Hbase_deleteTable_pargs() throw() {} + + const Text* tableName; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteTable_result__isset { + _Hbase_deleteTable_result__isset() : io(false) {} + bool io; +} _Hbase_deleteTable_result__isset; + +class Hbase_deleteTable_result { + public: + + Hbase_deleteTable_result() { + } + + virtual ~Hbase_deleteTable_result() throw() {} + + IOError io; + + _Hbase_deleteTable_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_deleteTable_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_deleteTable_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteTable_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteTable_presult__isset { + _Hbase_deleteTable_presult__isset() : io(false) {} + bool io; +} _Hbase_deleteTable_presult__isset; + +class Hbase_deleteTable_presult { + public: + + + virtual ~Hbase_deleteTable_presult() throw() {} + + IOError io; + + _Hbase_deleteTable_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_get_args__isset { + _Hbase_get_args__isset() : tableName(false), row(false), column(false), attributes(false) {} + bool tableName; + bool row; + bool column; + bool attributes; +} _Hbase_get_args__isset; + +class Hbase_get_args { + public: + + Hbase_get_args() : tableName(""), row(""), column("") { + } + + virtual ~Hbase_get_args() throw() {} + + Text tableName; + Text row; + Text column; + std::map attributes; + + _Hbase_get_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_get_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_get_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_get_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_get_pargs { + public: + + + virtual ~Hbase_get_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_get_result__isset { + _Hbase_get_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_get_result__isset; + +class Hbase_get_result { + public: + + Hbase_get_result() { + } + + virtual ~Hbase_get_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_get_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_get_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_get_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_get_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_get_presult__isset { + _Hbase_get_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_get_presult__isset; + +class Hbase_get_presult { + public: + + + virtual ~Hbase_get_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_get_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getVer_args__isset { + _Hbase_getVer_args__isset() : tableName(false), row(false), column(false), numVersions(false), attributes(false) {} + bool tableName; + bool row; + bool column; + bool numVersions; + bool attributes; +} _Hbase_getVer_args__isset; + +class Hbase_getVer_args { + public: + + Hbase_getVer_args() : tableName(""), row(""), column(""), numVersions(0) { + } + + virtual ~Hbase_getVer_args() throw() {} + + Text tableName; + Text row; + Text column; + int32_t numVersions; + std::map attributes; + + _Hbase_getVer_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_numVersions(const int32_t val) { + numVersions = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getVer_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(numVersions == rhs.numVersions)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getVer_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getVer_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getVer_pargs { + public: + + + virtual ~Hbase_getVer_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const int32_t* numVersions; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getVer_result__isset { + _Hbase_getVer_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getVer_result__isset; + +class Hbase_getVer_result { + public: + + Hbase_getVer_result() { + } + + virtual ~Hbase_getVer_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getVer_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getVer_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getVer_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getVer_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getVer_presult__isset { + _Hbase_getVer_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getVer_presult__isset; + +class Hbase_getVer_presult { + public: + + + virtual ~Hbase_getVer_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getVer_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getVerTs_args__isset { + _Hbase_getVerTs_args__isset() : tableName(false), row(false), column(false), timestamp(false), numVersions(false), attributes(false) {} + bool tableName; + bool row; + bool column; + bool timestamp; + bool numVersions; + bool attributes; +} _Hbase_getVerTs_args__isset; + +class Hbase_getVerTs_args { + public: + + Hbase_getVerTs_args() : tableName(""), row(""), column(""), timestamp(0), numVersions(0) { + } + + virtual ~Hbase_getVerTs_args() throw() {} + + Text tableName; + Text row; + Text column; + int64_t timestamp; + int32_t numVersions; + std::map attributes; + + _Hbase_getVerTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_numVersions(const int32_t val) { + numVersions = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getVerTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(numVersions == rhs.numVersions)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getVerTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getVerTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getVerTs_pargs { + public: + + + virtual ~Hbase_getVerTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const int64_t* timestamp; + const int32_t* numVersions; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getVerTs_result__isset { + _Hbase_getVerTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getVerTs_result__isset; + +class Hbase_getVerTs_result { + public: + + Hbase_getVerTs_result() { + } + + virtual ~Hbase_getVerTs_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getVerTs_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getVerTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getVerTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getVerTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getVerTs_presult__isset { + _Hbase_getVerTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getVerTs_presult__isset; + +class Hbase_getVerTs_presult { + public: + + + virtual ~Hbase_getVerTs_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getVerTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRow_args__isset { + _Hbase_getRow_args__isset() : tableName(false), row(false), attributes(false) {} + bool tableName; + bool row; + bool attributes; +} _Hbase_getRow_args__isset; + +class Hbase_getRow_args { + public: + + Hbase_getRow_args() : tableName(""), row("") { + } + + virtual ~Hbase_getRow_args() throw() {} + + Text tableName; + Text row; + std::map attributes; + + _Hbase_getRow_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRow_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRow_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRow_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRow_pargs { + public: + + + virtual ~Hbase_getRow_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRow_result__isset { + _Hbase_getRow_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRow_result__isset; + +class Hbase_getRow_result { + public: + + Hbase_getRow_result() { + } + + virtual ~Hbase_getRow_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRow_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRow_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRow_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRow_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRow_presult__isset { + _Hbase_getRow_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRow_presult__isset; + +class Hbase_getRow_presult { + public: + + + virtual ~Hbase_getRow_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRow_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowWithColumns_args__isset { + _Hbase_getRowWithColumns_args__isset() : tableName(false), row(false), columns(false), attributes(false) {} + bool tableName; + bool row; + bool columns; + bool attributes; +} _Hbase_getRowWithColumns_args__isset; + +class Hbase_getRowWithColumns_args { + public: + + Hbase_getRowWithColumns_args() : tableName(""), row("") { + } + + virtual ~Hbase_getRowWithColumns_args() throw() {} + + Text tableName; + Text row; + std::vector columns; + std::map attributes; + + _Hbase_getRowWithColumns_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowWithColumns_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowWithColumns_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowWithColumns_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowWithColumns_pargs { + public: + + + virtual ~Hbase_getRowWithColumns_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::vector * columns; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowWithColumns_result__isset { + _Hbase_getRowWithColumns_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowWithColumns_result__isset; + +class Hbase_getRowWithColumns_result { + public: + + Hbase_getRowWithColumns_result() { + } + + virtual ~Hbase_getRowWithColumns_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowWithColumns_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowWithColumns_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowWithColumns_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowWithColumns_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowWithColumns_presult__isset { + _Hbase_getRowWithColumns_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowWithColumns_presult__isset; + +class Hbase_getRowWithColumns_presult { + public: + + + virtual ~Hbase_getRowWithColumns_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowWithColumns_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowTs_args__isset { + _Hbase_getRowTs_args__isset() : tableName(false), row(false), timestamp(false), attributes(false) {} + bool tableName; + bool row; + bool timestamp; + bool attributes; +} _Hbase_getRowTs_args__isset; + +class Hbase_getRowTs_args { + public: + + Hbase_getRowTs_args() : tableName(""), row(""), timestamp(0) { + } + + virtual ~Hbase_getRowTs_args() throw() {} + + Text tableName; + Text row; + int64_t timestamp; + std::map attributes; + + _Hbase_getRowTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowTs_pargs { + public: + + + virtual ~Hbase_getRowTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowTs_result__isset { + _Hbase_getRowTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowTs_result__isset; + +class Hbase_getRowTs_result { + public: + + Hbase_getRowTs_result() { + } + + virtual ~Hbase_getRowTs_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowTs_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowTs_presult__isset { + _Hbase_getRowTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowTs_presult__isset; + +class Hbase_getRowTs_presult { + public: + + + virtual ~Hbase_getRowTs_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowWithColumnsTs_args__isset { + _Hbase_getRowWithColumnsTs_args__isset() : tableName(false), row(false), columns(false), timestamp(false), attributes(false) {} + bool tableName; + bool row; + bool columns; + bool timestamp; + bool attributes; +} _Hbase_getRowWithColumnsTs_args__isset; + +class Hbase_getRowWithColumnsTs_args { + public: + + Hbase_getRowWithColumnsTs_args() : tableName(""), row(""), timestamp(0) { + } + + virtual ~Hbase_getRowWithColumnsTs_args() throw() {} + + Text tableName; + Text row; + std::vector columns; + int64_t timestamp; + std::map attributes; + + _Hbase_getRowWithColumnsTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowWithColumnsTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowWithColumnsTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowWithColumnsTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowWithColumnsTs_pargs { + public: + + + virtual ~Hbase_getRowWithColumnsTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::vector * columns; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowWithColumnsTs_result__isset { + _Hbase_getRowWithColumnsTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowWithColumnsTs_result__isset; + +class Hbase_getRowWithColumnsTs_result { + public: + + Hbase_getRowWithColumnsTs_result() { + } + + virtual ~Hbase_getRowWithColumnsTs_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowWithColumnsTs_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowWithColumnsTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowWithColumnsTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowWithColumnsTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowWithColumnsTs_presult__isset { + _Hbase_getRowWithColumnsTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowWithColumnsTs_presult__isset; + +class Hbase_getRowWithColumnsTs_presult { + public: + + + virtual ~Hbase_getRowWithColumnsTs_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowWithColumnsTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRows_args__isset { + _Hbase_getRows_args__isset() : tableName(false), rows(false), attributes(false) {} + bool tableName; + bool rows; + bool attributes; +} _Hbase_getRows_args__isset; + +class Hbase_getRows_args { + public: + + Hbase_getRows_args() : tableName("") { + } + + virtual ~Hbase_getRows_args() throw() {} + + Text tableName; + std::vector rows; + std::map attributes; + + _Hbase_getRows_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rows(const std::vector & val) { + rows = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRows_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rows == rhs.rows)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRows_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRows_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRows_pargs { + public: + + + virtual ~Hbase_getRows_pargs() throw() {} + + const Text* tableName; + const std::vector * rows; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRows_result__isset { + _Hbase_getRows_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRows_result__isset; + +class Hbase_getRows_result { + public: + + Hbase_getRows_result() { + } + + virtual ~Hbase_getRows_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRows_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRows_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRows_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRows_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRows_presult__isset { + _Hbase_getRows_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRows_presult__isset; + +class Hbase_getRows_presult { + public: + + + virtual ~Hbase_getRows_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRows_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowsWithColumns_args__isset { + _Hbase_getRowsWithColumns_args__isset() : tableName(false), rows(false), columns(false), attributes(false) {} + bool tableName; + bool rows; + bool columns; + bool attributes; +} _Hbase_getRowsWithColumns_args__isset; + +class Hbase_getRowsWithColumns_args { + public: + + Hbase_getRowsWithColumns_args() : tableName("") { + } + + virtual ~Hbase_getRowsWithColumns_args() throw() {} + + Text tableName; + std::vector rows; + std::vector columns; + std::map attributes; + + _Hbase_getRowsWithColumns_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rows(const std::vector & val) { + rows = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowsWithColumns_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rows == rhs.rows)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowsWithColumns_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsWithColumns_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowsWithColumns_pargs { + public: + + + virtual ~Hbase_getRowsWithColumns_pargs() throw() {} + + const Text* tableName; + const std::vector * rows; + const std::vector * columns; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsWithColumns_result__isset { + _Hbase_getRowsWithColumns_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsWithColumns_result__isset; + +class Hbase_getRowsWithColumns_result { + public: + + Hbase_getRowsWithColumns_result() { + } + + virtual ~Hbase_getRowsWithColumns_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowsWithColumns_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowsWithColumns_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowsWithColumns_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsWithColumns_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsWithColumns_presult__isset { + _Hbase_getRowsWithColumns_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsWithColumns_presult__isset; + +class Hbase_getRowsWithColumns_presult { + public: + + + virtual ~Hbase_getRowsWithColumns_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowsWithColumns_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowsTs_args__isset { + _Hbase_getRowsTs_args__isset() : tableName(false), rows(false), timestamp(false), attributes(false) {} + bool tableName; + bool rows; + bool timestamp; + bool attributes; +} _Hbase_getRowsTs_args__isset; + +class Hbase_getRowsTs_args { + public: + + Hbase_getRowsTs_args() : tableName(""), timestamp(0) { + } + + virtual ~Hbase_getRowsTs_args() throw() {} + + Text tableName; + std::vector rows; + int64_t timestamp; + std::map attributes; + + _Hbase_getRowsTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rows(const std::vector & val) { + rows = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowsTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rows == rhs.rows)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowsTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowsTs_pargs { + public: + + + virtual ~Hbase_getRowsTs_pargs() throw() {} + + const Text* tableName; + const std::vector * rows; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsTs_result__isset { + _Hbase_getRowsTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsTs_result__isset; + +class Hbase_getRowsTs_result { + public: + + Hbase_getRowsTs_result() { + } + + virtual ~Hbase_getRowsTs_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowsTs_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowsTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowsTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsTs_presult__isset { + _Hbase_getRowsTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsTs_presult__isset; + +class Hbase_getRowsTs_presult { + public: + + + virtual ~Hbase_getRowsTs_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowsTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowsWithColumnsTs_args__isset { + _Hbase_getRowsWithColumnsTs_args__isset() : tableName(false), rows(false), columns(false), timestamp(false), attributes(false) {} + bool tableName; + bool rows; + bool columns; + bool timestamp; + bool attributes; +} _Hbase_getRowsWithColumnsTs_args__isset; + +class Hbase_getRowsWithColumnsTs_args { + public: + + Hbase_getRowsWithColumnsTs_args() : tableName(""), timestamp(0) { + } + + virtual ~Hbase_getRowsWithColumnsTs_args() throw() {} + + Text tableName; + std::vector rows; + std::vector columns; + int64_t timestamp; + std::map attributes; + + _Hbase_getRowsWithColumnsTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rows(const std::vector & val) { + rows = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_getRowsWithColumnsTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rows == rhs.rows)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_getRowsWithColumnsTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsWithColumnsTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowsWithColumnsTs_pargs { + public: + + + virtual ~Hbase_getRowsWithColumnsTs_pargs() throw() {} + + const Text* tableName; + const std::vector * rows; + const std::vector * columns; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsWithColumnsTs_result__isset { + _Hbase_getRowsWithColumnsTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsWithColumnsTs_result__isset; + +class Hbase_getRowsWithColumnsTs_result { + public: + + Hbase_getRowsWithColumnsTs_result() { + } + + virtual ~Hbase_getRowsWithColumnsTs_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowsWithColumnsTs_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowsWithColumnsTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowsWithColumnsTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowsWithColumnsTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowsWithColumnsTs_presult__isset { + _Hbase_getRowsWithColumnsTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowsWithColumnsTs_presult__isset; + +class Hbase_getRowsWithColumnsTs_presult { + public: + + + virtual ~Hbase_getRowsWithColumnsTs_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowsWithColumnsTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_mutateRow_args__isset { + _Hbase_mutateRow_args__isset() : tableName(false), row(false), mutations(false), attributes(false) {} + bool tableName; + bool row; + bool mutations; + bool attributes; +} _Hbase_mutateRow_args__isset; + +class Hbase_mutateRow_args { + public: + + Hbase_mutateRow_args() : tableName(""), row("") { + } + + virtual ~Hbase_mutateRow_args() throw() {} + + Text tableName; + Text row; + std::vector mutations; + std::map attributes; + + _Hbase_mutateRow_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_mutations(const std::vector & val) { + mutations = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_mutateRow_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(mutations == rhs.mutations)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_mutateRow_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRow_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_mutateRow_pargs { + public: + + + virtual ~Hbase_mutateRow_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::vector * mutations; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRow_result__isset { + _Hbase_mutateRow_result__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRow_result__isset; + +class Hbase_mutateRow_result { + public: + + Hbase_mutateRow_result() { + } + + virtual ~Hbase_mutateRow_result() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRow_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_mutateRow_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_mutateRow_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRow_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRow_presult__isset { + _Hbase_mutateRow_presult__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRow_presult__isset; + +class Hbase_mutateRow_presult { + public: + + + virtual ~Hbase_mutateRow_presult() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRow_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_mutateRowTs_args__isset { + _Hbase_mutateRowTs_args__isset() : tableName(false), row(false), mutations(false), timestamp(false), attributes(false) {} + bool tableName; + bool row; + bool mutations; + bool timestamp; + bool attributes; +} _Hbase_mutateRowTs_args__isset; + +class Hbase_mutateRowTs_args { + public: + + Hbase_mutateRowTs_args() : tableName(""), row(""), timestamp(0) { + } + + virtual ~Hbase_mutateRowTs_args() throw() {} + + Text tableName; + Text row; + std::vector mutations; + int64_t timestamp; + std::map attributes; + + _Hbase_mutateRowTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_mutations(const std::vector & val) { + mutations = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_mutateRowTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(mutations == rhs.mutations)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_mutateRowTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRowTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_mutateRowTs_pargs { + public: + + + virtual ~Hbase_mutateRowTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::vector * mutations; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRowTs_result__isset { + _Hbase_mutateRowTs_result__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRowTs_result__isset; + +class Hbase_mutateRowTs_result { + public: + + Hbase_mutateRowTs_result() { + } + + virtual ~Hbase_mutateRowTs_result() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRowTs_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_mutateRowTs_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_mutateRowTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRowTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRowTs_presult__isset { + _Hbase_mutateRowTs_presult__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRowTs_presult__isset; + +class Hbase_mutateRowTs_presult { + public: + + + virtual ~Hbase_mutateRowTs_presult() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRowTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_mutateRows_args__isset { + _Hbase_mutateRows_args__isset() : tableName(false), rowBatches(false), attributes(false) {} + bool tableName; + bool rowBatches; + bool attributes; +} _Hbase_mutateRows_args__isset; + +class Hbase_mutateRows_args { + public: + + Hbase_mutateRows_args() : tableName("") { + } + + virtual ~Hbase_mutateRows_args() throw() {} + + Text tableName; + std::vector rowBatches; + std::map attributes; + + _Hbase_mutateRows_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rowBatches(const std::vector & val) { + rowBatches = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_mutateRows_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rowBatches == rhs.rowBatches)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_mutateRows_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRows_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_mutateRows_pargs { + public: + + + virtual ~Hbase_mutateRows_pargs() throw() {} + + const Text* tableName; + const std::vector * rowBatches; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRows_result__isset { + _Hbase_mutateRows_result__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRows_result__isset; + +class Hbase_mutateRows_result { + public: + + Hbase_mutateRows_result() { + } + + virtual ~Hbase_mutateRows_result() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRows_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_mutateRows_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_mutateRows_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRows_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRows_presult__isset { + _Hbase_mutateRows_presult__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRows_presult__isset; + +class Hbase_mutateRows_presult { + public: + + + virtual ~Hbase_mutateRows_presult() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRows_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_mutateRowsTs_args__isset { + _Hbase_mutateRowsTs_args__isset() : tableName(false), rowBatches(false), timestamp(false), attributes(false) {} + bool tableName; + bool rowBatches; + bool timestamp; + bool attributes; +} _Hbase_mutateRowsTs_args__isset; + +class Hbase_mutateRowsTs_args { + public: + + Hbase_mutateRowsTs_args() : tableName(""), timestamp(0) { + } + + virtual ~Hbase_mutateRowsTs_args() throw() {} + + Text tableName; + std::vector rowBatches; + int64_t timestamp; + std::map attributes; + + _Hbase_mutateRowsTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_rowBatches(const std::vector & val) { + rowBatches = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_mutateRowsTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(rowBatches == rhs.rowBatches)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_mutateRowsTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRowsTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_mutateRowsTs_pargs { + public: + + + virtual ~Hbase_mutateRowsTs_pargs() throw() {} + + const Text* tableName; + const std::vector * rowBatches; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRowsTs_result__isset { + _Hbase_mutateRowsTs_result__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRowsTs_result__isset; + +class Hbase_mutateRowsTs_result { + public: + + Hbase_mutateRowsTs_result() { + } + + virtual ~Hbase_mutateRowsTs_result() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRowsTs_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_mutateRowsTs_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_mutateRowsTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_mutateRowsTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_mutateRowsTs_presult__isset { + _Hbase_mutateRowsTs_presult__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_mutateRowsTs_presult__isset; + +class Hbase_mutateRowsTs_presult { + public: + + + virtual ~Hbase_mutateRowsTs_presult() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_mutateRowsTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_atomicIncrement_args__isset { + _Hbase_atomicIncrement_args__isset() : tableName(false), row(false), column(false), value(false) {} + bool tableName; + bool row; + bool column; + bool value; +} _Hbase_atomicIncrement_args__isset; + +class Hbase_atomicIncrement_args { + public: + + Hbase_atomicIncrement_args() : tableName(""), row(""), column(""), value(0) { + } + + virtual ~Hbase_atomicIncrement_args() throw() {} + + Text tableName; + Text row; + Text column; + int64_t value; + + _Hbase_atomicIncrement_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_value(const int64_t val) { + value = val; + } + + bool operator == (const Hbase_atomicIncrement_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(value == rhs.value)) + return false; + return true; + } + bool operator != (const Hbase_atomicIncrement_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_atomicIncrement_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_atomicIncrement_pargs { + public: + + + virtual ~Hbase_atomicIncrement_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const int64_t* value; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_atomicIncrement_result__isset { + _Hbase_atomicIncrement_result__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_atomicIncrement_result__isset; + +class Hbase_atomicIncrement_result { + public: + + Hbase_atomicIncrement_result() : success(0) { + } + + virtual ~Hbase_atomicIncrement_result() throw() {} + + int64_t success; + IOError io; + IllegalArgument ia; + + _Hbase_atomicIncrement_result__isset __isset; + + void __set_success(const int64_t val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_atomicIncrement_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_atomicIncrement_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_atomicIncrement_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_atomicIncrement_presult__isset { + _Hbase_atomicIncrement_presult__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_atomicIncrement_presult__isset; + +class Hbase_atomicIncrement_presult { + public: + + + virtual ~Hbase_atomicIncrement_presult() throw() {} + + int64_t* success; + IOError io; + IllegalArgument ia; + + _Hbase_atomicIncrement_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_deleteAll_args__isset { + _Hbase_deleteAll_args__isset() : tableName(false), row(false), column(false), attributes(false) {} + bool tableName; + bool row; + bool column; + bool attributes; +} _Hbase_deleteAll_args__isset; + +class Hbase_deleteAll_args { + public: + + Hbase_deleteAll_args() : tableName(""), row(""), column("") { + } + + virtual ~Hbase_deleteAll_args() throw() {} + + Text tableName; + Text row; + Text column; + std::map attributes; + + _Hbase_deleteAll_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_deleteAll_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_deleteAll_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAll_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_deleteAll_pargs { + public: + + + virtual ~Hbase_deleteAll_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAll_result__isset { + _Hbase_deleteAll_result__isset() : io(false) {} + bool io; +} _Hbase_deleteAll_result__isset; + +class Hbase_deleteAll_result { + public: + + Hbase_deleteAll_result() { + } + + virtual ~Hbase_deleteAll_result() throw() {} + + IOError io; + + _Hbase_deleteAll_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_deleteAll_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_deleteAll_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAll_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAll_presult__isset { + _Hbase_deleteAll_presult__isset() : io(false) {} + bool io; +} _Hbase_deleteAll_presult__isset; + +class Hbase_deleteAll_presult { + public: + + + virtual ~Hbase_deleteAll_presult() throw() {} + + IOError io; + + _Hbase_deleteAll_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_deleteAllTs_args__isset { + _Hbase_deleteAllTs_args__isset() : tableName(false), row(false), column(false), timestamp(false), attributes(false) {} + bool tableName; + bool row; + bool column; + bool timestamp; + bool attributes; +} _Hbase_deleteAllTs_args__isset; + +class Hbase_deleteAllTs_args { + public: + + Hbase_deleteAllTs_args() : tableName(""), row(""), column(""), timestamp(0) { + } + + virtual ~Hbase_deleteAllTs_args() throw() {} + + Text tableName; + Text row; + Text column; + int64_t timestamp; + std::map attributes; + + _Hbase_deleteAllTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_deleteAllTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_deleteAllTs_pargs { + public: + + + virtual ~Hbase_deleteAllTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* column; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllTs_result__isset { + _Hbase_deleteAllTs_result__isset() : io(false) {} + bool io; +} _Hbase_deleteAllTs_result__isset; + +class Hbase_deleteAllTs_result { + public: + + Hbase_deleteAllTs_result() { + } + + virtual ~Hbase_deleteAllTs_result() throw() {} + + IOError io; + + _Hbase_deleteAllTs_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_deleteAllTs_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllTs_presult__isset { + _Hbase_deleteAllTs_presult__isset() : io(false) {} + bool io; +} _Hbase_deleteAllTs_presult__isset; + +class Hbase_deleteAllTs_presult { + public: + + + virtual ~Hbase_deleteAllTs_presult() throw() {} + + IOError io; + + _Hbase_deleteAllTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_deleteAllRow_args__isset { + _Hbase_deleteAllRow_args__isset() : tableName(false), row(false), attributes(false) {} + bool tableName; + bool row; + bool attributes; +} _Hbase_deleteAllRow_args__isset; + +class Hbase_deleteAllRow_args { + public: + + Hbase_deleteAllRow_args() : tableName(""), row("") { + } + + virtual ~Hbase_deleteAllRow_args() throw() {} + + Text tableName; + Text row; + std::map attributes; + + _Hbase_deleteAllRow_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_deleteAllRow_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllRow_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllRow_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_deleteAllRow_pargs { + public: + + + virtual ~Hbase_deleteAllRow_pargs() throw() {} + + const Text* tableName; + const Text* row; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllRow_result__isset { + _Hbase_deleteAllRow_result__isset() : io(false) {} + bool io; +} _Hbase_deleteAllRow_result__isset; + +class Hbase_deleteAllRow_result { + public: + + Hbase_deleteAllRow_result() { + } + + virtual ~Hbase_deleteAllRow_result() throw() {} + + IOError io; + + _Hbase_deleteAllRow_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_deleteAllRow_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllRow_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllRow_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllRow_presult__isset { + _Hbase_deleteAllRow_presult__isset() : io(false) {} + bool io; +} _Hbase_deleteAllRow_presult__isset; + +class Hbase_deleteAllRow_presult { + public: + + + virtual ~Hbase_deleteAllRow_presult() throw() {} + + IOError io; + + _Hbase_deleteAllRow_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_increment_args__isset { + _Hbase_increment_args__isset() : increment(false) {} + bool increment; +} _Hbase_increment_args__isset; + +class Hbase_increment_args { + public: + + Hbase_increment_args() { + } + + virtual ~Hbase_increment_args() throw() {} + + TIncrement increment; + + _Hbase_increment_args__isset __isset; + + void __set_increment(const TIncrement& val) { + increment = val; + } + + bool operator == (const Hbase_increment_args & rhs) const + { + if (!(increment == rhs.increment)) + return false; + return true; + } + bool operator != (const Hbase_increment_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_increment_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_increment_pargs { + public: + + + virtual ~Hbase_increment_pargs() throw() {} + + const TIncrement* increment; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_increment_result__isset { + _Hbase_increment_result__isset() : io(false) {} + bool io; +} _Hbase_increment_result__isset; + +class Hbase_increment_result { + public: + + Hbase_increment_result() { + } + + virtual ~Hbase_increment_result() throw() {} + + IOError io; + + _Hbase_increment_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_increment_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_increment_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_increment_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_increment_presult__isset { + _Hbase_increment_presult__isset() : io(false) {} + bool io; +} _Hbase_increment_presult__isset; + +class Hbase_increment_presult { + public: + + + virtual ~Hbase_increment_presult() throw() {} + + IOError io; + + _Hbase_increment_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_incrementRows_args__isset { + _Hbase_incrementRows_args__isset() : increments(false) {} + bool increments; +} _Hbase_incrementRows_args__isset; + +class Hbase_incrementRows_args { + public: + + Hbase_incrementRows_args() { + } + + virtual ~Hbase_incrementRows_args() throw() {} + + std::vector increments; + + _Hbase_incrementRows_args__isset __isset; + + void __set_increments(const std::vector & val) { + increments = val; + } + + bool operator == (const Hbase_incrementRows_args & rhs) const + { + if (!(increments == rhs.increments)) + return false; + return true; + } + bool operator != (const Hbase_incrementRows_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_incrementRows_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_incrementRows_pargs { + public: + + + virtual ~Hbase_incrementRows_pargs() throw() {} + + const std::vector * increments; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_incrementRows_result__isset { + _Hbase_incrementRows_result__isset() : io(false) {} + bool io; +} _Hbase_incrementRows_result__isset; + +class Hbase_incrementRows_result { + public: + + Hbase_incrementRows_result() { + } + + virtual ~Hbase_incrementRows_result() throw() {} + + IOError io; + + _Hbase_incrementRows_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_incrementRows_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_incrementRows_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_incrementRows_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_incrementRows_presult__isset { + _Hbase_incrementRows_presult__isset() : io(false) {} + bool io; +} _Hbase_incrementRows_presult__isset; + +class Hbase_incrementRows_presult { + public: + + + virtual ~Hbase_incrementRows_presult() throw() {} + + IOError io; + + _Hbase_incrementRows_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_deleteAllRowTs_args__isset { + _Hbase_deleteAllRowTs_args__isset() : tableName(false), row(false), timestamp(false), attributes(false) {} + bool tableName; + bool row; + bool timestamp; + bool attributes; +} _Hbase_deleteAllRowTs_args__isset; + +class Hbase_deleteAllRowTs_args { + public: + + Hbase_deleteAllRowTs_args() : tableName(""), row(""), timestamp(0) { + } + + virtual ~Hbase_deleteAllRowTs_args() throw() {} + + Text tableName; + Text row; + int64_t timestamp; + std::map attributes; + + _Hbase_deleteAllRowTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_deleteAllRowTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllRowTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllRowTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_deleteAllRowTs_pargs { + public: + + + virtual ~Hbase_deleteAllRowTs_pargs() throw() {} + + const Text* tableName; + const Text* row; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllRowTs_result__isset { + _Hbase_deleteAllRowTs_result__isset() : io(false) {} + bool io; +} _Hbase_deleteAllRowTs_result__isset; + +class Hbase_deleteAllRowTs_result { + public: + + Hbase_deleteAllRowTs_result() { + } + + virtual ~Hbase_deleteAllRowTs_result() throw() {} + + IOError io; + + _Hbase_deleteAllRowTs_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_deleteAllRowTs_result & rhs) const + { + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_deleteAllRowTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_deleteAllRowTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_deleteAllRowTs_presult__isset { + _Hbase_deleteAllRowTs_presult__isset() : io(false) {} + bool io; +} _Hbase_deleteAllRowTs_presult__isset; + +class Hbase_deleteAllRowTs_presult { + public: + + + virtual ~Hbase_deleteAllRowTs_presult() throw() {} + + IOError io; + + _Hbase_deleteAllRowTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpenWithScan_args__isset { + _Hbase_scannerOpenWithScan_args__isset() : tableName(false), scan(false), attributes(false) {} + bool tableName; + bool scan; + bool attributes; +} _Hbase_scannerOpenWithScan_args__isset; + +class Hbase_scannerOpenWithScan_args { + public: + + Hbase_scannerOpenWithScan_args() : tableName("") { + } + + virtual ~Hbase_scannerOpenWithScan_args() throw() {} + + Text tableName; + TScan scan; + std::map attributes; + + _Hbase_scannerOpenWithScan_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_scan(const TScan& val) { + scan = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpenWithScan_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(scan == rhs.scan)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithScan_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithScan_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpenWithScan_pargs { + public: + + + virtual ~Hbase_scannerOpenWithScan_pargs() throw() {} + + const Text* tableName; + const TScan* scan; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithScan_result__isset { + _Hbase_scannerOpenWithScan_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithScan_result__isset; + +class Hbase_scannerOpenWithScan_result { + public: + + Hbase_scannerOpenWithScan_result() : success(0) { + } + + virtual ~Hbase_scannerOpenWithScan_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpenWithScan_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpenWithScan_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithScan_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithScan_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithScan_presult__isset { + _Hbase_scannerOpenWithScan_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithScan_presult__isset; + +class Hbase_scannerOpenWithScan_presult { + public: + + + virtual ~Hbase_scannerOpenWithScan_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpenWithScan_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpen_args__isset { + _Hbase_scannerOpen_args__isset() : tableName(false), startRow(false), columns(false), attributes(false) {} + bool tableName; + bool startRow; + bool columns; + bool attributes; +} _Hbase_scannerOpen_args__isset; + +class Hbase_scannerOpen_args { + public: + + Hbase_scannerOpen_args() : tableName(""), startRow("") { + } + + virtual ~Hbase_scannerOpen_args() throw() {} + + Text tableName; + Text startRow; + std::vector columns; + std::map attributes; + + _Hbase_scannerOpen_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_startRow(const Text& val) { + startRow = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpen_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpen_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpen_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpen_pargs { + public: + + + virtual ~Hbase_scannerOpen_pargs() throw() {} + + const Text* tableName; + const Text* startRow; + const std::vector * columns; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpen_result__isset { + _Hbase_scannerOpen_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpen_result__isset; + +class Hbase_scannerOpen_result { + public: + + Hbase_scannerOpen_result() : success(0) { + } + + virtual ~Hbase_scannerOpen_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpen_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpen_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpen_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpen_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpen_presult__isset { + _Hbase_scannerOpen_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpen_presult__isset; + +class Hbase_scannerOpen_presult { + public: + + + virtual ~Hbase_scannerOpen_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpen_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpenWithStop_args__isset { + _Hbase_scannerOpenWithStop_args__isset() : tableName(false), startRow(false), stopRow(false), columns(false), attributes(false) {} + bool tableName; + bool startRow; + bool stopRow; + bool columns; + bool attributes; +} _Hbase_scannerOpenWithStop_args__isset; + +class Hbase_scannerOpenWithStop_args { + public: + + Hbase_scannerOpenWithStop_args() : tableName(""), startRow(""), stopRow("") { + } + + virtual ~Hbase_scannerOpenWithStop_args() throw() {} + + Text tableName; + Text startRow; + Text stopRow; + std::vector columns; + std::map attributes; + + _Hbase_scannerOpenWithStop_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_startRow(const Text& val) { + startRow = val; + } + + void __set_stopRow(const Text& val) { + stopRow = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpenWithStop_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(stopRow == rhs.stopRow)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithStop_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithStop_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpenWithStop_pargs { + public: + + + virtual ~Hbase_scannerOpenWithStop_pargs() throw() {} + + const Text* tableName; + const Text* startRow; + const Text* stopRow; + const std::vector * columns; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithStop_result__isset { + _Hbase_scannerOpenWithStop_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithStop_result__isset; + +class Hbase_scannerOpenWithStop_result { + public: + + Hbase_scannerOpenWithStop_result() : success(0) { + } + + virtual ~Hbase_scannerOpenWithStop_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpenWithStop_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpenWithStop_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithStop_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithStop_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithStop_presult__isset { + _Hbase_scannerOpenWithStop_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithStop_presult__isset; + +class Hbase_scannerOpenWithStop_presult { + public: + + + virtual ~Hbase_scannerOpenWithStop_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpenWithStop_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpenWithPrefix_args__isset { + _Hbase_scannerOpenWithPrefix_args__isset() : tableName(false), startAndPrefix(false), columns(false), attributes(false) {} + bool tableName; + bool startAndPrefix; + bool columns; + bool attributes; +} _Hbase_scannerOpenWithPrefix_args__isset; + +class Hbase_scannerOpenWithPrefix_args { + public: + + Hbase_scannerOpenWithPrefix_args() : tableName(""), startAndPrefix("") { + } + + virtual ~Hbase_scannerOpenWithPrefix_args() throw() {} + + Text tableName; + Text startAndPrefix; + std::vector columns; + std::map attributes; + + _Hbase_scannerOpenWithPrefix_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_startAndPrefix(const Text& val) { + startAndPrefix = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpenWithPrefix_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(startAndPrefix == rhs.startAndPrefix)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithPrefix_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithPrefix_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpenWithPrefix_pargs { + public: + + + virtual ~Hbase_scannerOpenWithPrefix_pargs() throw() {} + + const Text* tableName; + const Text* startAndPrefix; + const std::vector * columns; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithPrefix_result__isset { + _Hbase_scannerOpenWithPrefix_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithPrefix_result__isset; + +class Hbase_scannerOpenWithPrefix_result { + public: + + Hbase_scannerOpenWithPrefix_result() : success(0) { + } + + virtual ~Hbase_scannerOpenWithPrefix_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpenWithPrefix_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpenWithPrefix_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithPrefix_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithPrefix_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithPrefix_presult__isset { + _Hbase_scannerOpenWithPrefix_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithPrefix_presult__isset; + +class Hbase_scannerOpenWithPrefix_presult { + public: + + + virtual ~Hbase_scannerOpenWithPrefix_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpenWithPrefix_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpenTs_args__isset { + _Hbase_scannerOpenTs_args__isset() : tableName(false), startRow(false), columns(false), timestamp(false), attributes(false) {} + bool tableName; + bool startRow; + bool columns; + bool timestamp; + bool attributes; +} _Hbase_scannerOpenTs_args__isset; + +class Hbase_scannerOpenTs_args { + public: + + Hbase_scannerOpenTs_args() : tableName(""), startRow(""), timestamp(0) { + } + + virtual ~Hbase_scannerOpenTs_args() throw() {} + + Text tableName; + Text startRow; + std::vector columns; + int64_t timestamp; + std::map attributes; + + _Hbase_scannerOpenTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_startRow(const Text& val) { + startRow = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpenTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpenTs_pargs { + public: + + + virtual ~Hbase_scannerOpenTs_pargs() throw() {} + + const Text* tableName; + const Text* startRow; + const std::vector * columns; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenTs_result__isset { + _Hbase_scannerOpenTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenTs_result__isset; + +class Hbase_scannerOpenTs_result { + public: + + Hbase_scannerOpenTs_result() : success(0) { + } + + virtual ~Hbase_scannerOpenTs_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpenTs_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpenTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenTs_presult__isset { + _Hbase_scannerOpenTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenTs_presult__isset; + +class Hbase_scannerOpenTs_presult { + public: + + + virtual ~Hbase_scannerOpenTs_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpenTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerOpenWithStopTs_args__isset { + _Hbase_scannerOpenWithStopTs_args__isset() : tableName(false), startRow(false), stopRow(false), columns(false), timestamp(false), attributes(false) {} + bool tableName; + bool startRow; + bool stopRow; + bool columns; + bool timestamp; + bool attributes; +} _Hbase_scannerOpenWithStopTs_args__isset; + +class Hbase_scannerOpenWithStopTs_args { + public: + + Hbase_scannerOpenWithStopTs_args() : tableName(""), startRow(""), stopRow(""), timestamp(0) { + } + + virtual ~Hbase_scannerOpenWithStopTs_args() throw() {} + + Text tableName; + Text startRow; + Text stopRow; + std::vector columns; + int64_t timestamp; + std::map attributes; + + _Hbase_scannerOpenWithStopTs_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_startRow(const Text& val) { + startRow = val; + } + + void __set_stopRow(const Text& val) { + stopRow = val; + } + + void __set_columns(const std::vector & val) { + columns = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + void __set_attributes(const std::map & val) { + attributes = val; + } + + bool operator == (const Hbase_scannerOpenWithStopTs_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(startRow == rhs.startRow)) + return false; + if (!(stopRow == rhs.stopRow)) + return false; + if (!(columns == rhs.columns)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + if (!(attributes == rhs.attributes)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithStopTs_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithStopTs_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerOpenWithStopTs_pargs { + public: + + + virtual ~Hbase_scannerOpenWithStopTs_pargs() throw() {} + + const Text* tableName; + const Text* startRow; + const Text* stopRow; + const std::vector * columns; + const int64_t* timestamp; + const std::map * attributes; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithStopTs_result__isset { + _Hbase_scannerOpenWithStopTs_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithStopTs_result__isset; + +class Hbase_scannerOpenWithStopTs_result { + public: + + Hbase_scannerOpenWithStopTs_result() : success(0) { + } + + virtual ~Hbase_scannerOpenWithStopTs_result() throw() {} + + ScannerID success; + IOError io; + + _Hbase_scannerOpenWithStopTs_result__isset __isset; + + void __set_success(const ScannerID val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_scannerOpenWithStopTs_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_scannerOpenWithStopTs_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerOpenWithStopTs_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerOpenWithStopTs_presult__isset { + _Hbase_scannerOpenWithStopTs_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_scannerOpenWithStopTs_presult__isset; + +class Hbase_scannerOpenWithStopTs_presult { + public: + + + virtual ~Hbase_scannerOpenWithStopTs_presult() throw() {} + + ScannerID* success; + IOError io; + + _Hbase_scannerOpenWithStopTs_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerGet_args__isset { + _Hbase_scannerGet_args__isset() : id(false) {} + bool id; +} _Hbase_scannerGet_args__isset; + +class Hbase_scannerGet_args { + public: + + Hbase_scannerGet_args() : id(0) { + } + + virtual ~Hbase_scannerGet_args() throw() {} + + ScannerID id; + + _Hbase_scannerGet_args__isset __isset; + + void __set_id(const ScannerID val) { + id = val; + } + + bool operator == (const Hbase_scannerGet_args & rhs) const + { + if (!(id == rhs.id)) + return false; + return true; + } + bool operator != (const Hbase_scannerGet_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerGet_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerGet_pargs { + public: + + + virtual ~Hbase_scannerGet_pargs() throw() {} + + const ScannerID* id; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerGet_result__isset { + _Hbase_scannerGet_result__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_scannerGet_result__isset; + +class Hbase_scannerGet_result { + public: + + Hbase_scannerGet_result() { + } + + virtual ~Hbase_scannerGet_result() throw() {} + + std::vector success; + IOError io; + IllegalArgument ia; + + _Hbase_scannerGet_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_scannerGet_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_scannerGet_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerGet_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerGet_presult__isset { + _Hbase_scannerGet_presult__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_scannerGet_presult__isset; + +class Hbase_scannerGet_presult { + public: + + + virtual ~Hbase_scannerGet_presult() throw() {} + + std::vector * success; + IOError io; + IllegalArgument ia; + + _Hbase_scannerGet_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerGetList_args__isset { + _Hbase_scannerGetList_args__isset() : id(false), nbRows(false) {} + bool id; + bool nbRows; +} _Hbase_scannerGetList_args__isset; + +class Hbase_scannerGetList_args { + public: + + Hbase_scannerGetList_args() : id(0), nbRows(0) { + } + + virtual ~Hbase_scannerGetList_args() throw() {} + + ScannerID id; + int32_t nbRows; + + _Hbase_scannerGetList_args__isset __isset; + + void __set_id(const ScannerID val) { + id = val; + } + + void __set_nbRows(const int32_t val) { + nbRows = val; + } + + bool operator == (const Hbase_scannerGetList_args & rhs) const + { + if (!(id == rhs.id)) + return false; + if (!(nbRows == rhs.nbRows)) + return false; + return true; + } + bool operator != (const Hbase_scannerGetList_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerGetList_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerGetList_pargs { + public: + + + virtual ~Hbase_scannerGetList_pargs() throw() {} + + const ScannerID* id; + const int32_t* nbRows; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerGetList_result__isset { + _Hbase_scannerGetList_result__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_scannerGetList_result__isset; + +class Hbase_scannerGetList_result { + public: + + Hbase_scannerGetList_result() { + } + + virtual ~Hbase_scannerGetList_result() throw() {} + + std::vector success; + IOError io; + IllegalArgument ia; + + _Hbase_scannerGetList_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_scannerGetList_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_scannerGetList_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerGetList_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerGetList_presult__isset { + _Hbase_scannerGetList_presult__isset() : success(false), io(false), ia(false) {} + bool success; + bool io; + bool ia; +} _Hbase_scannerGetList_presult__isset; + +class Hbase_scannerGetList_presult { + public: + + + virtual ~Hbase_scannerGetList_presult() throw() {} + + std::vector * success; + IOError io; + IllegalArgument ia; + + _Hbase_scannerGetList_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_scannerClose_args__isset { + _Hbase_scannerClose_args__isset() : id(false) {} + bool id; +} _Hbase_scannerClose_args__isset; + +class Hbase_scannerClose_args { + public: + + Hbase_scannerClose_args() : id(0) { + } + + virtual ~Hbase_scannerClose_args() throw() {} + + ScannerID id; + + _Hbase_scannerClose_args__isset __isset; + + void __set_id(const ScannerID val) { + id = val; + } + + bool operator == (const Hbase_scannerClose_args & rhs) const + { + if (!(id == rhs.id)) + return false; + return true; + } + bool operator != (const Hbase_scannerClose_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerClose_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_scannerClose_pargs { + public: + + + virtual ~Hbase_scannerClose_pargs() throw() {} + + const ScannerID* id; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerClose_result__isset { + _Hbase_scannerClose_result__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_scannerClose_result__isset; + +class Hbase_scannerClose_result { + public: + + Hbase_scannerClose_result() { + } + + virtual ~Hbase_scannerClose_result() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_scannerClose_result__isset __isset; + + void __set_io(const IOError& val) { + io = val; + } + + void __set_ia(const IllegalArgument& val) { + ia = val; + } + + bool operator == (const Hbase_scannerClose_result & rhs) const + { + if (!(io == rhs.io)) + return false; + if (!(ia == rhs.ia)) + return false; + return true; + } + bool operator != (const Hbase_scannerClose_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_scannerClose_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_scannerClose_presult__isset { + _Hbase_scannerClose_presult__isset() : io(false), ia(false) {} + bool io; + bool ia; +} _Hbase_scannerClose_presult__isset; + +class Hbase_scannerClose_presult { + public: + + + virtual ~Hbase_scannerClose_presult() throw() {} + + IOError io; + IllegalArgument ia; + + _Hbase_scannerClose_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRowOrBefore_args__isset { + _Hbase_getRowOrBefore_args__isset() : tableName(false), row(false), family(false) {} + bool tableName; + bool row; + bool family; +} _Hbase_getRowOrBefore_args__isset; + +class Hbase_getRowOrBefore_args { + public: + + Hbase_getRowOrBefore_args() : tableName(""), row(""), family("") { + } + + virtual ~Hbase_getRowOrBefore_args() throw() {} + + Text tableName; + Text row; + Text family; + + _Hbase_getRowOrBefore_args__isset __isset; + + void __set_tableName(const Text& val) { + tableName = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_family(const Text& val) { + family = val; + } + + bool operator == (const Hbase_getRowOrBefore_args & rhs) const + { + if (!(tableName == rhs.tableName)) + return false; + if (!(row == rhs.row)) + return false; + if (!(family == rhs.family)) + return false; + return true; + } + bool operator != (const Hbase_getRowOrBefore_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowOrBefore_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRowOrBefore_pargs { + public: + + + virtual ~Hbase_getRowOrBefore_pargs() throw() {} + + const Text* tableName; + const Text* row; + const Text* family; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowOrBefore_result__isset { + _Hbase_getRowOrBefore_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowOrBefore_result__isset; + +class Hbase_getRowOrBefore_result { + public: + + Hbase_getRowOrBefore_result() { + } + + virtual ~Hbase_getRowOrBefore_result() throw() {} + + std::vector success; + IOError io; + + _Hbase_getRowOrBefore_result__isset __isset; + + void __set_success(const std::vector & val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRowOrBefore_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRowOrBefore_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRowOrBefore_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRowOrBefore_presult__isset { + _Hbase_getRowOrBefore_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRowOrBefore_presult__isset; + +class Hbase_getRowOrBefore_presult { + public: + + + virtual ~Hbase_getRowOrBefore_presult() throw() {} + + std::vector * success; + IOError io; + + _Hbase_getRowOrBefore_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +typedef struct _Hbase_getRegionInfo_args__isset { + _Hbase_getRegionInfo_args__isset() : row(false) {} + bool row; +} _Hbase_getRegionInfo_args__isset; + +class Hbase_getRegionInfo_args { + public: + + Hbase_getRegionInfo_args() : row("") { + } + + virtual ~Hbase_getRegionInfo_args() throw() {} + + Text row; + + _Hbase_getRegionInfo_args__isset __isset; + + void __set_row(const Text& val) { + row = val; + } + + bool operator == (const Hbase_getRegionInfo_args & rhs) const + { + if (!(row == rhs.row)) + return false; + return true; + } + bool operator != (const Hbase_getRegionInfo_args &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRegionInfo_args & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + + +class Hbase_getRegionInfo_pargs { + public: + + + virtual ~Hbase_getRegionInfo_pargs() throw() {} + + const Text* row; + + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRegionInfo_result__isset { + _Hbase_getRegionInfo_result__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRegionInfo_result__isset; + +class Hbase_getRegionInfo_result { + public: + + Hbase_getRegionInfo_result() { + } + + virtual ~Hbase_getRegionInfo_result() throw() {} + + TRegionInfo success; + IOError io; + + _Hbase_getRegionInfo_result__isset __isset; + + void __set_success(const TRegionInfo& val) { + success = val; + } + + void __set_io(const IOError& val) { + io = val; + } + + bool operator == (const Hbase_getRegionInfo_result & rhs) const + { + if (!(success == rhs.success)) + return false; + if (!(io == rhs.io)) + return false; + return true; + } + bool operator != (const Hbase_getRegionInfo_result &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Hbase_getRegionInfo_result & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Hbase_getRegionInfo_presult__isset { + _Hbase_getRegionInfo_presult__isset() : success(false), io(false) {} + bool success; + bool io; +} _Hbase_getRegionInfo_presult__isset; + +class Hbase_getRegionInfo_presult { + public: + + + virtual ~Hbase_getRegionInfo_presult() throw() {} + + TRegionInfo* success; + IOError io; + + _Hbase_getRegionInfo_presult__isset __isset; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + +}; + +class HbaseClient : virtual public HbaseIf { + public: + HbaseClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> prot) : + piprot_(prot), + poprot_(prot) { + iprot_ = prot.get(); + oprot_ = prot.get(); + } + HbaseClient(boost::shared_ptr< ::apache::thrift::protocol::TProtocol> iprot, boost::shared_ptr< ::apache::thrift::protocol::TProtocol> oprot) : + piprot_(iprot), + poprot_(oprot) { + iprot_ = iprot.get(); + oprot_ = oprot.get(); + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getInputProtocol() { + return piprot_; + } + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> getOutputProtocol() { + return poprot_; + } + void enableTable(const Bytes& tableName); + void send_enableTable(const Bytes& tableName); + void recv_enableTable(); + void disableTable(const Bytes& tableName); + void send_disableTable(const Bytes& tableName); + void recv_disableTable(); + bool isTableEnabled(const Bytes& tableName); + void send_isTableEnabled(const Bytes& tableName); + bool recv_isTableEnabled(); + void compact(const Bytes& tableNameOrRegionName); + void send_compact(const Bytes& tableNameOrRegionName); + void recv_compact(); + void majorCompact(const Bytes& tableNameOrRegionName); + void send_majorCompact(const Bytes& tableNameOrRegionName); + void recv_majorCompact(); + void getTableNames(std::vector & _return); + void send_getTableNames(); + void recv_getTableNames(std::vector & _return); + void getColumnDescriptors(std::map & _return, const Text& tableName); + void send_getColumnDescriptors(const Text& tableName); + void recv_getColumnDescriptors(std::map & _return); + void getTableRegions(std::vector & _return, const Text& tableName); + void send_getTableRegions(const Text& tableName); + void recv_getTableRegions(std::vector & _return); + void createTable(const Text& tableName, const std::vector & columnFamilies); + void send_createTable(const Text& tableName, const std::vector & columnFamilies); + void recv_createTable(); + void deleteTable(const Text& tableName); + void send_deleteTable(const Text& tableName); + void recv_deleteTable(); + void get(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const std::map & attributes); + void send_get(const Text& tableName, const Text& row, const Text& column, const std::map & attributes); + void recv_get(std::vector & _return); + void getVer(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes); + void send_getVer(const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes); + void recv_getVer(std::vector & _return); + void getVerTs(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes); + void send_getVerTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes); + void recv_getVerTs(std::vector & _return); + void getRow(std::vector & _return, const Text& tableName, const Text& row, const std::map & attributes); + void send_getRow(const Text& tableName, const Text& row, const std::map & attributes); + void recv_getRow(std::vector & _return); + void getRowWithColumns(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes); + void send_getRowWithColumns(const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes); + void recv_getRowWithColumns(std::vector & _return); + void getRowTs(std::vector & _return, const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes); + void send_getRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes); + void recv_getRowTs(std::vector & _return); + void getRowWithColumnsTs(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void send_getRowWithColumnsTs(const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void recv_getRowWithColumnsTs(std::vector & _return); + void getRows(std::vector & _return, const Text& tableName, const std::vector & rows, const std::map & attributes); + void send_getRows(const Text& tableName, const std::vector & rows, const std::map & attributes); + void recv_getRows(std::vector & _return); + void getRowsWithColumns(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes); + void send_getRowsWithColumns(const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes); + void recv_getRowsWithColumns(std::vector & _return); + void getRowsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes); + void send_getRowsTs(const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes); + void recv_getRowsTs(std::vector & _return); + void getRowsWithColumnsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void send_getRowsWithColumnsTs(const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void recv_getRowsWithColumnsTs(std::vector & _return); + void mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes); + void send_mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes); + void recv_mutateRow(); + void mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes); + void send_mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes); + void recv_mutateRowTs(); + void mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes); + void send_mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes); + void recv_mutateRows(); + void mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes); + void send_mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes); + void recv_mutateRowsTs(); + int64_t atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value); + void send_atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value); + int64_t recv_atomicIncrement(); + void deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes); + void send_deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes); + void recv_deleteAll(); + void deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes); + void send_deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes); + void recv_deleteAllTs(); + void deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes); + void send_deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes); + void recv_deleteAllRow(); + void increment(const TIncrement& increment); + void send_increment(const TIncrement& increment); + void recv_increment(); + void incrementRows(const std::vector & increments); + void send_incrementRows(const std::vector & increments); + void recv_incrementRows(); + void deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes); + void send_deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes); + void recv_deleteAllRowTs(); + ScannerID scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes); + void send_scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes); + ScannerID recv_scannerOpenWithScan(); + ScannerID scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes); + void send_scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes); + ScannerID recv_scannerOpen(); + ScannerID scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes); + void send_scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes); + ScannerID recv_scannerOpenWithStop(); + ScannerID scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes); + void send_scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes); + ScannerID recv_scannerOpenWithPrefix(); + ScannerID scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void send_scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + ScannerID recv_scannerOpenTs(); + ScannerID scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + void send_scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes); + ScannerID recv_scannerOpenWithStopTs(); + void scannerGet(std::vector & _return, const ScannerID id); + void send_scannerGet(const ScannerID id); + void recv_scannerGet(std::vector & _return); + void scannerGetList(std::vector & _return, const ScannerID id, const int32_t nbRows); + void send_scannerGetList(const ScannerID id, const int32_t nbRows); + void recv_scannerGetList(std::vector & _return); + void scannerClose(const ScannerID id); + void send_scannerClose(const ScannerID id); + void recv_scannerClose(); + void getRowOrBefore(std::vector & _return, const Text& tableName, const Text& row, const Text& family); + void send_getRowOrBefore(const Text& tableName, const Text& row, const Text& family); + void recv_getRowOrBefore(std::vector & _return); + void getRegionInfo(TRegionInfo& _return, const Text& row); + void send_getRegionInfo(const Text& row); + void recv_getRegionInfo(TRegionInfo& _return); + protected: + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> piprot_; + boost::shared_ptr< ::apache::thrift::protocol::TProtocol> poprot_; + ::apache::thrift::protocol::TProtocol* iprot_; + ::apache::thrift::protocol::TProtocol* oprot_; +}; + +class HbaseProcessor : public ::apache::thrift::TProcessor { + protected: + boost::shared_ptr iface_; + virtual bool process_fn(apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, std::string& fname, int32_t seqid, void* callContext); + private: + std::map processMap_; + void process_enableTable(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_disableTable(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_isTableEnabled(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_compact(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_majorCompact(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getTableNames(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getColumnDescriptors(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getTableRegions(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_createTable(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteTable(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_get(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getVer(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getVerTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRow(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowWithColumns(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowWithColumnsTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRows(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowsWithColumns(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowsTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowsWithColumnsTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_mutateRow(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_mutateRowTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_mutateRows(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_mutateRowsTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_atomicIncrement(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteAll(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteAllTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteAllRow(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_increment(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_incrementRows(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_deleteAllRowTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpenWithScan(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpen(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpenWithStop(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpenWithPrefix(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpenTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerOpenWithStopTs(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerGet(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerGetList(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_scannerClose(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRowOrBefore(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + void process_getRegionInfo(int32_t seqid, apache::thrift::protocol::TProtocol* iprot, apache::thrift::protocol::TProtocol* oprot, void* callContext); + public: + HbaseProcessor(boost::shared_ptr iface) : + iface_(iface) { + processMap_["enableTable"] = &HbaseProcessor::process_enableTable; + processMap_["disableTable"] = &HbaseProcessor::process_disableTable; + processMap_["isTableEnabled"] = &HbaseProcessor::process_isTableEnabled; + processMap_["compact"] = &HbaseProcessor::process_compact; + processMap_["majorCompact"] = &HbaseProcessor::process_majorCompact; + processMap_["getTableNames"] = &HbaseProcessor::process_getTableNames; + processMap_["getColumnDescriptors"] = &HbaseProcessor::process_getColumnDescriptors; + processMap_["getTableRegions"] = &HbaseProcessor::process_getTableRegions; + processMap_["createTable"] = &HbaseProcessor::process_createTable; + processMap_["deleteTable"] = &HbaseProcessor::process_deleteTable; + processMap_["get"] = &HbaseProcessor::process_get; + processMap_["getVer"] = &HbaseProcessor::process_getVer; + processMap_["getVerTs"] = &HbaseProcessor::process_getVerTs; + processMap_["getRow"] = &HbaseProcessor::process_getRow; + processMap_["getRowWithColumns"] = &HbaseProcessor::process_getRowWithColumns; + processMap_["getRowTs"] = &HbaseProcessor::process_getRowTs; + processMap_["getRowWithColumnsTs"] = &HbaseProcessor::process_getRowWithColumnsTs; + processMap_["getRows"] = &HbaseProcessor::process_getRows; + processMap_["getRowsWithColumns"] = &HbaseProcessor::process_getRowsWithColumns; + processMap_["getRowsTs"] = &HbaseProcessor::process_getRowsTs; + processMap_["getRowsWithColumnsTs"] = &HbaseProcessor::process_getRowsWithColumnsTs; + processMap_["mutateRow"] = &HbaseProcessor::process_mutateRow; + processMap_["mutateRowTs"] = &HbaseProcessor::process_mutateRowTs; + processMap_["mutateRows"] = &HbaseProcessor::process_mutateRows; + processMap_["mutateRowsTs"] = &HbaseProcessor::process_mutateRowsTs; + processMap_["atomicIncrement"] = &HbaseProcessor::process_atomicIncrement; + processMap_["deleteAll"] = &HbaseProcessor::process_deleteAll; + processMap_["deleteAllTs"] = &HbaseProcessor::process_deleteAllTs; + processMap_["deleteAllRow"] = &HbaseProcessor::process_deleteAllRow; + processMap_["increment"] = &HbaseProcessor::process_increment; + processMap_["incrementRows"] = &HbaseProcessor::process_incrementRows; + processMap_["deleteAllRowTs"] = &HbaseProcessor::process_deleteAllRowTs; + processMap_["scannerOpenWithScan"] = &HbaseProcessor::process_scannerOpenWithScan; + processMap_["scannerOpen"] = &HbaseProcessor::process_scannerOpen; + processMap_["scannerOpenWithStop"] = &HbaseProcessor::process_scannerOpenWithStop; + processMap_["scannerOpenWithPrefix"] = &HbaseProcessor::process_scannerOpenWithPrefix; + processMap_["scannerOpenTs"] = &HbaseProcessor::process_scannerOpenTs; + processMap_["scannerOpenWithStopTs"] = &HbaseProcessor::process_scannerOpenWithStopTs; + processMap_["scannerGet"] = &HbaseProcessor::process_scannerGet; + processMap_["scannerGetList"] = &HbaseProcessor::process_scannerGetList; + processMap_["scannerClose"] = &HbaseProcessor::process_scannerClose; + processMap_["getRowOrBefore"] = &HbaseProcessor::process_getRowOrBefore; + processMap_["getRegionInfo"] = &HbaseProcessor::process_getRegionInfo; + } + + virtual bool process(boost::shared_ptr piprot, boost::shared_ptr poprot, void* callContext); + virtual ~HbaseProcessor() {} +}; + +class HbaseProcessorFactory : public ::apache::thrift::TProcessorFactory { + public: + HbaseProcessorFactory(const ::boost::shared_ptr< HbaseIfFactory >& handlerFactory) : + handlerFactory_(handlerFactory) {} + + ::boost::shared_ptr< ::apache::thrift::TProcessor > getProcessor(const ::apache::thrift::TConnectionInfo& connInfo); + + protected: + ::boost::shared_ptr< HbaseIfFactory > handlerFactory_; +}; + +class HbaseMultiface : virtual public HbaseIf { + public: + HbaseMultiface(std::vector >& ifaces) : ifaces_(ifaces) { + } + virtual ~HbaseMultiface() {} + protected: + std::vector > ifaces_; + HbaseMultiface() {} + void add(boost::shared_ptr iface) { + ifaces_.push_back(iface); + } + public: + void enableTable(const Bytes& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->enableTable(tableName); + } + } + + void disableTable(const Bytes& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->disableTable(tableName); + } + } + + bool isTableEnabled(const Bytes& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->isTableEnabled(tableName); + } else { + ifaces_[i]->isTableEnabled(tableName); + } + } + } + + void compact(const Bytes& tableNameOrRegionName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->compact(tableNameOrRegionName); + } + } + + void majorCompact(const Bytes& tableNameOrRegionName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->majorCompact(tableNameOrRegionName); + } + } + + void getTableNames(std::vector & _return) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getTableNames(_return); + return; + } else { + ifaces_[i]->getTableNames(_return); + } + } + } + + void getColumnDescriptors(std::map & _return, const Text& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getColumnDescriptors(_return, tableName); + return; + } else { + ifaces_[i]->getColumnDescriptors(_return, tableName); + } + } + } + + void getTableRegions(std::vector & _return, const Text& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getTableRegions(_return, tableName); + return; + } else { + ifaces_[i]->getTableRegions(_return, tableName); + } + } + } + + void createTable(const Text& tableName, const std::vector & columnFamilies) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->createTable(tableName, columnFamilies); + } + } + + void deleteTable(const Text& tableName) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->deleteTable(tableName); + } + } + + void get(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->get(_return, tableName, row, column, attributes); + return; + } else { + ifaces_[i]->get(_return, tableName, row, column, attributes); + } + } + } + + void getVer(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getVer(_return, tableName, row, column, numVersions, attributes); + return; + } else { + ifaces_[i]->getVer(_return, tableName, row, column, numVersions, attributes); + } + } + } + + void getVerTs(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getVerTs(_return, tableName, row, column, timestamp, numVersions, attributes); + return; + } else { + ifaces_[i]->getVerTs(_return, tableName, row, column, timestamp, numVersions, attributes); + } + } + } + + void getRow(std::vector & _return, const Text& tableName, const Text& row, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRow(_return, tableName, row, attributes); + return; + } else { + ifaces_[i]->getRow(_return, tableName, row, attributes); + } + } + } + + void getRowWithColumns(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowWithColumns(_return, tableName, row, columns, attributes); + return; + } else { + ifaces_[i]->getRowWithColumns(_return, tableName, row, columns, attributes); + } + } + } + + void getRowTs(std::vector & _return, const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowTs(_return, tableName, row, timestamp, attributes); + return; + } else { + ifaces_[i]->getRowTs(_return, tableName, row, timestamp, attributes); + } + } + } + + void getRowWithColumnsTs(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowWithColumnsTs(_return, tableName, row, columns, timestamp, attributes); + return; + } else { + ifaces_[i]->getRowWithColumnsTs(_return, tableName, row, columns, timestamp, attributes); + } + } + } + + void getRows(std::vector & _return, const Text& tableName, const std::vector & rows, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRows(_return, tableName, rows, attributes); + return; + } else { + ifaces_[i]->getRows(_return, tableName, rows, attributes); + } + } + } + + void getRowsWithColumns(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowsWithColumns(_return, tableName, rows, columns, attributes); + return; + } else { + ifaces_[i]->getRowsWithColumns(_return, tableName, rows, columns, attributes); + } + } + } + + void getRowsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowsTs(_return, tableName, rows, timestamp, attributes); + return; + } else { + ifaces_[i]->getRowsTs(_return, tableName, rows, timestamp, attributes); + } + } + } + + void getRowsWithColumnsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowsWithColumnsTs(_return, tableName, rows, columns, timestamp, attributes); + return; + } else { + ifaces_[i]->getRowsWithColumnsTs(_return, tableName, rows, columns, timestamp, attributes); + } + } + } + + void mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->mutateRow(tableName, row, mutations, attributes); + } + } + + void mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->mutateRowTs(tableName, row, mutations, timestamp, attributes); + } + } + + void mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->mutateRows(tableName, rowBatches, attributes); + } + } + + void mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->mutateRowsTs(tableName, rowBatches, timestamp, attributes); + } + } + + int64_t atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->atomicIncrement(tableName, row, column, value); + } else { + ifaces_[i]->atomicIncrement(tableName, row, column, value); + } + } + } + + void deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->deleteAll(tableName, row, column, attributes); + } + } + + void deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->deleteAllTs(tableName, row, column, timestamp, attributes); + } + } + + void deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->deleteAllRow(tableName, row, attributes); + } + } + + void increment(const TIncrement& increment) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->increment(increment); + } + } + + void incrementRows(const std::vector & increments) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->incrementRows(increments); + } + } + + void deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->deleteAllRowTs(tableName, row, timestamp, attributes); + } + } + + ScannerID scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpenWithScan(tableName, scan, attributes); + } else { + ifaces_[i]->scannerOpenWithScan(tableName, scan, attributes); + } + } + } + + ScannerID scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpen(tableName, startRow, columns, attributes); + } else { + ifaces_[i]->scannerOpen(tableName, startRow, columns, attributes); + } + } + } + + ScannerID scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes); + } else { + ifaces_[i]->scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes); + } + } + } + + ScannerID scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes); + } else { + ifaces_[i]->scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes); + } + } + } + + ScannerID scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpenTs(tableName, startRow, columns, timestamp, attributes); + } else { + ifaces_[i]->scannerOpenTs(tableName, startRow, columns, timestamp, attributes); + } + } + } + + ScannerID scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + return ifaces_[i]->scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes); + } else { + ifaces_[i]->scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes); + } + } + } + + void scannerGet(std::vector & _return, const ScannerID id) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->scannerGet(_return, id); + return; + } else { + ifaces_[i]->scannerGet(_return, id); + } + } + } + + void scannerGetList(std::vector & _return, const ScannerID id, const int32_t nbRows) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->scannerGetList(_return, id, nbRows); + return; + } else { + ifaces_[i]->scannerGetList(_return, id, nbRows); + } + } + } + + void scannerClose(const ScannerID id) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + ifaces_[i]->scannerClose(id); + } + } + + void getRowOrBefore(std::vector & _return, const Text& tableName, const Text& row, const Text& family) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRowOrBefore(_return, tableName, row, family); + return; + } else { + ifaces_[i]->getRowOrBefore(_return, tableName, row, family); + } + } + } + + void getRegionInfo(TRegionInfo& _return, const Text& row) { + size_t sz = ifaces_.size(); + for (size_t i = 0; i < sz; ++i) { + if (i == sz - 1) { + ifaces_[i]->getRegionInfo(_return, row); + return; + } else { + ifaces_[i]->getRegionInfo(_return, row); + } + } + } + +}; + +}}}} // namespace + +#endif diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.cpp hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.cpp new file mode 100644 index 0000000..bcd1a85 --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.cpp @@ -0,0 +1,17 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "Hbase_constants.h" + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +const HbaseConstants g_Hbase_constants; + +HbaseConstants::HbaseConstants() { +} + +}}}} // namespace + diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.h hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.h new file mode 100644 index 0000000..0f8d9f9 --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase_constants.h @@ -0,0 +1,24 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef Hbase_CONSTANTS_H +#define Hbase_CONSTANTS_H + +#include "Hbase_types.h" + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +class HbaseConstants { + public: + HbaseConstants(); + +}; + +extern const HbaseConstants g_Hbase_constants; + +}}}} // namespace + +#endif diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase_server.skeleton.cpp hbase-examples/src/main/cpp/gen-cpp/Hbase_server.skeleton.cpp new file mode 100644 index 0000000..a760e10 --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase_server.skeleton.cpp @@ -0,0 +1,254 @@ +// This autogenerated skeleton file illustrates how to build a server. +// You should copy it to another filename to avoid overwriting it. + +#include "Hbase.h" +#include +#include +#include +#include + +using namespace ::apache::thrift; +using namespace ::apache::thrift::protocol; +using namespace ::apache::thrift::transport; +using namespace ::apache::thrift::server; + +using boost::shared_ptr; + +using namespace ::apache::hadoop::hbase::thrift; + +class HbaseHandler : virtual public HbaseIf { + public: + HbaseHandler() { + // Your initialization goes here + } + + void enableTable(const Bytes& tableName) { + // Your implementation goes here + printf("enableTable\n"); + } + + void disableTable(const Bytes& tableName) { + // Your implementation goes here + printf("disableTable\n"); + } + + bool isTableEnabled(const Bytes& tableName) { + // Your implementation goes here + printf("isTableEnabled\n"); + } + + void compact(const Bytes& tableNameOrRegionName) { + // Your implementation goes here + printf("compact\n"); + } + + void majorCompact(const Bytes& tableNameOrRegionName) { + // Your implementation goes here + printf("majorCompact\n"); + } + + void getTableNames(std::vector & _return) { + // Your implementation goes here + printf("getTableNames\n"); + } + + void getColumnDescriptors(std::map & _return, const Text& tableName) { + // Your implementation goes here + printf("getColumnDescriptors\n"); + } + + void getTableRegions(std::vector & _return, const Text& tableName) { + // Your implementation goes here + printf("getTableRegions\n"); + } + + void createTable(const Text& tableName, const std::vector & columnFamilies) { + // Your implementation goes here + printf("createTable\n"); + } + + void deleteTable(const Text& tableName) { + // Your implementation goes here + printf("deleteTable\n"); + } + + void get(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const std::map & attributes) { + // Your implementation goes here + printf("get\n"); + } + + void getVer(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int32_t numVersions, const std::map & attributes) { + // Your implementation goes here + printf("getVer\n"); + } + + void getVerTs(std::vector & _return, const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const int32_t numVersions, const std::map & attributes) { + // Your implementation goes here + printf("getVerTs\n"); + } + + void getRow(std::vector & _return, const Text& tableName, const Text& row, const std::map & attributes) { + // Your implementation goes here + printf("getRow\n"); + } + + void getRowWithColumns(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const std::map & attributes) { + // Your implementation goes here + printf("getRowWithColumns\n"); + } + + void getRowTs(std::vector & _return, const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("getRowTs\n"); + } + + void getRowWithColumnsTs(std::vector & _return, const Text& tableName, const Text& row, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("getRowWithColumnsTs\n"); + } + + void getRows(std::vector & _return, const Text& tableName, const std::vector & rows, const std::map & attributes) { + // Your implementation goes here + printf("getRows\n"); + } + + void getRowsWithColumns(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const std::map & attributes) { + // Your implementation goes here + printf("getRowsWithColumns\n"); + } + + void getRowsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("getRowsTs\n"); + } + + void getRowsWithColumnsTs(std::vector & _return, const Text& tableName, const std::vector & rows, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("getRowsWithColumnsTs\n"); + } + + void mutateRow(const Text& tableName, const Text& row, const std::vector & mutations, const std::map & attributes) { + // Your implementation goes here + printf("mutateRow\n"); + } + + void mutateRowTs(const Text& tableName, const Text& row, const std::vector & mutations, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("mutateRowTs\n"); + } + + void mutateRows(const Text& tableName, const std::vector & rowBatches, const std::map & attributes) { + // Your implementation goes here + printf("mutateRows\n"); + } + + void mutateRowsTs(const Text& tableName, const std::vector & rowBatches, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("mutateRowsTs\n"); + } + + int64_t atomicIncrement(const Text& tableName, const Text& row, const Text& column, const int64_t value) { + // Your implementation goes here + printf("atomicIncrement\n"); + } + + void deleteAll(const Text& tableName, const Text& row, const Text& column, const std::map & attributes) { + // Your implementation goes here + printf("deleteAll\n"); + } + + void deleteAllTs(const Text& tableName, const Text& row, const Text& column, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("deleteAllTs\n"); + } + + void deleteAllRow(const Text& tableName, const Text& row, const std::map & attributes) { + // Your implementation goes here + printf("deleteAllRow\n"); + } + + void increment(const TIncrement& increment) { + // Your implementation goes here + printf("increment\n"); + } + + void incrementRows(const std::vector & increments) { + // Your implementation goes here + printf("incrementRows\n"); + } + + void deleteAllRowTs(const Text& tableName, const Text& row, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("deleteAllRowTs\n"); + } + + ScannerID scannerOpenWithScan(const Text& tableName, const TScan& scan, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpenWithScan\n"); + } + + ScannerID scannerOpen(const Text& tableName, const Text& startRow, const std::vector & columns, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpen\n"); + } + + ScannerID scannerOpenWithStop(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpenWithStop\n"); + } + + ScannerID scannerOpenWithPrefix(const Text& tableName, const Text& startAndPrefix, const std::vector & columns, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpenWithPrefix\n"); + } + + ScannerID scannerOpenTs(const Text& tableName, const Text& startRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpenTs\n"); + } + + ScannerID scannerOpenWithStopTs(const Text& tableName, const Text& startRow, const Text& stopRow, const std::vector & columns, const int64_t timestamp, const std::map & attributes) { + // Your implementation goes here + printf("scannerOpenWithStopTs\n"); + } + + void scannerGet(std::vector & _return, const ScannerID id) { + // Your implementation goes here + printf("scannerGet\n"); + } + + void scannerGetList(std::vector & _return, const ScannerID id, const int32_t nbRows) { + // Your implementation goes here + printf("scannerGetList\n"); + } + + void scannerClose(const ScannerID id) { + // Your implementation goes here + printf("scannerClose\n"); + } + + void getRowOrBefore(std::vector & _return, const Text& tableName, const Text& row, const Text& family) { + // Your implementation goes here + printf("getRowOrBefore\n"); + } + + void getRegionInfo(TRegionInfo& _return, const Text& row) { + // Your implementation goes here + printf("getRegionInfo\n"); + } + +}; + +int main(int argc, char **argv) { + int port = 9090; + shared_ptr handler(new HbaseHandler()); + shared_ptr processor(new HbaseProcessor(handler)); + shared_ptr serverTransport(new TServerSocket(port)); + shared_ptr transportFactory(new TBufferedTransportFactory()); + shared_ptr protocolFactory(new TBinaryProtocolFactory()); + + TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory); + server.serve(); + return 0; +} + diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase_types.cpp hbase-examples/src/main/cpp/gen-cpp/Hbase_types.cpp new file mode 100644 index 0000000..7ea6fb6 --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase_types.cpp @@ -0,0 +1,989 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#include "Hbase_types.h" + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +const char* TCell::ascii_fingerprint = "1CCCF6FC31CFD1D61BBBB1BAF3590620"; +const uint8_t TCell::binary_fingerprint[16] = {0x1C,0xCC,0xF6,0xFC,0x31,0xCF,0xD1,0xD6,0x1B,0xBB,0xB1,0xBA,0xF3,0x59,0x06,0x20}; + +uint32_t TCell::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TCell::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("TCell"); + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->value); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 2); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* ColumnDescriptor::ascii_fingerprint = "3B18638852FDF9DD911BC1174265F92E"; +const uint8_t ColumnDescriptor::binary_fingerprint[16] = {0x3B,0x18,0x63,0x88,0x52,0xFD,0xF9,0xDD,0x91,0x1B,0xC1,0x17,0x42,0x65,0xF9,0x2E}; + +uint32_t ColumnDescriptor::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->maxVersions); + this->__isset.maxVersions = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->compression); + this->__isset.compression = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->inMemory); + this->__isset.inMemory = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->bloomFilterType); + this->__isset.bloomFilterType = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->bloomFilterVectorSize); + this->__isset.bloomFilterVectorSize = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->bloomFilterNbHashes); + this->__isset.bloomFilterNbHashes = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 8: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->blockCacheEnabled); + this->__isset.blockCacheEnabled = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->timeToLive); + this->__isset.timeToLive = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t ColumnDescriptor::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("ColumnDescriptor"); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("maxVersions", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32(this->maxVersions); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("compression", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeString(this->compression); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("inMemory", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->inMemory); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bloomFilterType", ::apache::thrift::protocol::T_STRING, 5); + xfer += oprot->writeString(this->bloomFilterType); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bloomFilterVectorSize", ::apache::thrift::protocol::T_I32, 6); + xfer += oprot->writeI32(this->bloomFilterVectorSize); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("bloomFilterNbHashes", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32(this->bloomFilterNbHashes); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("blockCacheEnabled", ::apache::thrift::protocol::T_BOOL, 8); + xfer += oprot->writeBool(this->blockCacheEnabled); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("timeToLive", ::apache::thrift::protocol::T_I32, 9); + xfer += oprot->writeI32(this->timeToLive); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* TRegionInfo::ascii_fingerprint = "B58AB7A239831F8614F7B6709C89DC7B"; +const uint8_t TRegionInfo::binary_fingerprint[16] = {0xB5,0x8A,0xB7,0xA2,0x39,0x83,0x1F,0x86,0x14,0xF7,0xB6,0x70,0x9C,0x89,0xDC,0x7B}; + +uint32_t TRegionInfo::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startKey); + this->__isset.startKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->endKey); + this->__isset.endKey = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->id); + this->__isset.id = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->name); + this->__isset.name = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_BYTE) { + xfer += iprot->readByte(this->version); + this->__isset.version = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->serverName); + this->__isset.serverName = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 7: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->port); + this->__isset.port = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TRegionInfo::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("TRegionInfo"); + xfer += oprot->writeFieldBegin("startKey", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->startKey); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("endKey", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->endKey); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("id", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->id); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 4); + xfer += oprot->writeBinary(this->name); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_BYTE, 5); + xfer += oprot->writeByte(this->version); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("serverName", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->serverName); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("port", ::apache::thrift::protocol::T_I32, 7); + xfer += oprot->writeI32(this->port); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* Mutation::ascii_fingerprint = "CD9E9D4A6406AD402C90440434AE18A0"; +const uint8_t Mutation::binary_fingerprint[16] = {0xCD,0x9E,0x9D,0x4A,0x64,0x06,0xAD,0x40,0x2C,0x90,0x44,0x04,0x34,0xAE,0x18,0xA0}; + +uint32_t Mutation::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->isDelete); + this->__isset.isDelete = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->value); + this->__isset.value = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_BOOL) { + xfer += iprot->readBool(this->writeToWAL); + this->__isset.writeToWAL = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t Mutation::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("Mutation"); + xfer += oprot->writeFieldBegin("isDelete", ::apache::thrift::protocol::T_BOOL, 1); + xfer += oprot->writeBool(this->isDelete); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->value); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("writeToWAL", ::apache::thrift::protocol::T_BOOL, 4); + xfer += oprot->writeBool(this->writeToWAL); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* BatchMutation::ascii_fingerprint = "4B8A4A9E051CAFF532E1C0D54F6AD2AB"; +const uint8_t BatchMutation::binary_fingerprint[16] = {0x4B,0x8A,0x4A,0x9E,0x05,0x1C,0xAF,0xF5,0x32,0xE1,0xC0,0xD5,0x4F,0x6A,0xD2,0xAB}; + +uint32_t BatchMutation::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->mutations.clear(); + uint32_t _size0; + ::apache::thrift::protocol::TType _etype3; + iprot->readListBegin(_etype3, _size0); + this->mutations.resize(_size0); + uint32_t _i4; + for (_i4 = 0; _i4 < _size0; ++_i4) + { + xfer += this->mutations[_i4].read(iprot); + } + iprot->readListEnd(); + } + this->__isset.mutations = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t BatchMutation::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("BatchMutation"); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("mutations", ::apache::thrift::protocol::T_LIST, 2); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast(this->mutations.size())); + std::vector ::const_iterator _iter5; + for (_iter5 = this->mutations.begin(); _iter5 != this->mutations.end(); ++_iter5) + { + xfer += (*_iter5).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* TIncrement::ascii_fingerprint = "5F9965D46A4F3845985AC0F9B81C3C69"; +const uint8_t TIncrement::binary_fingerprint[16] = {0x5F,0x99,0x65,0xD4,0x6A,0x4F,0x38,0x45,0x98,0x5A,0xC0,0xF9,0xB8,0x1C,0x3C,0x69}; + +uint32_t TIncrement::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->table); + this->__isset.table = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->column); + this->__isset.column = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->ammount); + this->__isset.ammount = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TIncrement::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("TIncrement"); + xfer += oprot->writeFieldBegin("table", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->table); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("column", ::apache::thrift::protocol::T_STRING, 3); + xfer += oprot->writeBinary(this->column); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("ammount", ::apache::thrift::protocol::T_I64, 4); + xfer += oprot->writeI64(this->ammount); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* TRowResult::ascii_fingerprint = "AE98EA4F344566FAFE04FA5E5823D1ED"; +const uint8_t TRowResult::binary_fingerprint[16] = {0xAE,0x98,0xEA,0x4F,0x34,0x45,0x66,0xFA,0xFE,0x04,0xFA,0x5E,0x58,0x23,0xD1,0xED}; + +uint32_t TRowResult::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->row); + this->__isset.row = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_MAP) { + { + this->columns.clear(); + uint32_t _size6; + ::apache::thrift::protocol::TType _ktype7; + ::apache::thrift::protocol::TType _vtype8; + iprot->readMapBegin(_ktype7, _vtype8, _size6); + uint32_t _i10; + for (_i10 = 0; _i10 < _size6; ++_i10) + { + Text _key11; + xfer += iprot->readBinary(_key11); + TCell& _val12 = this->columns[_key11]; + xfer += _val12.read(iprot); + } + iprot->readMapEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TRowResult::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("TRowResult"); + xfer += oprot->writeFieldBegin("row", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->row); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_MAP, 2); + { + xfer += oprot->writeMapBegin(::apache::thrift::protocol::T_STRING, ::apache::thrift::protocol::T_STRUCT, static_cast(this->columns.size())); + std::map ::const_iterator _iter13; + for (_iter13 = this->columns.begin(); _iter13 != this->columns.end(); ++_iter13) + { + xfer += oprot->writeBinary(_iter13->first); + xfer += _iter13->second.write(oprot); + } + xfer += oprot->writeMapEnd(); + } + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* TScan::ascii_fingerprint = "2C111FDF8CD162886ECCCBB9C9051083"; +const uint8_t TScan::binary_fingerprint[16] = {0x2C,0x11,0x1F,0xDF,0x8C,0xD1,0x62,0x88,0x6E,0xCC,0xCB,0xB9,0xC9,0x05,0x10,0x83}; + +uint32_t TScan::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->startRow); + this->__isset.startRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->stopRow); + this->__isset.stopRow = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I64) { + xfer += iprot->readI64(this->timestamp); + this->__isset.timestamp = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 4: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->columns.clear(); + uint32_t _size14; + ::apache::thrift::protocol::TType _etype17; + iprot->readListBegin(_etype17, _size14); + this->columns.resize(_size14); + uint32_t _i18; + for (_i18 = 0; _i18 < _size14; ++_i18) + { + xfer += iprot->readBinary(this->columns[_i18]); + } + iprot->readListEnd(); + } + this->__isset.columns = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 5: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->caching); + this->__isset.caching = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 6: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readBinary(this->filterString); + this->__isset.filterString = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t TScan::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("TScan"); + if (this->__isset.startRow) { + xfer += oprot->writeFieldBegin("startRow", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeBinary(this->startRow); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.stopRow) { + xfer += oprot->writeFieldBegin("stopRow", ::apache::thrift::protocol::T_STRING, 2); + xfer += oprot->writeBinary(this->stopRow); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.timestamp) { + xfer += oprot->writeFieldBegin("timestamp", ::apache::thrift::protocol::T_I64, 3); + xfer += oprot->writeI64(this->timestamp); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.columns) { + xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 4); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast(this->columns.size())); + std::vector ::const_iterator _iter19; + for (_iter19 = this->columns.begin(); _iter19 != this->columns.end(); ++_iter19) + { + xfer += oprot->writeBinary((*_iter19)); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.caching) { + xfer += oprot->writeFieldBegin("caching", ::apache::thrift::protocol::T_I32, 5); + xfer += oprot->writeI32(this->caching); + xfer += oprot->writeFieldEnd(); + } + if (this->__isset.filterString) { + xfer += oprot->writeFieldBegin("filterString", ::apache::thrift::protocol::T_STRING, 6); + xfer += oprot->writeBinary(this->filterString); + xfer += oprot->writeFieldEnd(); + } + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* IOError::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t IOError::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t IOError::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IOError::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("IOError"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* IllegalArgument::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t IllegalArgument::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t IllegalArgument::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t IllegalArgument::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("IllegalArgument"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +const char* AlreadyExists::ascii_fingerprint = "EFB929595D312AC8F305D5A794CFEDA1"; +const uint8_t AlreadyExists::binary_fingerprint[16] = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + +uint32_t AlreadyExists::read(::apache::thrift::protocol::TProtocol* iprot) { + + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_STRING) { + xfer += iprot->readString(this->message); + this->__isset.message = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + return xfer; +} + +uint32_t AlreadyExists::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + xfer += oprot->writeStructBegin("AlreadyExists"); + xfer += oprot->writeFieldBegin("message", ::apache::thrift::protocol::T_STRING, 1); + xfer += oprot->writeString(this->message); + xfer += oprot->writeFieldEnd(); + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +}}}} // namespace diff --git hbase-examples/src/main/cpp/gen-cpp/Hbase_types.h hbase-examples/src/main/cpp/gen-cpp/Hbase_types.h new file mode 100644 index 0000000..f49bfbc --- /dev/null +++ hbase-examples/src/main/cpp/gen-cpp/Hbase_types.h @@ -0,0 +1,720 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +#ifndef Hbase_TYPES_H +#define Hbase_TYPES_H + +#include +#include +#include +#include + + + +namespace apache { namespace hadoop { namespace hbase { namespace thrift { + +typedef std::string Text; + +typedef std::string Bytes; + +typedef int32_t ScannerID; + +typedef struct _TCell__isset { + _TCell__isset() : value(false), timestamp(false) {} + bool value; + bool timestamp; +} _TCell__isset; + +class TCell { + public: + + static const char* ascii_fingerprint; // = "1CCCF6FC31CFD1D61BBBB1BAF3590620"; + static const uint8_t binary_fingerprint[16]; // = {0x1C,0xCC,0xF6,0xFC,0x31,0xCF,0xD1,0xD6,0x1B,0xBB,0xB1,0xBA,0xF3,0x59,0x06,0x20}; + + TCell() : value(""), timestamp(0) { + } + + virtual ~TCell() throw() {} + + Bytes value; + int64_t timestamp; + + _TCell__isset __isset; + + void __set_value(const Bytes& val) { + value = val; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + } + + bool operator == (const TCell & rhs) const + { + if (!(value == rhs.value)) + return false; + if (!(timestamp == rhs.timestamp)) + return false; + return true; + } + bool operator != (const TCell &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TCell & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _ColumnDescriptor__isset { + _ColumnDescriptor__isset() : name(false), maxVersions(false), compression(false), inMemory(false), bloomFilterType(false), bloomFilterVectorSize(false), bloomFilterNbHashes(false), blockCacheEnabled(false), timeToLive(false) {} + bool name; + bool maxVersions; + bool compression; + bool inMemory; + bool bloomFilterType; + bool bloomFilterVectorSize; + bool bloomFilterNbHashes; + bool blockCacheEnabled; + bool timeToLive; +} _ColumnDescriptor__isset; + +class ColumnDescriptor { + public: + + static const char* ascii_fingerprint; // = "3B18638852FDF9DD911BC1174265F92E"; + static const uint8_t binary_fingerprint[16]; // = {0x3B,0x18,0x63,0x88,0x52,0xFD,0xF9,0xDD,0x91,0x1B,0xC1,0x17,0x42,0x65,0xF9,0x2E}; + + ColumnDescriptor() : name(""), maxVersions(3), compression("NONE"), inMemory(false), bloomFilterType("NONE"), bloomFilterVectorSize(0), bloomFilterNbHashes(0), blockCacheEnabled(false), timeToLive(-1) { + } + + virtual ~ColumnDescriptor() throw() {} + + Text name; + int32_t maxVersions; + std::string compression; + bool inMemory; + std::string bloomFilterType; + int32_t bloomFilterVectorSize; + int32_t bloomFilterNbHashes; + bool blockCacheEnabled; + int32_t timeToLive; + + _ColumnDescriptor__isset __isset; + + void __set_name(const Text& val) { + name = val; + } + + void __set_maxVersions(const int32_t val) { + maxVersions = val; + } + + void __set_compression(const std::string& val) { + compression = val; + } + + void __set_inMemory(const bool val) { + inMemory = val; + } + + void __set_bloomFilterType(const std::string& val) { + bloomFilterType = val; + } + + void __set_bloomFilterVectorSize(const int32_t val) { + bloomFilterVectorSize = val; + } + + void __set_bloomFilterNbHashes(const int32_t val) { + bloomFilterNbHashes = val; + } + + void __set_blockCacheEnabled(const bool val) { + blockCacheEnabled = val; + } + + void __set_timeToLive(const int32_t val) { + timeToLive = val; + } + + bool operator == (const ColumnDescriptor & rhs) const + { + if (!(name == rhs.name)) + return false; + if (!(maxVersions == rhs.maxVersions)) + return false; + if (!(compression == rhs.compression)) + return false; + if (!(inMemory == rhs.inMemory)) + return false; + if (!(bloomFilterType == rhs.bloomFilterType)) + return false; + if (!(bloomFilterVectorSize == rhs.bloomFilterVectorSize)) + return false; + if (!(bloomFilterNbHashes == rhs.bloomFilterNbHashes)) + return false; + if (!(blockCacheEnabled == rhs.blockCacheEnabled)) + return false; + if (!(timeToLive == rhs.timeToLive)) + return false; + return true; + } + bool operator != (const ColumnDescriptor &rhs) const { + return !(*this == rhs); + } + + bool operator < (const ColumnDescriptor & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TRegionInfo__isset { + _TRegionInfo__isset() : startKey(false), endKey(false), id(false), name(false), version(false), serverName(false), port(false) {} + bool startKey; + bool endKey; + bool id; + bool name; + bool version; + bool serverName; + bool port; +} _TRegionInfo__isset; + +class TRegionInfo { + public: + + static const char* ascii_fingerprint; // = "B58AB7A239831F8614F7B6709C89DC7B"; + static const uint8_t binary_fingerprint[16]; // = {0xB5,0x8A,0xB7,0xA2,0x39,0x83,0x1F,0x86,0x14,0xF7,0xB6,0x70,0x9C,0x89,0xDC,0x7B}; + + TRegionInfo() : startKey(""), endKey(""), id(0), name(""), version(0), serverName(""), port(0) { + } + + virtual ~TRegionInfo() throw() {} + + Text startKey; + Text endKey; + int64_t id; + Text name; + int8_t version; + Text serverName; + int32_t port; + + _TRegionInfo__isset __isset; + + void __set_startKey(const Text& val) { + startKey = val; + } + + void __set_endKey(const Text& val) { + endKey = val; + } + + void __set_id(const int64_t val) { + id = val; + } + + void __set_name(const Text& val) { + name = val; + } + + void __set_version(const int8_t val) { + version = val; + } + + void __set_serverName(const Text& val) { + serverName = val; + } + + void __set_port(const int32_t val) { + port = val; + } + + bool operator == (const TRegionInfo & rhs) const + { + if (!(startKey == rhs.startKey)) + return false; + if (!(endKey == rhs.endKey)) + return false; + if (!(id == rhs.id)) + return false; + if (!(name == rhs.name)) + return false; + if (!(version == rhs.version)) + return false; + if (!(serverName == rhs.serverName)) + return false; + if (!(port == rhs.port)) + return false; + return true; + } + bool operator != (const TRegionInfo &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TRegionInfo & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _Mutation__isset { + _Mutation__isset() : isDelete(false), column(false), value(false), writeToWAL(false) {} + bool isDelete; + bool column; + bool value; + bool writeToWAL; +} _Mutation__isset; + +class Mutation { + public: + + static const char* ascii_fingerprint; // = "CD9E9D4A6406AD402C90440434AE18A0"; + static const uint8_t binary_fingerprint[16]; // = {0xCD,0x9E,0x9D,0x4A,0x64,0x06,0xAD,0x40,0x2C,0x90,0x44,0x04,0x34,0xAE,0x18,0xA0}; + + Mutation() : isDelete(false), column(""), value(""), writeToWAL(true) { + } + + virtual ~Mutation() throw() {} + + bool isDelete; + Text column; + Text value; + bool writeToWAL; + + _Mutation__isset __isset; + + void __set_isDelete(const bool val) { + isDelete = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_value(const Text& val) { + value = val; + } + + void __set_writeToWAL(const bool val) { + writeToWAL = val; + } + + bool operator == (const Mutation & rhs) const + { + if (!(isDelete == rhs.isDelete)) + return false; + if (!(column == rhs.column)) + return false; + if (!(value == rhs.value)) + return false; + if (!(writeToWAL == rhs.writeToWAL)) + return false; + return true; + } + bool operator != (const Mutation &rhs) const { + return !(*this == rhs); + } + + bool operator < (const Mutation & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _BatchMutation__isset { + _BatchMutation__isset() : row(false), mutations(false) {} + bool row; + bool mutations; +} _BatchMutation__isset; + +class BatchMutation { + public: + + static const char* ascii_fingerprint; // = "4B8A4A9E051CAFF532E1C0D54F6AD2AB"; + static const uint8_t binary_fingerprint[16]; // = {0x4B,0x8A,0x4A,0x9E,0x05,0x1C,0xAF,0xF5,0x32,0xE1,0xC0,0xD5,0x4F,0x6A,0xD2,0xAB}; + + BatchMutation() : row("") { + } + + virtual ~BatchMutation() throw() {} + + Text row; + std::vector mutations; + + _BatchMutation__isset __isset; + + void __set_row(const Text& val) { + row = val; + } + + void __set_mutations(const std::vector & val) { + mutations = val; + } + + bool operator == (const BatchMutation & rhs) const + { + if (!(row == rhs.row)) + return false; + if (!(mutations == rhs.mutations)) + return false; + return true; + } + bool operator != (const BatchMutation &rhs) const { + return !(*this == rhs); + } + + bool operator < (const BatchMutation & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TIncrement__isset { + _TIncrement__isset() : table(false), row(false), column(false), ammount(false) {} + bool table; + bool row; + bool column; + bool ammount; +} _TIncrement__isset; + +class TIncrement { + public: + + static const char* ascii_fingerprint; // = "5F9965D46A4F3845985AC0F9B81C3C69"; + static const uint8_t binary_fingerprint[16]; // = {0x5F,0x99,0x65,0xD4,0x6A,0x4F,0x38,0x45,0x98,0x5A,0xC0,0xF9,0xB8,0x1C,0x3C,0x69}; + + TIncrement() : table(""), row(""), column(""), ammount(0) { + } + + virtual ~TIncrement() throw() {} + + Text table; + Text row; + Text column; + int64_t ammount; + + _TIncrement__isset __isset; + + void __set_table(const Text& val) { + table = val; + } + + void __set_row(const Text& val) { + row = val; + } + + void __set_column(const Text& val) { + column = val; + } + + void __set_ammount(const int64_t val) { + ammount = val; + } + + bool operator == (const TIncrement & rhs) const + { + if (!(table == rhs.table)) + return false; + if (!(row == rhs.row)) + return false; + if (!(column == rhs.column)) + return false; + if (!(ammount == rhs.ammount)) + return false; + return true; + } + bool operator != (const TIncrement &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TIncrement & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TRowResult__isset { + _TRowResult__isset() : row(false), columns(false) {} + bool row; + bool columns; +} _TRowResult__isset; + +class TRowResult { + public: + + static const char* ascii_fingerprint; // = "AE98EA4F344566FAFE04FA5E5823D1ED"; + static const uint8_t binary_fingerprint[16]; // = {0xAE,0x98,0xEA,0x4F,0x34,0x45,0x66,0xFA,0xFE,0x04,0xFA,0x5E,0x58,0x23,0xD1,0xED}; + + TRowResult() : row("") { + } + + virtual ~TRowResult() throw() {} + + Text row; + std::map columns; + + _TRowResult__isset __isset; + + void __set_row(const Text& val) { + row = val; + } + + void __set_columns(const std::map & val) { + columns = val; + } + + bool operator == (const TRowResult & rhs) const + { + if (!(row == rhs.row)) + return false; + if (!(columns == rhs.columns)) + return false; + return true; + } + bool operator != (const TRowResult &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TRowResult & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _TScan__isset { + _TScan__isset() : startRow(false), stopRow(false), timestamp(false), columns(false), caching(false), filterString(false) {} + bool startRow; + bool stopRow; + bool timestamp; + bool columns; + bool caching; + bool filterString; +} _TScan__isset; + +class TScan { + public: + + static const char* ascii_fingerprint; // = "2C111FDF8CD162886ECCCBB9C9051083"; + static const uint8_t binary_fingerprint[16]; // = {0x2C,0x11,0x1F,0xDF,0x8C,0xD1,0x62,0x88,0x6E,0xCC,0xCB,0xB9,0xC9,0x05,0x10,0x83}; + + TScan() : startRow(""), stopRow(""), timestamp(0), caching(0), filterString("") { + } + + virtual ~TScan() throw() {} + + Text startRow; + Text stopRow; + int64_t timestamp; + std::vector columns; + int32_t caching; + Text filterString; + + _TScan__isset __isset; + + void __set_startRow(const Text& val) { + startRow = val; + __isset.startRow = true; + } + + void __set_stopRow(const Text& val) { + stopRow = val; + __isset.stopRow = true; + } + + void __set_timestamp(const int64_t val) { + timestamp = val; + __isset.timestamp = true; + } + + void __set_columns(const std::vector & val) { + columns = val; + __isset.columns = true; + } + + void __set_caching(const int32_t val) { + caching = val; + __isset.caching = true; + } + + void __set_filterString(const Text& val) { + filterString = val; + __isset.filterString = true; + } + + bool operator == (const TScan & rhs) const + { + if (__isset.startRow != rhs.__isset.startRow) + return false; + else if (__isset.startRow && !(startRow == rhs.startRow)) + return false; + if (__isset.stopRow != rhs.__isset.stopRow) + return false; + else if (__isset.stopRow && !(stopRow == rhs.stopRow)) + return false; + if (__isset.timestamp != rhs.__isset.timestamp) + return false; + else if (__isset.timestamp && !(timestamp == rhs.timestamp)) + return false; + if (__isset.columns != rhs.__isset.columns) + return false; + else if (__isset.columns && !(columns == rhs.columns)) + return false; + if (__isset.caching != rhs.__isset.caching) + return false; + else if (__isset.caching && !(caching == rhs.caching)) + return false; + if (__isset.filterString != rhs.__isset.filterString) + return false; + else if (__isset.filterString && !(filterString == rhs.filterString)) + return false; + return true; + } + bool operator != (const TScan &rhs) const { + return !(*this == rhs); + } + + bool operator < (const TScan & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _IOError__isset { + _IOError__isset() : message(false) {} + bool message; +} _IOError__isset; + +class IOError : public ::apache::thrift::TException { + public: + + static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + IOError() : message("") { + } + + virtual ~IOError() throw() {} + + std::string message; + + _IOError__isset __isset; + + void __set_message(const std::string& val) { + message = val; + } + + bool operator == (const IOError & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const IOError &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IOError & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _IllegalArgument__isset { + _IllegalArgument__isset() : message(false) {} + bool message; +} _IllegalArgument__isset; + +class IllegalArgument : public ::apache::thrift::TException { + public: + + static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + IllegalArgument() : message("") { + } + + virtual ~IllegalArgument() throw() {} + + std::string message; + + _IllegalArgument__isset __isset; + + void __set_message(const std::string& val) { + message = val; + } + + bool operator == (const IllegalArgument & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const IllegalArgument &rhs) const { + return !(*this == rhs); + } + + bool operator < (const IllegalArgument & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +typedef struct _AlreadyExists__isset { + _AlreadyExists__isset() : message(false) {} + bool message; +} _AlreadyExists__isset; + +class AlreadyExists : public ::apache::thrift::TException { + public: + + static const char* ascii_fingerprint; // = "EFB929595D312AC8F305D5A794CFEDA1"; + static const uint8_t binary_fingerprint[16]; // = {0xEF,0xB9,0x29,0x59,0x5D,0x31,0x2A,0xC8,0xF3,0x05,0xD5,0xA7,0x94,0xCF,0xED,0xA1}; + + AlreadyExists() : message("") { + } + + virtual ~AlreadyExists() throw() {} + + std::string message; + + _AlreadyExists__isset __isset; + + void __set_message(const std::string& val) { + message = val; + } + + bool operator == (const AlreadyExists & rhs) const + { + if (!(message == rhs.message)) + return false; + return true; + } + bool operator != (const AlreadyExists &rhs) const { + return !(*this == rhs); + } + + bool operator < (const AlreadyExists & ) const; + + uint32_t read(::apache::thrift::protocol::TProtocol* iprot); + uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const; + +}; + +}}}} // namespace + +#endif diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java new file mode 100644 index 0000000..0aab865 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/IndexBuilder.java @@ -0,0 +1,153 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.mapreduce; + +import java.io.IOException; +import java.util.HashMap; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.client.Scan; +import org.apache.hadoop.hbase.io.ImmutableBytesWritable; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.io.Writable; +import org.apache.hadoop.mapreduce.Job; +import org.apache.hadoop.mapreduce.Mapper; +import org.apache.hadoop.util.GenericOptionsParser; + +/** + * Example map/reduce job to construct index tables that can be used to quickly + * find a row based on the value of a column. It demonstrates: + *
    + *
  • Using TableInputFormat and TableMapReduceUtil to use an HTable as input + * to a map/reduce job.
  • + *
  • Passing values from main method to children via the configuration.
  • + *
  • Using MultiTableOutputFormat to output to multiple tables from a + * map/reduce job.
  • + *
  • A real use case of building a secondary index over a table.
  • + *
+ * + *

Usage

+ * + *

+ * Modify ${HADOOP_HOME}/conf/hadoop-env.sh to include the hbase jar, the + * zookeeper jar, the examples output directory, and the hbase conf directory in + * HADOOP_CLASSPATH, and then run + * bin/hadoop org.apache.hadoop.hbase.mapreduce.IndexBuilder TABLE_NAME COLUMN_FAMILY ATTR [ATTR ...] + *

+ * + *

+ * To run with the sample data provided in index-builder-setup.rb, use the + * arguments people attributes name email phone. + *

+ * + *

+ * This code was written against HBase 0.21 trunk. + *

+ */ +public class IndexBuilder { + /** the column family containing the indexed row key */ + public static final byte[] INDEX_COLUMN = Bytes.toBytes("INDEX"); + /** the qualifier containing the indexed row key */ + public static final byte[] INDEX_QUALIFIER = Bytes.toBytes("ROW"); + + /** + * Internal Mapper to be run by Hadoop. + */ + public static class Map extends + Mapper { + private byte[] family; + private HashMap indexes; + + @Override + protected void map(ImmutableBytesWritable rowKey, Result result, Context context) + throws IOException, InterruptedException { + for(java.util.Map.Entry index : indexes.entrySet()) { + byte[] qualifier = index.getKey(); + ImmutableBytesWritable tableName = index.getValue(); + byte[] value = result.getValue(family, qualifier); + if (value != null) { + // original: row 123 attribute:phone 555-1212 + // index: row 555-1212 INDEX:ROW 123 + Put put = new Put(value); + put.add(INDEX_COLUMN, INDEX_QUALIFIER, rowKey.get()); + context.write(tableName, put); + } + } + } + + @Override + protected void setup(Context context) throws IOException, + InterruptedException { + Configuration configuration = context.getConfiguration(); + String tableName = configuration.get("index.tablename"); + String[] fields = configuration.getStrings("index.fields"); + String familyName = configuration.get("index.familyname"); + family = Bytes.toBytes(familyName); + indexes = new HashMap(); + for(String field : fields) { + // if the table is "people" and the field to index is "email", then the + // index table will be called "people-email" + indexes.put(Bytes.toBytes(field), + new ImmutableBytesWritable(Bytes.toBytes(tableName + "-" + field))); + } + } + } + + /** + * Job configuration. + */ + public static Job configureJob(Configuration conf, String [] args) + throws IOException { + String tableName = args[0]; + String columnFamily = args[1]; + System.out.println("****" + tableName); + conf.set(TableInputFormat.SCAN, TableMapReduceUtil.convertScanToString(new Scan())); + conf.set(TableInputFormat.INPUT_TABLE, tableName); + conf.set("index.tablename", tableName); + conf.set("index.familyname", columnFamily); + String[] fields = new String[args.length - 2]; + for(int i = 0; i < fields.length; i++) { + fields[i] = args[i + 2]; + } + conf.setStrings("index.fields", fields); + conf.set("index.familyname", "attributes"); + Job job = new Job(conf, tableName); + job.setJarByClass(IndexBuilder.class); + job.setMapperClass(Map.class); + job.setNumReduceTasks(0); + job.setInputFormatClass(TableInputFormat.class); + job.setOutputFormatClass(MultiTableOutputFormat.class); + return job; + } + + public static void main(String[] args) throws Exception { + Configuration conf = HBaseConfiguration.create(); + String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs(); + if(otherArgs.length < 3) { + System.err.println("Only " + otherArgs.length + " arguments supplied, required: 3"); + System.err.println("Usage: IndexBuilder [ ...]"); + System.exit(-1); + } + Job job = configureJob(conf, otherArgs); + System.exit(job.waitForCompletion(true) ? 0 : 1); + } +} diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/SampleUploader.java hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/SampleUploader.java new file mode 100644 index 0000000..4ccd036 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/mapreduce/SampleUploader.java @@ -0,0 +1,147 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.mapreduce; + +import java.io.IOException; + +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.io.ImmutableBytesWritable; +import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.io.LongWritable; +import org.apache.hadoop.io.Text; +import org.apache.hadoop.mapreduce.Job; +import org.apache.hadoop.mapreduce.Mapper; +import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; +import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat; +import org.apache.hadoop.util.GenericOptionsParser; + +/** + * Sample Uploader MapReduce + *

+ * This is EXAMPLE code. You will need to change it to work for your context. + *

+ * Uses {@link TableReducer} to put the data into HBase. Change the InputFormat + * to suit your data. In this example, we are importing a CSV file. + *

+ *

row,family,qualifier,value
+ *

+ * The table and columnfamily we're to insert into must preexist. + *

+ * There is no reducer in this example as it is not necessary and adds + * significant overhead. If you need to do any massaging of data before + * inserting into HBase, you can do this in the map as well. + *

Do the following to start the MR job: + *

+ * ./bin/hadoop org.apache.hadoop.hbase.mapreduce.SampleUploader /tmp/input.csv TABLE_NAME
+ * 
+ *

+ * This code was written against HBase 0.21 trunk. + */ +public class SampleUploader { + + private static final String NAME = "SampleUploader"; + + static class Uploader + extends Mapper { + + private long checkpoint = 100; + private long count = 0; + + @Override + public void map(LongWritable key, Text line, Context context) + throws IOException { + + // Input is a CSV file + // Each map() is a single line, where the key is the line number + // Each line is comma-delimited; row,family,qualifier,value + + // Split CSV line + String [] values = line.toString().split(","); + if(values.length != 4) { + return; + } + + // Extract each value + byte [] row = Bytes.toBytes(values[0]); + byte [] family = Bytes.toBytes(values[1]); + byte [] qualifier = Bytes.toBytes(values[2]); + byte [] value = Bytes.toBytes(values[3]); + + // Create Put + Put put = new Put(row); + put.add(family, qualifier, value); + + // Uncomment below to disable WAL. This will improve performance but means + // you will experience data loss in the case of a RegionServer crash. + // put.setWriteToWAL(false); + + try { + context.write(new ImmutableBytesWritable(row), put); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + // Set status every checkpoint lines + if(++count % checkpoint == 0) { + context.setStatus("Emitting Put " + count); + } + } + } + + /** + * Job configuration. + */ + public static Job configureJob(Configuration conf, String [] args) + throws IOException { + Path inputPath = new Path(args[0]); + String tableName = args[1]; + Job job = new Job(conf, NAME + "_" + tableName); + job.setJarByClass(Uploader.class); + FileInputFormat.setInputPaths(job, inputPath); + job.setInputFormatClass(SequenceFileInputFormat.class); + job.setMapperClass(Uploader.class); + // No reducers. Just write straight to table. Call initTableReducerJob + // because it sets up the TableOutputFormat. + TableMapReduceUtil.initTableReducerJob(tableName, null, job); + job.setNumReduceTasks(0); + return job; + } + + /** + * Main entry point. + * + * @param args The command line parameters. + * @throws Exception When running the job fails. + */ + public static void main(String[] args) throws Exception { + Configuration conf = HBaseConfiguration.create(); + String[] otherArgs = new GenericOptionsParser(conf, args).getRemainingArgs(); + if(otherArgs.length != 2) { + System.err.println("Wrong number of arguments: " + otherArgs.length); + System.err.println("Usage: " + NAME + " "); + System.exit(-1); + } + Job job = configureJob(conf, otherArgs); + System.exit(job.waitForCompletion(true) ? 0 : 1); + } +} diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java new file mode 100644 index 0000000..bc0c18f --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java @@ -0,0 +1,333 @@ +/** + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.hadoop.hbase.thrift; + +import java.io.UnsupportedEncodingException; +import java.nio.ByteBuffer; +import java.nio.charset.CharacterCodingException; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.text.NumberFormat; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.TreeMap; +import java.util.SortedMap; + +import org.apache.hadoop.hbase.thrift.generated.AlreadyExists; +import org.apache.hadoop.hbase.thrift.generated.ColumnDescriptor; +import org.apache.hadoop.hbase.thrift.generated.Hbase; +import org.apache.hadoop.hbase.thrift.generated.IOError; +import org.apache.hadoop.hbase.thrift.generated.IllegalArgument; +import org.apache.hadoop.hbase.thrift.generated.Mutation; +import org.apache.hadoop.hbase.thrift.generated.TCell; +import org.apache.hadoop.hbase.thrift.generated.TRowResult; + +import org.apache.thrift.TException; +import org.apache.thrift.protocol.TBinaryProtocol; +import org.apache.thrift.protocol.TProtocol; +import org.apache.thrift.transport.TSocket; +import org.apache.thrift.transport.TTransport; + +/* + * See the instructions under hbase-examples/README.txt + */ +public class DemoClient { + + static protected int port; + static protected String host; + CharsetDecoder decoder = null; + + public static void main(String[] args) + throws IOError, TException, UnsupportedEncodingException, IllegalArgument, AlreadyExists { + + if (args.length != 2) { + + System.out.println("Invalid arguments!"); + System.out.println("Usage: DemoClient host port"); + + System.exit(-1); + } + + port = Integer.parseInt(args[1]); + host = args[0]; + + + DemoClient client = new DemoClient(); + client.run(); + } + + DemoClient() { + decoder = Charset.forName("UTF-8").newDecoder(); + } + + // Helper to translate byte[]'s to UTF8 strings + private String utf8(byte[] buf) { + try { + return decoder.decode(ByteBuffer.wrap(buf)).toString(); + } catch (CharacterCodingException e) { + return "[INVALID UTF-8]"; + } + } + + // Helper to translate strings to UTF8 bytes + private byte[] bytes(String s) { + try { + return s.getBytes("UTF-8"); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + return null; + } + } + + private void run() throws IOError, TException, IllegalArgument, + AlreadyExists { + + TTransport transport = new TSocket(host, port); + TProtocol protocol = new TBinaryProtocol(transport, true, true); + Hbase.Client client = new Hbase.Client(protocol); + + transport.open(); + + byte[] t = bytes("demo_table"); + + // + // Scan all tables, look for the demo table and delete it. + // + System.out.println("scanning tables..."); + for (ByteBuffer name : client.getTableNames()) { + System.out.println(" found: " + utf8(name.array())); + if (utf8(name.array()).equals(utf8(t))) { + if (client.isTableEnabled(name)) { + System.out.println(" disabling table: " + utf8(name.array())); + client.disableTable(name); + } + System.out.println(" deleting table: " + utf8(name.array())); + client.deleteTable(name); + } + } + + // + // Create the demo table with two column families, entry: and unused: + // + ArrayList columns = new ArrayList(); + ColumnDescriptor col = null; + col = new ColumnDescriptor(); + col.name = ByteBuffer.wrap(bytes("entry:")); + col.maxVersions = 10; + columns.add(col); + col = new ColumnDescriptor(); + col.name = ByteBuffer.wrap(bytes("unused:")); + columns.add(col); + + System.out.println("creating table: " + utf8(t)); + try { + client.createTable(ByteBuffer.wrap(t), columns); + } catch (AlreadyExists ae) { + System.out.println("WARN: " + ae.message); + } + + System.out.println("column families in " + utf8(t) + ": "); + Map columnMap = client.getColumnDescriptors(ByteBuffer.wrap(t)); + for (ColumnDescriptor col2 : columnMap.values()) { + System.out.println(" column: " + utf8(col2.name.array()) + ", maxVer: " + Integer.toString(col2.maxVersions)); + } + + Map dummyAttributes = null; + boolean writeToWal = false; + + // + // Test UTF-8 handling + // + byte[] invalid = {(byte) 'f', (byte) 'o', (byte) 'o', (byte) '-', (byte) 0xfc, (byte) 0xa1, (byte) 0xa1, (byte) 0xa1, (byte) 0xa1}; + byte[] valid = {(byte) 'f', (byte) 'o', (byte) 'o', (byte) '-', (byte) 0xE7, (byte) 0x94, (byte) 0x9F, (byte) 0xE3, (byte) 0x83, (byte) 0x93, (byte) 0xE3, (byte) 0x83, (byte) 0xBC, (byte) 0xE3, (byte) 0x83, (byte) 0xAB}; + + ArrayList mutations; + // non-utf8 is fine for data + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(invalid), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("foo")), mutations, dummyAttributes); + + // try empty strings + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:")), ByteBuffer.wrap(bytes("")), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("")), mutations, dummyAttributes); + + // this row name is valid utf8 + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(valid), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(valid), mutations, dummyAttributes); + + // non-utf8 is now allowed in row names because HBase stores values as binary + ByteBuffer bf = ByteBuffer.wrap(invalid); + + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(invalid), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(invalid), mutations, dummyAttributes); + + + // Run a scanner on the rows we just created + ArrayList columnNames = new ArrayList(); + columnNames.add(ByteBuffer.wrap(bytes("entry:"))); + + System.out.println("Starting scanner..."); + int scanner = client.scannerOpen(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("")), columnNames, dummyAttributes); + + while (true) { + List entry = client.scannerGet(scanner); + if (entry.isEmpty()) { + break; + } + printRow(entry); + } + + // + // Run some operations on a bunch of rows + // + for (int i = 100; i >= 0; --i) { + // format row keys as "00000" to "00100" + NumberFormat nf = NumberFormat.getInstance(); + nf.setMinimumIntegerDigits(5); + nf.setGroupingUsed(false); + byte[] row = bytes(nf.format(i)); + + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("unused:")), ByteBuffer.wrap(bytes("DELETE_ME")), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); + printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); + client.deleteAllRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes); + + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:num")), ByteBuffer.wrap(bytes("0")), writeToWal)); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(bytes("FOO")), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); + printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); + + Mutation m = null; + mutations = new ArrayList(); + m = new Mutation(); + m.column = ByteBuffer.wrap(bytes("entry:foo")); + m.isDelete = true; + mutations.add(m); + m = new Mutation(); + m.column = ByteBuffer.wrap(bytes("entry:num")); + m.value = ByteBuffer.wrap(bytes("-1")); + mutations.add(m); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); + printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); + + mutations = new ArrayList(); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:num")), ByteBuffer.wrap(bytes(Integer.toString(i))), writeToWal)); + mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:sqr")), ByteBuffer.wrap(bytes(Integer.toString(i * i))), writeToWal)); + client.mutateRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, dummyAttributes); + printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); + + // sleep to force later timestamp + try { + Thread.sleep(50); + } catch (InterruptedException e) { + // no-op + } + + mutations.clear(); + m = new Mutation(); + m.column = ByteBuffer.wrap(bytes("entry:num")); + m.value= ByteBuffer.wrap(bytes("-999")); + mutations.add(m); + m = new Mutation(); + m.column = ByteBuffer.wrap(bytes("entry:sqr")); + m.isDelete = true; + client.mutateRowTs(ByteBuffer.wrap(t), ByteBuffer.wrap(row), mutations, 1, dummyAttributes); // shouldn't override latest + printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes)); + + List versions = client.getVer(ByteBuffer.wrap(t), ByteBuffer.wrap(row), ByteBuffer.wrap(bytes("entry:num")), 10, dummyAttributes); + printVersions(ByteBuffer.wrap(row), versions); + if (versions.isEmpty()) { + System.out.println("FATAL: wrong # of versions"); + System.exit(-1); + } + + + List result = client.get(ByteBuffer.wrap(t), ByteBuffer.wrap(row), ByteBuffer.wrap(bytes("entry:foo")), dummyAttributes); + if (result.isEmpty() == false) { + System.out.println("FATAL: shouldn't get here"); + System.exit(-1); + } + + System.out.println(""); + } + + // scan all rows/columnNames + + columnNames.clear(); + for (ColumnDescriptor col2 : client.getColumnDescriptors(ByteBuffer.wrap(t)).values()) { + System.out.println("column with name: " + new String(col2.name.array())); + System.out.println(col2.toString()); + + columnNames.add(col2.name); + } + + System.out.println("Starting scanner..."); + scanner = client.scannerOpenWithStop(ByteBuffer.wrap(t), ByteBuffer.wrap(bytes("00020")), ByteBuffer.wrap(bytes("00040")), columnNames, dummyAttributes); + + while (true) { + List entry = client.scannerGet(scanner); + if (entry.isEmpty()) { + System.out.println("Scanner finished"); + break; + } + printRow(entry); + } + + transport.close(); + } + + private final void printVersions(ByteBuffer row, List versions) { + StringBuilder rowStr = new StringBuilder(); + for (TCell cell : versions) { + rowStr.append(utf8(cell.value.array())); + rowStr.append("; "); + } + System.out.println("row: " + utf8(row.array()) + ", values: " + rowStr); + } + + private final void printRow(TRowResult rowResult) { + // copy values into a TreeMap to get them in sorted order + + TreeMap sorted = new TreeMap(); + for (Map.Entry column : rowResult.columns.entrySet()) { + sorted.put(utf8(column.getKey().array()), column.getValue()); + } + + StringBuilder rowStr = new StringBuilder(); + for (SortedMap.Entry entry : sorted.entrySet()) { + rowStr.append(entry.getKey()); + rowStr.append(" => "); + rowStr.append(utf8(entry.getValue().value.array())); + rowStr.append("; "); + } + System.out.println("row: " + utf8(rowResult.row.array()) + ", cols: " + rowStr); + } + + private void printRow(List rows) { + for (TRowResult rowResult : rows) { + printRow(rowResult); + } + } +} diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java new file mode 100644 index 0000000..a5b81f5 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java @@ -0,0 +1,386 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * An AlreadyExists exceptions signals that a table with the specified + * name already exists + */ +public class AlreadyExists extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists"); + + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new AlreadyExistsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new AlreadyExistsTupleSchemeFactory()); + } + + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyExists.class, metaDataMap); + } + + public AlreadyExists() { + } + + public AlreadyExists( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public AlreadyExists(AlreadyExists other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public AlreadyExists deepCopy() { + return new AlreadyExists(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public AlreadyExists setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof AlreadyExists) + return this.equals((AlreadyExists)that); + return false; + } + + public boolean equals(AlreadyExists that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(AlreadyExists other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + AlreadyExists typedOther = (AlreadyExists)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("AlreadyExists("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class AlreadyExistsStandardSchemeFactory implements SchemeFactory { + public AlreadyExistsStandardScheme getScheme() { + return new AlreadyExistsStandardScheme(); + } + } + + private static class AlreadyExistsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, AlreadyExists struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, AlreadyExists struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class AlreadyExistsTupleSchemeFactory implements SchemeFactory { + public AlreadyExistsTupleScheme getScheme() { + return new AlreadyExistsTupleScheme(); + } + } + + private static class AlreadyExistsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, AlreadyExists struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, AlreadyExists struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java new file mode 100644 index 0000000..d5df940 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java @@ -0,0 +1,549 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A BatchMutation object is used to apply a number of Mutations to a single row. + */ +public class BatchMutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation"); + + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new BatchMutationStandardSchemeFactory()); + schemes.put(TupleScheme.class, new BatchMutationTupleSchemeFactory()); + } + + public ByteBuffer row; // required + public List mutations; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROW((short)1, "row"), + MUTATIONS((short)2, "mutations"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROW + return ROW; + case 2: // MUTATIONS + return MUTATIONS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Mutation.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap); + } + + public BatchMutation() { + } + + public BatchMutation( + ByteBuffer row, + List mutations) + { + this(); + this.row = row; + this.mutations = mutations; + } + + /** + * Performs a deep copy on other. + */ + public BatchMutation(BatchMutation other) { + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + } + + public BatchMutation deepCopy() { + return new BatchMutation(this); + } + + @Override + public void clear() { + this.row = null; + this.mutations = null; + } + + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + public BatchMutation setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public BatchMutation setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + public List getMutations() { + return this.mutations; + } + + public BatchMutation setMutations(List mutations) { + this.mutations = mutations; + return this; + } + + public void unsetMutations() { + this.mutations = null; + } + + /** Returns true if field mutations is set (has been assigned a value) and false otherwise */ + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof BatchMutation) + return this.equals((BatchMutation)that); + return false; + } + + public boolean equals(BatchMutation that) { + if (that == null) + return false; + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); + if (this_present_mutations || that_present_mutations) { + if (!(this_present_mutations && that_present_mutations)) + return false; + if (!this.mutations.equals(that.mutations)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(BatchMutation other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + BatchMutation typedOther = (BatchMutation)other; + + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMutations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("BatchMutation("); + boolean first = true; + + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class BatchMutationStandardSchemeFactory implements SchemeFactory { + public BatchMutationStandardScheme getScheme() { + return new BatchMutationStandardScheme(); + } + } + + private static class BatchMutationStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, BatchMutation struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MUTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list0 = iprot.readListBegin(); + struct.mutations = new ArrayList(_list0.size); + for (int _i1 = 0; _i1 < _list0.size; ++_i1) + { + Mutation _elem2; // optional + _elem2 = new Mutation(); + _elem2.read(iprot); + struct.mutations.add(_elem2); + } + iprot.readListEnd(); + } + struct.setMutationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, BatchMutation struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.mutations != null) { + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size())); + for (Mutation _iter3 : struct.mutations) + { + _iter3.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class BatchMutationTupleSchemeFactory implements SchemeFactory { + public BatchMutationTupleScheme getScheme() { + return new BatchMutationTupleScheme(); + } + } + + private static class BatchMutationTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRow()) { + optionals.set(0); + } + if (struct.isSetMutations()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetMutations()) { + { + oprot.writeI32(struct.mutations.size()); + for (Mutation _iter4 : struct.mutations) + { + _iter4.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, BatchMutation struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.mutations = new ArrayList(_list5.size); + for (int _i6 = 0; _i6 < _list5.size; ++_i6) + { + Mutation _elem7; // optional + _elem7 = new Mutation(); + _elem7.read(iprot); + struct.mutations.add(_elem7); + } + } + struct.setMutationsIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java new file mode 100644 index 0000000..4ce85e7 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java @@ -0,0 +1,1184 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 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. + */ +public class ColumnDescriptor implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor"); + + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField COMPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("compression", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField IN_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("inMemory", org.apache.thrift.protocol.TType.BOOL, (short)4); + private static final org.apache.thrift.protocol.TField BLOOM_FILTER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterType", org.apache.thrift.protocol.TType.STRING, (short)5); + private static final org.apache.thrift.protocol.TField BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterVectorSize", org.apache.thrift.protocol.TType.I32, (short)6); + private static final org.apache.thrift.protocol.TField BLOOM_FILTER_NB_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterNbHashes", org.apache.thrift.protocol.TType.I32, (short)7); + private static final org.apache.thrift.protocol.TField BLOCK_CACHE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("blockCacheEnabled", org.apache.thrift.protocol.TType.BOOL, (short)8); + private static final org.apache.thrift.protocol.TField TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeToLive", org.apache.thrift.protocol.TType.I32, (short)9); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new ColumnDescriptorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new ColumnDescriptorTupleSchemeFactory()); + } + + public ByteBuffer name; // required + public int maxVersions; // required + public String compression; // required + public boolean inMemory; // required + public String bloomFilterType; // required + public int bloomFilterVectorSize; // required + public int bloomFilterNbHashes; // required + public boolean blockCacheEnabled; // required + public int timeToLive; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + NAME((short)1, "name"), + MAX_VERSIONS((short)2, "maxVersions"), + COMPRESSION((short)3, "compression"), + IN_MEMORY((short)4, "inMemory"), + BLOOM_FILTER_TYPE((short)5, "bloomFilterType"), + BLOOM_FILTER_VECTOR_SIZE((short)6, "bloomFilterVectorSize"), + BLOOM_FILTER_NB_HASHES((short)7, "bloomFilterNbHashes"), + BLOCK_CACHE_ENABLED((short)8, "blockCacheEnabled"), + TIME_TO_LIVE((short)9, "timeToLive"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // NAME + return NAME; + case 2: // MAX_VERSIONS + return MAX_VERSIONS; + case 3: // COMPRESSION + return COMPRESSION; + case 4: // IN_MEMORY + return IN_MEMORY; + case 5: // BLOOM_FILTER_TYPE + return BLOOM_FILTER_TYPE; + case 6: // BLOOM_FILTER_VECTOR_SIZE + return BLOOM_FILTER_VECTOR_SIZE; + case 7: // BLOOM_FILTER_NB_HASHES + return BLOOM_FILTER_NB_HASHES; + case 8: // BLOCK_CACHE_ENABLED + return BLOCK_CACHE_ENABLED; + case 9: // TIME_TO_LIVE + return TIME_TO_LIVE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __MAXVERSIONS_ISSET_ID = 0; + private static final int __INMEMORY_ISSET_ID = 1; + private static final int __BLOOMFILTERVECTORSIZE_ISSET_ID = 2; + private static final int __BLOOMFILTERNBHASHES_ISSET_ID = 3; + private static final int __BLOCKCACHEENABLED_ISSET_ID = 4; + private static final int __TIMETOLIVE_ISSET_ID = 5; + private BitSet __isset_bit_vector = new BitSet(6); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.COMPRESSION, new org.apache.thrift.meta_data.FieldMetaData("compression", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("inMemory", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.BLOOM_FILTER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterVectorSize", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.BLOOM_FILTER_NB_HASHES, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterNbHashes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("blockCacheEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("timeToLive", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap); + } + + public ColumnDescriptor() { + this.maxVersions = 3; + + this.compression = "NONE"; + + this.inMemory = false; + + this.bloomFilterType = "NONE"; + + this.bloomFilterVectorSize = 0; + + this.bloomFilterNbHashes = 0; + + this.blockCacheEnabled = false; + + this.timeToLive = -1; + + } + + public ColumnDescriptor( + ByteBuffer name, + int maxVersions, + String compression, + boolean inMemory, + String bloomFilterType, + int bloomFilterVectorSize, + int bloomFilterNbHashes, + boolean blockCacheEnabled, + int timeToLive) + { + this(); + this.name = name; + this.maxVersions = maxVersions; + setMaxVersionsIsSet(true); + this.compression = compression; + this.inMemory = inMemory; + setInMemoryIsSet(true); + this.bloomFilterType = bloomFilterType; + this.bloomFilterVectorSize = bloomFilterVectorSize; + setBloomFilterVectorSizeIsSet(true); + this.bloomFilterNbHashes = bloomFilterNbHashes; + setBloomFilterNbHashesIsSet(true); + this.blockCacheEnabled = blockCacheEnabled; + setBlockCacheEnabledIsSet(true); + this.timeToLive = timeToLive; + setTimeToLiveIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public ColumnDescriptor(ColumnDescriptor other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetName()) { + this.name = other.name; + } + this.maxVersions = other.maxVersions; + if (other.isSetCompression()) { + this.compression = other.compression; + } + this.inMemory = other.inMemory; + if (other.isSetBloomFilterType()) { + this.bloomFilterType = other.bloomFilterType; + } + this.bloomFilterVectorSize = other.bloomFilterVectorSize; + this.bloomFilterNbHashes = other.bloomFilterNbHashes; + this.blockCacheEnabled = other.blockCacheEnabled; + this.timeToLive = other.timeToLive; + } + + public ColumnDescriptor deepCopy() { + return new ColumnDescriptor(this); + } + + @Override + public void clear() { + this.name = null; + this.maxVersions = 3; + + this.compression = "NONE"; + + this.inMemory = false; + + this.bloomFilterType = "NONE"; + + this.bloomFilterVectorSize = 0; + + this.bloomFilterNbHashes = 0; + + this.blockCacheEnabled = false; + + this.timeToLive = -1; + + } + + public byte[] getName() { + setName(org.apache.thrift.TBaseHelper.rightSize(name)); + return name == null ? null : name.array(); + } + + public ByteBuffer bufferForName() { + return name; + } + + public ColumnDescriptor setName(byte[] name) { + setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name)); + return this; + } + + public ColumnDescriptor setName(ByteBuffer name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public int getMaxVersions() { + return this.maxVersions; + } + + public ColumnDescriptor setMaxVersions(int maxVersions) { + this.maxVersions = maxVersions; + setMaxVersionsIsSet(true); + return this; + } + + public void unsetMaxVersions() { + __isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID); + } + + /** Returns true if field maxVersions is set (has been assigned a value) and false otherwise */ + public boolean isSetMaxVersions() { + return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID); + } + + public void setMaxVersionsIsSet(boolean value) { + __isset_bit_vector.set(__MAXVERSIONS_ISSET_ID, value); + } + + public String getCompression() { + return this.compression; + } + + public ColumnDescriptor setCompression(String compression) { + this.compression = compression; + return this; + } + + public void unsetCompression() { + this.compression = null; + } + + /** Returns true if field compression is set (has been assigned a value) and false otherwise */ + public boolean isSetCompression() { + return this.compression != null; + } + + public void setCompressionIsSet(boolean value) { + if (!value) { + this.compression = null; + } + } + + public boolean isInMemory() { + return this.inMemory; + } + + public ColumnDescriptor setInMemory(boolean inMemory) { + this.inMemory = inMemory; + setInMemoryIsSet(true); + return this; + } + + public void unsetInMemory() { + __isset_bit_vector.clear(__INMEMORY_ISSET_ID); + } + + /** Returns true if field inMemory is set (has been assigned a value) and false otherwise */ + public boolean isSetInMemory() { + return __isset_bit_vector.get(__INMEMORY_ISSET_ID); + } + + public void setInMemoryIsSet(boolean value) { + __isset_bit_vector.set(__INMEMORY_ISSET_ID, value); + } + + public String getBloomFilterType() { + return this.bloomFilterType; + } + + public ColumnDescriptor setBloomFilterType(String bloomFilterType) { + this.bloomFilterType = bloomFilterType; + return this; + } + + public void unsetBloomFilterType() { + this.bloomFilterType = null; + } + + /** Returns true if field bloomFilterType is set (has been assigned a value) and false otherwise */ + public boolean isSetBloomFilterType() { + return this.bloomFilterType != null; + } + + public void setBloomFilterTypeIsSet(boolean value) { + if (!value) { + this.bloomFilterType = null; + } + } + + public int getBloomFilterVectorSize() { + return this.bloomFilterVectorSize; + } + + public ColumnDescriptor setBloomFilterVectorSize(int bloomFilterVectorSize) { + this.bloomFilterVectorSize = bloomFilterVectorSize; + setBloomFilterVectorSizeIsSet(true); + return this; + } + + public void unsetBloomFilterVectorSize() { + __isset_bit_vector.clear(__BLOOMFILTERVECTORSIZE_ISSET_ID); + } + + /** Returns true if field bloomFilterVectorSize is set (has been assigned a value) and false otherwise */ + public boolean isSetBloomFilterVectorSize() { + return __isset_bit_vector.get(__BLOOMFILTERVECTORSIZE_ISSET_ID); + } + + public void setBloomFilterVectorSizeIsSet(boolean value) { + __isset_bit_vector.set(__BLOOMFILTERVECTORSIZE_ISSET_ID, value); + } + + public int getBloomFilterNbHashes() { + return this.bloomFilterNbHashes; + } + + public ColumnDescriptor setBloomFilterNbHashes(int bloomFilterNbHashes) { + this.bloomFilterNbHashes = bloomFilterNbHashes; + setBloomFilterNbHashesIsSet(true); + return this; + } + + public void unsetBloomFilterNbHashes() { + __isset_bit_vector.clear(__BLOOMFILTERNBHASHES_ISSET_ID); + } + + /** Returns true if field bloomFilterNbHashes is set (has been assigned a value) and false otherwise */ + public boolean isSetBloomFilterNbHashes() { + return __isset_bit_vector.get(__BLOOMFILTERNBHASHES_ISSET_ID); + } + + public void setBloomFilterNbHashesIsSet(boolean value) { + __isset_bit_vector.set(__BLOOMFILTERNBHASHES_ISSET_ID, value); + } + + public boolean isBlockCacheEnabled() { + return this.blockCacheEnabled; + } + + public ColumnDescriptor setBlockCacheEnabled(boolean blockCacheEnabled) { + this.blockCacheEnabled = blockCacheEnabled; + setBlockCacheEnabledIsSet(true); + return this; + } + + public void unsetBlockCacheEnabled() { + __isset_bit_vector.clear(__BLOCKCACHEENABLED_ISSET_ID); + } + + /** Returns true if field blockCacheEnabled is set (has been assigned a value) and false otherwise */ + public boolean isSetBlockCacheEnabled() { + return __isset_bit_vector.get(__BLOCKCACHEENABLED_ISSET_ID); + } + + public void setBlockCacheEnabledIsSet(boolean value) { + __isset_bit_vector.set(__BLOCKCACHEENABLED_ISSET_ID, value); + } + + public int getTimeToLive() { + return this.timeToLive; + } + + public ColumnDescriptor setTimeToLive(int timeToLive) { + this.timeToLive = timeToLive; + setTimeToLiveIsSet(true); + return this; + } + + public void unsetTimeToLive() { + __isset_bit_vector.clear(__TIMETOLIVE_ISSET_ID); + } + + /** Returns true if field timeToLive is set (has been assigned a value) and false otherwise */ + public boolean isSetTimeToLive() { + return __isset_bit_vector.get(__TIMETOLIVE_ISSET_ID); + } + + public void setTimeToLiveIsSet(boolean value) { + __isset_bit_vector.set(__TIMETOLIVE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case NAME: + if (value == null) { + unsetName(); + } else { + setName((ByteBuffer)value); + } + break; + + case MAX_VERSIONS: + if (value == null) { + unsetMaxVersions(); + } else { + setMaxVersions((Integer)value); + } + break; + + case COMPRESSION: + if (value == null) { + unsetCompression(); + } else { + setCompression((String)value); + } + break; + + case IN_MEMORY: + if (value == null) { + unsetInMemory(); + } else { + setInMemory((Boolean)value); + } + break; + + case BLOOM_FILTER_TYPE: + if (value == null) { + unsetBloomFilterType(); + } else { + setBloomFilterType((String)value); + } + break; + + case BLOOM_FILTER_VECTOR_SIZE: + if (value == null) { + unsetBloomFilterVectorSize(); + } else { + setBloomFilterVectorSize((Integer)value); + } + break; + + case BLOOM_FILTER_NB_HASHES: + if (value == null) { + unsetBloomFilterNbHashes(); + } else { + setBloomFilterNbHashes((Integer)value); + } + break; + + case BLOCK_CACHE_ENABLED: + if (value == null) { + unsetBlockCacheEnabled(); + } else { + setBlockCacheEnabled((Boolean)value); + } + break; + + case TIME_TO_LIVE: + if (value == null) { + unsetTimeToLive(); + } else { + setTimeToLive((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case NAME: + return getName(); + + case MAX_VERSIONS: + return Integer.valueOf(getMaxVersions()); + + case COMPRESSION: + return getCompression(); + + case IN_MEMORY: + return Boolean.valueOf(isInMemory()); + + case BLOOM_FILTER_TYPE: + return getBloomFilterType(); + + case BLOOM_FILTER_VECTOR_SIZE: + return Integer.valueOf(getBloomFilterVectorSize()); + + case BLOOM_FILTER_NB_HASHES: + return Integer.valueOf(getBloomFilterNbHashes()); + + case BLOCK_CACHE_ENABLED: + return Boolean.valueOf(isBlockCacheEnabled()); + + case TIME_TO_LIVE: + return Integer.valueOf(getTimeToLive()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case NAME: + return isSetName(); + case MAX_VERSIONS: + return isSetMaxVersions(); + case COMPRESSION: + return isSetCompression(); + case IN_MEMORY: + return isSetInMemory(); + case BLOOM_FILTER_TYPE: + return isSetBloomFilterType(); + case BLOOM_FILTER_VECTOR_SIZE: + return isSetBloomFilterVectorSize(); + case BLOOM_FILTER_NB_HASHES: + return isSetBloomFilterNbHashes(); + case BLOCK_CACHE_ENABLED: + return isSetBlockCacheEnabled(); + case TIME_TO_LIVE: + return isSetTimeToLive(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof ColumnDescriptor) + return this.equals((ColumnDescriptor)that); + return false; + } + + public boolean equals(ColumnDescriptor that) { + if (that == null) + return false; + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_maxVersions = true; + boolean that_present_maxVersions = true; + if (this_present_maxVersions || that_present_maxVersions) { + if (!(this_present_maxVersions && that_present_maxVersions)) + return false; + if (this.maxVersions != that.maxVersions) + return false; + } + + boolean this_present_compression = true && this.isSetCompression(); + boolean that_present_compression = true && that.isSetCompression(); + if (this_present_compression || that_present_compression) { + if (!(this_present_compression && that_present_compression)) + return false; + if (!this.compression.equals(that.compression)) + return false; + } + + boolean this_present_inMemory = true; + boolean that_present_inMemory = true; + if (this_present_inMemory || that_present_inMemory) { + if (!(this_present_inMemory && that_present_inMemory)) + return false; + if (this.inMemory != that.inMemory) + return false; + } + + boolean this_present_bloomFilterType = true && this.isSetBloomFilterType(); + boolean that_present_bloomFilterType = true && that.isSetBloomFilterType(); + if (this_present_bloomFilterType || that_present_bloomFilterType) { + if (!(this_present_bloomFilterType && that_present_bloomFilterType)) + return false; + if (!this.bloomFilterType.equals(that.bloomFilterType)) + return false; + } + + boolean this_present_bloomFilterVectorSize = true; + boolean that_present_bloomFilterVectorSize = true; + if (this_present_bloomFilterVectorSize || that_present_bloomFilterVectorSize) { + if (!(this_present_bloomFilterVectorSize && that_present_bloomFilterVectorSize)) + return false; + if (this.bloomFilterVectorSize != that.bloomFilterVectorSize) + return false; + } + + boolean this_present_bloomFilterNbHashes = true; + boolean that_present_bloomFilterNbHashes = true; + if (this_present_bloomFilterNbHashes || that_present_bloomFilterNbHashes) { + if (!(this_present_bloomFilterNbHashes && that_present_bloomFilterNbHashes)) + return false; + if (this.bloomFilterNbHashes != that.bloomFilterNbHashes) + return false; + } + + boolean this_present_blockCacheEnabled = true; + boolean that_present_blockCacheEnabled = true; + if (this_present_blockCacheEnabled || that_present_blockCacheEnabled) { + if (!(this_present_blockCacheEnabled && that_present_blockCacheEnabled)) + return false; + if (this.blockCacheEnabled != that.blockCacheEnabled) + return false; + } + + boolean this_present_timeToLive = true; + boolean that_present_timeToLive = true; + if (this_present_timeToLive || that_present_timeToLive) { + if (!(this_present_timeToLive && that_present_timeToLive)) + return false; + if (this.timeToLive != that.timeToLive) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(ColumnDescriptor other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + ColumnDescriptor typedOther = (ColumnDescriptor)other; + + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMaxVersions()).compareTo(typedOther.isSetMaxVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMaxVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCompression()).compareTo(typedOther.isSetCompression()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCompression()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression, typedOther.compression); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetInMemory()).compareTo(typedOther.isSetInMemory()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetInMemory()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, typedOther.inMemory); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBloomFilterType()).compareTo(typedOther.isSetBloomFilterType()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBloomFilterType()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBloomFilterVectorSize()).compareTo(typedOther.isSetBloomFilterVectorSize()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBloomFilterVectorSize()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterVectorSize, typedOther.bloomFilterVectorSize); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBloomFilterNbHashes()).compareTo(typedOther.isSetBloomFilterNbHashes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBloomFilterNbHashes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterNbHashes, typedOther.bloomFilterNbHashes); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetBlockCacheEnabled()).compareTo(typedOther.isSetBlockCacheEnabled()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetBlockCacheEnabled()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimeToLive()).compareTo(typedOther.isSetTimeToLive()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimeToLive()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("ColumnDescriptor("); + boolean first = true; + + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("maxVersions:"); + sb.append(this.maxVersions); + first = false; + if (!first) sb.append(", "); + sb.append("compression:"); + if (this.compression == null) { + sb.append("null"); + } else { + sb.append(this.compression); + } + first = false; + if (!first) sb.append(", "); + sb.append("inMemory:"); + sb.append(this.inMemory); + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterType:"); + if (this.bloomFilterType == null) { + sb.append("null"); + } else { + sb.append(this.bloomFilterType); + } + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterVectorSize:"); + sb.append(this.bloomFilterVectorSize); + first = false; + if (!first) sb.append(", "); + sb.append("bloomFilterNbHashes:"); + sb.append(this.bloomFilterNbHashes); + first = false; + if (!first) sb.append(", "); + sb.append("blockCacheEnabled:"); + sb.append(this.blockCacheEnabled); + first = false; + if (!first) sb.append(", "); + sb.append("timeToLive:"); + sb.append(this.timeToLive); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class ColumnDescriptorStandardSchemeFactory implements SchemeFactory { + public ColumnDescriptorStandardScheme getScheme() { + return new ColumnDescriptorStandardScheme(); + } + } + + private static class ColumnDescriptorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, ColumnDescriptor struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // MAX_VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.maxVersions = iprot.readI32(); + struct.setMaxVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COMPRESSION + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.compression = iprot.readString(); + struct.setCompressionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // IN_MEMORY + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.inMemory = iprot.readBool(); + struct.setInMemoryIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // BLOOM_FILTER_TYPE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.bloomFilterType = iprot.readString(); + struct.setBloomFilterTypeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // BLOOM_FILTER_VECTOR_SIZE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.bloomFilterVectorSize = iprot.readI32(); + struct.setBloomFilterVectorSizeIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // BLOOM_FILTER_NB_HASHES + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.bloomFilterNbHashes = iprot.readI32(); + struct.setBloomFilterNbHashesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 8: // BLOCK_CACHE_ENABLED + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.blockCacheEnabled = iprot.readBool(); + struct.setBlockCacheEnabledIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 9: // TIME_TO_LIVE + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.timeToLive = iprot.readI32(); + struct.setTimeToLiveIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, ColumnDescriptor struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeBinary(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(MAX_VERSIONS_FIELD_DESC); + oprot.writeI32(struct.maxVersions); + oprot.writeFieldEnd(); + if (struct.compression != null) { + oprot.writeFieldBegin(COMPRESSION_FIELD_DESC); + oprot.writeString(struct.compression); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(IN_MEMORY_FIELD_DESC); + oprot.writeBool(struct.inMemory); + oprot.writeFieldEnd(); + if (struct.bloomFilterType != null) { + oprot.writeFieldBegin(BLOOM_FILTER_TYPE_FIELD_DESC); + oprot.writeString(struct.bloomFilterType); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC); + oprot.writeI32(struct.bloomFilterVectorSize); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(BLOOM_FILTER_NB_HASHES_FIELD_DESC); + oprot.writeI32(struct.bloomFilterNbHashes); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(BLOCK_CACHE_ENABLED_FIELD_DESC); + oprot.writeBool(struct.blockCacheEnabled); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(TIME_TO_LIVE_FIELD_DESC); + oprot.writeI32(struct.timeToLive); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class ColumnDescriptorTupleSchemeFactory implements SchemeFactory { + public ColumnDescriptorTupleScheme getScheme() { + return new ColumnDescriptorTupleScheme(); + } + } + + private static class ColumnDescriptorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetName()) { + optionals.set(0); + } + if (struct.isSetMaxVersions()) { + optionals.set(1); + } + if (struct.isSetCompression()) { + optionals.set(2); + } + if (struct.isSetInMemory()) { + optionals.set(3); + } + if (struct.isSetBloomFilterType()) { + optionals.set(4); + } + if (struct.isSetBloomFilterVectorSize()) { + optionals.set(5); + } + if (struct.isSetBloomFilterNbHashes()) { + optionals.set(6); + } + if (struct.isSetBlockCacheEnabled()) { + optionals.set(7); + } + if (struct.isSetTimeToLive()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); + if (struct.isSetName()) { + oprot.writeBinary(struct.name); + } + if (struct.isSetMaxVersions()) { + oprot.writeI32(struct.maxVersions); + } + if (struct.isSetCompression()) { + oprot.writeString(struct.compression); + } + if (struct.isSetInMemory()) { + oprot.writeBool(struct.inMemory); + } + if (struct.isSetBloomFilterType()) { + oprot.writeString(struct.bloomFilterType); + } + if (struct.isSetBloomFilterVectorSize()) { + oprot.writeI32(struct.bloomFilterVectorSize); + } + if (struct.isSetBloomFilterNbHashes()) { + oprot.writeI32(struct.bloomFilterNbHashes); + } + if (struct.isSetBlockCacheEnabled()) { + oprot.writeBool(struct.blockCacheEnabled); + } + if (struct.isSetTimeToLive()) { + oprot.writeI32(struct.timeToLive); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, ColumnDescriptor struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(9); + if (incoming.get(0)) { + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + } + if (incoming.get(1)) { + struct.maxVersions = iprot.readI32(); + struct.setMaxVersionsIsSet(true); + } + if (incoming.get(2)) { + struct.compression = iprot.readString(); + struct.setCompressionIsSet(true); + } + if (incoming.get(3)) { + struct.inMemory = iprot.readBool(); + struct.setInMemoryIsSet(true); + } + if (incoming.get(4)) { + struct.bloomFilterType = iprot.readString(); + struct.setBloomFilterTypeIsSet(true); + } + if (incoming.get(5)) { + struct.bloomFilterVectorSize = iprot.readI32(); + struct.setBloomFilterVectorSizeIsSet(true); + } + if (incoming.get(6)) { + struct.bloomFilterNbHashes = iprot.readI32(); + struct.setBloomFilterNbHashesIsSet(true); + } + if (incoming.get(7)) { + struct.blockCacheEnabled = iprot.readBool(); + struct.setBlockCacheEnabledIsSet(true); + } + if (incoming.get(8)) { + struct.timeToLive = iprot.readI32(); + struct.setTimeToLiveIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java new file mode 100644 index 0000000..193d1ea --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java @@ -0,0 +1,52969 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class Hbase { + + public interface Iface { + + /** + * Brings a table on-line (enables it) + * + * @param tableName name of the table + */ + public void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + /** + * Disables a table (takes it off-line) If it is being served, the master + * will tell the servers to stop serving it. + * + * @param tableName name of the table + */ + public void disableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + /** + * @return true if table is on-line + * + * @param tableName name of the table to check + */ + public boolean isTableEnabled(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + public void compact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException; + + public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException; + + /** + * List all the userspace tables. + * + * @return returns a list of names + */ + public List getTableNames() throws IOError, org.apache.thrift.TException; + + /** + * List all the column families assoicated with a table. + * + * @return list of column family descriptors + * + * @param tableName table name + */ + public Map getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + /** + * List the regions associated with a table. + * + * @return list of region descriptors + * + * @param tableName table name + */ + public List getTableRegions(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + /** + * Create a table with the specified column families. The name + * field for each ColumnDescriptor must be set and must end in a + * colon (:). All other fields are optional and will get default + * values if not explicitly specified. + * + * @throws IllegalArgument if an input parameter is invalid + * + * @throws AlreadyExists if the table name already exists + * + * @param tableName name of table to create + * + * @param columnFamilies list of column family descriptors + */ + public void createTable(ByteBuffer tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException; + + /** + * Deletes a table + * + * @throws IOError if table doesn't exist on server or there was some other + * problem + * + * @param tableName name of table to delete + */ + public void deleteTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException; + + /** + * Get a single TCell for the specified table, row, and column at the + * latest timestamp. Returns an empty list if no such value exists. + * + * @return value for specified row/column + * + * @param tableName name of table + * + * @param row row key + * + * @param column column name + * + * @param attributes Get attributes + */ + public List get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified number of versions for the specified table, + * row, and column. + * + * @return list of cells for specified row/column + * + * @param tableName name of table + * + * @param row row key + * + * @param column column name + * + * @param numVersions number of versions to retrieve + * + * @param attributes Get attributes + */ + public List getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified number of versions for the specified table, + * row, and column. Only versions less than or equal to the specified + * timestamp will be returned. + * + * @return list of cells for specified row/column + * + * @param tableName name of table + * + * @param row row key + * + * @param column column name + * + * @param timestamp timestamp + * + * @param numVersions number of versions to retrieve + * + * @param attributes Get attributes + */ + public List getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get all the data for the specified table and row at the latest + * timestamp. Returns an empty list if the row does not exist. + * + * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName name of table + * + * @param row row key + * + * @param attributes Get attributes + */ + public List getRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified columns for the specified table and row at the latest + * timestamp. Returns an empty list if the row does not exist. + * + * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName name of table + * + * @param row row key + * + * @param columns List of columns to return, null for all columns + * + * @param attributes Get attributes + */ + public List getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get all the data for the specified table and row at the specified + * timestamp. Returns an empty list if the row does not exist. + * + * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName name of the table + * + * @param row row key + * + * @param timestamp timestamp + * + * @param attributes Get attributes + */ + public List getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified columns for the specified table and row at the specified + * timestamp. Returns an empty list if the row does not exist. + * + * @return TRowResult containing the row and map of columns to TCells + * + * @param tableName name of table + * + * @param row row key + * + * @param columns List of columns to return, null for all columns + * + * @param timestamp + * @param attributes Get attributes + */ + public List getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get all the data for the specified table and rows at the latest + * timestamp. Returns an empty list if no rows exist. + * + * @return TRowResult containing the rows and map of columns to TCells + * + * @param tableName name of table + * + * @param rows row keys + * + * @param attributes Get attributes + */ + public List getRows(ByteBuffer tableName, List rows, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified columns for the specified table and rows at the latest + * timestamp. Returns an empty list if no rows exist. + * + * @return TRowResult containing the rows and map of columns to TCells + * + * @param tableName name of table + * + * @param rows row keys + * + * @param columns List of columns to return, null for all columns + * + * @param attributes Get attributes + */ + public List getRowsWithColumns(ByteBuffer tableName, List rows, List columns, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get all the data for the specified table and rows at the specified + * timestamp. Returns an empty list if no rows exist. + * + * @return TRowResult containing the rows and map of columns to TCells + * + * @param tableName name of the table + * + * @param rows row keys + * + * @param timestamp timestamp + * + * @param attributes Get attributes + */ + public List getRowsTs(ByteBuffer tableName, List rows, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get the specified columns for the specified table and rows at the specified + * timestamp. Returns an empty list if no rows exist. + * + * @return TRowResult containing the rows and map of columns to TCells + * + * @param tableName name of table + * + * @param rows row keys + * + * @param columns List of columns to return, null for all columns + * + * @param timestamp + * @param attributes Get attributes + */ + public List getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Apply a series of mutations (updates/deletes) to a row in a + * single transaction. If an exception is thrown, then the + * transaction is aborted. Default current timestamp is used, and + * all entries will have an identical timestamp. + * + * @param tableName name of table + * + * @param row row key + * + * @param mutations list of mutation commands + * + * @param attributes Mutation attributes + */ + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Apply a series of mutations (updates/deletes) to a row in a + * single transaction. If an exception is thrown, then the + * transaction is aborted. The specified timestamp is used, and + * all entries will have an identical timestamp. + * + * @param tableName name of table + * + * @param row row key + * + * @param mutations list of mutation commands + * + * @param timestamp timestamp + * + * @param attributes Mutation attributes + */ + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Apply a series of batches (each a series of mutations on a single row) + * in a single transaction. If an exception is thrown, then the + * transaction is aborted. Default current timestamp is used, and + * all entries will have an identical timestamp. + * + * @param tableName name of table + * + * @param rowBatches list of row batches + * + * @param attributes Mutation attributes + */ + public void mutateRows(ByteBuffer tableName, List rowBatches, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Apply a series of batches (each a series of mutations on a single row) + * in a single transaction. If an exception is thrown, then the + * transaction is aborted. The specified timestamp is used, and + * all entries will have an identical timestamp. + * + * @param tableName name of table + * + * @param rowBatches list of row batches + * + * @param timestamp timestamp + * + * @param attributes Mutation attributes + */ + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Atomically increment the column value specified. Returns the next value post increment. + * + * @param tableName name of table + * + * @param row row to increment + * + * @param column name of column + * + * @param value amount to increment by + */ + public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Delete all cells that match the passed row and column. + * + * @param tableName name of table + * + * @param row Row to update + * + * @param column name of column whose value is to be deleted + * + * @param attributes Delete attributes + */ + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Delete all cells that match the passed row and column and whose + * timestamp is equal-to or older than the passed timestamp. + * + * @param tableName name of table + * + * @param row Row to update + * + * @param column name of column whose value is to be deleted + * + * @param timestamp timestamp + * + * @param attributes Delete attributes + */ + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Completely delete the row's cells. + * + * @param tableName name of table + * + * @param row key of the row to be completely deleted. + * + * @param attributes Delete attributes + */ + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Increment a cell by the ammount. + * Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. + * False is the default. Turn to true if you need the extra performance and can accept some + * data loss if a thrift server dies with increments still in the queue. + * + * @param increment The single increment to apply + */ + public void increment(TIncrement increment) throws IOError, org.apache.thrift.TException; + + public void incrementRows(List increments) throws IOError, org.apache.thrift.TException; + + /** + * Completely delete the row's cells marked with a timestamp + * equal-to or older than the passed timestamp. + * + * @param tableName name of table + * + * @param row key of the row to be completely deleted. + * + * @param timestamp timestamp + * + * @param attributes Delete attributes + */ + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get a scanner on the current table, using the Scan instance + * for the scan parameters. + * + * @param tableName name of table + * + * @param scan Scan instance + * + * @param attributes Scan attributes + */ + public int scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get a scanner on the current table starting at the specified row and + * ending at the last row in the table. Return the specified columns. + * + * @return scanner id to be used with other scanner procedures + * + * @param tableName name of table + * + * @param startRow Starting row in table to scan. + * Send "" (empty string) to start at the first row. + * + * @param columns columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + * + * @param attributes Scan attributes + */ + public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get a scanner on the current table starting and stopping at the + * specified rows. ending at the last row in the table. Return the + * specified columns. + * + * @return scanner id to be used with other scanner procedures + * + * @param tableName name of table + * + * @param startRow Starting row in table to scan. + * Send "" (empty string) to start at the first row. + * + * @param stopRow row to stop scanning on. This row is *not* included in the + * scanner's results + * + * @param columns columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + * + * @param attributes Scan attributes + */ + public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Open a scanner for a given prefix. That is all rows will have the specified + * prefix. No other rows will be returned. + * + * @return scanner id to use with other scanner calls + * + * @param tableName name of table + * + * @param startAndPrefix the prefix (and thus start row) of the keys you want + * + * @param columns the columns you want returned + * + * @param attributes Scan attributes + */ + public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get a scanner on the current table starting at the specified row and + * ending at the last row in the table. Return the specified columns. + * Only values with the specified timestamp are returned. + * + * @return scanner id to be used with other scanner procedures + * + * @param tableName name of table + * + * @param startRow Starting row in table to scan. + * Send "" (empty string) to start at the first row. + * + * @param columns columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + * + * @param timestamp timestamp + * + * @param attributes Scan attributes + */ + public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Get a scanner on the current table starting and stopping at the + * specified rows. ending at the last row in the table. Return the + * specified columns. Only values with the specified timestamp are + * returned. + * + * @return scanner id to be used with other scanner procedures + * + * @param tableName name of table + * + * @param startRow Starting row in table to scan. + * Send "" (empty string) to start at the first row. + * + * @param stopRow row to stop scanning on. This row is *not* included in the + * scanner's results + * + * @param columns columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + * + * @param timestamp timestamp + * + * @param attributes Scan attributes + */ + public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException; + + /** + * Returns the scanner's current row value and advances to the next + * row in the table. When there are no more rows in the table, or a key + * greater-than-or-equal-to the scanner's specified stopRow is reached, + * an empty list is returned. + * + * @return a TRowResult containing the current row and a map of the columns to TCells. + * + * @throws IllegalArgument if ScannerID is invalid + * + * @throws NotFound when the scanner reaches the end + * + * @param id id of a scanner returned by scannerOpen + */ + public List scannerGet(int id) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Returns, starting at the scanner's current row value nbRows worth of + * rows and advances to the next row in the table. When there are no more + * rows in the table, or a key greater-than-or-equal-to the scanner's + * specified stopRow is reached, an empty list is returned. + * + * @return a TRowResult containing the current row and a map of the columns to TCells. + * + * @throws IllegalArgument if ScannerID is invalid + * + * @throws NotFound when the scanner reaches the end + * + * @param id id of a scanner returned by scannerOpen + * + * @param nbRows number of results to return + */ + public List scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Closes the server-state associated with an open scanner. + * + * @throws IllegalArgument if ScannerID is invalid + * + * @param id id of a scanner returned by scannerOpen + */ + public void scannerClose(int id) throws IOError, IllegalArgument, org.apache.thrift.TException; + + /** + * Get the row just before the specified one. + * + * @return value for specified row/column + * + * @param tableName name of table + * + * @param row row key + * + * @param family column name + */ + public List getRowOrBefore(ByteBuffer tableName, ByteBuffer row, ByteBuffer family) throws IOError, org.apache.thrift.TException; + + /** + * Get the regininfo for the specified row. It scans + * the metatable to find region's start and end keys. + * + * @return value for specified row/column + * + * @param row row key + */ + public TRegionInfo getRegionInfo(ByteBuffer row) throws IOError, org.apache.thrift.TException; + + } + + public interface AsyncIface { + + public void enableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void disableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void isTableEnabled(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void compact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void majorCompact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableNames(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getTableRegions(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void createTable(ByteBuffer tableName, List columnFamilies, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRow(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRows(ByteBuffer tableName, List rows, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowsWithColumns(ByteBuffer tableName, List rows, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowsTs(ByteBuffer tableName, List rows, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mutateRows(ByteBuffer tableName, List rowBatches, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void increment(TIncrement increment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void incrementRows(List increments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerGet(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerGetList(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void scannerClose(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRowOrBefore(ByteBuffer tableName, ByteBuffer row, ByteBuffer family, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + public void getRegionInfo(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + + } + + public static class Client extends org.apache.thrift.TServiceClient implements Iface { + public static class Factory implements org.apache.thrift.TServiceClientFactory { + public Factory() {} + public Client getClient(org.apache.thrift.protocol.TProtocol prot) { + return new Client(prot); + } + public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + return new Client(iprot, oprot); + } + } + + public Client(org.apache.thrift.protocol.TProtocol prot) + { + super(prot, prot); + } + + public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { + super(iprot, oprot); + } + + public void enableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_enableTable(tableName); + recv_enableTable(); + } + + public void send_enableTable(ByteBuffer tableName) throws org.apache.thrift.TException + { + enableTable_args args = new enableTable_args(); + args.setTableName(tableName); + sendBase("enableTable", args); + } + + public void recv_enableTable() throws IOError, org.apache.thrift.TException + { + enableTable_result result = new enableTable_result(); + receiveBase(result, "enableTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void disableTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_disableTable(tableName); + recv_disableTable(); + } + + public void send_disableTable(ByteBuffer tableName) throws org.apache.thrift.TException + { + disableTable_args args = new disableTable_args(); + args.setTableName(tableName); + sendBase("disableTable", args); + } + + public void recv_disableTable() throws IOError, org.apache.thrift.TException + { + disableTable_result result = new disableTable_result(); + receiveBase(result, "disableTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public boolean isTableEnabled(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_isTableEnabled(tableName); + return recv_isTableEnabled(); + } + + public void send_isTableEnabled(ByteBuffer tableName) throws org.apache.thrift.TException + { + isTableEnabled_args args = new isTableEnabled_args(); + args.setTableName(tableName); + sendBase("isTableEnabled", args); + } + + public boolean recv_isTableEnabled() throws IOError, org.apache.thrift.TException + { + isTableEnabled_result result = new isTableEnabled_result(); + receiveBase(result, "isTableEnabled"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); + } + + public void compact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException + { + send_compact(tableNameOrRegionName); + recv_compact(); + } + + public void send_compact(ByteBuffer tableNameOrRegionName) throws org.apache.thrift.TException + { + compact_args args = new compact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + sendBase("compact", args); + } + + public void recv_compact() throws IOError, org.apache.thrift.TException + { + compact_result result = new compact_result(); + receiveBase(result, "compact"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void majorCompact(ByteBuffer tableNameOrRegionName) throws IOError, org.apache.thrift.TException + { + send_majorCompact(tableNameOrRegionName); + recv_majorCompact(); + } + + public void send_majorCompact(ByteBuffer tableNameOrRegionName) throws org.apache.thrift.TException + { + majorCompact_args args = new majorCompact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + sendBase("majorCompact", args); + } + + public void recv_majorCompact() throws IOError, org.apache.thrift.TException + { + majorCompact_result result = new majorCompact_result(); + receiveBase(result, "majorCompact"); + if (result.io != null) { + throw result.io; + } + return; + } + + public List getTableNames() throws IOError, org.apache.thrift.TException + { + send_getTableNames(); + return recv_getTableNames(); + } + + public void send_getTableNames() throws org.apache.thrift.TException + { + getTableNames_args args = new getTableNames_args(); + sendBase("getTableNames", args); + } + + public List recv_getTableNames() throws IOError, org.apache.thrift.TException + { + getTableNames_result result = new getTableNames_result(); + receiveBase(result, "getTableNames"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); + } + + public Map getColumnDescriptors(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_getColumnDescriptors(tableName); + return recv_getColumnDescriptors(); + } + + public void send_getColumnDescriptors(ByteBuffer tableName) throws org.apache.thrift.TException + { + getColumnDescriptors_args args = new getColumnDescriptors_args(); + args.setTableName(tableName); + sendBase("getColumnDescriptors", args); + } + + public Map recv_getColumnDescriptors() throws IOError, org.apache.thrift.TException + { + getColumnDescriptors_result result = new getColumnDescriptors_result(); + receiveBase(result, "getColumnDescriptors"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); + } + + public List getTableRegions(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_getTableRegions(tableName); + return recv_getTableRegions(); + } + + public void send_getTableRegions(ByteBuffer tableName) throws org.apache.thrift.TException + { + getTableRegions_args args = new getTableRegions_args(); + args.setTableName(tableName); + sendBase("getTableRegions", args); + } + + public List recv_getTableRegions() throws IOError, org.apache.thrift.TException + { + getTableRegions_result result = new getTableRegions_result(); + receiveBase(result, "getTableRegions"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); + } + + public void createTable(ByteBuffer tableName, List columnFamilies) throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException + { + send_createTable(tableName, columnFamilies); + recv_createTable(); + } + + public void send_createTable(ByteBuffer tableName, List columnFamilies) throws org.apache.thrift.TException + { + createTable_args args = new createTable_args(); + args.setTableName(tableName); + args.setColumnFamilies(columnFamilies); + sendBase("createTable", args); + } + + public void recv_createTable() throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException + { + createTable_result result = new createTable_result(); + receiveBase(result, "createTable"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + if (result.exist != null) { + throw result.exist; + } + return; + } + + public void deleteTable(ByteBuffer tableName) throws IOError, org.apache.thrift.TException + { + send_deleteTable(tableName); + recv_deleteTable(); + } + + public void send_deleteTable(ByteBuffer tableName) throws org.apache.thrift.TException + { + deleteTable_args args = new deleteTable_args(); + args.setTableName(tableName); + sendBase("deleteTable", args); + } + + public void recv_deleteTable() throws IOError, org.apache.thrift.TException + { + deleteTable_result result = new deleteTable_result(); + receiveBase(result, "deleteTable"); + if (result.io != null) { + throw result.io; + } + return; + } + + public List get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws IOError, org.apache.thrift.TException + { + send_get(tableName, row, column, attributes); + return recv_get(); + } + + public void send_get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws org.apache.thrift.TException + { + get_args args = new get_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setAttributes(attributes); + sendBase("get", args); + } + + public List recv_get() throws IOError, org.apache.thrift.TException + { + get_result result = new get_result(); + receiveBase(result, "get"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get failed: unknown result"); + } + + public List getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getVer(tableName, row, column, numVersions, attributes); + return recv_getVer(); + } + + public void send_getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes) throws org.apache.thrift.TException + { + getVer_args args = new getVer_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setNumVersions(numVersions); + args.setAttributes(attributes); + sendBase("getVer", args); + } + + public List recv_getVer() throws IOError, org.apache.thrift.TException + { + getVer_result result = new getVer_result(); + receiveBase(result, "getVer"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); + } + + public List getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getVerTs(tableName, row, column, timestamp, numVersions, attributes); + return recv_getVerTs(); + } + + public void send_getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes) throws org.apache.thrift.TException + { + getVerTs_args args = new getVerTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setNumVersions(numVersions); + args.setAttributes(attributes); + sendBase("getVerTs", args); + } + + public List recv_getVerTs() throws IOError, org.apache.thrift.TException + { + getVerTs_result result = new getVerTs_result(); + receiveBase(result, "getVerTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); + } + + public List getRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRow(tableName, row, attributes); + return recv_getRow(); + } + + public void send_getRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws org.apache.thrift.TException + { + getRow_args args = new getRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setAttributes(attributes); + sendBase("getRow", args); + } + + public List recv_getRow() throws IOError, org.apache.thrift.TException + { + getRow_result result = new getRow_result(); + receiveBase(result, "getRow"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); + } + + public List getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowWithColumns(tableName, row, columns, attributes); + return recv_getRowWithColumns(); + } + + public void send_getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes) throws org.apache.thrift.TException + { + getRowWithColumns_args args = new getRowWithColumns_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setAttributes(attributes); + sendBase("getRowWithColumns", args); + } + + public List recv_getRowWithColumns() throws IOError, org.apache.thrift.TException + { + getRowWithColumns_result result = new getRowWithColumns_result(); + receiveBase(result, "getRowWithColumns"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result"); + } + + public List getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowTs(tableName, row, timestamp, attributes); + return recv_getRowTs(); + } + + public void send_getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws org.apache.thrift.TException + { + getRowTs_args args = new getRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("getRowTs", args); + } + + public List recv_getRowTs() throws IOError, org.apache.thrift.TException + { + getRowTs_result result = new getRowTs_result(); + receiveBase(result, "getRowTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); + } + + public List getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes); + return recv_getRowWithColumnsTs(); + } + + public void send_getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes) throws org.apache.thrift.TException + { + getRowWithColumnsTs_args args = new getRowWithColumnsTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("getRowWithColumnsTs", args); + } + + public List recv_getRowWithColumnsTs() throws IOError, org.apache.thrift.TException + { + getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); + receiveBase(result, "getRowWithColumnsTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); + } + + public List getRows(ByteBuffer tableName, List rows, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRows(tableName, rows, attributes); + return recv_getRows(); + } + + public void send_getRows(ByteBuffer tableName, List rows, Map attributes) throws org.apache.thrift.TException + { + getRows_args args = new getRows_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setAttributes(attributes); + sendBase("getRows", args); + } + + public List recv_getRows() throws IOError, org.apache.thrift.TException + { + getRows_result result = new getRows_result(); + receiveBase(result, "getRows"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRows failed: unknown result"); + } + + public List getRowsWithColumns(ByteBuffer tableName, List rows, List columns, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowsWithColumns(tableName, rows, columns, attributes); + return recv_getRowsWithColumns(); + } + + public void send_getRowsWithColumns(ByteBuffer tableName, List rows, List columns, Map attributes) throws org.apache.thrift.TException + { + getRowsWithColumns_args args = new getRowsWithColumns_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); + args.setAttributes(attributes); + sendBase("getRowsWithColumns", args); + } + + public List recv_getRowsWithColumns() throws IOError, org.apache.thrift.TException + { + getRowsWithColumns_result result = new getRowsWithColumns_result(); + receiveBase(result, "getRowsWithColumns"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowsWithColumns failed: unknown result"); + } + + public List getRowsTs(ByteBuffer tableName, List rows, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowsTs(tableName, rows, timestamp, attributes); + return recv_getRowsTs(); + } + + public void send_getRowsTs(ByteBuffer tableName, List rows, long timestamp, Map attributes) throws org.apache.thrift.TException + { + getRowsTs_args args = new getRowsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("getRowsTs", args); + } + + public List recv_getRowsTs() throws IOError, org.apache.thrift.TException + { + getRowsTs_result result = new getRowsTs_result(); + receiveBase(result, "getRowsTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowsTs failed: unknown result"); + } + + public List getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes); + return recv_getRowsWithColumnsTs(); + } + + public void send_getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes) throws org.apache.thrift.TException + { + getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("getRowsWithColumnsTs", args); + } + + public List recv_getRowsWithColumnsTs() throws IOError, org.apache.thrift.TException + { + getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result(); + receiveBase(result, "getRowsWithColumnsTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowsWithColumnsTs failed: unknown result"); + } + + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_mutateRow(tableName, row, mutations, attributes); + recv_mutateRow(); + } + + public void send_mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes) throws org.apache.thrift.TException + { + mutateRow_args args = new mutateRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setAttributes(attributes); + sendBase("mutateRow", args); + } + + public void recv_mutateRow() throws IOError, IllegalArgument, org.apache.thrift.TException + { + mutateRow_result result = new mutateRow_result(); + receiveBase(result, "mutateRow"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + return; + } + + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_mutateRowTs(tableName, row, mutations, timestamp, attributes); + recv_mutateRowTs(); + } + + public void send_mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes) throws org.apache.thrift.TException + { + mutateRowTs_args args = new mutateRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("mutateRowTs", args); + } + + public void recv_mutateRowTs() throws IOError, IllegalArgument, org.apache.thrift.TException + { + mutateRowTs_result result = new mutateRowTs_result(); + receiveBase(result, "mutateRowTs"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + return; + } + + public void mutateRows(ByteBuffer tableName, List rowBatches, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_mutateRows(tableName, rowBatches, attributes); + recv_mutateRows(); + } + + public void send_mutateRows(ByteBuffer tableName, List rowBatches, Map attributes) throws org.apache.thrift.TException + { + mutateRows_args args = new mutateRows_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setAttributes(attributes); + sendBase("mutateRows", args); + } + + public void recv_mutateRows() throws IOError, IllegalArgument, org.apache.thrift.TException + { + mutateRows_result result = new mutateRows_result(); + receiveBase(result, "mutateRows"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + return; + } + + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_mutateRowsTs(tableName, rowBatches, timestamp, attributes); + recv_mutateRowsTs(); + } + + public void send_mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes) throws org.apache.thrift.TException + { + mutateRowsTs_args args = new mutateRowsTs_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("mutateRowsTs", args); + } + + public void recv_mutateRowsTs() throws IOError, IllegalArgument, org.apache.thrift.TException + { + mutateRowsTs_result result = new mutateRowsTs_result(); + receiveBase(result, "mutateRowsTs"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + return; + } + + public long atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_atomicIncrement(tableName, row, column, value); + return recv_atomicIncrement(); + } + + public void send_atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value) throws org.apache.thrift.TException + { + atomicIncrement_args args = new atomicIncrement_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setValue(value); + sendBase("atomicIncrement", args); + } + + public long recv_atomicIncrement() throws IOError, IllegalArgument, org.apache.thrift.TException + { + atomicIncrement_result result = new atomicIncrement_result(); + receiveBase(result, "atomicIncrement"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result"); + } + + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws IOError, org.apache.thrift.TException + { + send_deleteAll(tableName, row, column, attributes); + recv_deleteAll(); + } + + public void send_deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes) throws org.apache.thrift.TException + { + deleteAll_args args = new deleteAll_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setAttributes(attributes); + sendBase("deleteAll", args); + } + + public void recv_deleteAll() throws IOError, org.apache.thrift.TException + { + deleteAll_result result = new deleteAll_result(); + receiveBase(result, "deleteAll"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_deleteAllTs(tableName, row, column, timestamp, attributes); + recv_deleteAllTs(); + } + + public void send_deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes) throws org.apache.thrift.TException + { + deleteAllTs_args args = new deleteAllTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("deleteAllTs", args); + } + + public void recv_deleteAllTs() throws IOError, org.apache.thrift.TException + { + deleteAllTs_result result = new deleteAllTs_result(); + receiveBase(result, "deleteAllTs"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws IOError, org.apache.thrift.TException + { + send_deleteAllRow(tableName, row, attributes); + recv_deleteAllRow(); + } + + public void send_deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map attributes) throws org.apache.thrift.TException + { + deleteAllRow_args args = new deleteAllRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setAttributes(attributes); + sendBase("deleteAllRow", args); + } + + public void recv_deleteAllRow() throws IOError, org.apache.thrift.TException + { + deleteAllRow_result result = new deleteAllRow_result(); + receiveBase(result, "deleteAllRow"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void increment(TIncrement increment) throws IOError, org.apache.thrift.TException + { + send_increment(increment); + recv_increment(); + } + + public void send_increment(TIncrement increment) throws org.apache.thrift.TException + { + increment_args args = new increment_args(); + args.setIncrement(increment); + sendBase("increment", args); + } + + public void recv_increment() throws IOError, org.apache.thrift.TException + { + increment_result result = new increment_result(); + receiveBase(result, "increment"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void incrementRows(List increments) throws IOError, org.apache.thrift.TException + { + send_incrementRows(increments); + recv_incrementRows(); + } + + public void send_incrementRows(List increments) throws org.apache.thrift.TException + { + incrementRows_args args = new incrementRows_args(); + args.setIncrements(increments); + sendBase("incrementRows", args); + } + + public void recv_incrementRows() throws IOError, org.apache.thrift.TException + { + incrementRows_result result = new incrementRows_result(); + receiveBase(result, "incrementRows"); + if (result.io != null) { + throw result.io; + } + return; + } + + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_deleteAllRowTs(tableName, row, timestamp, attributes); + recv_deleteAllRowTs(); + } + + public void send_deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes) throws org.apache.thrift.TException + { + deleteAllRowTs_args args = new deleteAllRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("deleteAllRowTs", args); + } + + public void recv_deleteAllRowTs() throws IOError, org.apache.thrift.TException + { + deleteAllRowTs_result result = new deleteAllRowTs_result(); + receiveBase(result, "deleteAllRowTs"); + if (result.io != null) { + throw result.io; + } + return; + } + + public int scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpenWithScan(tableName, scan, attributes); + return recv_scannerOpenWithScan(); + } + + public void send_scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map attributes) throws org.apache.thrift.TException + { + scannerOpenWithScan_args args = new scannerOpenWithScan_args(); + args.setTableName(tableName); + args.setScan(scan); + args.setAttributes(attributes); + sendBase("scannerOpenWithScan", args); + } + + public int recv_scannerOpenWithScan() throws IOError, org.apache.thrift.TException + { + scannerOpenWithScan_result result = new scannerOpenWithScan_result(); + receiveBase(result, "scannerOpenWithScan"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpenWithScan failed: unknown result"); + } + + public int scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpen(tableName, startRow, columns, attributes); + return recv_scannerOpen(); + } + + public void send_scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes) throws org.apache.thrift.TException + { + scannerOpen_args args = new scannerOpen_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setAttributes(attributes); + sendBase("scannerOpen", args); + } + + public int recv_scannerOpen() throws IOError, org.apache.thrift.TException + { + scannerOpen_result result = new scannerOpen_result(); + receiveBase(result, "scannerOpen"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); + } + + public int scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes); + return recv_scannerOpenWithStop(); + } + + public void send_scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes) throws org.apache.thrift.TException + { + scannerOpenWithStop_args args = new scannerOpenWithStop_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setAttributes(attributes); + sendBase("scannerOpenWithStop", args); + } + + public int recv_scannerOpenWithStop() throws IOError, org.apache.thrift.TException + { + scannerOpenWithStop_result result = new scannerOpenWithStop_result(); + receiveBase(result, "scannerOpenWithStop"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); + } + + public int scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes); + return recv_scannerOpenWithPrefix(); + } + + public void send_scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes) throws org.apache.thrift.TException + { + scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); + args.setTableName(tableName); + args.setStartAndPrefix(startAndPrefix); + args.setColumns(columns); + args.setAttributes(attributes); + sendBase("scannerOpenWithPrefix", args); + } + + public int recv_scannerOpenWithPrefix() throws IOError, org.apache.thrift.TException + { + scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); + receiveBase(result, "scannerOpenWithPrefix"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); + } + + public int scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes); + return recv_scannerOpenTs(); + } + + public void send_scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes) throws org.apache.thrift.TException + { + scannerOpenTs_args args = new scannerOpenTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("scannerOpenTs", args); + } + + public int recv_scannerOpenTs() throws IOError, org.apache.thrift.TException + { + scannerOpenTs_result result = new scannerOpenTs_result(); + receiveBase(result, "scannerOpenTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); + } + + public int scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes) throws IOError, org.apache.thrift.TException + { + send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes); + return recv_scannerOpenWithStopTs(); + } + + public void send_scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes) throws org.apache.thrift.TException + { + scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + sendBase("scannerOpenWithStopTs", args); + } + + public int recv_scannerOpenWithStopTs() throws IOError, org.apache.thrift.TException + { + scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result(); + receiveBase(result, "scannerOpenWithStopTs"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); + } + + public List scannerGet(int id) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_scannerGet(id); + return recv_scannerGet(); + } + + public void send_scannerGet(int id) throws org.apache.thrift.TException + { + scannerGet_args args = new scannerGet_args(); + args.setId(id); + sendBase("scannerGet", args); + } + + public List recv_scannerGet() throws IOError, IllegalArgument, org.apache.thrift.TException + { + scannerGet_result result = new scannerGet_result(); + receiveBase(result, "scannerGet"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result"); + } + + public List scannerGetList(int id, int nbRows) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_scannerGetList(id, nbRows); + return recv_scannerGetList(); + } + + public void send_scannerGetList(int id, int nbRows) throws org.apache.thrift.TException + { + scannerGetList_args args = new scannerGetList_args(); + args.setId(id); + args.setNbRows(nbRows); + sendBase("scannerGetList", args); + } + + public List recv_scannerGetList() throws IOError, IllegalArgument, org.apache.thrift.TException + { + scannerGetList_result result = new scannerGetList_result(); + receiveBase(result, "scannerGetList"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scannerGetList failed: unknown result"); + } + + public void scannerClose(int id) throws IOError, IllegalArgument, org.apache.thrift.TException + { + send_scannerClose(id); + recv_scannerClose(); + } + + public void send_scannerClose(int id) throws org.apache.thrift.TException + { + scannerClose_args args = new scannerClose_args(); + args.setId(id); + sendBase("scannerClose", args); + } + + public void recv_scannerClose() throws IOError, IllegalArgument, org.apache.thrift.TException + { + scannerClose_result result = new scannerClose_result(); + receiveBase(result, "scannerClose"); + if (result.io != null) { + throw result.io; + } + if (result.ia != null) { + throw result.ia; + } + return; + } + + public List getRowOrBefore(ByteBuffer tableName, ByteBuffer row, ByteBuffer family) throws IOError, org.apache.thrift.TException + { + send_getRowOrBefore(tableName, row, family); + return recv_getRowOrBefore(); + } + + public void send_getRowOrBefore(ByteBuffer tableName, ByteBuffer row, ByteBuffer family) throws org.apache.thrift.TException + { + getRowOrBefore_args args = new getRowOrBefore_args(); + args.setTableName(tableName); + args.setRow(row); + args.setFamily(family); + sendBase("getRowOrBefore", args); + } + + public List recv_getRowOrBefore() throws IOError, org.apache.thrift.TException + { + getRowOrBefore_result result = new getRowOrBefore_result(); + receiveBase(result, "getRowOrBefore"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRowOrBefore failed: unknown result"); + } + + public TRegionInfo getRegionInfo(ByteBuffer row) throws IOError, org.apache.thrift.TException + { + send_getRegionInfo(row); + return recv_getRegionInfo(); + } + + public void send_getRegionInfo(ByteBuffer row) throws org.apache.thrift.TException + { + getRegionInfo_args args = new getRegionInfo_args(); + args.setRow(row); + sendBase("getRegionInfo", args); + } + + public TRegionInfo recv_getRegionInfo() throws IOError, org.apache.thrift.TException + { + getRegionInfo_result result = new getRegionInfo_result(); + receiveBase(result, "getRegionInfo"); + if (result.isSetSuccess()) { + return result.success; + } + if (result.io != null) { + throw result.io; + } + throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getRegionInfo failed: unknown result"); + } + + } + public static class AsyncClient extends org.apache.thrift.async.TAsyncClient implements AsyncIface { + public static class Factory implements org.apache.thrift.async.TAsyncClientFactory { + private org.apache.thrift.async.TAsyncClientManager clientManager; + private org.apache.thrift.protocol.TProtocolFactory protocolFactory; + public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) { + this.clientManager = clientManager; + this.protocolFactory = protocolFactory; + } + public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) { + return new AsyncClient(protocolFactory, clientManager, transport); + } + } + + public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) { + super(protocolFactory, clientManager, transport); + } + + public void enableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + enableTable_call method_call = new enableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class enableTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public enableTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("enableTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + enableTable_args args = new enableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_enableTable(); + } + } + + public void disableTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + disableTable_call method_call = new disableTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class disableTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public disableTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("disableTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + disableTable_args args = new disableTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_disableTable(); + } + } + + public void isTableEnabled(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + isTableEnabled_call method_call = new isTableEnabled_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class isTableEnabled_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public isTableEnabled_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isTableEnabled", org.apache.thrift.protocol.TMessageType.CALL, 0)); + isTableEnabled_args args = new isTableEnabled_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public boolean getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_isTableEnabled(); + } + } + + public void compact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + compact_call method_call = new compact_call(tableNameOrRegionName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class compact_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableNameOrRegionName; + public compact_call(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("compact", org.apache.thrift.protocol.TMessageType.CALL, 0)); + compact_args args = new compact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_compact(); + } + } + + public void majorCompact(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + majorCompact_call method_call = new majorCompact_call(tableNameOrRegionName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class majorCompact_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableNameOrRegionName; + public majorCompact_call(ByteBuffer tableNameOrRegionName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("majorCompact", org.apache.thrift.protocol.TMessageType.CALL, 0)); + majorCompact_args args = new majorCompact_args(); + args.setTableNameOrRegionName(tableNameOrRegionName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_majorCompact(); + } + } + + public void getTableNames(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableNames_call method_call = new getTableNames_call(resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getTableNames_call extends org.apache.thrift.async.TAsyncMethodCall { + public getTableNames_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableNames", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableNames_args args = new getTableNames_args(); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableNames(); + } + } + + public void getColumnDescriptors(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getColumnDescriptors_call method_call = new getColumnDescriptors_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getColumnDescriptors_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public getColumnDescriptors_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getColumnDescriptors", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getColumnDescriptors_args args = new getColumnDescriptors_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public Map getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getColumnDescriptors(); + } + } + + public void getTableRegions(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getTableRegions_call method_call = new getTableRegions_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getTableRegions_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public getTableRegions_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTableRegions", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getTableRegions_args args = new getTableRegions_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getTableRegions(); + } + } + + public void createTable(ByteBuffer tableName, List columnFamilies, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + createTable_call method_call = new createTable_call(tableName, columnFamilies, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class createTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List columnFamilies; + public createTable_call(ByteBuffer tableName, List columnFamilies, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.columnFamilies = columnFamilies; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + createTable_args args = new createTable_args(); + args.setTableName(tableName); + args.setColumnFamilies(columnFamilies); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, AlreadyExists, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_createTable(); + } + } + + public void deleteTable(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteTable_call method_call = new deleteTable_call(tableName, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteTable_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + public deleteTable_call(ByteBuffer tableName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteTable", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteTable_args args = new deleteTable_args(); + args.setTableName(tableName); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteTable(); + } + } + + public void get(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + get_call method_call = new get_call(tableName, row, column, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class get_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private Map attributes; + public get_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("get", org.apache.thrift.protocol.TMessageType.CALL, 0)); + get_args args = new get_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_get(); + } + } + + public void getVer(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getVer_call method_call = new getVer_call(tableName, row, column, numVersions, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getVer_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private int numVersions; + private Map attributes; + public getVer_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.numVersions = numVersions; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVer", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getVer_args args = new getVer_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setNumVersions(numVersions); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVer(); + } + } + + public void getVerTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getVerTs_call method_call = new getVerTs_call(tableName, row, column, timestamp, numVersions, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getVerTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long timestamp; + private int numVersions; + private Map attributes; + public getVerTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, int numVersions, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + this.numVersions = numVersions; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVerTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getVerTs_args args = new getVerTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setNumVersions(numVersions); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getVerTs(); + } + } + + public void getRow(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRow_call method_call = new getRow_call(tableName, row, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRow_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private Map attributes; + public getRow_call(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRow", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRow_args args = new getRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRow(); + } + } + + public void getRowWithColumns(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowWithColumns_call method_call = new getRowWithColumns_call(tableName, row, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowWithColumns_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List columns; + private Map attributes; + public getRowWithColumns_call(ByteBuffer tableName, ByteBuffer row, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.columns = columns; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowWithColumns", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowWithColumns_args args = new getRowWithColumns_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowWithColumns(); + } + } + + public void getRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowTs_call method_call = new getRowTs_call(tableName, row, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private long timestamp; + private Map attributes; + public getRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowTs_args args = new getRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowTs(); + } + } + + public void getRowWithColumnsTs(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowWithColumnsTs_call method_call = new getRowWithColumnsTs_call(tableName, row, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowWithColumnsTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List columns; + private long timestamp; + private Map attributes; + public getRowWithColumnsTs_call(ByteBuffer tableName, ByteBuffer row, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.columns = columns; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowWithColumnsTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowWithColumnsTs_args args = new getRowWithColumnsTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowWithColumnsTs(); + } + } + + public void getRows(ByteBuffer tableName, List rows, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRows_call method_call = new getRows_call(tableName, rows, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRows_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private Map attributes; + public getRows_call(ByteBuffer tableName, List rows, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRows", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRows_args args = new getRows_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRows(); + } + } + + public void getRowsWithColumns(ByteBuffer tableName, List rows, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowsWithColumns_call method_call = new getRowsWithColumns_call(tableName, rows, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowsWithColumns_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private List columns; + private Map attributes; + public getRowsWithColumns_call(ByteBuffer tableName, List rows, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsWithColumns", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowsWithColumns_args args = new getRowsWithColumns_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowsWithColumns(); + } + } + + public void getRowsTs(ByteBuffer tableName, List rows, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowsTs_call method_call = new getRowsTs_call(tableName, rows, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowsTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private long timestamp; + private Map attributes; + public getRowsTs_call(ByteBuffer tableName, List rows, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowsTs_args args = new getRowsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowsTs(); + } + } + + public void getRowsWithColumnsTs(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowsWithColumnsTs_call method_call = new getRowsWithColumnsTs_call(tableName, rows, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowsWithColumnsTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rows; + private List columns; + private long timestamp; + private Map attributes; + public getRowsWithColumnsTs_call(ByteBuffer tableName, List rows, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowsWithColumnsTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowsWithColumnsTs_args args = new getRowsWithColumnsTs_args(); + args.setTableName(tableName); + args.setRows(rows); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowsWithColumnsTs(); + } + } + + public void mutateRow(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mutateRow_call method_call = new mutateRow_call(tableName, row, mutations, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mutateRow_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List mutations; + private Map attributes; + public mutateRow_call(ByteBuffer tableName, ByteBuffer row, List mutations, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRow", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mutateRow_args args = new mutateRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRow(); + } + } + + public void mutateRowTs(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mutateRowTs_call method_call = new mutateRowTs_call(tableName, row, mutations, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mutateRowTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private List mutations; + private long timestamp; + private Map attributes; + public mutateRowTs_call(ByteBuffer tableName, ByteBuffer row, List mutations, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mutateRowTs_args args = new mutateRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setMutations(mutations); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRowTs(); + } + } + + public void mutateRows(ByteBuffer tableName, List rowBatches, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mutateRows_call method_call = new mutateRows_call(tableName, rowBatches, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mutateRows_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rowBatches; + private Map attributes; + public mutateRows_call(ByteBuffer tableName, List rowBatches, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rowBatches = rowBatches; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRows", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mutateRows_args args = new mutateRows_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRows(); + } + } + + public void mutateRowsTs(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + mutateRowsTs_call method_call = new mutateRowsTs_call(tableName, rowBatches, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class mutateRowsTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private List rowBatches; + private long timestamp; + private Map attributes; + public mutateRowsTs_call(ByteBuffer tableName, List rowBatches, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.rowBatches = rowBatches; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("mutateRowsTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + mutateRowsTs_args args = new mutateRowsTs_args(); + args.setTableName(tableName); + args.setRowBatches(rowBatches); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_mutateRowsTs(); + } + } + + public void atomicIncrement(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + atomicIncrement_call method_call = new atomicIncrement_call(tableName, row, column, value, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class atomicIncrement_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long value; + public atomicIncrement_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long value, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.value = value; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("atomicIncrement", org.apache.thrift.protocol.TMessageType.CALL, 0)); + atomicIncrement_args args = new atomicIncrement_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setValue(value); + args.write(prot); + prot.writeMessageEnd(); + } + + public long getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_atomicIncrement(); + } + } + + public void deleteAll(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteAll_call method_call = new deleteAll_call(tableName, row, column, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteAll_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private Map attributes; + public deleteAll_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAll", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteAll_args args = new deleteAll_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAll(); + } + } + + public void deleteAllTs(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteAllTs_call method_call = new deleteAllTs_call(tableName, row, column, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteAllTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer column; + private long timestamp; + private Map attributes; + public deleteAllTs_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer column, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteAllTs_args args = new deleteAllTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setColumn(column); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllTs(); + } + } + + public void deleteAllRow(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteAllRow_call method_call = new deleteAllRow_call(tableName, row, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteAllRow_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private Map attributes; + public deleteAllRow_call(ByteBuffer tableName, ByteBuffer row, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllRow", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteAllRow_args args = new deleteAllRow_args(); + args.setTableName(tableName); + args.setRow(row); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllRow(); + } + } + + public void increment(TIncrement increment, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + increment_call method_call = new increment_call(increment, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class increment_call extends org.apache.thrift.async.TAsyncMethodCall { + private TIncrement increment; + public increment_call(TIncrement increment, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.increment = increment; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("increment", org.apache.thrift.protocol.TMessageType.CALL, 0)); + increment_args args = new increment_args(); + args.setIncrement(increment); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_increment(); + } + } + + public void incrementRows(List increments, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + incrementRows_call method_call = new incrementRows_call(increments, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class incrementRows_call extends org.apache.thrift.async.TAsyncMethodCall { + private List increments; + public incrementRows_call(List increments, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.increments = increments; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("incrementRows", org.apache.thrift.protocol.TMessageType.CALL, 0)); + incrementRows_args args = new incrementRows_args(); + args.setIncrements(increments); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_incrementRows(); + } + } + + public void deleteAllRowTs(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + deleteAllRowTs_call method_call = new deleteAllRowTs_call(tableName, row, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class deleteAllRowTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private long timestamp; + private Map attributes; + public deleteAllRowTs_call(ByteBuffer tableName, ByteBuffer row, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteAllRowTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + deleteAllRowTs_args args = new deleteAllRowTs_args(); + args.setTableName(tableName); + args.setRow(row); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_deleteAllRowTs(); + } + } + + public void scannerOpenWithScan(ByteBuffer tableName, TScan scan, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpenWithScan_call method_call = new scannerOpenWithScan_call(tableName, scan, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpenWithScan_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private TScan scan; + private Map attributes; + public scannerOpenWithScan_call(ByteBuffer tableName, TScan scan, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.scan = scan; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithScan", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpenWithScan_args args = new scannerOpenWithScan_args(); + args.setTableName(tableName); + args.setScan(scan); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithScan(); + } + } + + public void scannerOpen(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpen_call method_call = new scannerOpen_call(tableName, startRow, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpen_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private List columns; + private Map attributes; + public scannerOpen_call(ByteBuffer tableName, ByteBuffer startRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpen", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpen_args args = new scannerOpen_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpen(); + } + } + + public void scannerOpenWithStop(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpenWithStop_call method_call = new scannerOpenWithStop_call(tableName, startRow, stopRow, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpenWithStop_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private ByteBuffer stopRow; + private List columns; + private Map attributes; + public scannerOpenWithStop_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithStop", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpenWithStop_args args = new scannerOpenWithStop_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithStop(); + } + } + + public void scannerOpenWithPrefix(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpenWithPrefix_call method_call = new scannerOpenWithPrefix_call(tableName, startAndPrefix, columns, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpenWithPrefix_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startAndPrefix; + private List columns; + private Map attributes; + public scannerOpenWithPrefix_call(ByteBuffer tableName, ByteBuffer startAndPrefix, List columns, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startAndPrefix = startAndPrefix; + this.columns = columns; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithPrefix", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpenWithPrefix_args args = new scannerOpenWithPrefix_args(); + args.setTableName(tableName); + args.setStartAndPrefix(startAndPrefix); + args.setColumns(columns); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithPrefix(); + } + } + + public void scannerOpenTs(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpenTs_call method_call = new scannerOpenTs_call(tableName, startRow, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpenTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private List columns; + private long timestamp; + private Map attributes; + public scannerOpenTs_call(ByteBuffer tableName, ByteBuffer startRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpenTs_args args = new scannerOpenTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenTs(); + } + } + + public void scannerOpenWithStopTs(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerOpenWithStopTs_call method_call = new scannerOpenWithStopTs_call(tableName, startRow, stopRow, columns, timestamp, attributes, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerOpenWithStopTs_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer startRow; + private ByteBuffer stopRow; + private List columns; + private long timestamp; + private Map attributes; + public scannerOpenWithStopTs_call(ByteBuffer tableName, ByteBuffer startRow, ByteBuffer stopRow, List columns, long timestamp, Map attributes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + this.timestamp = timestamp; + this.attributes = attributes; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerOpenWithStopTs", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerOpenWithStopTs_args args = new scannerOpenWithStopTs_args(); + args.setTableName(tableName); + args.setStartRow(startRow); + args.setStopRow(stopRow); + args.setColumns(columns); + args.setTimestamp(timestamp); + args.setAttributes(attributes); + args.write(prot); + prot.writeMessageEnd(); + } + + public int getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerOpenWithStopTs(); + } + } + + public void scannerGet(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerGet_call method_call = new scannerGet_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerGet_call extends org.apache.thrift.async.TAsyncMethodCall { + private int id; + public scannerGet_call(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerGet", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerGet_args args = new scannerGet_args(); + args.setId(id); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerGet(); + } + } + + public void scannerGetList(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerGetList_call method_call = new scannerGetList_call(id, nbRows, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerGetList_call extends org.apache.thrift.async.TAsyncMethodCall { + private int id; + private int nbRows; + public scannerGetList_call(int id, int nbRows, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + this.nbRows = nbRows; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerGetList", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerGetList_args args = new scannerGetList_args(); + args.setId(id); + args.setNbRows(nbRows); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_scannerGetList(); + } + } + + public void scannerClose(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + scannerClose_call method_call = new scannerClose_call(id, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class scannerClose_call extends org.apache.thrift.async.TAsyncMethodCall { + private int id; + public scannerClose_call(int id, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.id = id; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scannerClose", org.apache.thrift.protocol.TMessageType.CALL, 0)); + scannerClose_args args = new scannerClose_args(); + args.setId(id); + args.write(prot); + prot.writeMessageEnd(); + } + + public void getResult() throws IOError, IllegalArgument, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + (new Client(prot)).recv_scannerClose(); + } + } + + public void getRowOrBefore(ByteBuffer tableName, ByteBuffer row, ByteBuffer family, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRowOrBefore_call method_call = new getRowOrBefore_call(tableName, row, family, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRowOrBefore_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer tableName; + private ByteBuffer row; + private ByteBuffer family; + public getRowOrBefore_call(ByteBuffer tableName, ByteBuffer row, ByteBuffer family, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.tableName = tableName; + this.row = row; + this.family = family; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRowOrBefore", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRowOrBefore_args args = new getRowOrBefore_args(); + args.setTableName(tableName); + args.setRow(row); + args.setFamily(family); + args.write(prot); + prot.writeMessageEnd(); + } + + public List getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRowOrBefore(); + } + } + + public void getRegionInfo(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + checkReady(); + getRegionInfo_call method_call = new getRegionInfo_call(row, resultHandler, this, ___protocolFactory, ___transport); + this.___currentMethod = method_call; + ___manager.call(method_call); + } + + public static class getRegionInfo_call extends org.apache.thrift.async.TAsyncMethodCall { + private ByteBuffer row; + public getRegionInfo_call(ByteBuffer row, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + super(client, protocolFactory, transport, resultHandler, false); + this.row = row; + } + + public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException { + prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getRegionInfo", org.apache.thrift.protocol.TMessageType.CALL, 0)); + getRegionInfo_args args = new getRegionInfo_args(); + args.setRow(row); + args.write(prot); + prot.writeMessageEnd(); + } + + public TRegionInfo getResult() throws IOError, org.apache.thrift.TException { + if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { + throw new IllegalStateException("Method call not finished!"); + } + org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); + org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); + return (new Client(prot)).recv_getRegionInfo(); + } + } + + } + + public static class Processor extends org.apache.thrift.TBaseProcessor implements org.apache.thrift.TProcessor { + private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName()); + public Processor(I iface) { + super(iface, getProcessMap(new HashMap>())); + } + + protected Processor(I iface, Map> processMap) { + super(iface, getProcessMap(processMap)); + } + + private static Map> getProcessMap(Map> processMap) { + processMap.put("enableTable", new enableTable()); + processMap.put("disableTable", new disableTable()); + processMap.put("isTableEnabled", new isTableEnabled()); + processMap.put("compact", new compact()); + processMap.put("majorCompact", new majorCompact()); + processMap.put("getTableNames", new getTableNames()); + processMap.put("getColumnDescriptors", new getColumnDescriptors()); + processMap.put("getTableRegions", new getTableRegions()); + processMap.put("createTable", new createTable()); + processMap.put("deleteTable", new deleteTable()); + processMap.put("get", new get()); + processMap.put("getVer", new getVer()); + processMap.put("getVerTs", new getVerTs()); + processMap.put("getRow", new getRow()); + processMap.put("getRowWithColumns", new getRowWithColumns()); + processMap.put("getRowTs", new getRowTs()); + processMap.put("getRowWithColumnsTs", new getRowWithColumnsTs()); + processMap.put("getRows", new getRows()); + processMap.put("getRowsWithColumns", new getRowsWithColumns()); + processMap.put("getRowsTs", new getRowsTs()); + processMap.put("getRowsWithColumnsTs", new getRowsWithColumnsTs()); + processMap.put("mutateRow", new mutateRow()); + processMap.put("mutateRowTs", new mutateRowTs()); + processMap.put("mutateRows", new mutateRows()); + processMap.put("mutateRowsTs", new mutateRowsTs()); + processMap.put("atomicIncrement", new atomicIncrement()); + processMap.put("deleteAll", new deleteAll()); + processMap.put("deleteAllTs", new deleteAllTs()); + processMap.put("deleteAllRow", new deleteAllRow()); + processMap.put("increment", new increment()); + processMap.put("incrementRows", new incrementRows()); + processMap.put("deleteAllRowTs", new deleteAllRowTs()); + processMap.put("scannerOpenWithScan", new scannerOpenWithScan()); + processMap.put("scannerOpen", new scannerOpen()); + processMap.put("scannerOpenWithStop", new scannerOpenWithStop()); + processMap.put("scannerOpenWithPrefix", new scannerOpenWithPrefix()); + processMap.put("scannerOpenTs", new scannerOpenTs()); + processMap.put("scannerOpenWithStopTs", new scannerOpenWithStopTs()); + processMap.put("scannerGet", new scannerGet()); + processMap.put("scannerGetList", new scannerGetList()); + processMap.put("scannerClose", new scannerClose()); + processMap.put("getRowOrBefore", new getRowOrBefore()); + processMap.put("getRegionInfo", new getRegionInfo()); + return processMap; + } + + private static class enableTable extends org.apache.thrift.ProcessFunction { + public enableTable() { + super("enableTable"); + } + + protected enableTable_args getEmptyArgsInstance() { + return new enableTable_args(); + } + + protected enableTable_result getResult(I iface, enableTable_args args) throws org.apache.thrift.TException { + enableTable_result result = new enableTable_result(); + try { + iface.enableTable(args.tableName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class disableTable extends org.apache.thrift.ProcessFunction { + public disableTable() { + super("disableTable"); + } + + protected disableTable_args getEmptyArgsInstance() { + return new disableTable_args(); + } + + protected disableTable_result getResult(I iface, disableTable_args args) throws org.apache.thrift.TException { + disableTable_result result = new disableTable_result(); + try { + iface.disableTable(args.tableName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class isTableEnabled extends org.apache.thrift.ProcessFunction { + public isTableEnabled() { + super("isTableEnabled"); + } + + protected isTableEnabled_args getEmptyArgsInstance() { + return new isTableEnabled_args(); + } + + protected isTableEnabled_result getResult(I iface, isTableEnabled_args args) throws org.apache.thrift.TException { + isTableEnabled_result result = new isTableEnabled_result(); + try { + result.success = iface.isTableEnabled(args.tableName); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class compact extends org.apache.thrift.ProcessFunction { + public compact() { + super("compact"); + } + + protected compact_args getEmptyArgsInstance() { + return new compact_args(); + } + + protected compact_result getResult(I iface, compact_args args) throws org.apache.thrift.TException { + compact_result result = new compact_result(); + try { + iface.compact(args.tableNameOrRegionName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class majorCompact extends org.apache.thrift.ProcessFunction { + public majorCompact() { + super("majorCompact"); + } + + protected majorCompact_args getEmptyArgsInstance() { + return new majorCompact_args(); + } + + protected majorCompact_result getResult(I iface, majorCompact_args args) throws org.apache.thrift.TException { + majorCompact_result result = new majorCompact_result(); + try { + iface.majorCompact(args.tableNameOrRegionName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getTableNames extends org.apache.thrift.ProcessFunction { + public getTableNames() { + super("getTableNames"); + } + + protected getTableNames_args getEmptyArgsInstance() { + return new getTableNames_args(); + } + + protected getTableNames_result getResult(I iface, getTableNames_args args) throws org.apache.thrift.TException { + getTableNames_result result = new getTableNames_result(); + try { + result.success = iface.getTableNames(); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getColumnDescriptors extends org.apache.thrift.ProcessFunction { + public getColumnDescriptors() { + super("getColumnDescriptors"); + } + + protected getColumnDescriptors_args getEmptyArgsInstance() { + return new getColumnDescriptors_args(); + } + + protected getColumnDescriptors_result getResult(I iface, getColumnDescriptors_args args) throws org.apache.thrift.TException { + getColumnDescriptors_result result = new getColumnDescriptors_result(); + try { + result.success = iface.getColumnDescriptors(args.tableName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getTableRegions extends org.apache.thrift.ProcessFunction { + public getTableRegions() { + super("getTableRegions"); + } + + protected getTableRegions_args getEmptyArgsInstance() { + return new getTableRegions_args(); + } + + protected getTableRegions_result getResult(I iface, getTableRegions_args args) throws org.apache.thrift.TException { + getTableRegions_result result = new getTableRegions_result(); + try { + result.success = iface.getTableRegions(args.tableName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class createTable extends org.apache.thrift.ProcessFunction { + public createTable() { + super("createTable"); + } + + protected createTable_args getEmptyArgsInstance() { + return new createTable_args(); + } + + protected createTable_result getResult(I iface, createTable_args args) throws org.apache.thrift.TException { + createTable_result result = new createTable_result(); + try { + iface.createTable(args.tableName, args.columnFamilies); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } catch (AlreadyExists exist) { + result.exist = exist; + } + return result; + } + } + + private static class deleteTable extends org.apache.thrift.ProcessFunction { + public deleteTable() { + super("deleteTable"); + } + + protected deleteTable_args getEmptyArgsInstance() { + return new deleteTable_args(); + } + + protected deleteTable_result getResult(I iface, deleteTable_args args) throws org.apache.thrift.TException { + deleteTable_result result = new deleteTable_result(); + try { + iface.deleteTable(args.tableName); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class get extends org.apache.thrift.ProcessFunction { + public get() { + super("get"); + } + + protected get_args getEmptyArgsInstance() { + return new get_args(); + } + + protected get_result getResult(I iface, get_args args) throws org.apache.thrift.TException { + get_result result = new get_result(); + try { + result.success = iface.get(args.tableName, args.row, args.column, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getVer extends org.apache.thrift.ProcessFunction { + public getVer() { + super("getVer"); + } + + protected getVer_args getEmptyArgsInstance() { + return new getVer_args(); + } + + protected getVer_result getResult(I iface, getVer_args args) throws org.apache.thrift.TException { + getVer_result result = new getVer_result(); + try { + result.success = iface.getVer(args.tableName, args.row, args.column, args.numVersions, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getVerTs extends org.apache.thrift.ProcessFunction { + public getVerTs() { + super("getVerTs"); + } + + protected getVerTs_args getEmptyArgsInstance() { + return new getVerTs_args(); + } + + protected getVerTs_result getResult(I iface, getVerTs_args args) throws org.apache.thrift.TException { + getVerTs_result result = new getVerTs_result(); + try { + result.success = iface.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRow extends org.apache.thrift.ProcessFunction { + public getRow() { + super("getRow"); + } + + protected getRow_args getEmptyArgsInstance() { + return new getRow_args(); + } + + protected getRow_result getResult(I iface, getRow_args args) throws org.apache.thrift.TException { + getRow_result result = new getRow_result(); + try { + result.success = iface.getRow(args.tableName, args.row, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowWithColumns extends org.apache.thrift.ProcessFunction { + public getRowWithColumns() { + super("getRowWithColumns"); + } + + protected getRowWithColumns_args getEmptyArgsInstance() { + return new getRowWithColumns_args(); + } + + protected getRowWithColumns_result getResult(I iface, getRowWithColumns_args args) throws org.apache.thrift.TException { + getRowWithColumns_result result = new getRowWithColumns_result(); + try { + result.success = iface.getRowWithColumns(args.tableName, args.row, args.columns, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowTs extends org.apache.thrift.ProcessFunction { + public getRowTs() { + super("getRowTs"); + } + + protected getRowTs_args getEmptyArgsInstance() { + return new getRowTs_args(); + } + + protected getRowTs_result getResult(I iface, getRowTs_args args) throws org.apache.thrift.TException { + getRowTs_result result = new getRowTs_result(); + try { + result.success = iface.getRowTs(args.tableName, args.row, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowWithColumnsTs extends org.apache.thrift.ProcessFunction { + public getRowWithColumnsTs() { + super("getRowWithColumnsTs"); + } + + protected getRowWithColumnsTs_args getEmptyArgsInstance() { + return new getRowWithColumnsTs_args(); + } + + protected getRowWithColumnsTs_result getResult(I iface, getRowWithColumnsTs_args args) throws org.apache.thrift.TException { + getRowWithColumnsTs_result result = new getRowWithColumnsTs_result(); + try { + result.success = iface.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRows extends org.apache.thrift.ProcessFunction { + public getRows() { + super("getRows"); + } + + protected getRows_args getEmptyArgsInstance() { + return new getRows_args(); + } + + protected getRows_result getResult(I iface, getRows_args args) throws org.apache.thrift.TException { + getRows_result result = new getRows_result(); + try { + result.success = iface.getRows(args.tableName, args.rows, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowsWithColumns extends org.apache.thrift.ProcessFunction { + public getRowsWithColumns() { + super("getRowsWithColumns"); + } + + protected getRowsWithColumns_args getEmptyArgsInstance() { + return new getRowsWithColumns_args(); + } + + protected getRowsWithColumns_result getResult(I iface, getRowsWithColumns_args args) throws org.apache.thrift.TException { + getRowsWithColumns_result result = new getRowsWithColumns_result(); + try { + result.success = iface.getRowsWithColumns(args.tableName, args.rows, args.columns, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowsTs extends org.apache.thrift.ProcessFunction { + public getRowsTs() { + super("getRowsTs"); + } + + protected getRowsTs_args getEmptyArgsInstance() { + return new getRowsTs_args(); + } + + protected getRowsTs_result getResult(I iface, getRowsTs_args args) throws org.apache.thrift.TException { + getRowsTs_result result = new getRowsTs_result(); + try { + result.success = iface.getRowsTs(args.tableName, args.rows, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRowsWithColumnsTs extends org.apache.thrift.ProcessFunction { + public getRowsWithColumnsTs() { + super("getRowsWithColumnsTs"); + } + + protected getRowsWithColumnsTs_args getEmptyArgsInstance() { + return new getRowsWithColumnsTs_args(); + } + + protected getRowsWithColumnsTs_result getResult(I iface, getRowsWithColumnsTs_args args) throws org.apache.thrift.TException { + getRowsWithColumnsTs_result result = new getRowsWithColumnsTs_result(); + try { + result.success = iface.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class mutateRow extends org.apache.thrift.ProcessFunction { + public mutateRow() { + super("mutateRow"); + } + + protected mutateRow_args getEmptyArgsInstance() { + return new mutateRow_args(); + } + + protected mutateRow_result getResult(I iface, mutateRow_args args) throws org.apache.thrift.TException { + mutateRow_result result = new mutateRow_result(); + try { + iface.mutateRow(args.tableName, args.row, args.mutations, args.attributes); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class mutateRowTs extends org.apache.thrift.ProcessFunction { + public mutateRowTs() { + super("mutateRowTs"); + } + + protected mutateRowTs_args getEmptyArgsInstance() { + return new mutateRowTs_args(); + } + + protected mutateRowTs_result getResult(I iface, mutateRowTs_args args) throws org.apache.thrift.TException { + mutateRowTs_result result = new mutateRowTs_result(); + try { + iface.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class mutateRows extends org.apache.thrift.ProcessFunction { + public mutateRows() { + super("mutateRows"); + } + + protected mutateRows_args getEmptyArgsInstance() { + return new mutateRows_args(); + } + + protected mutateRows_result getResult(I iface, mutateRows_args args) throws org.apache.thrift.TException { + mutateRows_result result = new mutateRows_result(); + try { + iface.mutateRows(args.tableName, args.rowBatches, args.attributes); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class mutateRowsTs extends org.apache.thrift.ProcessFunction { + public mutateRowsTs() { + super("mutateRowsTs"); + } + + protected mutateRowsTs_args getEmptyArgsInstance() { + return new mutateRowsTs_args(); + } + + protected mutateRowsTs_result getResult(I iface, mutateRowsTs_args args) throws org.apache.thrift.TException { + mutateRowsTs_result result = new mutateRowsTs_result(); + try { + iface.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class atomicIncrement extends org.apache.thrift.ProcessFunction { + public atomicIncrement() { + super("atomicIncrement"); + } + + protected atomicIncrement_args getEmptyArgsInstance() { + return new atomicIncrement_args(); + } + + protected atomicIncrement_result getResult(I iface, atomicIncrement_args args) throws org.apache.thrift.TException { + atomicIncrement_result result = new atomicIncrement_result(); + try { + result.success = iface.atomicIncrement(args.tableName, args.row, args.column, args.value); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class deleteAll extends org.apache.thrift.ProcessFunction { + public deleteAll() { + super("deleteAll"); + } + + protected deleteAll_args getEmptyArgsInstance() { + return new deleteAll_args(); + } + + protected deleteAll_result getResult(I iface, deleteAll_args args) throws org.apache.thrift.TException { + deleteAll_result result = new deleteAll_result(); + try { + iface.deleteAll(args.tableName, args.row, args.column, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class deleteAllTs extends org.apache.thrift.ProcessFunction { + public deleteAllTs() { + super("deleteAllTs"); + } + + protected deleteAllTs_args getEmptyArgsInstance() { + return new deleteAllTs_args(); + } + + protected deleteAllTs_result getResult(I iface, deleteAllTs_args args) throws org.apache.thrift.TException { + deleteAllTs_result result = new deleteAllTs_result(); + try { + iface.deleteAllTs(args.tableName, args.row, args.column, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class deleteAllRow extends org.apache.thrift.ProcessFunction { + public deleteAllRow() { + super("deleteAllRow"); + } + + protected deleteAllRow_args getEmptyArgsInstance() { + return new deleteAllRow_args(); + } + + protected deleteAllRow_result getResult(I iface, deleteAllRow_args args) throws org.apache.thrift.TException { + deleteAllRow_result result = new deleteAllRow_result(); + try { + iface.deleteAllRow(args.tableName, args.row, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class increment extends org.apache.thrift.ProcessFunction { + public increment() { + super("increment"); + } + + protected increment_args getEmptyArgsInstance() { + return new increment_args(); + } + + protected increment_result getResult(I iface, increment_args args) throws org.apache.thrift.TException { + increment_result result = new increment_result(); + try { + iface.increment(args.increment); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class incrementRows extends org.apache.thrift.ProcessFunction { + public incrementRows() { + super("incrementRows"); + } + + protected incrementRows_args getEmptyArgsInstance() { + return new incrementRows_args(); + } + + protected incrementRows_result getResult(I iface, incrementRows_args args) throws org.apache.thrift.TException { + incrementRows_result result = new incrementRows_result(); + try { + iface.incrementRows(args.increments); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class deleteAllRowTs extends org.apache.thrift.ProcessFunction { + public deleteAllRowTs() { + super("deleteAllRowTs"); + } + + protected deleteAllRowTs_args getEmptyArgsInstance() { + return new deleteAllRowTs_args(); + } + + protected deleteAllRowTs_result getResult(I iface, deleteAllRowTs_args args) throws org.apache.thrift.TException { + deleteAllRowTs_result result = new deleteAllRowTs_result(); + try { + iface.deleteAllRowTs(args.tableName, args.row, args.timestamp, args.attributes); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpenWithScan extends org.apache.thrift.ProcessFunction { + public scannerOpenWithScan() { + super("scannerOpenWithScan"); + } + + protected scannerOpenWithScan_args getEmptyArgsInstance() { + return new scannerOpenWithScan_args(); + } + + protected scannerOpenWithScan_result getResult(I iface, scannerOpenWithScan_args args) throws org.apache.thrift.TException { + scannerOpenWithScan_result result = new scannerOpenWithScan_result(); + try { + result.success = iface.scannerOpenWithScan(args.tableName, args.scan, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpen extends org.apache.thrift.ProcessFunction { + public scannerOpen() { + super("scannerOpen"); + } + + protected scannerOpen_args getEmptyArgsInstance() { + return new scannerOpen_args(); + } + + protected scannerOpen_result getResult(I iface, scannerOpen_args args) throws org.apache.thrift.TException { + scannerOpen_result result = new scannerOpen_result(); + try { + result.success = iface.scannerOpen(args.tableName, args.startRow, args.columns, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpenWithStop extends org.apache.thrift.ProcessFunction { + public scannerOpenWithStop() { + super("scannerOpenWithStop"); + } + + protected scannerOpenWithStop_args getEmptyArgsInstance() { + return new scannerOpenWithStop_args(); + } + + protected scannerOpenWithStop_result getResult(I iface, scannerOpenWithStop_args args) throws org.apache.thrift.TException { + scannerOpenWithStop_result result = new scannerOpenWithStop_result(); + try { + result.success = iface.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpenWithPrefix extends org.apache.thrift.ProcessFunction { + public scannerOpenWithPrefix() { + super("scannerOpenWithPrefix"); + } + + protected scannerOpenWithPrefix_args getEmptyArgsInstance() { + return new scannerOpenWithPrefix_args(); + } + + protected scannerOpenWithPrefix_result getResult(I iface, scannerOpenWithPrefix_args args) throws org.apache.thrift.TException { + scannerOpenWithPrefix_result result = new scannerOpenWithPrefix_result(); + try { + result.success = iface.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpenTs extends org.apache.thrift.ProcessFunction { + public scannerOpenTs() { + super("scannerOpenTs"); + } + + protected scannerOpenTs_args getEmptyArgsInstance() { + return new scannerOpenTs_args(); + } + + protected scannerOpenTs_result getResult(I iface, scannerOpenTs_args args) throws org.apache.thrift.TException { + scannerOpenTs_result result = new scannerOpenTs_result(); + try { + result.success = iface.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerOpenWithStopTs extends org.apache.thrift.ProcessFunction { + public scannerOpenWithStopTs() { + super("scannerOpenWithStopTs"); + } + + protected scannerOpenWithStopTs_args getEmptyArgsInstance() { + return new scannerOpenWithStopTs_args(); + } + + protected scannerOpenWithStopTs_result getResult(I iface, scannerOpenWithStopTs_args args) throws org.apache.thrift.TException { + scannerOpenWithStopTs_result result = new scannerOpenWithStopTs_result(); + try { + result.success = iface.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp, args.attributes); + result.setSuccessIsSet(true); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class scannerGet extends org.apache.thrift.ProcessFunction { + public scannerGet() { + super("scannerGet"); + } + + protected scannerGet_args getEmptyArgsInstance() { + return new scannerGet_args(); + } + + protected scannerGet_result getResult(I iface, scannerGet_args args) throws org.apache.thrift.TException { + scannerGet_result result = new scannerGet_result(); + try { + result.success = iface.scannerGet(args.id); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class scannerGetList extends org.apache.thrift.ProcessFunction { + public scannerGetList() { + super("scannerGetList"); + } + + protected scannerGetList_args getEmptyArgsInstance() { + return new scannerGetList_args(); + } + + protected scannerGetList_result getResult(I iface, scannerGetList_args args) throws org.apache.thrift.TException { + scannerGetList_result result = new scannerGetList_result(); + try { + result.success = iface.scannerGetList(args.id, args.nbRows); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class scannerClose extends org.apache.thrift.ProcessFunction { + public scannerClose() { + super("scannerClose"); + } + + protected scannerClose_args getEmptyArgsInstance() { + return new scannerClose_args(); + } + + protected scannerClose_result getResult(I iface, scannerClose_args args) throws org.apache.thrift.TException { + scannerClose_result result = new scannerClose_result(); + try { + iface.scannerClose(args.id); + } catch (IOError io) { + result.io = io; + } catch (IllegalArgument ia) { + result.ia = ia; + } + return result; + } + } + + private static class getRowOrBefore extends org.apache.thrift.ProcessFunction { + public getRowOrBefore() { + super("getRowOrBefore"); + } + + protected getRowOrBefore_args getEmptyArgsInstance() { + return new getRowOrBefore_args(); + } + + protected getRowOrBefore_result getResult(I iface, getRowOrBefore_args args) throws org.apache.thrift.TException { + getRowOrBefore_result result = new getRowOrBefore_result(); + try { + result.success = iface.getRowOrBefore(args.tableName, args.row, args.family); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + private static class getRegionInfo extends org.apache.thrift.ProcessFunction { + public getRegionInfo() { + super("getRegionInfo"); + } + + protected getRegionInfo_args getEmptyArgsInstance() { + return new getRegionInfo_args(); + } + + protected getRegionInfo_result getResult(I iface, getRegionInfo_args args) throws org.apache.thrift.TException { + getRegionInfo_result result = new getRegionInfo_result(); + try { + result.success = iface.getRegionInfo(args.row); + } catch (IOError io) { + result.io = io; + } + return result; + } + } + + } + + public static class enableTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new enableTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTable_argsTupleSchemeFactory()); + } + + /** + * name of the table + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of the table + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_args.class, metaDataMap); + } + + public enableTable_args() { + } + + public enableTable_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public enableTable_args(enableTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public enableTable_args deepCopy() { + return new enableTable_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * name of the table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of the table + */ + public enableTable_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public enableTable_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof enableTable_args) + return this.equals((enableTable_args)that); + return false; + } + + public boolean equals(enableTable_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(enableTable_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + enableTable_args typedOther = (enableTable_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("enableTable_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class enableTable_argsStandardSchemeFactory implements SchemeFactory { + public enableTable_argsStandardScheme getScheme() { + return new enableTable_argsStandardScheme(); + } + } + + private static class enableTable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class enableTable_argsTupleSchemeFactory implements SchemeFactory { + public enableTable_argsTupleScheme getScheme() { + return new enableTable_argsTupleScheme(); + } + } + + private static class enableTable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, enableTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class enableTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("enableTable_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new enableTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new enableTable_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableTable_result.class, metaDataMap); + } + + public enableTable_result() { + } + + public enableTable_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public enableTable_result(enableTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public enableTable_result deepCopy() { + return new enableTable_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public enableTable_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof enableTable_result) + return this.equals((enableTable_result)that); + return false; + } + + public boolean equals(enableTable_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(enableTable_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + enableTable_result typedOther = (enableTable_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("enableTable_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class enableTable_resultStandardSchemeFactory implements SchemeFactory { + public enableTable_resultStandardScheme getScheme() { + return new enableTable_resultStandardScheme(); + } + } + + private static class enableTable_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, enableTable_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, enableTable_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class enableTable_resultTupleSchemeFactory implements SchemeFactory { + public enableTable_resultTupleScheme getScheme() { + return new enableTable_resultTupleScheme(); + } + } + + private static class enableTable_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, enableTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, enableTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class disableTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new disableTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTable_argsTupleSchemeFactory()); + } + + /** + * name of the table + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of the table + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_args.class, metaDataMap); + } + + public disableTable_args() { + } + + public disableTable_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public disableTable_args(disableTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public disableTable_args deepCopy() { + return new disableTable_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * name of the table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of the table + */ + public disableTable_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public disableTable_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof disableTable_args) + return this.equals((disableTable_args)that); + return false; + } + + public boolean equals(disableTable_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(disableTable_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + disableTable_args typedOther = (disableTable_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("disableTable_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class disableTable_argsStandardSchemeFactory implements SchemeFactory { + public disableTable_argsStandardScheme getScheme() { + return new disableTable_argsStandardScheme(); + } + } + + private static class disableTable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class disableTable_argsTupleSchemeFactory implements SchemeFactory { + public disableTable_argsTupleScheme getScheme() { + return new disableTable_argsTupleScheme(); + } + } + + private static class disableTable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, disableTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class disableTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("disableTable_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new disableTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new disableTable_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(disableTable_result.class, metaDataMap); + } + + public disableTable_result() { + } + + public disableTable_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public disableTable_result(disableTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public disableTable_result deepCopy() { + return new disableTable_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public disableTable_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof disableTable_result) + return this.equals((disableTable_result)that); + return false; + } + + public boolean equals(disableTable_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(disableTable_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + disableTable_result typedOther = (disableTable_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("disableTable_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class disableTable_resultStandardSchemeFactory implements SchemeFactory { + public disableTable_resultStandardScheme getScheme() { + return new disableTable_resultStandardScheme(); + } + } + + private static class disableTable_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, disableTable_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, disableTable_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class disableTable_resultTupleSchemeFactory implements SchemeFactory { + public disableTable_resultTupleScheme getScheme() { + return new disableTable_resultTupleScheme(); + } + } + + private static class disableTable_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, disableTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, disableTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class isTableEnabled_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isTableEnabled_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableEnabled_argsTupleSchemeFactory()); + } + + /** + * name of the table to check + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of the table to check + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableEnabled_args.class, metaDataMap); + } + + public isTableEnabled_args() { + } + + public isTableEnabled_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public isTableEnabled_args(isTableEnabled_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public isTableEnabled_args deepCopy() { + return new isTableEnabled_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * name of the table to check + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of the table to check + */ + public isTableEnabled_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public isTableEnabled_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isTableEnabled_args) + return this.equals((isTableEnabled_args)that); + return false; + } + + public boolean equals(isTableEnabled_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(isTableEnabled_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + isTableEnabled_args typedOther = (isTableEnabled_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("isTableEnabled_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class isTableEnabled_argsStandardSchemeFactory implements SchemeFactory { + public isTableEnabled_argsStandardScheme getScheme() { + return new isTableEnabled_argsStandardScheme(); + } + } + + private static class isTableEnabled_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableEnabled_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isTableEnabled_argsTupleSchemeFactory implements SchemeFactory { + public isTableEnabled_argsTupleScheme getScheme() { + return new isTableEnabled_argsTupleScheme(); + } + } + + private static class isTableEnabled_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class isTableEnabled_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isTableEnabled_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new isTableEnabled_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new isTableEnabled_resultTupleSchemeFactory()); + } + + public boolean success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isTableEnabled_result.class, metaDataMap); + } + + public isTableEnabled_result() { + } + + public isTableEnabled_result( + boolean success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public isTableEnabled_result(isTableEnabled_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public isTableEnabled_result deepCopy() { + return new isTableEnabled_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = false; + this.io = null; + } + + public boolean isSuccess() { + return this.success; + } + + public isTableEnabled_result setSuccess(boolean success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public isTableEnabled_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Boolean)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Boolean.valueOf(isSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof isTableEnabled_result) + return this.equals((isTableEnabled_result)that); + return false; + } + + public boolean equals(isTableEnabled_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(isTableEnabled_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + isTableEnabled_result typedOther = (isTableEnabled_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("isTableEnabled_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class isTableEnabled_resultStandardSchemeFactory implements SchemeFactory { + public isTableEnabled_resultStandardScheme getScheme() { + return new isTableEnabled_resultStandardScheme(); + } + } + + private static class isTableEnabled_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, isTableEnabled_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, isTableEnabled_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeBool(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class isTableEnabled_resultTupleSchemeFactory implements SchemeFactory { + public isTableEnabled_resultTupleScheme getScheme() { + return new isTableEnabled_resultTupleScheme(); + } + } + + private static class isTableEnabled_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeBool(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, isTableEnabled_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readBool(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class compact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableNameOrRegionName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_argsTupleSchemeFactory()); + } + + public ByteBuffer tableNameOrRegionName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME_OR_REGION_NAME + return TABLE_NAME_OR_REGION_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME_OR_REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableNameOrRegionName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_args.class, metaDataMap); + } + + public compact_args() { + } + + public compact_args( + ByteBuffer tableNameOrRegionName) + { + this(); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + /** + * Performs a deep copy on other. + */ + public compact_args(compact_args other) { + if (other.isSetTableNameOrRegionName()) { + this.tableNameOrRegionName = other.tableNameOrRegionName; + } + } + + public compact_args deepCopy() { + return new compact_args(this); + } + + @Override + public void clear() { + this.tableNameOrRegionName = null; + } + + public byte[] getTableNameOrRegionName() { + setTableNameOrRegionName(org.apache.thrift.TBaseHelper.rightSize(tableNameOrRegionName)); + return tableNameOrRegionName == null ? null : tableNameOrRegionName.array(); + } + + public ByteBuffer bufferForTableNameOrRegionName() { + return tableNameOrRegionName; + } + + public compact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) { + setTableNameOrRegionName(tableNameOrRegionName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableNameOrRegionName)); + return this; + } + + public compact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) { + this.tableNameOrRegionName = tableNameOrRegionName; + return this; + } + + public void unsetTableNameOrRegionName() { + this.tableNameOrRegionName = null; + } + + /** Returns true if field tableNameOrRegionName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableNameOrRegionName() { + return this.tableNameOrRegionName != null; + } + + public void setTableNameOrRegionNameIsSet(boolean value) { + if (!value) { + this.tableNameOrRegionName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + if (value == null) { + unsetTableNameOrRegionName(); + } else { + setTableNameOrRegionName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + return getTableNameOrRegionName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + return isSetTableNameOrRegionName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_args) + return this.equals((compact_args)that); + return false; + } + + public boolean equals(compact_args that) { + if (that == null) + return false; + + boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName(); + boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName(); + if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { + if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) + return false; + if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(compact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + compact_args typedOther = (compact_args)other; + + lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableNameOrRegionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact_args("); + boolean first = true; + + sb.append("tableNameOrRegionName:"); + if (this.tableNameOrRegionName == null) { + sb.append("null"); + } else { + sb.append(this.tableNameOrRegionName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class compact_argsStandardSchemeFactory implements SchemeFactory { + public compact_argsStandardScheme getScheme() { + return new compact_argsStandardScheme(); + } + } + + private static class compact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME_OR_REGION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableNameOrRegionName = iprot.readBinary(); + struct.setTableNameOrRegionNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableNameOrRegionName != null) { + oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableNameOrRegionName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_argsTupleSchemeFactory implements SchemeFactory { + public compact_argsTupleScheme getScheme() { + return new compact_argsTupleScheme(); + } + } + + private static class compact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableNameOrRegionName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableNameOrRegionName()) { + oprot.writeBinary(struct.tableNameOrRegionName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableNameOrRegionName = iprot.readBinary(); + struct.setTableNameOrRegionNameIsSet(true); + } + } + } + + } + + public static class compact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("compact_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new compact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new compact_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(compact_result.class, metaDataMap); + } + + public compact_result() { + } + + public compact_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public compact_result(compact_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public compact_result deepCopy() { + return new compact_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public compact_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof compact_result) + return this.equals((compact_result)that); + return false; + } + + public boolean equals(compact_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(compact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + compact_result typedOther = (compact_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("compact_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class compact_resultStandardSchemeFactory implements SchemeFactory { + public compact_resultStandardScheme getScheme() { + return new compact_resultStandardScheme(); + } + } + + private static class compact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, compact_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, compact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class compact_resultTupleSchemeFactory implements SchemeFactory { + public compact_resultTupleScheme getScheme() { + return new compact_resultTupleScheme(); + } + } + + private static class compact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, compact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class majorCompact_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("majorCompact_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_OR_REGION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableNameOrRegionName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new majorCompact_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new majorCompact_argsTupleSchemeFactory()); + } + + public ByteBuffer tableNameOrRegionName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE_NAME_OR_REGION_NAME((short)1, "tableNameOrRegionName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME_OR_REGION_NAME + return TABLE_NAME_OR_REGION_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME_OR_REGION_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableNameOrRegionName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(majorCompact_args.class, metaDataMap); + } + + public majorCompact_args() { + } + + public majorCompact_args( + ByteBuffer tableNameOrRegionName) + { + this(); + this.tableNameOrRegionName = tableNameOrRegionName; + } + + /** + * Performs a deep copy on other. + */ + public majorCompact_args(majorCompact_args other) { + if (other.isSetTableNameOrRegionName()) { + this.tableNameOrRegionName = other.tableNameOrRegionName; + } + } + + public majorCompact_args deepCopy() { + return new majorCompact_args(this); + } + + @Override + public void clear() { + this.tableNameOrRegionName = null; + } + + public byte[] getTableNameOrRegionName() { + setTableNameOrRegionName(org.apache.thrift.TBaseHelper.rightSize(tableNameOrRegionName)); + return tableNameOrRegionName == null ? null : tableNameOrRegionName.array(); + } + + public ByteBuffer bufferForTableNameOrRegionName() { + return tableNameOrRegionName; + } + + public majorCompact_args setTableNameOrRegionName(byte[] tableNameOrRegionName) { + setTableNameOrRegionName(tableNameOrRegionName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableNameOrRegionName)); + return this; + } + + public majorCompact_args setTableNameOrRegionName(ByteBuffer tableNameOrRegionName) { + this.tableNameOrRegionName = tableNameOrRegionName; + return this; + } + + public void unsetTableNameOrRegionName() { + this.tableNameOrRegionName = null; + } + + /** Returns true if field tableNameOrRegionName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableNameOrRegionName() { + return this.tableNameOrRegionName != null; + } + + public void setTableNameOrRegionNameIsSet(boolean value) { + if (!value) { + this.tableNameOrRegionName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + if (value == null) { + unsetTableNameOrRegionName(); + } else { + setTableNameOrRegionName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + return getTableNameOrRegionName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME_OR_REGION_NAME: + return isSetTableNameOrRegionName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof majorCompact_args) + return this.equals((majorCompact_args)that); + return false; + } + + public boolean equals(majorCompact_args that) { + if (that == null) + return false; + + boolean this_present_tableNameOrRegionName = true && this.isSetTableNameOrRegionName(); + boolean that_present_tableNameOrRegionName = true && that.isSetTableNameOrRegionName(); + if (this_present_tableNameOrRegionName || that_present_tableNameOrRegionName) { + if (!(this_present_tableNameOrRegionName && that_present_tableNameOrRegionName)) + return false; + if (!this.tableNameOrRegionName.equals(that.tableNameOrRegionName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(majorCompact_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + majorCompact_args typedOther = (majorCompact_args)other; + + lastComparison = Boolean.valueOf(isSetTableNameOrRegionName()).compareTo(typedOther.isSetTableNameOrRegionName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableNameOrRegionName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableNameOrRegionName, typedOther.tableNameOrRegionName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("majorCompact_args("); + boolean first = true; + + sb.append("tableNameOrRegionName:"); + if (this.tableNameOrRegionName == null) { + sb.append("null"); + } else { + sb.append(this.tableNameOrRegionName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class majorCompact_argsStandardSchemeFactory implements SchemeFactory { + public majorCompact_argsStandardScheme getScheme() { + return new majorCompact_argsStandardScheme(); + } + } + + private static class majorCompact_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, majorCompact_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME_OR_REGION_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableNameOrRegionName = iprot.readBinary(); + struct.setTableNameOrRegionNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, majorCompact_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableNameOrRegionName != null) { + oprot.writeFieldBegin(TABLE_NAME_OR_REGION_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableNameOrRegionName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class majorCompact_argsTupleSchemeFactory implements SchemeFactory { + public majorCompact_argsTupleScheme getScheme() { + return new majorCompact_argsTupleScheme(); + } + } + + private static class majorCompact_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, majorCompact_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableNameOrRegionName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableNameOrRegionName()) { + oprot.writeBinary(struct.tableNameOrRegionName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, majorCompact_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableNameOrRegionName = iprot.readBinary(); + struct.setTableNameOrRegionNameIsSet(true); + } + } + } + + } + + public static class majorCompact_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("majorCompact_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new majorCompact_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new majorCompact_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(majorCompact_result.class, metaDataMap); + } + + public majorCompact_result() { + } + + public majorCompact_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public majorCompact_result(majorCompact_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public majorCompact_result deepCopy() { + return new majorCompact_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public majorCompact_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof majorCompact_result) + return this.equals((majorCompact_result)that); + return false; + } + + public boolean equals(majorCompact_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(majorCompact_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + majorCompact_result typedOther = (majorCompact_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("majorCompact_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class majorCompact_resultStandardSchemeFactory implements SchemeFactory { + public majorCompact_resultStandardScheme getScheme() { + return new majorCompact_resultStandardScheme(); + } + } + + private static class majorCompact_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, majorCompact_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, majorCompact_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class majorCompact_resultTupleSchemeFactory implements SchemeFactory { + public majorCompact_resultTupleScheme getScheme() { + return new majorCompact_resultTupleScheme(); + } + } + + private static class majorCompact_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, majorCompact_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, majorCompact_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableNames_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNames_args"); + + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNames_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNames_argsTupleSchemeFactory()); + } + + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { +; + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNames_args.class, metaDataMap); + } + + public getTableNames_args() { + } + + /** + * Performs a deep copy on other. + */ + public getTableNames_args(getTableNames_args other) { + } + + public getTableNames_args deepCopy() { + return new getTableNames_args(this); + } + + @Override + public void clear() { + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNames_args) + return this.equals((getTableNames_args)that); + return false; + } + + public boolean equals(getTableNames_args that) { + if (that == null) + return false; + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getTableNames_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getTableNames_args typedOther = (getTableNames_args)other; + + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNames_args("); + boolean first = true; + + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNames_argsStandardSchemeFactory implements SchemeFactory { + public getTableNames_argsStandardScheme getScheme() { + return new getTableNames_argsStandardScheme(); + } + } + + private static class getTableNames_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNames_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNames_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNames_argsTupleSchemeFactory implements SchemeFactory { + public getTableNames_argsTupleScheme getScheme() { + return new getTableNames_argsTupleScheme(); + } + } + + private static class getTableNames_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNames_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNames_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + } + } + + } + + public static class getTableNames_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableNames_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableNames_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableNames_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableNames_result.class, metaDataMap); + } + + public getTableNames_result() { + } + + public getTableNames_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableNames_result(getTableNames_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (ByteBuffer other_element : other.success) { + __this__success.add(other_element); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getTableNames_result deepCopy() { + return new getTableNames_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(ByteBuffer elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableNames_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getTableNames_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableNames_result) + return this.equals((getTableNames_result)that); + return false; + } + + public boolean equals(getTableNames_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getTableNames_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getTableNames_result typedOther = (getTableNames_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableNames_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableNames_resultStandardSchemeFactory implements SchemeFactory { + public getTableNames_resultStandardScheme getScheme() { + return new getTableNames_resultStandardScheme(); + } + } + + private static class getTableNames_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableNames_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list26 = iprot.readListBegin(); + struct.success = new ArrayList(_list26.size); + for (int _i27 = 0; _i27 < _list26.size; ++_i27) + { + ByteBuffer _elem28; // optional + _elem28 = iprot.readBinary(); + struct.success.add(_elem28); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableNames_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.success.size())); + for (ByteBuffer _iter29 : struct.success) + { + oprot.writeBinary(_iter29); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableNames_resultTupleSchemeFactory implements SchemeFactory { + public getTableNames_resultTupleScheme getScheme() { + return new getTableNames_resultTupleScheme(); + } + } + + private static class getTableNames_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableNames_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (ByteBuffer _iter30 : struct.success) + { + oprot.writeBinary(_iter30); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableNames_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list31 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.success = new ArrayList(_list31.size); + for (int _i32 = 0; _i32 < _list31.size; ++_i32) + { + ByteBuffer _elem33; // optional + _elem33 = iprot.readBinary(); + struct.success.add(_elem33); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getColumnDescriptors_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnDescriptors_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getColumnDescriptors_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getColumnDescriptors_argsTupleSchemeFactory()); + } + + /** + * table name + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * table name + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnDescriptors_args.class, metaDataMap); + } + + public getColumnDescriptors_args() { + } + + public getColumnDescriptors_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public getColumnDescriptors_args(getColumnDescriptors_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public getColumnDescriptors_args deepCopy() { + return new getColumnDescriptors_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * table name + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * table name + */ + public getColumnDescriptors_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getColumnDescriptors_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getColumnDescriptors_args) + return this.equals((getColumnDescriptors_args)that); + return false; + } + + public boolean equals(getColumnDescriptors_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getColumnDescriptors_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getColumnDescriptors_args typedOther = (getColumnDescriptors_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getColumnDescriptors_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getColumnDescriptors_argsStandardSchemeFactory implements SchemeFactory { + public getColumnDescriptors_argsStandardScheme getScheme() { + return new getColumnDescriptors_argsStandardScheme(); + } + } + + private static class getColumnDescriptors_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnDescriptors_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnDescriptors_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getColumnDescriptors_argsTupleSchemeFactory implements SchemeFactory { + public getColumnDescriptors_argsTupleScheme getScheme() { + return new getColumnDescriptors_argsTupleScheme(); + } + } + + private static class getColumnDescriptors_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class getColumnDescriptors_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getColumnDescriptors_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getColumnDescriptors_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getColumnDescriptors_resultTupleSchemeFactory()); + } + + public Map success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnDescriptor.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getColumnDescriptors_result.class, metaDataMap); + } + + public getColumnDescriptors_result() { + } + + public getColumnDescriptors_result( + Map success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getColumnDescriptors_result(getColumnDescriptors_result other) { + if (other.isSetSuccess()) { + Map __this__success = new HashMap(); + for (Map.Entry other_element : other.success.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ColumnDescriptor other_element_value = other_element.getValue(); + + ByteBuffer __this__success_copy_key = other_element_key; + + ColumnDescriptor __this__success_copy_value = new ColumnDescriptor(other_element_value); + + __this__success.put(__this__success_copy_key, __this__success_copy_value); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getColumnDescriptors_result deepCopy() { + return new getColumnDescriptors_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public void putToSuccess(ByteBuffer key, ColumnDescriptor val) { + if (this.success == null) { + this.success = new HashMap(); + } + this.success.put(key, val); + } + + public Map getSuccess() { + return this.success; + } + + public getColumnDescriptors_result setSuccess(Map success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getColumnDescriptors_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Map)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getColumnDescriptors_result) + return this.equals((getColumnDescriptors_result)that); + return false; + } + + public boolean equals(getColumnDescriptors_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getColumnDescriptors_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getColumnDescriptors_result typedOther = (getColumnDescriptors_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getColumnDescriptors_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getColumnDescriptors_resultStandardSchemeFactory implements SchemeFactory { + public getColumnDescriptors_resultStandardScheme getScheme() { + return new getColumnDescriptors_resultStandardScheme(); + } + } + + private static class getColumnDescriptors_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getColumnDescriptors_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map34 = iprot.readMapBegin(); + struct.success = new HashMap(2*_map34.size); + for (int _i35 = 0; _i35 < _map34.size; ++_i35) + { + ByteBuffer _key36; // required + ColumnDescriptor _val37; // required + _key36 = iprot.readBinary(); + _val37 = new ColumnDescriptor(); + _val37.read(iprot); + struct.success.put(_key36, _val37); + } + iprot.readMapEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getColumnDescriptors_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (Map.Entry _iter38 : struct.success.entrySet()) + { + oprot.writeBinary(_iter38.getKey()); + _iter38.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getColumnDescriptors_resultTupleSchemeFactory implements SchemeFactory { + public getColumnDescriptors_resultTupleScheme getScheme() { + return new getColumnDescriptors_resultTupleScheme(); + } + } + + private static class getColumnDescriptors_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (Map.Entry _iter39 : struct.success.entrySet()) + { + oprot.writeBinary(_iter39.getKey()); + _iter39.getValue().write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getColumnDescriptors_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TMap _map40 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new HashMap(2*_map40.size); + for (int _i41 = 0; _i41 < _map40.size; ++_i41) + { + ByteBuffer _key42; // required + ColumnDescriptor _val43; // required + _key42 = iprot.readBinary(); + _val43 = new ColumnDescriptor(); + _val43.read(iprot); + struct.success.put(_key42, _val43); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getTableRegions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableRegions_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableRegions_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableRegions_argsTupleSchemeFactory()); + } + + /** + * table name + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * table name + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableRegions_args.class, metaDataMap); + } + + public getTableRegions_args() { + } + + public getTableRegions_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public getTableRegions_args(getTableRegions_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public getTableRegions_args deepCopy() { + return new getTableRegions_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * table name + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * table name + */ + public getTableRegions_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getTableRegions_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableRegions_args) + return this.equals((getTableRegions_args)that); + return false; + } + + public boolean equals(getTableRegions_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getTableRegions_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getTableRegions_args typedOther = (getTableRegions_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableRegions_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableRegions_argsStandardSchemeFactory implements SchemeFactory { + public getTableRegions_argsStandardScheme getScheme() { + return new getTableRegions_argsStandardScheme(); + } + } + + private static class getTableRegions_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableRegions_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableRegions_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableRegions_argsTupleSchemeFactory implements SchemeFactory { + public getTableRegions_argsTupleScheme getScheme() { + return new getTableRegions_argsTupleScheme(); + } + } + + private static class getTableRegions_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableRegions_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableRegions_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class getTableRegions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTableRegions_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getTableRegions_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getTableRegions_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRegionInfo.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTableRegions_result.class, metaDataMap); + } + + public getTableRegions_result() { + } + + public getTableRegions_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getTableRegions_result(getTableRegions_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRegionInfo other_element : other.success) { + __this__success.add(new TRegionInfo(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getTableRegions_result deepCopy() { + return new getTableRegions_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRegionInfo elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getTableRegions_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getTableRegions_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getTableRegions_result) + return this.equals((getTableRegions_result)that); + return false; + } + + public boolean equals(getTableRegions_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getTableRegions_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getTableRegions_result typedOther = (getTableRegions_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getTableRegions_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getTableRegions_resultStandardSchemeFactory implements SchemeFactory { + public getTableRegions_resultStandardScheme getScheme() { + return new getTableRegions_resultStandardScheme(); + } + } + + private static class getTableRegions_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getTableRegions_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(); + struct.success = new ArrayList(_list44.size); + for (int _i45 = 0; _i45 < _list44.size; ++_i45) + { + TRegionInfo _elem46; // optional + _elem46 = new TRegionInfo(); + _elem46.read(iprot); + struct.success.add(_elem46); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getTableRegions_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRegionInfo _iter47 : struct.success) + { + _iter47.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getTableRegions_resultTupleSchemeFactory implements SchemeFactory { + public getTableRegions_resultTupleScheme getScheme() { + return new getTableRegions_resultTupleScheme(); + } + } + + private static class getTableRegions_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getTableRegions_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRegionInfo _iter48 : struct.success) + { + _iter48.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getTableRegions_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list49.size); + for (int _i50 = 0; _i50 < _list49.size; ++_i50) + { + TRegionInfo _elem51; // optional + _elem51 = new TRegionInfo(); + _elem51.read(iprot); + struct.success.add(_elem51); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class createTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField COLUMN_FAMILIES_FIELD_DESC = new org.apache.thrift.protocol.TField("columnFamilies", org.apache.thrift.protocol.TType.LIST, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createTable_argsTupleSchemeFactory()); + } + + /** + * name of table to create + */ + public ByteBuffer tableName; // required + /** + * list of column family descriptors + */ + public List columnFamilies; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table to create + */ + TABLE_NAME((short)1, "tableName"), + /** + * list of column family descriptors + */ + COLUMN_FAMILIES((short)2, "columnFamilies"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // COLUMN_FAMILIES + return COLUMN_FAMILIES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN_FAMILIES, new org.apache.thrift.meta_data.FieldMetaData("columnFamilies", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ColumnDescriptor.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_args.class, metaDataMap); + } + + public createTable_args() { + } + + public createTable_args( + ByteBuffer tableName, + List columnFamilies) + { + this(); + this.tableName = tableName; + this.columnFamilies = columnFamilies; + } + + /** + * Performs a deep copy on other. + */ + public createTable_args(createTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetColumnFamilies()) { + List __this__columnFamilies = new ArrayList(); + for (ColumnDescriptor other_element : other.columnFamilies) { + __this__columnFamilies.add(new ColumnDescriptor(other_element)); + } + this.columnFamilies = __this__columnFamilies; + } + } + + public createTable_args deepCopy() { + return new createTable_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.columnFamilies = null; + } + + /** + * name of table to create + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table to create + */ + public createTable_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public createTable_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getColumnFamiliesSize() { + return (this.columnFamilies == null) ? 0 : this.columnFamilies.size(); + } + + public java.util.Iterator getColumnFamiliesIterator() { + return (this.columnFamilies == null) ? null : this.columnFamilies.iterator(); + } + + public void addToColumnFamilies(ColumnDescriptor elem) { + if (this.columnFamilies == null) { + this.columnFamilies = new ArrayList(); + } + this.columnFamilies.add(elem); + } + + /** + * list of column family descriptors + */ + public List getColumnFamilies() { + return this.columnFamilies; + } + + /** + * list of column family descriptors + */ + public createTable_args setColumnFamilies(List columnFamilies) { + this.columnFamilies = columnFamilies; + return this; + } + + public void unsetColumnFamilies() { + this.columnFamilies = null; + } + + /** Returns true if field columnFamilies is set (has been assigned a value) and false otherwise */ + public boolean isSetColumnFamilies() { + return this.columnFamilies != null; + } + + public void setColumnFamiliesIsSet(boolean value) { + if (!value) { + this.columnFamilies = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case COLUMN_FAMILIES: + if (value == null) { + unsetColumnFamilies(); + } else { + setColumnFamilies((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case COLUMN_FAMILIES: + return getColumnFamilies(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case COLUMN_FAMILIES: + return isSetColumnFamilies(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createTable_args) + return this.equals((createTable_args)that); + return false; + } + + public boolean equals(createTable_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_columnFamilies = true && this.isSetColumnFamilies(); + boolean that_present_columnFamilies = true && that.isSetColumnFamilies(); + if (this_present_columnFamilies || that_present_columnFamilies) { + if (!(this_present_columnFamilies && that_present_columnFamilies)) + return false; + if (!this.columnFamilies.equals(that.columnFamilies)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(createTable_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + createTable_args typedOther = (createTable_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumnFamilies()).compareTo(typedOther.isSetColumnFamilies()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumnFamilies()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnFamilies, typedOther.columnFamilies); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("createTable_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("columnFamilies:"); + if (this.columnFamilies == null) { + sb.append("null"); + } else { + sb.append(this.columnFamilies); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createTable_argsStandardSchemeFactory implements SchemeFactory { + public createTable_argsStandardScheme getScheme() { + return new createTable_argsStandardScheme(); + } + } + + private static class createTable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COLUMN_FAMILIES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list52 = iprot.readListBegin(); + struct.columnFamilies = new ArrayList(_list52.size); + for (int _i53 = 0; _i53 < _list52.size; ++_i53) + { + ColumnDescriptor _elem54; // optional + _elem54 = new ColumnDescriptor(); + _elem54.read(iprot); + struct.columnFamilies.add(_elem54); + } + iprot.readListEnd(); + } + struct.setColumnFamiliesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.columnFamilies != null) { + oprot.writeFieldBegin(COLUMN_FAMILIES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.columnFamilies.size())); + for (ColumnDescriptor _iter55 : struct.columnFamilies) + { + _iter55.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTable_argsTupleSchemeFactory implements SchemeFactory { + public createTable_argsTupleScheme getScheme() { + return new createTable_argsTupleScheme(); + } + } + + private static class createTable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetColumnFamilies()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetColumnFamilies()) { + { + oprot.writeI32(struct.columnFamilies.size()); + for (ColumnDescriptor _iter56 : struct.columnFamilies) + { + _iter56.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list57 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.columnFamilies = new ArrayList(_list57.size); + for (int _i58 = 0; _i58 < _list57.size; ++_i58) + { + ColumnDescriptor _elem59; // optional + _elem59 = new ColumnDescriptor(); + _elem59.read(iprot); + struct.columnFamilies.add(_elem59); + } + } + struct.setColumnFamiliesIsSet(true); + } + } + } + + } + + public static class createTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createTable_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField EXIST_FIELD_DESC = new org.apache.thrift.protocol.TField("exist", org.apache.thrift.protocol.TType.STRUCT, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new createTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new createTable_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + public AlreadyExists exist; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"), + EXIST((short)3, "exist"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + case 3: // EXIST + return EXIST; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.EXIST, new org.apache.thrift.meta_data.FieldMetaData("exist", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createTable_result.class, metaDataMap); + } + + public createTable_result() { + } + + public createTable_result( + IOError io, + IllegalArgument ia, + AlreadyExists exist) + { + this(); + this.io = io; + this.ia = ia; + this.exist = exist; + } + + /** + * Performs a deep copy on other. + */ + public createTable_result(createTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + if (other.isSetExist()) { + this.exist = new AlreadyExists(other.exist); + } + } + + public createTable_result deepCopy() { + return new createTable_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + this.exist = null; + } + + public IOError getIo() { + return this.io; + } + + public createTable_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public createTable_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public AlreadyExists getExist() { + return this.exist; + } + + public createTable_result setExist(AlreadyExists exist) { + this.exist = exist; + return this; + } + + public void unsetExist() { + this.exist = null; + } + + /** Returns true if field exist is set (has been assigned a value) and false otherwise */ + public boolean isSetExist() { + return this.exist != null; + } + + public void setExistIsSet(boolean value) { + if (!value) { + this.exist = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + case EXIST: + if (value == null) { + unsetExist(); + } else { + setExist((AlreadyExists)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + case EXIST: + return getExist(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + case EXIST: + return isSetExist(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof createTable_result) + return this.equals((createTable_result)that); + return false; + } + + public boolean equals(createTable_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + boolean this_present_exist = true && this.isSetExist(); + boolean that_present_exist = true && that.isSetExist(); + if (this_present_exist || that_present_exist) { + if (!(this_present_exist && that_present_exist)) + return false; + if (!this.exist.equals(that.exist)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(createTable_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + createTable_result typedOther = (createTable_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetExist()).compareTo(typedOther.isSetExist()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetExist()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.exist, typedOther.exist); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("createTable_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + if (!first) sb.append(", "); + sb.append("exist:"); + if (this.exist == null) { + sb.append("null"); + } else { + sb.append(this.exist); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class createTable_resultStandardSchemeFactory implements SchemeFactory { + public createTable_resultStandardScheme getScheme() { + return new createTable_resultStandardScheme(); + } + } + + private static class createTable_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, createTable_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // EXIST + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.exist = new AlreadyExists(); + struct.exist.read(iprot); + struct.setExistIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, createTable_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.exist != null) { + oprot.writeFieldBegin(EXIST_FIELD_DESC); + struct.exist.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class createTable_resultTupleSchemeFactory implements SchemeFactory { + public createTable_resultTupleScheme getScheme() { + return new createTable_resultTupleScheme(); + } + } + + private static class createTable_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + if (struct.isSetExist()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + if (struct.isSetExist()) { + struct.exist.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, createTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + if (incoming.get(2)) { + struct.exist = new AlreadyExists(); + struct.exist.read(iprot); + struct.setExistIsSet(true); + } + } + } + + } + + public static class deleteTable_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteTable_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTable_argsTupleSchemeFactory()); + } + + /** + * name of table to delete + */ + public ByteBuffer tableName; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table to delete + */ + TABLE_NAME((short)1, "tableName"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTable_args.class, metaDataMap); + } + + public deleteTable_args() { + } + + public deleteTable_args( + ByteBuffer tableName) + { + this(); + this.tableName = tableName; + } + + /** + * Performs a deep copy on other. + */ + public deleteTable_args(deleteTable_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + } + + public deleteTable_args deepCopy() { + return new deleteTable_args(this); + } + + @Override + public void clear() { + this.tableName = null; + } + + /** + * name of table to delete + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table to delete + */ + public deleteTable_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public deleteTable_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteTable_args) + return this.equals((deleteTable_args)that); + return false; + } + + public boolean equals(deleteTable_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteTable_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteTable_args typedOther = (deleteTable_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteTable_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteTable_argsStandardSchemeFactory implements SchemeFactory { + public deleteTable_argsStandardScheme getScheme() { + return new deleteTable_argsStandardScheme(); + } + } + + private static class deleteTable_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTable_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteTable_argsTupleSchemeFactory implements SchemeFactory { + public deleteTable_argsTupleScheme getScheme() { + return new deleteTable_argsTupleScheme(); + } + } + + private static class deleteTable_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTable_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + } + } + + } + + public static class deleteTable_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteTable_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteTable_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteTable_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteTable_result.class, metaDataMap); + } + + public deleteTable_result() { + } + + public deleteTable_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteTable_result(deleteTable_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public deleteTable_result deepCopy() { + return new deleteTable_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public deleteTable_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteTable_result) + return this.equals((deleteTable_result)that); + return false; + } + + public boolean equals(deleteTable_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteTable_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteTable_result typedOther = (deleteTable_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteTable_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteTable_resultStandardSchemeFactory implements SchemeFactory { + public deleteTable_resultStandardScheme getScheme() { + return new deleteTable_resultStandardScheme(); + } + } + + private static class deleteTable_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteTable_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteTable_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteTable_resultTupleSchemeFactory implements SchemeFactory { + public deleteTable_resultTupleScheme getScheme() { + return new deleteTable_resultTupleScheme(); + } + } + + private static class deleteTable_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteTable_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class get_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * column name + */ + public ByteBuffer column; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * column name + */ + COLUMN((short)3, "column"), + /** + * Get attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_args.class, metaDataMap); + } + + public get_args() { + } + + public get_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public get_args(get_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public get_args deepCopy() { + return new get_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public get_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public get_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public get_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public get_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column name + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * column name + */ + public get_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public get_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public get_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_args) + return this.equals((get_args)that); + return false; + } + + public boolean equals(get_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_args typedOther = (get_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class get_argsStandardSchemeFactory implements SchemeFactory { + public get_argsStandardScheme getScheme() { + return new get_argsStandardScheme(); + } + } + + private static class get_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map60 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map60.size); + for (int _i61 = 0; _i61 < _map60.size; ++_i61) + { + ByteBuffer _key62; // required + ByteBuffer _val63; // required + _key62 = iprot.readBinary(); + _val63 = iprot.readBinary(); + struct.attributes.put(_key62, _val63); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter64 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter64.getKey()); + oprot.writeBinary(_iter64.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_argsTupleSchemeFactory implements SchemeFactory { + public get_argsTupleScheme getScheme() { + return new get_argsTupleScheme(); + } + } + + private static class get_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter65 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter65.getKey()); + oprot.writeBinary(_iter65.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map66 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map66.size); + for (int _i67 = 0; _i67 < _map66.size; ++_i67) + { + ByteBuffer _key68; // required + ByteBuffer _val69; // required + _key68 = iprot.readBinary(); + _val69 = iprot.readBinary(); + struct.attributes.put(_key68, _val69); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class get_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("get_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new get_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new get_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(get_result.class, metaDataMap); + } + + public get_result() { + } + + public get_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public get_result(get_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TCell other_element : other.success) { + __this__success.add(new TCell(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public get_result deepCopy() { + return new get_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public get_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public get_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof get_result) + return this.equals((get_result)that); + return false; + } + + public boolean equals(get_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(get_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + get_result typedOther = (get_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("get_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class get_resultStandardSchemeFactory implements SchemeFactory { + public get_resultStandardScheme getScheme() { + return new get_resultStandardScheme(); + } + } + + private static class get_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, get_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); + struct.success = new ArrayList(_list70.size); + for (int _i71 = 0; _i71 < _list70.size; ++_i71) + { + TCell _elem72; // optional + _elem72 = new TCell(); + _elem72.read(iprot); + struct.success.add(_elem72); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, get_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TCell _iter73 : struct.success) + { + _iter73.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class get_resultTupleSchemeFactory implements SchemeFactory { + public get_resultTupleScheme getScheme() { + return new get_resultTupleScheme(); + } + } + + private static class get_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TCell _iter74 : struct.success) + { + _iter74.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, get_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list75.size); + for (int _i76 = 0; _i76 < _list75.size; ++_i76) + { + TCell _elem77; // optional + _elem77 = new TCell(); + _elem77.read(iprot); + struct.success.add(_elem77); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getVer_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVer_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField NUM_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numVersions", org.apache.thrift.protocol.TType.I32, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVer_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVer_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * column name + */ + public ByteBuffer column; // required + /** + * number of versions to retrieve + */ + public int numVersions; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * column name + */ + COLUMN((short)3, "column"), + /** + * number of versions to retrieve + */ + NUM_VERSIONS((short)4, "numVersions"), + /** + * Get attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // NUM_VERSIONS + return NUM_VERSIONS; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __NUMVERSIONS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.NUM_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("numVersions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVer_args.class, metaDataMap); + } + + public getVer_args() { + } + + public getVer_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + int numVersions, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.numVersions = numVersions; + setNumVersionsIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getVer_args(getVer_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + this.numVersions = other.numVersions; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getVer_args deepCopy() { + return new getVer_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setNumVersionsIsSet(false); + this.numVersions = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getVer_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getVer_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getVer_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getVer_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column name + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * column name + */ + public getVer_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public getVer_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + /** + * number of versions to retrieve + */ + public int getNumVersions() { + return this.numVersions; + } + + /** + * number of versions to retrieve + */ + public getVer_args setNumVersions(int numVersions) { + this.numVersions = numVersions; + setNumVersionsIsSet(true); + return this; + } + + public void unsetNumVersions() { + __isset_bit_vector.clear(__NUMVERSIONS_ISSET_ID); + } + + /** Returns true if field numVersions is set (has been assigned a value) and false otherwise */ + public boolean isSetNumVersions() { + return __isset_bit_vector.get(__NUMVERSIONS_ISSET_ID); + } + + public void setNumVersionsIsSet(boolean value) { + __isset_bit_vector.set(__NUMVERSIONS_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getVer_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case NUM_VERSIONS: + if (value == null) { + unsetNumVersions(); + } else { + setNumVersions((Integer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case NUM_VERSIONS: + return Integer.valueOf(getNumVersions()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case NUM_VERSIONS: + return isSetNumVersions(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVer_args) + return this.equals((getVer_args)that); + return false; + } + + public boolean equals(getVer_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_numVersions = true; + boolean that_present_numVersions = true; + if (this_present_numVersions || that_present_numVersions) { + if (!(this_present_numVersions && that_present_numVersions)) + return false; + if (this.numVersions != that.numVersions) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getVer_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getVer_args typedOther = (getVer_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numVersions, typedOther.numVersions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVer_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("numVersions:"); + sb.append(this.numVersions); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVer_argsStandardSchemeFactory implements SchemeFactory { + public getVer_argsStandardScheme getScheme() { + return new getVer_argsStandardScheme(); + } + } + + private static class getVer_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVer_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NUM_VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numVersions = iprot.readI32(); + struct.setNumVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map78 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map78.size); + for (int _i79 = 0; _i79 < _map78.size; ++_i79) + { + ByteBuffer _key80; // required + ByteBuffer _val81; // required + _key80 = iprot.readBinary(); + _val81 = iprot.readBinary(); + struct.attributes.put(_key80, _val81); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVer_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC); + oprot.writeI32(struct.numVersions); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter82 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter82.getKey()); + oprot.writeBinary(_iter82.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVer_argsTupleSchemeFactory implements SchemeFactory { + public getVer_argsTupleScheme getScheme() { + return new getVer_argsTupleScheme(); + } + } + + private static class getVer_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVer_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetNumVersions()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetNumVersions()) { + oprot.writeI32(struct.numVersions); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter83 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter83.getKey()); + oprot.writeBinary(_iter83.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVer_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + struct.numVersions = iprot.readI32(); + struct.setNumVersionsIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map84 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map84.size); + for (int _i85 = 0; _i85 < _map84.size; ++_i85) + { + ByteBuffer _key86; // required + ByteBuffer _val87; // required + _key86 = iprot.readBinary(); + _val87 = iprot.readBinary(); + struct.attributes.put(_key86, _val87); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getVer_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVer_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVer_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVer_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVer_result.class, metaDataMap); + } + + public getVer_result() { + } + + public getVer_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getVer_result(getVer_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TCell other_element : other.success) { + __this__success.add(new TCell(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getVer_result deepCopy() { + return new getVer_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getVer_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getVer_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVer_result) + return this.equals((getVer_result)that); + return false; + } + + public boolean equals(getVer_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getVer_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getVer_result typedOther = (getVer_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVer_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVer_resultStandardSchemeFactory implements SchemeFactory { + public getVer_resultStandardScheme getScheme() { + return new getVer_resultStandardScheme(); + } + } + + private static class getVer_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVer_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list88 = iprot.readListBegin(); + struct.success = new ArrayList(_list88.size); + for (int _i89 = 0; _i89 < _list88.size; ++_i89) + { + TCell _elem90; // optional + _elem90 = new TCell(); + _elem90.read(iprot); + struct.success.add(_elem90); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVer_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TCell _iter91 : struct.success) + { + _iter91.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVer_resultTupleSchemeFactory implements SchemeFactory { + public getVer_resultTupleScheme getScheme() { + return new getVer_resultTupleScheme(); + } + } + + private static class getVer_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVer_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TCell _iter92 : struct.success) + { + _iter92.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVer_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list93 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list93.size); + for (int _i94 = 0; _i94 < _list93.size; ++_i94) + { + TCell _elem95; // optional + _elem95 = new TCell(); + _elem95.read(iprot); + struct.success.add(_elem95); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getVerTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVerTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField NUM_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("numVersions", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVerTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVerTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * column name + */ + public ByteBuffer column; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * number of versions to retrieve + */ + public int numVersions; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * column name + */ + COLUMN((short)3, "column"), + /** + * timestamp + */ + TIMESTAMP((short)4, "timestamp"), + /** + * number of versions to retrieve + */ + NUM_VERSIONS((short)5, "numVersions"), + /** + * Get attributes + */ + ATTRIBUTES((short)6, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // NUM_VERSIONS + return NUM_VERSIONS; + case 6: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private static final int __NUMVERSIONS_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NUM_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("numVersions", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVerTs_args.class, metaDataMap); + } + + public getVerTs_args() { + } + + public getVerTs_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + long timestamp, + int numVersions, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.numVersions = numVersions; + setNumVersionsIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getVerTs_args(getVerTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + this.timestamp = other.timestamp; + this.numVersions = other.numVersions; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getVerTs_args deepCopy() { + return new getVerTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setTimestampIsSet(false); + this.timestamp = 0; + setNumVersionsIsSet(false); + this.numVersions = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getVerTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getVerTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getVerTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getVerTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column name + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * column name + */ + public getVerTs_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public getVerTs_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public getVerTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + /** + * number of versions to retrieve + */ + public int getNumVersions() { + return this.numVersions; + } + + /** + * number of versions to retrieve + */ + public getVerTs_args setNumVersions(int numVersions) { + this.numVersions = numVersions; + setNumVersionsIsSet(true); + return this; + } + + public void unsetNumVersions() { + __isset_bit_vector.clear(__NUMVERSIONS_ISSET_ID); + } + + /** Returns true if field numVersions is set (has been assigned a value) and false otherwise */ + public boolean isSetNumVersions() { + return __isset_bit_vector.get(__NUMVERSIONS_ISSET_ID); + } + + public void setNumVersionsIsSet(boolean value) { + __isset_bit_vector.set(__NUMVERSIONS_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getVerTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case NUM_VERSIONS: + if (value == null) { + unsetNumVersions(); + } else { + setNumVersions((Integer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case NUM_VERSIONS: + return Integer.valueOf(getNumVersions()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case TIMESTAMP: + return isSetTimestamp(); + case NUM_VERSIONS: + return isSetNumVersions(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVerTs_args) + return this.equals((getVerTs_args)that); + return false; + } + + public boolean equals(getVerTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_numVersions = true; + boolean that_present_numVersions = true; + if (this_present_numVersions || that_present_numVersions) { + if (!(this_present_numVersions && that_present_numVersions)) + return false; + if (this.numVersions != that.numVersions) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getVerTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getVerTs_args typedOther = (getVerTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumVersions()).compareTo(typedOther.isSetNumVersions()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumVersions()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numVersions, typedOther.numVersions); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVerTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("numVersions:"); + sb.append(this.numVersions); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVerTs_argsStandardSchemeFactory implements SchemeFactory { + public getVerTs_argsStandardScheme getScheme() { + return new getVerTs_argsStandardScheme(); + } + } + + private static class getVerTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVerTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // NUM_VERSIONS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.numVersions = iprot.readI32(); + struct.setNumVersionsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map96 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map96.size); + for (int _i97 = 0; _i97 < _map96.size; ++_i97) + { + ByteBuffer _key98; // required + ByteBuffer _val99; // required + _key98 = iprot.readBinary(); + _val99 = iprot.readBinary(); + struct.attributes.put(_key98, _val99); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVerTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NUM_VERSIONS_FIELD_DESC); + oprot.writeI32(struct.numVersions); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter100 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter100.getKey()); + oprot.writeBinary(_iter100.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVerTs_argsTupleSchemeFactory implements SchemeFactory { + public getVerTs_argsTupleScheme getScheme() { + return new getVerTs_argsTupleScheme(); + } + } + + private static class getVerTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVerTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetNumVersions()) { + optionals.set(4); + } + if (struct.isSetAttributes()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetNumVersions()) { + oprot.writeI32(struct.numVersions); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter101 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter101.getKey()); + oprot.writeBinary(_iter101.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVerTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + struct.numVersions = iprot.readI32(); + struct.setNumVersionsIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TMap _map102 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map102.size); + for (int _i103 = 0; _i103 < _map102.size; ++_i103) + { + ByteBuffer _key104; // required + ByteBuffer _val105; // required + _key104 = iprot.readBinary(); + _val105 = iprot.readBinary(); + struct.attributes.put(_key104, _val105); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getVerTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVerTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getVerTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getVerTs_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVerTs_result.class, metaDataMap); + } + + public getVerTs_result() { + } + + public getVerTs_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getVerTs_result(getVerTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TCell other_element : other.success) { + __this__success.add(new TCell(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getVerTs_result deepCopy() { + return new getVerTs_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getVerTs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getVerTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getVerTs_result) + return this.equals((getVerTs_result)that); + return false; + } + + public boolean equals(getVerTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getVerTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getVerTs_result typedOther = (getVerTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getVerTs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getVerTs_resultStandardSchemeFactory implements SchemeFactory { + public getVerTs_resultStandardScheme getScheme() { + return new getVerTs_resultStandardScheme(); + } + } + + private static class getVerTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getVerTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list106 = iprot.readListBegin(); + struct.success = new ArrayList(_list106.size); + for (int _i107 = 0; _i107 < _list106.size; ++_i107) + { + TCell _elem108; // optional + _elem108 = new TCell(); + _elem108.read(iprot); + struct.success.add(_elem108); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getVerTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TCell _iter109 : struct.success) + { + _iter109.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getVerTs_resultTupleSchemeFactory implements SchemeFactory { + public getVerTs_resultTupleScheme getScheme() { + return new getVerTs_resultTupleScheme(); + } + } + + private static class getVerTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getVerTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TCell _iter110 : struct.success) + { + _iter110.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getVerTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list111 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list111.size); + for (int _i112 = 0; _i112 < _list111.size; ++_i112) + { + TCell _elem113; // optional + _elem113 = new TCell(); + _elem113.read(iprot); + struct.success.add(_elem113); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRow_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRow_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRow_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRow_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * Get attributes + */ + ATTRIBUTES((short)3, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRow_args.class, metaDataMap); + } + + public getRow_args() { + } + + public getRow_args( + ByteBuffer tableName, + ByteBuffer row, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRow_args(getRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRow_args deepCopy() { + return new getRow_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRow_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRow_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRow_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRow_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRow_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRow_args) + return this.equals((getRow_args)that); + return false; + } + + public boolean equals(getRow_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRow_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRow_args typedOther = (getRow_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRow_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRow_argsStandardSchemeFactory implements SchemeFactory { + public getRow_argsStandardScheme getScheme() { + return new getRow_argsStandardScheme(); + } + } + + private static class getRow_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRow_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map114 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map114.size); + for (int _i115 = 0; _i115 < _map114.size; ++_i115) + { + ByteBuffer _key116; // required + ByteBuffer _val117; // required + _key116 = iprot.readBinary(); + _val117 = iprot.readBinary(); + struct.attributes.put(_key116, _val117); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRow_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter118 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter118.getKey()); + oprot.writeBinary(_iter118.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRow_argsTupleSchemeFactory implements SchemeFactory { + public getRow_argsTupleScheme getScheme() { + return new getRow_argsTupleScheme(); + } + } + + private static class getRow_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter119 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter119.getKey()); + oprot.writeBinary(_iter119.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map120 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map120.size); + for (int _i121 = 0; _i121 < _map120.size; ++_i121) + { + ByteBuffer _key122; // required + ByteBuffer _val123; // required + _key122 = iprot.readBinary(); + _val123 = iprot.readBinary(); + struct.attributes.put(_key122, _val123); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRow_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRow_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRow_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRow_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRow_result.class, metaDataMap); + } + + public getRow_result() { + } + + public getRow_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRow_result(getRow_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRow_result deepCopy() { + return new getRow_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRow_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRow_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRow_result) + return this.equals((getRow_result)that); + return false; + } + + public boolean equals(getRow_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRow_result typedOther = (getRow_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRow_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRow_resultStandardSchemeFactory implements SchemeFactory { + public getRow_resultStandardScheme getScheme() { + return new getRow_resultStandardScheme(); + } + } + + private static class getRow_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRow_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list124 = iprot.readListBegin(); + struct.success = new ArrayList(_list124.size); + for (int _i125 = 0; _i125 < _list124.size; ++_i125) + { + TRowResult _elem126; // optional + _elem126 = new TRowResult(); + _elem126.read(iprot); + struct.success.add(_elem126); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRow_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter127 : struct.success) + { + _iter127.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRow_resultTupleSchemeFactory implements SchemeFactory { + public getRow_resultTupleScheme getScheme() { + return new getRow_resultTupleScheme(); + } + } + + private static class getRow_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter128 : struct.success) + { + _iter128.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list129.size); + for (int _i130 = 0; _i130 < _list129.size; ++_i130) + { + TRowResult _elem131; // optional + _elem131 = new TRowResult(); + _elem131.read(iprot); + struct.success.add(_elem131); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowWithColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumns_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowWithColumns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowWithColumns_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * List of columns to return, null for all columns + */ + public List columns; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * List of columns to return, null for all columns + */ + COLUMNS((short)3, "columns"), + /** + * Get attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumns_args.class, metaDataMap); + } + + public getRowWithColumns_args() { + } + + public getRowWithColumns_args( + ByteBuffer tableName, + ByteBuffer row, + List columns, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.columns = columns; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowWithColumns_args(getRowWithColumns_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowWithColumns_args deepCopy() { + return new getRowWithColumns_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.columns = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRowWithColumns_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowWithColumns_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRowWithColumns_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRowWithColumns_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * List of columns to return, null for all columns + */ + public List getColumns() { + return this.columns; + } + + /** + * List of columns to return, null for all columns + */ + public getRowWithColumns_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowWithColumns_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowWithColumns_args) + return this.equals((getRowWithColumns_args)that); + return false; + } + + public boolean equals(getRowWithColumns_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowWithColumns_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumns_args typedOther = (getRowWithColumns_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowWithColumns_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowWithColumns_argsStandardSchemeFactory implements SchemeFactory { + public getRowWithColumns_argsStandardScheme getScheme() { + return new getRowWithColumns_argsStandardScheme(); + } + } + + private static class getRowWithColumns_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumns_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(); + struct.columns = new ArrayList(_list132.size); + for (int _i133 = 0; _i133 < _list132.size; ++_i133) + { + ByteBuffer _elem134; // optional + _elem134 = iprot.readBinary(); + struct.columns.add(_elem134); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map135 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map135.size); + for (int _i136 = 0; _i136 < _map135.size; ++_i136) + { + ByteBuffer _key137; // required + ByteBuffer _val138; // required + _key137 = iprot.readBinary(); + _val138 = iprot.readBinary(); + struct.attributes.put(_key137, _val138); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowWithColumns_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter139 : struct.columns) + { + oprot.writeBinary(_iter139); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter140 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter140.getKey()); + oprot.writeBinary(_iter140.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowWithColumns_argsTupleSchemeFactory implements SchemeFactory { + public getRowWithColumns_argsTupleScheme getScheme() { + return new getRowWithColumns_argsTupleScheme(); + } + } + + private static class getRowWithColumns_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter141 : struct.columns) + { + oprot.writeBinary(_iter141); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter142 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter142.getKey()); + oprot.writeBinary(_iter142.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list143 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list143.size); + for (int _i144 = 0; _i144 < _list143.size; ++_i144) + { + ByteBuffer _elem145; // optional + _elem145 = iprot.readBinary(); + struct.columns.add(_elem145); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map146 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map146.size); + for (int _i147 = 0; _i147 < _map146.size; ++_i147) + { + ByteBuffer _key148; // required + ByteBuffer _val149; // required + _key148 = iprot.readBinary(); + _val149 = iprot.readBinary(); + struct.attributes.put(_key148, _val149); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowWithColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumns_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowWithColumns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowWithColumns_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumns_result.class, metaDataMap); + } + + public getRowWithColumns_result() { + } + + public getRowWithColumns_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowWithColumns_result(getRowWithColumns_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowWithColumns_result deepCopy() { + return new getRowWithColumns_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowWithColumns_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowWithColumns_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowWithColumns_result) + return this.equals((getRowWithColumns_result)that); + return false; + } + + public boolean equals(getRowWithColumns_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowWithColumns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumns_result typedOther = (getRowWithColumns_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowWithColumns_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowWithColumns_resultStandardSchemeFactory implements SchemeFactory { + public getRowWithColumns_resultStandardScheme getScheme() { + return new getRowWithColumns_resultStandardScheme(); + } + } + + private static class getRowWithColumns_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumns_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list150 = iprot.readListBegin(); + struct.success = new ArrayList(_list150.size); + for (int _i151 = 0; _i151 < _list150.size; ++_i151) + { + TRowResult _elem152; // optional + _elem152 = new TRowResult(); + _elem152.read(iprot); + struct.success.add(_elem152); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowWithColumns_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter153 : struct.success) + { + _iter153.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowWithColumns_resultTupleSchemeFactory implements SchemeFactory { + public getRowWithColumns_resultTupleScheme getScheme() { + return new getRowWithColumns_resultTupleScheme(); + } + } + + private static class getRowWithColumns_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter154 : struct.success) + { + _iter154.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumns_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list155 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list155.size); + for (int _i156 = 0; _i156 < _list155.size; ++_i156) + { + TRowResult _elem157; // optional + _elem157 = new TRowResult(); + _elem157.read(iprot); + struct.success.add(_elem157); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowTs_argsTupleSchemeFactory()); + } + + /** + * name of the table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of the table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * timestamp + */ + TIMESTAMP((short)3, "timestamp"), + /** + * Get attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // TIMESTAMP + return TIMESTAMP; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowTs_args.class, metaDataMap); + } + + public getRowTs_args() { + } + + public getRowTs_args( + ByteBuffer tableName, + ByteBuffer row, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowTs_args(getRowTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowTs_args deepCopy() { + return new getRowTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of the table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of the table + */ + public getRowTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRowTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRowTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public getRowTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowTs_args) + return this.equals((getRowTs_args)that); + return false; + } + + public boolean equals(getRowTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowTs_args typedOther = (getRowTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowTs_argsStandardSchemeFactory implements SchemeFactory { + public getRowTs_argsStandardScheme getScheme() { + return new getRowTs_argsStandardScheme(); + } + } + + private static class getRowTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map158 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map158.size); + for (int _i159 = 0; _i159 < _map158.size; ++_i159) + { + ByteBuffer _key160; // required + ByteBuffer _val161; // required + _key160 = iprot.readBinary(); + _val161 = iprot.readBinary(); + struct.attributes.put(_key160, _val161); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter162 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter162.getKey()); + oprot.writeBinary(_iter162.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowTs_argsTupleSchemeFactory implements SchemeFactory { + public getRowTs_argsTupleScheme getScheme() { + return new getRowTs_argsTupleScheme(); + } + } + + private static class getRowTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetTimestamp()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter163 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter163.getKey()); + oprot.writeBinary(_iter163.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map164 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map164.size); + for (int _i165 = 0; _i165 < _map164.size; ++_i165) + { + ByteBuffer _key166; // required + ByteBuffer _val167; // required + _key166 = iprot.readBinary(); + _val167 = iprot.readBinary(); + struct.attributes.put(_key166, _val167); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowTs_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowTs_result.class, metaDataMap); + } + + public getRowTs_result() { + } + + public getRowTs_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowTs_result(getRowTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowTs_result deepCopy() { + return new getRowTs_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowTs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowTs_result) + return this.equals((getRowTs_result)that); + return false; + } + + public boolean equals(getRowTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowTs_result typedOther = (getRowTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowTs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowTs_resultStandardSchemeFactory implements SchemeFactory { + public getRowTs_resultStandardScheme getScheme() { + return new getRowTs_resultStandardScheme(); + } + } + + private static class getRowTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list168 = iprot.readListBegin(); + struct.success = new ArrayList(_list168.size); + for (int _i169 = 0; _i169 < _list168.size; ++_i169) + { + TRowResult _elem170; // optional + _elem170 = new TRowResult(); + _elem170.read(iprot); + struct.success.add(_elem170); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter171 : struct.success) + { + _iter171.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowTs_resultTupleSchemeFactory implements SchemeFactory { + public getRowTs_resultTupleScheme getScheme() { + return new getRowTs_resultTupleScheme(); + } + } + + private static class getRowTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter172 : struct.success) + { + _iter172.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list173 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list173.size); + for (int _i174 = 0; _i174 < _list173.size; ++_i174) + { + TRowResult _elem175; // optional + _elem175 = new TRowResult(); + _elem175.read(iprot); + struct.success.add(_elem175); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowWithColumnsTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumnsTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowWithColumnsTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowWithColumnsTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * List of columns to return, null for all columns + */ + public List columns; // required + public long timestamp; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * List of columns to return, null for all columns + */ + COLUMNS((short)3, "columns"), + TIMESTAMP((short)4, "timestamp"), + /** + * Get attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_args.class, metaDataMap); + } + + public getRowWithColumnsTs_args() { + } + + public getRowWithColumnsTs_args( + ByteBuffer tableName, + ByteBuffer row, + List columns, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.columns = columns; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowWithColumnsTs_args(getRowWithColumnsTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowWithColumnsTs_args deepCopy() { + return new getRowWithColumnsTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRowWithColumnsTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowWithColumnsTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRowWithColumnsTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRowWithColumnsTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * List of columns to return, null for all columns + */ + public List getColumns() { + return this.columns; + } + + /** + * List of columns to return, null for all columns + */ + public getRowWithColumnsTs_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public getRowWithColumnsTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowWithColumnsTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowWithColumnsTs_args) + return this.equals((getRowWithColumnsTs_args)that); + return false; + } + + public boolean equals(getRowWithColumnsTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowWithColumnsTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumnsTs_args typedOther = (getRowWithColumnsTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowWithColumnsTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowWithColumnsTs_argsStandardSchemeFactory implements SchemeFactory { + public getRowWithColumnsTs_argsStandardScheme getScheme() { + return new getRowWithColumnsTs_argsStandardScheme(); + } + } + + private static class getRowWithColumnsTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list176 = iprot.readListBegin(); + struct.columns = new ArrayList(_list176.size); + for (int _i177 = 0; _i177 < _list176.size; ++_i177) + { + ByteBuffer _elem178; // optional + _elem178 = iprot.readBinary(); + struct.columns.add(_elem178); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map179 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map179.size); + for (int _i180 = 0; _i180 < _map179.size; ++_i180) + { + ByteBuffer _key181; // required + ByteBuffer _val182; // required + _key181 = iprot.readBinary(); + _val182 = iprot.readBinary(); + struct.attributes.put(_key181, _val182); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter183 : struct.columns) + { + oprot.writeBinary(_iter183); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter184 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter184.getKey()); + oprot.writeBinary(_iter184.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowWithColumnsTs_argsTupleSchemeFactory implements SchemeFactory { + public getRowWithColumnsTs_argsTupleScheme getScheme() { + return new getRowWithColumnsTs_argsTupleScheme(); + } + } + + private static class getRowWithColumnsTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter185 : struct.columns) + { + oprot.writeBinary(_iter185); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter186 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter186.getKey()); + oprot.writeBinary(_iter186.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list187.size); + for (int _i188 = 0; _i188 < _list187.size; ++_i188) + { + ByteBuffer _elem189; // optional + _elem189 = iprot.readBinary(); + struct.columns.add(_elem189); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map190 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map190.size); + for (int _i191 = 0; _i191 < _map190.size; ++_i191) + { + ByteBuffer _key192; // required + ByteBuffer _val193; // required + _key192 = iprot.readBinary(); + _val193 = iprot.readBinary(); + struct.attributes.put(_key192, _val193); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowWithColumnsTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowWithColumnsTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowWithColumnsTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowWithColumnsTs_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowWithColumnsTs_result.class, metaDataMap); + } + + public getRowWithColumnsTs_result() { + } + + public getRowWithColumnsTs_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowWithColumnsTs_result(getRowWithColumnsTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowWithColumnsTs_result deepCopy() { + return new getRowWithColumnsTs_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowWithColumnsTs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowWithColumnsTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowWithColumnsTs_result) + return this.equals((getRowWithColumnsTs_result)that); + return false; + } + + public boolean equals(getRowWithColumnsTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowWithColumnsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowWithColumnsTs_result typedOther = (getRowWithColumnsTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowWithColumnsTs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowWithColumnsTs_resultStandardSchemeFactory implements SchemeFactory { + public getRowWithColumnsTs_resultStandardScheme getScheme() { + return new getRowWithColumnsTs_resultStandardScheme(); + } + } + + private static class getRowWithColumnsTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowWithColumnsTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list194 = iprot.readListBegin(); + struct.success = new ArrayList(_list194.size); + for (int _i195 = 0; _i195 < _list194.size; ++_i195) + { + TRowResult _elem196; // optional + _elem196 = new TRowResult(); + _elem196.read(iprot); + struct.success.add(_elem196); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowWithColumnsTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter197 : struct.success) + { + _iter197.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowWithColumnsTs_resultTupleSchemeFactory implements SchemeFactory { + public getRowWithColumnsTs_resultTupleScheme getScheme() { + return new getRowWithColumnsTs_resultTupleScheme(); + } + } + + private static class getRowWithColumnsTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter198 : struct.success) + { + _iter198.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowWithColumnsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list199.size); + for (int _i200 = 0; _i200 < _list199.size; ++_i200) + { + TRowResult _elem201; // optional + _elem201 = new TRowResult(); + _elem201.read(iprot); + struct.success.add(_elem201); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRows_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRows_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRows_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRows_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row keys + */ + public List rows; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row keys + */ + ROWS((short)2, "rows"), + /** + * Get attributes + */ + ATTRIBUTES((short)3, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROWS + return ROWS; + case 3: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRows_args.class, metaDataMap); + } + + public getRows_args() { + } + + public getRows_args( + ByteBuffer tableName, + List rows, + Map attributes) + { + this(); + this.tableName = tableName; + this.rows = rows; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRows_args(getRows_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRows()) { + List __this__rows = new ArrayList(); + for (ByteBuffer other_element : other.rows) { + __this__rows.add(other_element); + } + this.rows = __this__rows; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRows_args deepCopy() { + return new getRows_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rows = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRows_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRows_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowsSize() { + return (this.rows == null) ? 0 : this.rows.size(); + } + + public java.util.Iterator getRowsIterator() { + return (this.rows == null) ? null : this.rows.iterator(); + } + + public void addToRows(ByteBuffer elem) { + if (this.rows == null) { + this.rows = new ArrayList(); + } + this.rows.add(elem); + } + + /** + * row keys + */ + public List getRows() { + return this.rows; + } + + /** + * row keys + */ + public getRows_args setRows(List rows) { + this.rows = rows; + return this; + } + + public void unsetRows() { + this.rows = null; + } + + /** Returns true if field rows is set (has been assigned a value) and false otherwise */ + public boolean isSetRows() { + return this.rows != null; + } + + public void setRowsIsSet(boolean value) { + if (!value) { + this.rows = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRows_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROWS: + if (value == null) { + unsetRows(); + } else { + setRows((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROWS: + return getRows(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROWS: + return isSetRows(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRows_args) + return this.equals((getRows_args)that); + return false; + } + + public boolean equals(getRows_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rows = true && this.isSetRows(); + boolean that_present_rows = true && that.isSetRows(); + if (this_present_rows || that_present_rows) { + if (!(this_present_rows && that_present_rows)) + return false; + if (!this.rows.equals(that.rows)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRows_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRows_args typedOther = (getRows_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRows_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rows:"); + if (this.rows == null) { + sb.append("null"); + } else { + sb.append(this.rows); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRows_argsStandardSchemeFactory implements SchemeFactory { + public getRows_argsStandardScheme getScheme() { + return new getRows_argsStandardScheme(); + } + } + + private static class getRows_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRows_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list202 = iprot.readListBegin(); + struct.rows = new ArrayList(_list202.size); + for (int _i203 = 0; _i203 < _list202.size; ++_i203) + { + ByteBuffer _elem204; // optional + _elem204 = iprot.readBinary(); + struct.rows.add(_elem204); + } + iprot.readListEnd(); + } + struct.setRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map205 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map205.size); + for (int _i206 = 0; _i206 < _map205.size; ++_i206) + { + ByteBuffer _key207; // required + ByteBuffer _val208; // required + _key207 = iprot.readBinary(); + _val208 = iprot.readBinary(); + struct.attributes.put(_key207, _val208); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRows_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rows != null) { + oprot.writeFieldBegin(ROWS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size())); + for (ByteBuffer _iter209 : struct.rows) + { + oprot.writeBinary(_iter209); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter210 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter210.getKey()); + oprot.writeBinary(_iter210.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRows_argsTupleSchemeFactory implements SchemeFactory { + public getRows_argsTupleScheme getScheme() { + return new getRows_argsTupleScheme(); + } + } + + private static class getRows_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRows()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRows()) { + { + oprot.writeI32(struct.rows.size()); + for (ByteBuffer _iter211 : struct.rows) + { + oprot.writeBinary(_iter211); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter212 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter212.getKey()); + oprot.writeBinary(_iter212.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list213 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.rows = new ArrayList(_list213.size); + for (int _i214 = 0; _i214 < _list213.size; ++_i214) + { + ByteBuffer _elem215; // optional + _elem215 = iprot.readBinary(); + struct.rows.add(_elem215); + } + } + struct.setRowsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map216 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map216.size); + for (int _i217 = 0; _i217 < _map216.size; ++_i217) + { + ByteBuffer _key218; // required + ByteBuffer _val219; // required + _key218 = iprot.readBinary(); + _val219 = iprot.readBinary(); + struct.attributes.put(_key218, _val219); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRows_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRows_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRows_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRows_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRows_result.class, metaDataMap); + } + + public getRows_result() { + } + + public getRows_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRows_result(getRows_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRows_result deepCopy() { + return new getRows_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRows_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRows_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRows_result) + return this.equals((getRows_result)that); + return false; + } + + public boolean equals(getRows_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRows_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRows_result typedOther = (getRows_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRows_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRows_resultStandardSchemeFactory implements SchemeFactory { + public getRows_resultStandardScheme getScheme() { + return new getRows_resultStandardScheme(); + } + } + + private static class getRows_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRows_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list220 = iprot.readListBegin(); + struct.success = new ArrayList(_list220.size); + for (int _i221 = 0; _i221 < _list220.size; ++_i221) + { + TRowResult _elem222; // optional + _elem222 = new TRowResult(); + _elem222.read(iprot); + struct.success.add(_elem222); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRows_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter223 : struct.success) + { + _iter223.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRows_resultTupleSchemeFactory implements SchemeFactory { + public getRows_resultTupleScheme getScheme() { + return new getRows_resultTupleScheme(); + } + } + + private static class getRows_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter224 : struct.success) + { + _iter224.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list225 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list225.size); + for (int _i226 = 0; _i226 < _list225.size; ++_i226) + { + TRowResult _elem227; // optional + _elem227 = new TRowResult(); + _elem227.read(iprot); + struct.success.add(_elem227); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowsWithColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumns_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsWithColumns_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsWithColumns_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row keys + */ + public List rows; // required + /** + * List of columns to return, null for all columns + */ + public List columns; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row keys + */ + ROWS((short)2, "rows"), + /** + * List of columns to return, null for all columns + */ + COLUMNS((short)3, "columns"), + /** + * Get attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROWS + return ROWS; + case 3: // COLUMNS + return COLUMNS; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumns_args.class, metaDataMap); + } + + public getRowsWithColumns_args() { + } + + public getRowsWithColumns_args( + ByteBuffer tableName, + List rows, + List columns, + Map attributes) + { + this(); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowsWithColumns_args(getRowsWithColumns_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRows()) { + List __this__rows = new ArrayList(); + for (ByteBuffer other_element : other.rows) { + __this__rows.add(other_element); + } + this.rows = __this__rows; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowsWithColumns_args deepCopy() { + return new getRowsWithColumns_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rows = null; + this.columns = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRowsWithColumns_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsWithColumns_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowsSize() { + return (this.rows == null) ? 0 : this.rows.size(); + } + + public java.util.Iterator getRowsIterator() { + return (this.rows == null) ? null : this.rows.iterator(); + } + + public void addToRows(ByteBuffer elem) { + if (this.rows == null) { + this.rows = new ArrayList(); + } + this.rows.add(elem); + } + + /** + * row keys + */ + public List getRows() { + return this.rows; + } + + /** + * row keys + */ + public getRowsWithColumns_args setRows(List rows) { + this.rows = rows; + return this; + } + + public void unsetRows() { + this.rows = null; + } + + /** Returns true if field rows is set (has been assigned a value) and false otherwise */ + public boolean isSetRows() { + return this.rows != null; + } + + public void setRowsIsSet(boolean value) { + if (!value) { + this.rows = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * List of columns to return, null for all columns + */ + public List getColumns() { + return this.columns; + } + + /** + * List of columns to return, null for all columns + */ + public getRowsWithColumns_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowsWithColumns_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROWS: + if (value == null) { + unsetRows(); + } else { + setRows((List)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROWS: + return getRows(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROWS: + return isSetRows(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsWithColumns_args) + return this.equals((getRowsWithColumns_args)that); + return false; + } + + public boolean equals(getRowsWithColumns_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rows = true && this.isSetRows(); + boolean that_present_rows = true && that.isSetRows(); + if (this_present_rows || that_present_rows) { + if (!(this_present_rows && that_present_rows)) + return false; + if (!this.rows.equals(that.rows)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsWithColumns_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsWithColumns_args typedOther = (getRowsWithColumns_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsWithColumns_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rows:"); + if (this.rows == null) { + sb.append("null"); + } else { + sb.append(this.rows); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsWithColumns_argsStandardSchemeFactory implements SchemeFactory { + public getRowsWithColumns_argsStandardScheme getScheme() { + return new getRowsWithColumns_argsStandardScheme(); + } + } + + private static class getRowsWithColumns_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumns_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list228 = iprot.readListBegin(); + struct.rows = new ArrayList(_list228.size); + for (int _i229 = 0; _i229 < _list228.size; ++_i229) + { + ByteBuffer _elem230; // optional + _elem230 = iprot.readBinary(); + struct.rows.add(_elem230); + } + iprot.readListEnd(); + } + struct.setRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list231 = iprot.readListBegin(); + struct.columns = new ArrayList(_list231.size); + for (int _i232 = 0; _i232 < _list231.size; ++_i232) + { + ByteBuffer _elem233; // optional + _elem233 = iprot.readBinary(); + struct.columns.add(_elem233); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map234 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map234.size); + for (int _i235 = 0; _i235 < _map234.size; ++_i235) + { + ByteBuffer _key236; // required + ByteBuffer _val237; // required + _key236 = iprot.readBinary(); + _val237 = iprot.readBinary(); + struct.attributes.put(_key236, _val237); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsWithColumns_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rows != null) { + oprot.writeFieldBegin(ROWS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size())); + for (ByteBuffer _iter238 : struct.rows) + { + oprot.writeBinary(_iter238); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter239 : struct.columns) + { + oprot.writeBinary(_iter239); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter240 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter240.getKey()); + oprot.writeBinary(_iter240.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsWithColumns_argsTupleSchemeFactory implements SchemeFactory { + public getRowsWithColumns_argsTupleScheme getScheme() { + return new getRowsWithColumns_argsTupleScheme(); + } + } + + private static class getRowsWithColumns_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRows()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRows()) { + { + oprot.writeI32(struct.rows.size()); + for (ByteBuffer _iter241 : struct.rows) + { + oprot.writeBinary(_iter241); + } + } + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter242 : struct.columns) + { + oprot.writeBinary(_iter242); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter243 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter243.getKey()); + oprot.writeBinary(_iter243.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list244 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.rows = new ArrayList(_list244.size); + for (int _i245 = 0; _i245 < _list244.size; ++_i245) + { + ByteBuffer _elem246; // optional + _elem246 = iprot.readBinary(); + struct.rows.add(_elem246); + } + } + struct.setRowsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list247.size); + for (int _i248 = 0; _i248 < _list247.size; ++_i248) + { + ByteBuffer _elem249; // optional + _elem249 = iprot.readBinary(); + struct.columns.add(_elem249); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map250 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map250.size); + for (int _i251 = 0; _i251 < _map250.size; ++_i251) + { + ByteBuffer _key252; // required + ByteBuffer _val253; // required + _key252 = iprot.readBinary(); + _val253 = iprot.readBinary(); + struct.attributes.put(_key252, _val253); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowsWithColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumns_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsWithColumns_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsWithColumns_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumns_result.class, metaDataMap); + } + + public getRowsWithColumns_result() { + } + + public getRowsWithColumns_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowsWithColumns_result(getRowsWithColumns_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowsWithColumns_result deepCopy() { + return new getRowsWithColumns_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowsWithColumns_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowsWithColumns_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsWithColumns_result) + return this.equals((getRowsWithColumns_result)that); + return false; + } + + public boolean equals(getRowsWithColumns_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsWithColumns_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsWithColumns_result typedOther = (getRowsWithColumns_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsWithColumns_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsWithColumns_resultStandardSchemeFactory implements SchemeFactory { + public getRowsWithColumns_resultStandardScheme getScheme() { + return new getRowsWithColumns_resultStandardScheme(); + } + } + + private static class getRowsWithColumns_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumns_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list254 = iprot.readListBegin(); + struct.success = new ArrayList(_list254.size); + for (int _i255 = 0; _i255 < _list254.size; ++_i255) + { + TRowResult _elem256; // optional + _elem256 = new TRowResult(); + _elem256.read(iprot); + struct.success.add(_elem256); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsWithColumns_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter257 : struct.success) + { + _iter257.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsWithColumns_resultTupleSchemeFactory implements SchemeFactory { + public getRowsWithColumns_resultTupleScheme getScheme() { + return new getRowsWithColumns_resultTupleScheme(); + } + } + + private static class getRowsWithColumns_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter258 : struct.success) + { + _iter258.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumns_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list259 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list259.size); + for (int _i260 = 0; _i260 < _list259.size; ++_i260) + { + TRowResult _elem261; // optional + _elem261 = new TRowResult(); + _elem261.read(iprot); + struct.success.add(_elem261); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowsTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsTs_argsTupleSchemeFactory()); + } + + /** + * name of the table + */ + public ByteBuffer tableName; // required + /** + * row keys + */ + public List rows; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of the table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row keys + */ + ROWS((short)2, "rows"), + /** + * timestamp + */ + TIMESTAMP((short)3, "timestamp"), + /** + * Get attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROWS + return ROWS; + case 3: // TIMESTAMP + return TIMESTAMP; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsTs_args.class, metaDataMap); + } + + public getRowsTs_args() { + } + + public getRowsTs_args( + ByteBuffer tableName, + List rows, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.rows = rows; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowsTs_args(getRowsTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRows()) { + List __this__rows = new ArrayList(); + for (ByteBuffer other_element : other.rows) { + __this__rows.add(other_element); + } + this.rows = __this__rows; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowsTs_args deepCopy() { + return new getRowsTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rows = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of the table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of the table + */ + public getRowsTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowsSize() { + return (this.rows == null) ? 0 : this.rows.size(); + } + + public java.util.Iterator getRowsIterator() { + return (this.rows == null) ? null : this.rows.iterator(); + } + + public void addToRows(ByteBuffer elem) { + if (this.rows == null) { + this.rows = new ArrayList(); + } + this.rows.add(elem); + } + + /** + * row keys + */ + public List getRows() { + return this.rows; + } + + /** + * row keys + */ + public getRowsTs_args setRows(List rows) { + this.rows = rows; + return this; + } + + public void unsetRows() { + this.rows = null; + } + + /** Returns true if field rows is set (has been assigned a value) and false otherwise */ + public boolean isSetRows() { + return this.rows != null; + } + + public void setRowsIsSet(boolean value) { + if (!value) { + this.rows = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public getRowsTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowsTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROWS: + if (value == null) { + unsetRows(); + } else { + setRows((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROWS: + return getRows(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROWS: + return isSetRows(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsTs_args) + return this.equals((getRowsTs_args)that); + return false; + } + + public boolean equals(getRowsTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rows = true && this.isSetRows(); + boolean that_present_rows = true && that.isSetRows(); + if (this_present_rows || that_present_rows) { + if (!(this_present_rows && that_present_rows)) + return false; + if (!this.rows.equals(that.rows)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsTs_args typedOther = (getRowsTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rows:"); + if (this.rows == null) { + sb.append("null"); + } else { + sb.append(this.rows); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsTs_argsStandardSchemeFactory implements SchemeFactory { + public getRowsTs_argsStandardScheme getScheme() { + return new getRowsTs_argsStandardScheme(); + } + } + + private static class getRowsTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list262 = iprot.readListBegin(); + struct.rows = new ArrayList(_list262.size); + for (int _i263 = 0; _i263 < _list262.size; ++_i263) + { + ByteBuffer _elem264; // optional + _elem264 = iprot.readBinary(); + struct.rows.add(_elem264); + } + iprot.readListEnd(); + } + struct.setRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map265 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map265.size); + for (int _i266 = 0; _i266 < _map265.size; ++_i266) + { + ByteBuffer _key267; // required + ByteBuffer _val268; // required + _key267 = iprot.readBinary(); + _val268 = iprot.readBinary(); + struct.attributes.put(_key267, _val268); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rows != null) { + oprot.writeFieldBegin(ROWS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size())); + for (ByteBuffer _iter269 : struct.rows) + { + oprot.writeBinary(_iter269); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter270 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter270.getKey()); + oprot.writeBinary(_iter270.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsTs_argsTupleSchemeFactory implements SchemeFactory { + public getRowsTs_argsTupleScheme getScheme() { + return new getRowsTs_argsTupleScheme(); + } + } + + private static class getRowsTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRows()) { + optionals.set(1); + } + if (struct.isSetTimestamp()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRows()) { + { + oprot.writeI32(struct.rows.size()); + for (ByteBuffer _iter271 : struct.rows) + { + oprot.writeBinary(_iter271); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter272 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter272.getKey()); + oprot.writeBinary(_iter272.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.rows = new ArrayList(_list273.size); + for (int _i274 = 0; _i274 < _list273.size; ++_i274) + { + ByteBuffer _elem275; // optional + _elem275 = iprot.readBinary(); + struct.rows.add(_elem275); + } + } + struct.setRowsIsSet(true); + } + if (incoming.get(2)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map276 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map276.size); + for (int _i277 = 0; _i277 < _map276.size; ++_i277) + { + ByteBuffer _key278; // required + ByteBuffer _val279; // required + _key278 = iprot.readBinary(); + _val279 = iprot.readBinary(); + struct.attributes.put(_key278, _val279); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowsTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsTs_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsTs_result.class, metaDataMap); + } + + public getRowsTs_result() { + } + + public getRowsTs_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowsTs_result(getRowsTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowsTs_result deepCopy() { + return new getRowsTs_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowsTs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowsTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsTs_result) + return this.equals((getRowsTs_result)that); + return false; + } + + public boolean equals(getRowsTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsTs_result typedOther = (getRowsTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsTs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsTs_resultStandardSchemeFactory implements SchemeFactory { + public getRowsTs_resultStandardScheme getScheme() { + return new getRowsTs_resultStandardScheme(); + } + } + + private static class getRowsTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list280 = iprot.readListBegin(); + struct.success = new ArrayList(_list280.size); + for (int _i281 = 0; _i281 < _list280.size; ++_i281) + { + TRowResult _elem282; // optional + _elem282 = new TRowResult(); + _elem282.read(iprot); + struct.success.add(_elem282); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter283 : struct.success) + { + _iter283.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsTs_resultTupleSchemeFactory implements SchemeFactory { + public getRowsTs_resultTupleScheme getScheme() { + return new getRowsTs_resultTupleScheme(); + } + } + + private static class getRowsTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter284 : struct.success) + { + _iter284.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list285 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list285.size); + for (int _i286 = 0; _i286 < _list285.size; ++_i286) + { + TRowResult _elem287; // optional + _elem287 = new TRowResult(); + _elem287.read(iprot); + struct.success.add(_elem287); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRowsWithColumnsTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumnsTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("rows", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsWithColumnsTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsWithColumnsTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row keys + */ + public List rows; // required + /** + * List of columns to return, null for all columns + */ + public List columns; // required + public long timestamp; // required + /** + * Get attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row keys + */ + ROWS((short)2, "rows"), + /** + * List of columns to return, null for all columns + */ + COLUMNS((short)3, "columns"), + TIMESTAMP((short)4, "timestamp"), + /** + * Get attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROWS + return ROWS; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROWS, new org.apache.thrift.meta_data.FieldMetaData("rows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumnsTs_args.class, metaDataMap); + } + + public getRowsWithColumnsTs_args() { + } + + public getRowsWithColumnsTs_args( + ByteBuffer tableName, + List rows, + List columns, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.rows = rows; + this.columns = columns; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public getRowsWithColumnsTs_args(getRowsWithColumnsTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRows()) { + List __this__rows = new ArrayList(); + for (ByteBuffer other_element : other.rows) { + __this__rows.add(other_element); + } + this.rows = __this__rows; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public getRowsWithColumnsTs_args deepCopy() { + return new getRowsWithColumnsTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rows = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRowsWithColumnsTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowsWithColumnsTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowsSize() { + return (this.rows == null) ? 0 : this.rows.size(); + } + + public java.util.Iterator getRowsIterator() { + return (this.rows == null) ? null : this.rows.iterator(); + } + + public void addToRows(ByteBuffer elem) { + if (this.rows == null) { + this.rows = new ArrayList(); + } + this.rows.add(elem); + } + + /** + * row keys + */ + public List getRows() { + return this.rows; + } + + /** + * row keys + */ + public getRowsWithColumnsTs_args setRows(List rows) { + this.rows = rows; + return this; + } + + public void unsetRows() { + this.rows = null; + } + + /** Returns true if field rows is set (has been assigned a value) and false otherwise */ + public boolean isSetRows() { + return this.rows != null; + } + + public void setRowsIsSet(boolean value) { + if (!value) { + this.rows = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * List of columns to return, null for all columns + */ + public List getColumns() { + return this.columns; + } + + /** + * List of columns to return, null for all columns + */ + public getRowsWithColumnsTs_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public getRowsWithColumnsTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Get attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Get attributes + */ + public getRowsWithColumnsTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROWS: + if (value == null) { + unsetRows(); + } else { + setRows((List)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROWS: + return getRows(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROWS: + return isSetRows(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsWithColumnsTs_args) + return this.equals((getRowsWithColumnsTs_args)that); + return false; + } + + public boolean equals(getRowsWithColumnsTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rows = true && this.isSetRows(); + boolean that_present_rows = true && that.isSetRows(); + if (this_present_rows || that_present_rows) { + if (!(this_present_rows && that_present_rows)) + return false; + if (!this.rows.equals(that.rows)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsWithColumnsTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsWithColumnsTs_args typedOther = (getRowsWithColumnsTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsWithColumnsTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rows:"); + if (this.rows == null) { + sb.append("null"); + } else { + sb.append(this.rows); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsWithColumnsTs_argsStandardSchemeFactory implements SchemeFactory { + public getRowsWithColumnsTs_argsStandardScheme getScheme() { + return new getRowsWithColumnsTs_argsStandardScheme(); + } + } + + private static class getRowsWithColumnsTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list288 = iprot.readListBegin(); + struct.rows = new ArrayList(_list288.size); + for (int _i289 = 0; _i289 < _list288.size; ++_i289) + { + ByteBuffer _elem290; // optional + _elem290 = iprot.readBinary(); + struct.rows.add(_elem290); + } + iprot.readListEnd(); + } + struct.setRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list291 = iprot.readListBegin(); + struct.columns = new ArrayList(_list291.size); + for (int _i292 = 0; _i292 < _list291.size; ++_i292) + { + ByteBuffer _elem293; // optional + _elem293 = iprot.readBinary(); + struct.columns.add(_elem293); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map294 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map294.size); + for (int _i295 = 0; _i295 < _map294.size; ++_i295) + { + ByteBuffer _key296; // required + ByteBuffer _val297; // required + _key296 = iprot.readBinary(); + _val297 = iprot.readBinary(); + struct.attributes.put(_key296, _val297); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rows != null) { + oprot.writeFieldBegin(ROWS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.rows.size())); + for (ByteBuffer _iter298 : struct.rows) + { + oprot.writeBinary(_iter298); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter299 : struct.columns) + { + oprot.writeBinary(_iter299); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter300 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter300.getKey()); + oprot.writeBinary(_iter300.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsWithColumnsTs_argsTupleSchemeFactory implements SchemeFactory { + public getRowsWithColumnsTs_argsTupleScheme getScheme() { + return new getRowsWithColumnsTs_argsTupleScheme(); + } + } + + private static class getRowsWithColumnsTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRows()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRows()) { + { + oprot.writeI32(struct.rows.size()); + for (ByteBuffer _iter301 : struct.rows) + { + oprot.writeBinary(_iter301); + } + } + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter302 : struct.columns) + { + oprot.writeBinary(_iter302); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter303 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter303.getKey()); + oprot.writeBinary(_iter303.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list304 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.rows = new ArrayList(_list304.size); + for (int _i305 = 0; _i305 < _list304.size; ++_i305) + { + ByteBuffer _elem306; // optional + _elem306 = iprot.readBinary(); + struct.rows.add(_elem306); + } + } + struct.setRowsIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list307 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list307.size); + for (int _i308 = 0; _i308 < _list307.size; ++_i308) + { + ByteBuffer _elem309; // optional + _elem309 = iprot.readBinary(); + struct.columns.add(_elem309); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map310 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map310.size); + for (int _i311 = 0; _i311 < _map310.size; ++_i311) + { + ByteBuffer _key312; // required + ByteBuffer _val313; // required + _key312 = iprot.readBinary(); + _val313 = iprot.readBinary(); + struct.attributes.put(_key312, _val313); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class getRowsWithColumnsTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowsWithColumnsTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowsWithColumnsTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowsWithColumnsTs_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowsWithColumnsTs_result.class, metaDataMap); + } + + public getRowsWithColumnsTs_result() { + } + + public getRowsWithColumnsTs_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowsWithColumnsTs_result(getRowsWithColumnsTs_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowsWithColumnsTs_result deepCopy() { + return new getRowsWithColumnsTs_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowsWithColumnsTs_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowsWithColumnsTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowsWithColumnsTs_result) + return this.equals((getRowsWithColumnsTs_result)that); + return false; + } + + public boolean equals(getRowsWithColumnsTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowsWithColumnsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowsWithColumnsTs_result typedOther = (getRowsWithColumnsTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowsWithColumnsTs_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowsWithColumnsTs_resultStandardSchemeFactory implements SchemeFactory { + public getRowsWithColumnsTs_resultStandardScheme getScheme() { + return new getRowsWithColumnsTs_resultStandardScheme(); + } + } + + private static class getRowsWithColumnsTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowsWithColumnsTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list314 = iprot.readListBegin(); + struct.success = new ArrayList(_list314.size); + for (int _i315 = 0; _i315 < _list314.size; ++_i315) + { + TRowResult _elem316; // optional + _elem316 = new TRowResult(); + _elem316.read(iprot); + struct.success.add(_elem316); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowsWithColumnsTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter317 : struct.success) + { + _iter317.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowsWithColumnsTs_resultTupleSchemeFactory implements SchemeFactory { + public getRowsWithColumnsTs_resultTupleScheme getScheme() { + return new getRowsWithColumnsTs_resultTupleScheme(); + } + } + + private static class getRowsWithColumnsTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter318 : struct.success) + { + _iter318.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowsWithColumnsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list319.size); + for (int _i320 = 0; _i320 < _list319.size; ++_i320) + { + TRowResult _elem321; // optional + _elem321 = new TRowResult(); + _elem321.read(iprot); + struct.success.add(_elem321); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class mutateRow_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRow_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRow_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * list of mutation commands + */ + public List mutations; // required + /** + * Mutation attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * list of mutation commands + */ + MUTATIONS((short)3, "mutations"), + /** + * Mutation attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // MUTATIONS + return MUTATIONS; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Mutation.class)))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_args.class, metaDataMap); + } + + public mutateRow_args() { + } + + public mutateRow_args( + ByteBuffer tableName, + ByteBuffer row, + List mutations, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public mutateRow_args(mutateRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public mutateRow_args deepCopy() { + return new mutateRow_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.mutations = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public mutateRow_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRow_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public mutateRow_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public mutateRow_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + /** + * list of mutation commands + */ + public List getMutations() { + return this.mutations; + } + + /** + * list of mutation commands + */ + public mutateRow_args setMutations(List mutations) { + this.mutations = mutations; + return this; + } + + public void unsetMutations() { + this.mutations = null; + } + + /** Returns true if field mutations is set (has been assigned a value) and false otherwise */ + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Mutation attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Mutation attributes + */ + public mutateRow_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRow_args) + return this.equals((mutateRow_args)that); + return false; + } + + public boolean equals(mutateRow_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); + if (this_present_mutations || that_present_mutations) { + if (!(this_present_mutations && that_present_mutations)) + return false; + if (!this.mutations.equals(that.mutations)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRow_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRow_args typedOther = (mutateRow_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMutations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRow_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRow_argsStandardSchemeFactory implements SchemeFactory { + public mutateRow_argsStandardScheme getScheme() { + return new mutateRow_argsStandardScheme(); + } + } + + private static class mutateRow_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MUTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list322 = iprot.readListBegin(); + struct.mutations = new ArrayList(_list322.size); + for (int _i323 = 0; _i323 < _list322.size; ++_i323) + { + Mutation _elem324; // optional + _elem324 = new Mutation(); + _elem324.read(iprot); + struct.mutations.add(_elem324); + } + iprot.readListEnd(); + } + struct.setMutationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map325 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map325.size); + for (int _i326 = 0; _i326 < _map325.size; ++_i326) + { + ByteBuffer _key327; // required + ByteBuffer _val328; // required + _key327 = iprot.readBinary(); + _val328 = iprot.readBinary(); + struct.attributes.put(_key327, _val328); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.mutations != null) { + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size())); + for (Mutation _iter329 : struct.mutations) + { + _iter329.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter330 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter330.getKey()); + oprot.writeBinary(_iter330.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRow_argsTupleSchemeFactory implements SchemeFactory { + public mutateRow_argsTupleScheme getScheme() { + return new mutateRow_argsTupleScheme(); + } + } + + private static class mutateRow_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetMutations()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetMutations()) { + { + oprot.writeI32(struct.mutations.size()); + for (Mutation _iter331 : struct.mutations) + { + _iter331.write(oprot); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter332 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter332.getKey()); + oprot.writeBinary(_iter332.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list333 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.mutations = new ArrayList(_list333.size); + for (int _i334 = 0; _i334 < _list333.size; ++_i334) + { + Mutation _elem335; // optional + _elem335 = new Mutation(); + _elem335.read(iprot); + struct.mutations.add(_elem335); + } + } + struct.setMutationsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map336 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map336.size); + for (int _i337 = 0; _i337 < _map336.size; ++_i337) + { + ByteBuffer _key338; // required + ByteBuffer _val339; // required + _key338 = iprot.readBinary(); + _val339 = iprot.readBinary(); + struct.attributes.put(_key338, _val339); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class mutateRow_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRow_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRow_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRow_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRow_result.class, metaDataMap); + } + + public mutateRow_result() { + } + + public mutateRow_result( + IOError io, + IllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public mutateRow_result(mutateRow_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public mutateRow_result deepCopy() { + return new mutateRow_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public IOError getIo() { + return this.io; + } + + public mutateRow_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public mutateRow_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRow_result) + return this.equals((mutateRow_result)that); + return false; + } + + public boolean equals(mutateRow_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRow_result typedOther = (mutateRow_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRow_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRow_resultStandardSchemeFactory implements SchemeFactory { + public mutateRow_resultStandardScheme getScheme() { + return new mutateRow_resultStandardScheme(); + } + } + + private static class mutateRow_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRow_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRow_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRow_resultTupleSchemeFactory implements SchemeFactory { + public mutateRow_resultTupleScheme getScheme() { + return new mutateRow_resultTupleScheme(); + } + } + + private static class mutateRow_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class mutateRowTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRowTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRowTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * list of mutation commands + */ + public List mutations; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Mutation attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * list of mutation commands + */ + MUTATIONS((short)3, "mutations"), + /** + * timestamp + */ + TIMESTAMP((short)4, "timestamp"), + /** + * Mutation attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // MUTATIONS + return MUTATIONS; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Mutation.class)))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowTs_args.class, metaDataMap); + } + + public mutateRowTs_args() { + } + + public mutateRowTs_args( + ByteBuffer tableName, + ByteBuffer row, + List mutations, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.mutations = mutations; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public mutateRowTs_args(mutateRowTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetMutations()) { + List __this__mutations = new ArrayList(); + for (Mutation other_element : other.mutations) { + __this__mutations.add(new Mutation(other_element)); + } + this.mutations = __this__mutations; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public mutateRowTs_args deepCopy() { + return new mutateRowTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.mutations = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public mutateRowTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRowTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public mutateRowTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public mutateRowTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getMutationsSize() { + return (this.mutations == null) ? 0 : this.mutations.size(); + } + + public java.util.Iterator getMutationsIterator() { + return (this.mutations == null) ? null : this.mutations.iterator(); + } + + public void addToMutations(Mutation elem) { + if (this.mutations == null) { + this.mutations = new ArrayList(); + } + this.mutations.add(elem); + } + + /** + * list of mutation commands + */ + public List getMutations() { + return this.mutations; + } + + /** + * list of mutation commands + */ + public mutateRowTs_args setMutations(List mutations) { + this.mutations = mutations; + return this; + } + + public void unsetMutations() { + this.mutations = null; + } + + /** Returns true if field mutations is set (has been assigned a value) and false otherwise */ + public boolean isSetMutations() { + return this.mutations != null; + } + + public void setMutationsIsSet(boolean value) { + if (!value) { + this.mutations = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public mutateRowTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Mutation attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Mutation attributes + */ + public mutateRowTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case MUTATIONS: + if (value == null) { + unsetMutations(); + } else { + setMutations((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case MUTATIONS: + return getMutations(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case MUTATIONS: + return isSetMutations(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRowTs_args) + return this.equals((mutateRowTs_args)that); + return false; + } + + public boolean equals(mutateRowTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_mutations = true && this.isSetMutations(); + boolean that_present_mutations = true && that.isSetMutations(); + if (this_present_mutations || that_present_mutations) { + if (!(this_present_mutations && that_present_mutations)) + return false; + if (!this.mutations.equals(that.mutations)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRowTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRowTs_args typedOther = (mutateRowTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetMutations()).compareTo(typedOther.isSetMutations()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMutations()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRowTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("mutations:"); + if (this.mutations == null) { + sb.append("null"); + } else { + sb.append(this.mutations); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRowTs_argsStandardSchemeFactory implements SchemeFactory { + public mutateRowTs_argsStandardScheme getScheme() { + return new mutateRowTs_argsStandardScheme(); + } + } + + private static class mutateRowTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // MUTATIONS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list340 = iprot.readListBegin(); + struct.mutations = new ArrayList(_list340.size); + for (int _i341 = 0; _i341 < _list340.size; ++_i341) + { + Mutation _elem342; // optional + _elem342 = new Mutation(); + _elem342.read(iprot); + struct.mutations.add(_elem342); + } + iprot.readListEnd(); + } + struct.setMutationsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map343 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map343.size); + for (int _i344 = 0; _i344 < _map343.size; ++_i344) + { + ByteBuffer _key345; // required + ByteBuffer _val346; // required + _key345 = iprot.readBinary(); + _val346 = iprot.readBinary(); + struct.attributes.put(_key345, _val346); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRowTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.mutations != null) { + oprot.writeFieldBegin(MUTATIONS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.mutations.size())); + for (Mutation _iter347 : struct.mutations) + { + _iter347.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter348 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter348.getKey()); + oprot.writeBinary(_iter348.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRowTs_argsTupleSchemeFactory implements SchemeFactory { + public mutateRowTs_argsTupleScheme getScheme() { + return new mutateRowTs_argsTupleScheme(); + } + } + + private static class mutateRowTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetMutations()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetMutations()) { + { + oprot.writeI32(struct.mutations.size()); + for (Mutation _iter349 : struct.mutations) + { + _iter349.write(oprot); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter350 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter350.getKey()); + oprot.writeBinary(_iter350.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.mutations = new ArrayList(_list351.size); + for (int _i352 = 0; _i352 < _list351.size; ++_i352) + { + Mutation _elem353; // optional + _elem353 = new Mutation(); + _elem353.read(iprot); + struct.mutations.add(_elem353); + } + } + struct.setMutationsIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map354 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map354.size); + for (int _i355 = 0; _i355 < _map354.size; ++_i355) + { + ByteBuffer _key356; // required + ByteBuffer _val357; // required + _key356 = iprot.readBinary(); + _val357 = iprot.readBinary(); + struct.attributes.put(_key356, _val357); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class mutateRowTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowTs_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRowTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRowTs_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowTs_result.class, metaDataMap); + } + + public mutateRowTs_result() { + } + + public mutateRowTs_result( + IOError io, + IllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public mutateRowTs_result(mutateRowTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public mutateRowTs_result deepCopy() { + return new mutateRowTs_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public IOError getIo() { + return this.io; + } + + public mutateRowTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public mutateRowTs_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRowTs_result) + return this.equals((mutateRowTs_result)that); + return false; + } + + public boolean equals(mutateRowTs_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRowTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRowTs_result typedOther = (mutateRowTs_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRowTs_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRowTs_resultStandardSchemeFactory implements SchemeFactory { + public mutateRowTs_resultStandardScheme getScheme() { + return new mutateRowTs_resultStandardScheme(); + } + } + + private static class mutateRowTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRowTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRowTs_resultTupleSchemeFactory implements SchemeFactory { + public mutateRowTs_resultTupleScheme getScheme() { + return new mutateRowTs_resultTupleScheme(); + } + } + + private static class mutateRowTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class mutateRows_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRows_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_BATCHES_FIELD_DESC = new org.apache.thrift.protocol.TField("rowBatches", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRows_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRows_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * list of row batches + */ + public List rowBatches; // required + /** + * Mutation attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * list of row batches + */ + ROW_BATCHES((short)2, "rowBatches"), + /** + * Mutation attributes + */ + ATTRIBUTES((short)3, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW_BATCHES + return ROW_BATCHES; + case 3: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW_BATCHES, new org.apache.thrift.meta_data.FieldMetaData("rowBatches", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BatchMutation.class)))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRows_args.class, metaDataMap); + } + + public mutateRows_args() { + } + + public mutateRows_args( + ByteBuffer tableName, + List rowBatches, + Map attributes) + { + this(); + this.tableName = tableName; + this.rowBatches = rowBatches; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public mutateRows_args(mutateRows_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRowBatches()) { + List __this__rowBatches = new ArrayList(); + for (BatchMutation other_element : other.rowBatches) { + __this__rowBatches.add(new BatchMutation(other_element)); + } + this.rowBatches = __this__rowBatches; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public mutateRows_args deepCopy() { + return new mutateRows_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rowBatches = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public mutateRows_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRows_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowBatchesSize() { + return (this.rowBatches == null) ? 0 : this.rowBatches.size(); + } + + public java.util.Iterator getRowBatchesIterator() { + return (this.rowBatches == null) ? null : this.rowBatches.iterator(); + } + + public void addToRowBatches(BatchMutation elem) { + if (this.rowBatches == null) { + this.rowBatches = new ArrayList(); + } + this.rowBatches.add(elem); + } + + /** + * list of row batches + */ + public List getRowBatches() { + return this.rowBatches; + } + + /** + * list of row batches + */ + public mutateRows_args setRowBatches(List rowBatches) { + this.rowBatches = rowBatches; + return this; + } + + public void unsetRowBatches() { + this.rowBatches = null; + } + + /** Returns true if field rowBatches is set (has been assigned a value) and false otherwise */ + public boolean isSetRowBatches() { + return this.rowBatches != null; + } + + public void setRowBatchesIsSet(boolean value) { + if (!value) { + this.rowBatches = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Mutation attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Mutation attributes + */ + public mutateRows_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW_BATCHES: + if (value == null) { + unsetRowBatches(); + } else { + setRowBatches((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW_BATCHES: + return getRowBatches(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW_BATCHES: + return isSetRowBatches(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRows_args) + return this.equals((mutateRows_args)that); + return false; + } + + public boolean equals(mutateRows_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rowBatches = true && this.isSetRowBatches(); + boolean that_present_rowBatches = true && that.isSetRowBatches(); + if (this_present_rowBatches || that_present_rowBatches) { + if (!(this_present_rowBatches && that_present_rowBatches)) + return false; + if (!this.rowBatches.equals(that.rowBatches)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRows_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRows_args typedOther = (mutateRows_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRowBatches()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRows_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rowBatches:"); + if (this.rowBatches == null) { + sb.append("null"); + } else { + sb.append(this.rowBatches); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRows_argsStandardSchemeFactory implements SchemeFactory { + public mutateRows_argsStandardScheme getScheme() { + return new mutateRows_argsStandardScheme(); + } + } + + private static class mutateRows_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRows_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW_BATCHES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list358 = iprot.readListBegin(); + struct.rowBatches = new ArrayList(_list358.size); + for (int _i359 = 0; _i359 < _list358.size; ++_i359) + { + BatchMutation _elem360; // optional + _elem360 = new BatchMutation(); + _elem360.read(iprot); + struct.rowBatches.add(_elem360); + } + iprot.readListEnd(); + } + struct.setRowBatchesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map361 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map361.size); + for (int _i362 = 0; _i362 < _map361.size; ++_i362) + { + ByteBuffer _key363; // required + ByteBuffer _val364; // required + _key363 = iprot.readBinary(); + _val364 = iprot.readBinary(); + struct.attributes.put(_key363, _val364); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRows_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rowBatches != null) { + oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rowBatches.size())); + for (BatchMutation _iter365 : struct.rowBatches) + { + _iter365.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter366 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter366.getKey()); + oprot.writeBinary(_iter366.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRows_argsTupleSchemeFactory implements SchemeFactory { + public mutateRows_argsTupleScheme getScheme() { + return new mutateRows_argsTupleScheme(); + } + } + + private static class mutateRows_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRowBatches()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRowBatches()) { + { + oprot.writeI32(struct.rowBatches.size()); + for (BatchMutation _iter367 : struct.rowBatches) + { + _iter367.write(oprot); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter368 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter368.getKey()); + oprot.writeBinary(_iter368.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list369 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.rowBatches = new ArrayList(_list369.size); + for (int _i370 = 0; _i370 < _list369.size; ++_i370) + { + BatchMutation _elem371; // optional + _elem371 = new BatchMutation(); + _elem371.read(iprot); + struct.rowBatches.add(_elem371); + } + } + struct.setRowBatchesIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map372 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map372.size); + for (int _i373 = 0; _i373 < _map372.size; ++_i373) + { + ByteBuffer _key374; // required + ByteBuffer _val375; // required + _key374 = iprot.readBinary(); + _val375 = iprot.readBinary(); + struct.attributes.put(_key374, _val375); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class mutateRows_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRows_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRows_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRows_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRows_result.class, metaDataMap); + } + + public mutateRows_result() { + } + + public mutateRows_result( + IOError io, + IllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public mutateRows_result(mutateRows_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public mutateRows_result deepCopy() { + return new mutateRows_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public IOError getIo() { + return this.io; + } + + public mutateRows_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public mutateRows_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRows_result) + return this.equals((mutateRows_result)that); + return false; + } + + public boolean equals(mutateRows_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRows_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRows_result typedOther = (mutateRows_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRows_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRows_resultStandardSchemeFactory implements SchemeFactory { + public mutateRows_resultStandardScheme getScheme() { + return new mutateRows_resultStandardScheme(); + } + } + + private static class mutateRows_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRows_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRows_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRows_resultTupleSchemeFactory implements SchemeFactory { + public mutateRows_resultTupleScheme getScheme() { + return new mutateRows_resultTupleScheme(); + } + } + + private static class mutateRows_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class mutateRowsTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowsTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_BATCHES_FIELD_DESC = new org.apache.thrift.protocol.TField("rowBatches", org.apache.thrift.protocol.TType.LIST, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRowsTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRowsTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * list of row batches + */ + public List rowBatches; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Mutation attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * list of row batches + */ + ROW_BATCHES((short)2, "rowBatches"), + /** + * timestamp + */ + TIMESTAMP((short)3, "timestamp"), + /** + * Mutation attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW_BATCHES + return ROW_BATCHES; + case 3: // TIMESTAMP + return TIMESTAMP; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW_BATCHES, new org.apache.thrift.meta_data.FieldMetaData("rowBatches", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BatchMutation.class)))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowsTs_args.class, metaDataMap); + } + + public mutateRowsTs_args() { + } + + public mutateRowsTs_args( + ByteBuffer tableName, + List rowBatches, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.rowBatches = rowBatches; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public mutateRowsTs_args(mutateRowsTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRowBatches()) { + List __this__rowBatches = new ArrayList(); + for (BatchMutation other_element : other.rowBatches) { + __this__rowBatches.add(new BatchMutation(other_element)); + } + this.rowBatches = __this__rowBatches; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public mutateRowsTs_args deepCopy() { + return new mutateRowsTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.rowBatches = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public mutateRowsTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public mutateRowsTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + public int getRowBatchesSize() { + return (this.rowBatches == null) ? 0 : this.rowBatches.size(); + } + + public java.util.Iterator getRowBatchesIterator() { + return (this.rowBatches == null) ? null : this.rowBatches.iterator(); + } + + public void addToRowBatches(BatchMutation elem) { + if (this.rowBatches == null) { + this.rowBatches = new ArrayList(); + } + this.rowBatches.add(elem); + } + + /** + * list of row batches + */ + public List getRowBatches() { + return this.rowBatches; + } + + /** + * list of row batches + */ + public mutateRowsTs_args setRowBatches(List rowBatches) { + this.rowBatches = rowBatches; + return this; + } + + public void unsetRowBatches() { + this.rowBatches = null; + } + + /** Returns true if field rowBatches is set (has been assigned a value) and false otherwise */ + public boolean isSetRowBatches() { + return this.rowBatches != null; + } + + public void setRowBatchesIsSet(boolean value) { + if (!value) { + this.rowBatches = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public mutateRowsTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Mutation attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Mutation attributes + */ + public mutateRowsTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW_BATCHES: + if (value == null) { + unsetRowBatches(); + } else { + setRowBatches((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW_BATCHES: + return getRowBatches(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW_BATCHES: + return isSetRowBatches(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRowsTs_args) + return this.equals((mutateRowsTs_args)that); + return false; + } + + public boolean equals(mutateRowsTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_rowBatches = true && this.isSetRowBatches(); + boolean that_present_rowBatches = true && that.isSetRowBatches(); + if (this_present_rowBatches || that_present_rowBatches) { + if (!(this_present_rowBatches && that_present_rowBatches)) + return false; + if (!this.rowBatches.equals(that.rowBatches)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRowsTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRowsTs_args typedOther = (mutateRowsTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRowBatches()).compareTo(typedOther.isSetRowBatches()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRowBatches()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rowBatches, typedOther.rowBatches); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRowsTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("rowBatches:"); + if (this.rowBatches == null) { + sb.append("null"); + } else { + sb.append(this.rowBatches); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRowsTs_argsStandardSchemeFactory implements SchemeFactory { + public mutateRowsTs_argsStandardScheme getScheme() { + return new mutateRowsTs_argsStandardScheme(); + } + } + + private static class mutateRowsTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowsTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW_BATCHES + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list376 = iprot.readListBegin(); + struct.rowBatches = new ArrayList(_list376.size); + for (int _i377 = 0; _i377 < _list376.size; ++_i377) + { + BatchMutation _elem378; // optional + _elem378 = new BatchMutation(); + _elem378.read(iprot); + struct.rowBatches.add(_elem378); + } + iprot.readListEnd(); + } + struct.setRowBatchesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map379 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map379.size); + for (int _i380 = 0; _i380 < _map379.size; ++_i380) + { + ByteBuffer _key381; // required + ByteBuffer _val382; // required + _key381 = iprot.readBinary(); + _val382 = iprot.readBinary(); + struct.attributes.put(_key381, _val382); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRowsTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.rowBatches != null) { + oprot.writeFieldBegin(ROW_BATCHES_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.rowBatches.size())); + for (BatchMutation _iter383 : struct.rowBatches) + { + _iter383.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter384 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter384.getKey()); + oprot.writeBinary(_iter384.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRowsTs_argsTupleSchemeFactory implements SchemeFactory { + public mutateRowsTs_argsTupleScheme getScheme() { + return new mutateRowsTs_argsTupleScheme(); + } + } + + private static class mutateRowsTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRowBatches()) { + optionals.set(1); + } + if (struct.isSetTimestamp()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRowBatches()) { + { + oprot.writeI32(struct.rowBatches.size()); + for (BatchMutation _iter385 : struct.rowBatches) + { + _iter385.write(oprot); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter386 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter386.getKey()); + oprot.writeBinary(_iter386.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TList _list387 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.rowBatches = new ArrayList(_list387.size); + for (int _i388 = 0; _i388 < _list387.size; ++_i388) + { + BatchMutation _elem389; // optional + _elem389 = new BatchMutation(); + _elem389.read(iprot); + struct.rowBatches.add(_elem389); + } + } + struct.setRowBatchesIsSet(true); + } + if (incoming.get(2)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map390 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map390.size); + for (int _i391 = 0; _i391 < _map390.size; ++_i391) + { + ByteBuffer _key392; // required + ByteBuffer _val393; // required + _key392 = iprot.readBinary(); + _val393 = iprot.readBinary(); + struct.attributes.put(_key392, _val393); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class mutateRowsTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("mutateRowsTs_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new mutateRowsTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new mutateRowsTs_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(mutateRowsTs_result.class, metaDataMap); + } + + public mutateRowsTs_result() { + } + + public mutateRowsTs_result( + IOError io, + IllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public mutateRowsTs_result(mutateRowsTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public mutateRowsTs_result deepCopy() { + return new mutateRowsTs_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public IOError getIo() { + return this.io; + } + + public mutateRowsTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public mutateRowsTs_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof mutateRowsTs_result) + return this.equals((mutateRowsTs_result)that); + return false; + } + + public boolean equals(mutateRowsTs_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(mutateRowsTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + mutateRowsTs_result typedOther = (mutateRowsTs_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("mutateRowsTs_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class mutateRowsTs_resultStandardSchemeFactory implements SchemeFactory { + public mutateRowsTs_resultStandardScheme getScheme() { + return new mutateRowsTs_resultStandardScheme(); + } + } + + private static class mutateRowsTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, mutateRowsTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, mutateRowsTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class mutateRowsTs_resultTupleSchemeFactory implements SchemeFactory { + public mutateRowsTs_resultTupleScheme getScheme() { + return new mutateRowsTs_resultTupleScheme(); + } + } + + private static class mutateRowsTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, mutateRowsTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class atomicIncrement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("atomicIncrement_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I64, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new atomicIncrement_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new atomicIncrement_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row to increment + */ + public ByteBuffer row; // required + /** + * name of column + */ + public ByteBuffer column; // required + /** + * amount to increment by + */ + public long value; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row to increment + */ + ROW((short)2, "row"), + /** + * name of column + */ + COLUMN((short)3, "column"), + /** + * amount to increment by + */ + VALUE((short)4, "value"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // VALUE + return VALUE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __VALUE_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(atomicIncrement_args.class, metaDataMap); + } + + public atomicIncrement_args() { + } + + public atomicIncrement_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + long value) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.value = value; + setValueIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public atomicIncrement_args(atomicIncrement_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + this.value = other.value; + } + + public atomicIncrement_args deepCopy() { + return new atomicIncrement_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setValueIsSet(false); + this.value = 0; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public atomicIncrement_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public atomicIncrement_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row to increment + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row to increment + */ + public atomicIncrement_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public atomicIncrement_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * name of column + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * name of column + */ + public atomicIncrement_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public atomicIncrement_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + /** + * amount to increment by + */ + public long getValue() { + return this.value; + } + + /** + * amount to increment by + */ + public atomicIncrement_args setValue(long value) { + this.value = value; + setValueIsSet(true); + return this; + } + + public void unsetValue() { + __isset_bit_vector.clear(__VALUE_ISSET_ID); + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return __isset_bit_vector.get(__VALUE_ISSET_ID); + } + + public void setValueIsSet(boolean value) { + __isset_bit_vector.set(__VALUE_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case VALUE: + return Long.valueOf(getValue()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case VALUE: + return isSetValue(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof atomicIncrement_args) + return this.equals((atomicIncrement_args)that); + return false; + } + + public boolean equals(atomicIncrement_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_value = true; + boolean that_present_value = true; + if (this_present_value || that_present_value) { + if (!(this_present_value && that_present_value)) + return false; + if (this.value != that.value) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(atomicIncrement_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + atomicIncrement_args typedOther = (atomicIncrement_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("atomicIncrement_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + sb.append(this.value); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class atomicIncrement_argsStandardSchemeFactory implements SchemeFactory { + public atomicIncrement_argsStandardScheme getScheme() { + return new atomicIncrement_argsStandardScheme(); + } + } + + private static class atomicIncrement_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, atomicIncrement_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.value = iprot.readI64(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, atomicIncrement_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeI64(struct.value); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class atomicIncrement_argsTupleSchemeFactory implements SchemeFactory { + public atomicIncrement_argsTupleScheme getScheme() { + return new atomicIncrement_argsTupleScheme(); + } + } + + private static class atomicIncrement_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetValue()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetValue()) { + oprot.writeI64(struct.value); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + struct.value = iprot.readI64(); + struct.setValueIsSet(true); + } + } + } + + } + + public static class atomicIncrement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("atomicIncrement_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new atomicIncrement_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new atomicIncrement_resultTupleSchemeFactory()); + } + + public long success; // required + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(atomicIncrement_result.class, metaDataMap); + } + + public atomicIncrement_result() { + } + + public atomicIncrement_result( + long success, + IOError io, + IllegalArgument ia) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public atomicIncrement_result(atomicIncrement_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public atomicIncrement_result deepCopy() { + return new atomicIncrement_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + this.ia = null; + } + + public long getSuccess() { + return this.success; + } + + public atomicIncrement_result setSuccess(long success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public atomicIncrement_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public atomicIncrement_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Long)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Long.valueOf(getSuccess()); + + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof atomicIncrement_result) + return this.equals((atomicIncrement_result)that); + return false; + } + + public boolean equals(atomicIncrement_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(atomicIncrement_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + atomicIncrement_result typedOther = (atomicIncrement_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("atomicIncrement_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class atomicIncrement_resultStandardSchemeFactory implements SchemeFactory { + public atomicIncrement_resultStandardScheme getScheme() { + return new atomicIncrement_resultStandardScheme(); + } + } + + private static class atomicIncrement_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, atomicIncrement_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, atomicIncrement_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI64(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class atomicIncrement_resultTupleSchemeFactory implements SchemeFactory { + public atomicIncrement_resultTupleScheme getScheme() { + return new atomicIncrement_resultTupleScheme(); + } + } + + private static class atomicIncrement_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + if (struct.isSetIa()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + oprot.writeI64(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, atomicIncrement_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.success = iprot.readI64(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(2)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class deleteAll_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAll_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAll_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAll_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Row to update + */ + public ByteBuffer row; // required + /** + * name of column whose value is to be deleted + */ + public ByteBuffer column; // required + /** + * Delete attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Row to update + */ + ROW((short)2, "row"), + /** + * name of column whose value is to be deleted + */ + COLUMN((short)3, "column"), + /** + * Delete attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAll_args.class, metaDataMap); + } + + public deleteAll_args() { + } + + public deleteAll_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public deleteAll_args(deleteAll_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public deleteAll_args deepCopy() { + return new deleteAll_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public deleteAll_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAll_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Row to update + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * Row to update + */ + public deleteAll_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public deleteAll_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * name of column whose value is to be deleted + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * name of column whose value is to be deleted + */ + public deleteAll_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public deleteAll_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Delete attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Delete attributes + */ + public deleteAll_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAll_args) + return this.equals((deleteAll_args)that); + return false; + } + + public boolean equals(deleteAll_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAll_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAll_args typedOther = (deleteAll_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAll_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAll_argsStandardSchemeFactory implements SchemeFactory { + public deleteAll_argsStandardScheme getScheme() { + return new deleteAll_argsStandardScheme(); + } + } + + private static class deleteAll_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAll_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map394 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map394.size); + for (int _i395 = 0; _i395 < _map394.size; ++_i395) + { + ByteBuffer _key396; // required + ByteBuffer _val397; // required + _key396 = iprot.readBinary(); + _val397 = iprot.readBinary(); + struct.attributes.put(_key396, _val397); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAll_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter398 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter398.getKey()); + oprot.writeBinary(_iter398.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAll_argsTupleSchemeFactory implements SchemeFactory { + public deleteAll_argsTupleScheme getScheme() { + return new deleteAll_argsTupleScheme(); + } + } + + private static class deleteAll_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter399 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter399.getKey()); + oprot.writeBinary(_iter399.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAll_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map400 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map400.size); + for (int _i401 = 0; _i401 < _map400.size; ++_i401) + { + ByteBuffer _key402; // required + ByteBuffer _val403; // required + _key402 = iprot.readBinary(); + _val403 = iprot.readBinary(); + struct.attributes.put(_key402, _val403); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class deleteAll_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAll_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAll_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAll_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAll_result.class, metaDataMap); + } + + public deleteAll_result() { + } + + public deleteAll_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteAll_result(deleteAll_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public deleteAll_result deepCopy() { + return new deleteAll_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public deleteAll_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAll_result) + return this.equals((deleteAll_result)that); + return false; + } + + public boolean equals(deleteAll_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAll_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAll_result typedOther = (deleteAll_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAll_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAll_resultStandardSchemeFactory implements SchemeFactory { + public deleteAll_resultStandardScheme getScheme() { + return new deleteAll_resultStandardScheme(); + } + } + + private static class deleteAll_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAll_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAll_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAll_resultTupleSchemeFactory implements SchemeFactory { + public deleteAll_resultTupleScheme getScheme() { + return new deleteAll_resultTupleScheme(); + } + } + + private static class deleteAll_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAll_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class deleteAllTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Row to update + */ + public ByteBuffer row; // required + /** + * name of column whose value is to be deleted + */ + public ByteBuffer column; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Delete attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Row to update + */ + ROW((short)2, "row"), + /** + * name of column whose value is to be deleted + */ + COLUMN((short)3, "column"), + /** + * timestamp + */ + TIMESTAMP((short)4, "timestamp"), + /** + * Delete attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllTs_args.class, metaDataMap); + } + + public deleteAllTs_args() { + } + + public deleteAllTs_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer column, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.column = column; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllTs_args(deleteAllTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public deleteAllTs_args deepCopy() { + return new deleteAllTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.column = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public deleteAllTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Row to update + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * Row to update + */ + public deleteAllTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public deleteAllTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * name of column whose value is to be deleted + */ + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + /** + * name of column whose value is to be deleted + */ + public deleteAllTs_args setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public deleteAllTs_args setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public deleteAllTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Delete attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Delete attributes + */ + public deleteAllTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllTs_args) + return this.equals((deleteAllTs_args)that); + return false; + } + + public boolean equals(deleteAllTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllTs_args typedOther = (deleteAllTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllTs_argsStandardSchemeFactory implements SchemeFactory { + public deleteAllTs_argsStandardScheme getScheme() { + return new deleteAllTs_argsStandardScheme(); + } + } + + private static class deleteAllTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map404 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map404.size); + for (int _i405 = 0; _i405 < _map404.size; ++_i405) + { + ByteBuffer _key406; // required + ByteBuffer _val407; // required + _key406 = iprot.readBinary(); + _val407 = iprot.readBinary(); + struct.attributes.put(_key406, _val407); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter408 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter408.getKey()); + oprot.writeBinary(_iter408.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllTs_argsTupleSchemeFactory implements SchemeFactory { + public deleteAllTs_argsTupleScheme getScheme() { + return new deleteAllTs_argsTupleScheme(); + } + } + + private static class deleteAllTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter409 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter409.getKey()); + oprot.writeBinary(_iter409.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map410 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map410.size); + for (int _i411 = 0; _i411 < _map410.size; ++_i411) + { + ByteBuffer _key412; // required + ByteBuffer _val413; // required + _key412 = iprot.readBinary(); + _val413 = iprot.readBinary(); + struct.attributes.put(_key412, _val413); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class deleteAllTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllTs_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllTs_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllTs_result.class, metaDataMap); + } + + public deleteAllTs_result() { + } + + public deleteAllTs_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllTs_result(deleteAllTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public deleteAllTs_result deepCopy() { + return new deleteAllTs_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public deleteAllTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllTs_result) + return this.equals((deleteAllTs_result)that); + return false; + } + + public boolean equals(deleteAllTs_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllTs_result typedOther = (deleteAllTs_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllTs_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllTs_resultStandardSchemeFactory implements SchemeFactory { + public deleteAllTs_resultStandardScheme getScheme() { + return new deleteAllTs_resultStandardScheme(); + } + } + + private static class deleteAllTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllTs_resultTupleSchemeFactory implements SchemeFactory { + public deleteAllTs_resultTupleScheme getScheme() { + return new deleteAllTs_resultTupleScheme(); + } + } + + private static class deleteAllTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class deleteAllRow_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRow_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllRow_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllRow_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * key of the row to be completely deleted. + */ + public ByteBuffer row; // required + /** + * Delete attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * key of the row to be completely deleted. + */ + ROW((short)2, "row"), + /** + * Delete attributes + */ + ATTRIBUTES((short)3, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRow_args.class, metaDataMap); + } + + public deleteAllRow_args() { + } + + public deleteAllRow_args( + ByteBuffer tableName, + ByteBuffer row, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllRow_args(deleteAllRow_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public deleteAllRow_args deepCopy() { + return new deleteAllRow_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public deleteAllRow_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllRow_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * key of the row to be completely deleted. + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * key of the row to be completely deleted. + */ + public deleteAllRow_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public deleteAllRow_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Delete attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Delete attributes + */ + public deleteAllRow_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllRow_args) + return this.equals((deleteAllRow_args)that); + return false; + } + + public boolean equals(deleteAllRow_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllRow_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllRow_args typedOther = (deleteAllRow_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllRow_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllRow_argsStandardSchemeFactory implements SchemeFactory { + public deleteAllRow_argsStandardScheme getScheme() { + return new deleteAllRow_argsStandardScheme(); + } + } + + private static class deleteAllRow_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRow_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map414 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map414.size); + for (int _i415 = 0; _i415 < _map414.size; ++_i415) + { + ByteBuffer _key416; // required + ByteBuffer _val417; // required + _key416 = iprot.readBinary(); + _val417 = iprot.readBinary(); + struct.attributes.put(_key416, _val417); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllRow_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter418 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter418.getKey()); + oprot.writeBinary(_iter418.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllRow_argsTupleSchemeFactory implements SchemeFactory { + public deleteAllRow_argsTupleScheme getScheme() { + return new deleteAllRow_argsTupleScheme(); + } + } + + private static class deleteAllRow_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter419 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter419.getKey()); + oprot.writeBinary(_iter419.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map420 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map420.size); + for (int _i421 = 0; _i421 < _map420.size; ++_i421) + { + ByteBuffer _key422; // required + ByteBuffer _val423; // required + _key422 = iprot.readBinary(); + _val423 = iprot.readBinary(); + struct.attributes.put(_key422, _val423); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class deleteAllRow_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRow_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllRow_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllRow_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRow_result.class, metaDataMap); + } + + public deleteAllRow_result() { + } + + public deleteAllRow_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllRow_result(deleteAllRow_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public deleteAllRow_result deepCopy() { + return new deleteAllRow_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public deleteAllRow_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllRow_result) + return this.equals((deleteAllRow_result)that); + return false; + } + + public boolean equals(deleteAllRow_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllRow_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllRow_result typedOther = (deleteAllRow_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllRow_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllRow_resultStandardSchemeFactory implements SchemeFactory { + public deleteAllRow_resultStandardScheme getScheme() { + return new deleteAllRow_resultStandardScheme(); + } + } + + private static class deleteAllRow_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRow_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllRow_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllRow_resultTupleSchemeFactory implements SchemeFactory { + public deleteAllRow_resultTupleScheme getScheme() { + return new deleteAllRow_resultTupleScheme(); + } + } + + private static class deleteAllRow_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRow_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class increment_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_args"); + + private static final org.apache.thrift.protocol.TField INCREMENT_FIELD_DESC = new org.apache.thrift.protocol.TField("increment", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new increment_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new increment_argsTupleSchemeFactory()); + } + + /** + * The single increment to apply + */ + public TIncrement increment; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * The single increment to apply + */ + INCREMENT((short)1, "increment"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // INCREMENT + return INCREMENT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.INCREMENT, new org.apache.thrift.meta_data.FieldMetaData("increment", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIncrement.class))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_args.class, metaDataMap); + } + + public increment_args() { + } + + public increment_args( + TIncrement increment) + { + this(); + this.increment = increment; + } + + /** + * Performs a deep copy on other. + */ + public increment_args(increment_args other) { + if (other.isSetIncrement()) { + this.increment = new TIncrement(other.increment); + } + } + + public increment_args deepCopy() { + return new increment_args(this); + } + + @Override + public void clear() { + this.increment = null; + } + + /** + * The single increment to apply + */ + public TIncrement getIncrement() { + return this.increment; + } + + /** + * The single increment to apply + */ + public increment_args setIncrement(TIncrement increment) { + this.increment = increment; + return this; + } + + public void unsetIncrement() { + this.increment = null; + } + + /** Returns true if field increment is set (has been assigned a value) and false otherwise */ + public boolean isSetIncrement() { + return this.increment != null; + } + + public void setIncrementIsSet(boolean value) { + if (!value) { + this.increment = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case INCREMENT: + if (value == null) { + unsetIncrement(); + } else { + setIncrement((TIncrement)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case INCREMENT: + return getIncrement(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case INCREMENT: + return isSetIncrement(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof increment_args) + return this.equals((increment_args)that); + return false; + } + + public boolean equals(increment_args that) { + if (that == null) + return false; + + boolean this_present_increment = true && this.isSetIncrement(); + boolean that_present_increment = true && that.isSetIncrement(); + if (this_present_increment || that_present_increment) { + if (!(this_present_increment && that_present_increment)) + return false; + if (!this.increment.equals(that.increment)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(increment_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + increment_args typedOther = (increment_args)other; + + lastComparison = Boolean.valueOf(isSetIncrement()).compareTo(typedOther.isSetIncrement()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIncrement()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.increment, typedOther.increment); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("increment_args("); + boolean first = true; + + sb.append("increment:"); + if (this.increment == null) { + sb.append("null"); + } else { + sb.append(this.increment); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class increment_argsStandardSchemeFactory implements SchemeFactory { + public increment_argsStandardScheme getScheme() { + return new increment_argsStandardScheme(); + } + } + + private static class increment_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, increment_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // INCREMENT + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.increment = new TIncrement(); + struct.increment.read(iprot); + struct.setIncrementIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, increment_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.increment != null) { + oprot.writeFieldBegin(INCREMENT_FIELD_DESC); + struct.increment.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class increment_argsTupleSchemeFactory implements SchemeFactory { + public increment_argsTupleScheme getScheme() { + return new increment_argsTupleScheme(); + } + } + + private static class increment_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIncrement()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIncrement()) { + struct.increment.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, increment_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.increment = new TIncrement(); + struct.increment.read(iprot); + struct.setIncrementIsSet(true); + } + } + } + + } + + public static class increment_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("increment_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new increment_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new increment_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(increment_result.class, metaDataMap); + } + + public increment_result() { + } + + public increment_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public increment_result(increment_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public increment_result deepCopy() { + return new increment_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public increment_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof increment_result) + return this.equals((increment_result)that); + return false; + } + + public boolean equals(increment_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(increment_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + increment_result typedOther = (increment_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("increment_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class increment_resultStandardSchemeFactory implements SchemeFactory { + public increment_resultStandardScheme getScheme() { + return new increment_resultStandardScheme(); + } + } + + private static class increment_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, increment_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, increment_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class increment_resultTupleSchemeFactory implements SchemeFactory { + public increment_resultTupleScheme getScheme() { + return new increment_resultTupleScheme(); + } + } + + private static class increment_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, increment_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class incrementRows_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("incrementRows_args"); + + private static final org.apache.thrift.protocol.TField INCREMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("increments", org.apache.thrift.protocol.TType.LIST, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new incrementRows_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new incrementRows_argsTupleSchemeFactory()); + } + + /** + * The list of increments + */ + public List increments; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * The list of increments + */ + INCREMENTS((short)1, "increments"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // INCREMENTS + return INCREMENTS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.INCREMENTS, new org.apache.thrift.meta_data.FieldMetaData("increments", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TIncrement.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(incrementRows_args.class, metaDataMap); + } + + public incrementRows_args() { + } + + public incrementRows_args( + List increments) + { + this(); + this.increments = increments; + } + + /** + * Performs a deep copy on other. + */ + public incrementRows_args(incrementRows_args other) { + if (other.isSetIncrements()) { + List __this__increments = new ArrayList(); + for (TIncrement other_element : other.increments) { + __this__increments.add(new TIncrement(other_element)); + } + this.increments = __this__increments; + } + } + + public incrementRows_args deepCopy() { + return new incrementRows_args(this); + } + + @Override + public void clear() { + this.increments = null; + } + + public int getIncrementsSize() { + return (this.increments == null) ? 0 : this.increments.size(); + } + + public java.util.Iterator getIncrementsIterator() { + return (this.increments == null) ? null : this.increments.iterator(); + } + + public void addToIncrements(TIncrement elem) { + if (this.increments == null) { + this.increments = new ArrayList(); + } + this.increments.add(elem); + } + + /** + * The list of increments + */ + public List getIncrements() { + return this.increments; + } + + /** + * The list of increments + */ + public incrementRows_args setIncrements(List increments) { + this.increments = increments; + return this; + } + + public void unsetIncrements() { + this.increments = null; + } + + /** Returns true if field increments is set (has been assigned a value) and false otherwise */ + public boolean isSetIncrements() { + return this.increments != null; + } + + public void setIncrementsIsSet(boolean value) { + if (!value) { + this.increments = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case INCREMENTS: + if (value == null) { + unsetIncrements(); + } else { + setIncrements((List)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case INCREMENTS: + return getIncrements(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case INCREMENTS: + return isSetIncrements(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof incrementRows_args) + return this.equals((incrementRows_args)that); + return false; + } + + public boolean equals(incrementRows_args that) { + if (that == null) + return false; + + boolean this_present_increments = true && this.isSetIncrements(); + boolean that_present_increments = true && that.isSetIncrements(); + if (this_present_increments || that_present_increments) { + if (!(this_present_increments && that_present_increments)) + return false; + if (!this.increments.equals(that.increments)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(incrementRows_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + incrementRows_args typedOther = (incrementRows_args)other; + + lastComparison = Boolean.valueOf(isSetIncrements()).compareTo(typedOther.isSetIncrements()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIncrements()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.increments, typedOther.increments); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("incrementRows_args("); + boolean first = true; + + sb.append("increments:"); + if (this.increments == null) { + sb.append("null"); + } else { + sb.append(this.increments); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class incrementRows_argsStandardSchemeFactory implements SchemeFactory { + public incrementRows_argsStandardScheme getScheme() { + return new incrementRows_argsStandardScheme(); + } + } + + private static class incrementRows_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, incrementRows_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // INCREMENTS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list424 = iprot.readListBegin(); + struct.increments = new ArrayList(_list424.size); + for (int _i425 = 0; _i425 < _list424.size; ++_i425) + { + TIncrement _elem426; // optional + _elem426 = new TIncrement(); + _elem426.read(iprot); + struct.increments.add(_elem426); + } + iprot.readListEnd(); + } + struct.setIncrementsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, incrementRows_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.increments != null) { + oprot.writeFieldBegin(INCREMENTS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.increments.size())); + for (TIncrement _iter427 : struct.increments) + { + _iter427.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class incrementRows_argsTupleSchemeFactory implements SchemeFactory { + public incrementRows_argsTupleScheme getScheme() { + return new incrementRows_argsTupleScheme(); + } + } + + private static class incrementRows_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, incrementRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIncrements()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIncrements()) { + { + oprot.writeI32(struct.increments.size()); + for (TIncrement _iter428 : struct.increments) + { + _iter428.write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, incrementRows_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list429 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.increments = new ArrayList(_list429.size); + for (int _i430 = 0; _i430 < _list429.size; ++_i430) + { + TIncrement _elem431; // optional + _elem431 = new TIncrement(); + _elem431.read(iprot); + struct.increments.add(_elem431); + } + } + struct.setIncrementsIsSet(true); + } + } + } + + } + + public static class incrementRows_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("incrementRows_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new incrementRows_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new incrementRows_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(incrementRows_result.class, metaDataMap); + } + + public incrementRows_result() { + } + + public incrementRows_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public incrementRows_result(incrementRows_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public incrementRows_result deepCopy() { + return new incrementRows_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public incrementRows_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof incrementRows_result) + return this.equals((incrementRows_result)that); + return false; + } + + public boolean equals(incrementRows_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(incrementRows_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + incrementRows_result typedOther = (incrementRows_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("incrementRows_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class incrementRows_resultStandardSchemeFactory implements SchemeFactory { + public incrementRows_resultStandardScheme getScheme() { + return new incrementRows_resultStandardScheme(); + } + } + + private static class incrementRows_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, incrementRows_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, incrementRows_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class incrementRows_resultTupleSchemeFactory implements SchemeFactory { + public incrementRows_resultTupleScheme getScheme() { + return new incrementRows_resultTupleScheme(); + } + } + + private static class incrementRows_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, incrementRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, incrementRows_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class deleteAllRowTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRowTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllRowTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllRowTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * key of the row to be completely deleted. + */ + public ByteBuffer row; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Delete attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * key of the row to be completely deleted. + */ + ROW((short)2, "row"), + /** + * timestamp + */ + TIMESTAMP((short)3, "timestamp"), + /** + * Delete attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // TIMESTAMP + return TIMESTAMP; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRowTs_args.class, metaDataMap); + } + + public deleteAllRowTs_args() { + } + + public deleteAllRowTs_args( + ByteBuffer tableName, + ByteBuffer row, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.row = row; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllRowTs_args(deleteAllRowTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public deleteAllRowTs_args deepCopy() { + return new deleteAllRowTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public deleteAllRowTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public deleteAllRowTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * key of the row to be completely deleted. + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * key of the row to be completely deleted. + */ + public deleteAllRowTs_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public deleteAllRowTs_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public deleteAllRowTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Delete attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Delete attributes + */ + public deleteAllRowTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllRowTs_args) + return this.equals((deleteAllRowTs_args)that); + return false; + } + + public boolean equals(deleteAllRowTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllRowTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllRowTs_args typedOther = (deleteAllRowTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllRowTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllRowTs_argsStandardSchemeFactory implements SchemeFactory { + public deleteAllRowTs_argsStandardScheme getScheme() { + return new deleteAllRowTs_argsStandardScheme(); + } + } + + private static class deleteAllRowTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRowTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map432 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map432.size); + for (int _i433 = 0; _i433 < _map432.size; ++_i433) + { + ByteBuffer _key434; // required + ByteBuffer _val435; // required + _key434 = iprot.readBinary(); + _val435 = iprot.readBinary(); + struct.attributes.put(_key434, _val435); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllRowTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter436 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter436.getKey()); + oprot.writeBinary(_iter436.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllRowTs_argsTupleSchemeFactory implements SchemeFactory { + public deleteAllRowTs_argsTupleScheme getScheme() { + return new deleteAllRowTs_argsTupleScheme(); + } + } + + private static class deleteAllRowTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetTimestamp()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter437 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter437.getKey()); + oprot.writeBinary(_iter437.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map438 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map438.size); + for (int _i439 = 0; _i439 < _map438.size; ++_i439) + { + ByteBuffer _key440; // required + ByteBuffer _val441; // required + _key440 = iprot.readBinary(); + _val441 = iprot.readBinary(); + struct.attributes.put(_key440, _val441); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class deleteAllRowTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteAllRowTs_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new deleteAllRowTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new deleteAllRowTs_resultTupleSchemeFactory()); + } + + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteAllRowTs_result.class, metaDataMap); + } + + public deleteAllRowTs_result() { + } + + public deleteAllRowTs_result( + IOError io) + { + this(); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public deleteAllRowTs_result(deleteAllRowTs_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public deleteAllRowTs_result deepCopy() { + return new deleteAllRowTs_result(this); + } + + @Override + public void clear() { + this.io = null; + } + + public IOError getIo() { + return this.io; + } + + public deleteAllRowTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof deleteAllRowTs_result) + return this.equals((deleteAllRowTs_result)that); + return false; + } + + public boolean equals(deleteAllRowTs_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(deleteAllRowTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + deleteAllRowTs_result typedOther = (deleteAllRowTs_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("deleteAllRowTs_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class deleteAllRowTs_resultStandardSchemeFactory implements SchemeFactory { + public deleteAllRowTs_resultStandardScheme getScheme() { + return new deleteAllRowTs_resultStandardScheme(); + } + } + + private static class deleteAllRowTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, deleteAllRowTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, deleteAllRowTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class deleteAllRowTs_resultTupleSchemeFactory implements SchemeFactory { + public deleteAllRowTs_resultTupleScheme getScheme() { + return new deleteAllRowTs_resultTupleScheme(); + } + } + + private static class deleteAllRowTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, deleteAllRowTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpenWithScan_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithScan_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField SCAN_FIELD_DESC = new org.apache.thrift.protocol.TField("scan", org.apache.thrift.protocol.TType.STRUCT, (short)2); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithScan_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithScan_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Scan instance + */ + public TScan scan; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Scan instance + */ + SCAN((short)2, "scan"), + /** + * Scan attributes + */ + ATTRIBUTES((short)3, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // SCAN + return SCAN; + case 3: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.SCAN, new org.apache.thrift.meta_data.FieldMetaData("scan", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TScan.class))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithScan_args.class, metaDataMap); + } + + public scannerOpenWithScan_args() { + } + + public scannerOpenWithScan_args( + ByteBuffer tableName, + TScan scan, + Map attributes) + { + this(); + this.tableName = tableName; + this.scan = scan; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithScan_args(scannerOpenWithScan_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetScan()) { + this.scan = new TScan(other.scan); + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpenWithScan_args deepCopy() { + return new scannerOpenWithScan_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.scan = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpenWithScan_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithScan_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Scan instance + */ + public TScan getScan() { + return this.scan; + } + + /** + * Scan instance + */ + public scannerOpenWithScan_args setScan(TScan scan) { + this.scan = scan; + return this; + } + + public void unsetScan() { + this.scan = null; + } + + /** Returns true if field scan is set (has been assigned a value) and false otherwise */ + public boolean isSetScan() { + return this.scan != null; + } + + public void setScanIsSet(boolean value) { + if (!value) { + this.scan = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpenWithScan_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case SCAN: + if (value == null) { + unsetScan(); + } else { + setScan((TScan)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case SCAN: + return getScan(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case SCAN: + return isSetScan(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithScan_args) + return this.equals((scannerOpenWithScan_args)that); + return false; + } + + public boolean equals(scannerOpenWithScan_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_scan = true && this.isSetScan(); + boolean that_present_scan = true && that.isSetScan(); + if (this_present_scan || that_present_scan) { + if (!(this_present_scan && that_present_scan)) + return false; + if (!this.scan.equals(that.scan)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithScan_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithScan_args typedOther = (scannerOpenWithScan_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetScan()).compareTo(typedOther.isSetScan()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetScan()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scan, typedOther.scan); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithScan_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("scan:"); + if (this.scan == null) { + sb.append("null"); + } else { + sb.append(this.scan); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithScan_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithScan_argsStandardScheme getScheme() { + return new scannerOpenWithScan_argsStandardScheme(); + } + } + + private static class scannerOpenWithScan_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithScan_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // SCAN + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.scan = new TScan(); + struct.scan.read(iprot); + struct.setScanIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map442 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map442.size); + for (int _i443 = 0; _i443 < _map442.size; ++_i443) + { + ByteBuffer _key444; // required + ByteBuffer _val445; // required + _key444 = iprot.readBinary(); + _val445 = iprot.readBinary(); + struct.attributes.put(_key444, _val445); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithScan_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.scan != null) { + oprot.writeFieldBegin(SCAN_FIELD_DESC); + struct.scan.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter446 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter446.getKey()); + oprot.writeBinary(_iter446.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithScan_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithScan_argsTupleScheme getScheme() { + return new scannerOpenWithScan_argsTupleScheme(); + } + } + + private static class scannerOpenWithScan_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithScan_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetScan()) { + optionals.set(1); + } + if (struct.isSetAttributes()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetScan()) { + struct.scan.write(oprot); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter447 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter447.getKey()); + oprot.writeBinary(_iter447.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithScan_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.scan = new TScan(); + struct.scan.read(iprot); + struct.setScanIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TMap _map448 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map448.size); + for (int _i449 = 0; _i449 < _map448.size; ++_i449) + { + ByteBuffer _key450; // required + ByteBuffer _val451; // required + _key450 = iprot.readBinary(); + _val451 = iprot.readBinary(); + struct.attributes.put(_key450, _val451); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpenWithScan_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithScan_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithScan_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithScan_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithScan_result.class, metaDataMap); + } + + public scannerOpenWithScan_result() { + } + + public scannerOpenWithScan_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithScan_result(scannerOpenWithScan_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpenWithScan_result deepCopy() { + return new scannerOpenWithScan_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpenWithScan_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpenWithScan_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithScan_result) + return this.equals((scannerOpenWithScan_result)that); + return false; + } + + public boolean equals(scannerOpenWithScan_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithScan_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithScan_result typedOther = (scannerOpenWithScan_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithScan_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithScan_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithScan_resultStandardScheme getScheme() { + return new scannerOpenWithScan_resultStandardScheme(); + } + } + + private static class scannerOpenWithScan_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithScan_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithScan_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithScan_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithScan_resultTupleScheme getScheme() { + return new scannerOpenWithScan_resultTupleScheme(); + } + } + + private static class scannerOpenWithScan_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithScan_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithScan_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpen_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpen_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpen_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpen_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public ByteBuffer startRow; // required + /** + * 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. + */ + public List columns; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + START_ROW((short)2, "startRow"), + /** + * 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((short)3, "columns"), + /** + * Scan attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpen_args.class, metaDataMap); + } + + public scannerOpen_args() { + } + + public scannerOpen_args( + ByteBuffer tableName, + ByteBuffer startRow, + List columns, + Map attributes) + { + this(); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpen_args(scannerOpen_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpen_args deepCopy() { + return new scannerOpen_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.columns = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpen_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpen_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public byte[] getStartRow() { + setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow)); + return startRow == null ? null : startRow.array(); + } + + public ByteBuffer bufferForStartRow() { + return startRow; + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public scannerOpen_args setStartRow(byte[] startRow) { + setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpen_args setStartRow(ByteBuffer startRow) { + this.startRow = startRow; + return this; + } + + public void unsetStartRow() { + this.startRow = null; + } + + /** Returns true if field startRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * 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. + */ + public List getColumns() { + return this.columns; + } + + /** + * columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + */ + public scannerOpen_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpen_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case START_ROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case START_ROW: + return getStartRow(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case START_ROW: + return isSetStartRow(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpen_args) + return this.equals((scannerOpen_args)that); + return false; + } + + public boolean equals(scannerOpen_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); + if (this_present_startRow || that_present_startRow) { + if (!(this_present_startRow && that_present_startRow)) + return false; + if (!this.startRow.equals(that.startRow)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpen_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpen_args typedOther = (scannerOpen_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpen_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpen_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpen_argsStandardScheme getScheme() { + return new scannerOpen_argsStandardScheme(); + } + } + + private static class scannerOpen_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpen_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list452 = iprot.readListBegin(); + struct.columns = new ArrayList(_list452.size); + for (int _i453 = 0; _i453 < _list452.size; ++_i453) + { + ByteBuffer _elem454; // optional + _elem454 = iprot.readBinary(); + struct.columns.add(_elem454); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map455 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map455.size); + for (int _i456 = 0; _i456 < _map455.size; ++_i456) + { + ByteBuffer _key457; // required + ByteBuffer _val458; // required + _key457 = iprot.readBinary(); + _val458 = iprot.readBinary(); + struct.attributes.put(_key457, _val458); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpen_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.startRow != null) { + oprot.writeFieldBegin(START_ROW_FIELD_DESC); + oprot.writeBinary(struct.startRow); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter459 : struct.columns) + { + oprot.writeBinary(_iter459); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter460 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter460.getKey()); + oprot.writeBinary(_iter460.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpen_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpen_argsTupleScheme getScheme() { + return new scannerOpen_argsTupleScheme(); + } + } + + private static class scannerOpen_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpen_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetStartRow()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetStartRow()) { + oprot.writeBinary(struct.startRow); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter461 : struct.columns) + { + oprot.writeBinary(_iter461); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter462 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter462.getKey()); + oprot.writeBinary(_iter462.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpen_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list463 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list463.size); + for (int _i464 = 0; _i464 < _list463.size; ++_i464) + { + ByteBuffer _elem465; // optional + _elem465 = iprot.readBinary(); + struct.columns.add(_elem465); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map466 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map466.size); + for (int _i467 = 0; _i467 < _map466.size; ++_i467) + { + ByteBuffer _key468; // required + ByteBuffer _val469; // required + _key468 = iprot.readBinary(); + _val469 = iprot.readBinary(); + struct.attributes.put(_key468, _val469); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpen_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpen_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpen_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpen_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpen_result.class, metaDataMap); + } + + public scannerOpen_result() { + } + + public scannerOpen_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpen_result(scannerOpen_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpen_result deepCopy() { + return new scannerOpen_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpen_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpen_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpen_result) + return this.equals((scannerOpen_result)that); + return false; + } + + public boolean equals(scannerOpen_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpen_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpen_result typedOther = (scannerOpen_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpen_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpen_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpen_resultStandardScheme getScheme() { + return new scannerOpen_resultStandardScheme(); + } + } + + private static class scannerOpen_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpen_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpen_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpen_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpen_resultTupleScheme getScheme() { + return new scannerOpen_resultTupleScheme(); + } + } + + private static class scannerOpen_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpen_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpen_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpenWithStop_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStop_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithStop_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithStop_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public ByteBuffer startRow; // required + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public ByteBuffer stopRow; // required + /** + * 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. + */ + public List columns; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + START_ROW((short)2, "startRow"), + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + STOP_ROW((short)3, "stopRow"), + /** + * 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((short)4, "columns"), + /** + * Scan attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // STOP_ROW + return STOP_ROW; + case 4: // COLUMNS + return COLUMNS; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_args.class, metaDataMap); + } + + public scannerOpenWithStop_args() { + } + + public scannerOpenWithStop_args( + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns, + Map attributes) + { + this(); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStop_args(scannerOpenWithStop_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetStopRow()) { + this.stopRow = other.stopRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpenWithStop_args deepCopy() { + return new scannerOpenWithStop_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.stopRow = null; + this.columns = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpenWithStop_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithStop_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public byte[] getStartRow() { + setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow)); + return startRow == null ? null : startRow.array(); + } + + public ByteBuffer bufferForStartRow() { + return startRow; + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public scannerOpenWithStop_args setStartRow(byte[] startRow) { + setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenWithStop_args setStartRow(ByteBuffer startRow) { + this.startRow = startRow; + return this; + } + + public void unsetStartRow() { + this.startRow = null; + } + + /** Returns true if field startRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public byte[] getStopRow() { + setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow)); + return stopRow == null ? null : stopRow.array(); + } + + public ByteBuffer bufferForStopRow() { + return stopRow; + } + + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public scannerOpenWithStop_args setStopRow(byte[] stopRow) { + setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow)); + return this; + } + + public scannerOpenWithStop_args setStopRow(ByteBuffer stopRow) { + this.stopRow = stopRow; + return this; + } + + public void unsetStopRow() { + this.stopRow = null; + } + + /** Returns true if field stopRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStopRow() { + return this.stopRow != null; + } + + public void setStopRowIsSet(boolean value) { + if (!value) { + this.stopRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * 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. + */ + public List getColumns() { + return this.columns; + } + + /** + * columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + */ + public scannerOpenWithStop_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpenWithStop_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case START_ROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((ByteBuffer)value); + } + break; + + case STOP_ROW: + if (value == null) { + unsetStopRow(); + } else { + setStopRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case START_ROW: + return getStartRow(); + + case STOP_ROW: + return getStopRow(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case START_ROW: + return isSetStartRow(); + case STOP_ROW: + return isSetStopRow(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithStop_args) + return this.equals((scannerOpenWithStop_args)that); + return false; + } + + public boolean equals(scannerOpenWithStop_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); + if (this_present_startRow || that_present_startRow) { + if (!(this_present_startRow && that_present_startRow)) + return false; + if (!this.startRow.equals(that.startRow)) + return false; + } + + boolean this_present_stopRow = true && this.isSetStopRow(); + boolean that_present_stopRow = true && that.isSetStopRow(); + if (this_present_stopRow || that_present_stopRow) { + if (!(this_present_stopRow && that_present_stopRow)) + return false; + if (!this.stopRow.equals(that.stopRow)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithStop_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithStop_args typedOther = (scannerOpenWithStop_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStopRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithStop_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("stopRow:"); + if (this.stopRow == null) { + sb.append("null"); + } else { + sb.append(this.stopRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithStop_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithStop_argsStandardScheme getScheme() { + return new scannerOpenWithStop_argsStandardScheme(); + } + } + + private static class scannerOpenWithStop_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STOP_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list470 = iprot.readListBegin(); + struct.columns = new ArrayList(_list470.size); + for (int _i471 = 0; _i471 < _list470.size; ++_i471) + { + ByteBuffer _elem472; // optional + _elem472 = iprot.readBinary(); + struct.columns.add(_elem472); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map473 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map473.size); + for (int _i474 = 0; _i474 < _map473.size; ++_i474) + { + ByteBuffer _key475; // required + ByteBuffer _val476; // required + _key475 = iprot.readBinary(); + _val476 = iprot.readBinary(); + struct.attributes.put(_key475, _val476); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.startRow != null) { + oprot.writeFieldBegin(START_ROW_FIELD_DESC); + oprot.writeBinary(struct.startRow); + oprot.writeFieldEnd(); + } + if (struct.stopRow != null) { + oprot.writeFieldBegin(STOP_ROW_FIELD_DESC); + oprot.writeBinary(struct.stopRow); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter477 : struct.columns) + { + oprot.writeBinary(_iter477); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter478 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter478.getKey()); + oprot.writeBinary(_iter478.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithStop_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithStop_argsTupleScheme getScheme() { + return new scannerOpenWithStop_argsTupleScheme(); + } + } + + private static class scannerOpenWithStop_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetStartRow()) { + optionals.set(1); + } + if (struct.isSetStopRow()) { + optionals.set(2); + } + if (struct.isSetColumns()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetStartRow()) { + oprot.writeBinary(struct.startRow); + } + if (struct.isSetStopRow()) { + oprot.writeBinary(struct.stopRow); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter479 : struct.columns) + { + oprot.writeBinary(_iter479); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter480 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter480.getKey()); + oprot.writeBinary(_iter480.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } + if (incoming.get(2)) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list481 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list481.size); + for (int _i482 = 0; _i482 < _list481.size; ++_i482) + { + ByteBuffer _elem483; // optional + _elem483 = iprot.readBinary(); + struct.columns.add(_elem483); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map484 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map484.size); + for (int _i485 = 0; _i485 < _map484.size; ++_i485) + { + ByteBuffer _key486; // required + ByteBuffer _val487; // required + _key486 = iprot.readBinary(); + _val487 = iprot.readBinary(); + struct.attributes.put(_key486, _val487); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpenWithStop_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStop_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithStop_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithStop_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStop_result.class, metaDataMap); + } + + public scannerOpenWithStop_result() { + } + + public scannerOpenWithStop_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStop_result(scannerOpenWithStop_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpenWithStop_result deepCopy() { + return new scannerOpenWithStop_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpenWithStop_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpenWithStop_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithStop_result) + return this.equals((scannerOpenWithStop_result)that); + return false; + } + + public boolean equals(scannerOpenWithStop_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithStop_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithStop_result typedOther = (scannerOpenWithStop_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithStop_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithStop_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithStop_resultStandardScheme getScheme() { + return new scannerOpenWithStop_resultStandardScheme(); + } + } + + private static class scannerOpenWithStop_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStop_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithStop_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithStop_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithStop_resultTupleScheme getScheme() { + return new scannerOpenWithStop_resultTupleScheme(); + } + } + + private static class scannerOpenWithStop_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStop_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpenWithPrefix_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithPrefix_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_AND_PREFIX_FIELD_DESC = new org.apache.thrift.protocol.TField("startAndPrefix", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithPrefix_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithPrefix_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * the prefix (and thus start row) of the keys you want + */ + public ByteBuffer startAndPrefix; // required + /** + * the columns you want returned + */ + public List columns; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * the prefix (and thus start row) of the keys you want + */ + START_AND_PREFIX((short)2, "startAndPrefix"), + /** + * the columns you want returned + */ + COLUMNS((short)3, "columns"), + /** + * Scan attributes + */ + ATTRIBUTES((short)4, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_AND_PREFIX + return START_AND_PREFIX; + case 3: // COLUMNS + return COLUMNS; + case 4: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.START_AND_PREFIX, new org.apache.thrift.meta_data.FieldMetaData("startAndPrefix", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_args.class, metaDataMap); + } + + public scannerOpenWithPrefix_args() { + } + + public scannerOpenWithPrefix_args( + ByteBuffer tableName, + ByteBuffer startAndPrefix, + List columns, + Map attributes) + { + this(); + this.tableName = tableName; + this.startAndPrefix = startAndPrefix; + this.columns = columns; + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithPrefix_args(scannerOpenWithPrefix_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartAndPrefix()) { + this.startAndPrefix = other.startAndPrefix; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpenWithPrefix_args deepCopy() { + return new scannerOpenWithPrefix_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.startAndPrefix = null; + this.columns = null; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpenWithPrefix_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithPrefix_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * the prefix (and thus start row) of the keys you want + */ + public byte[] getStartAndPrefix() { + setStartAndPrefix(org.apache.thrift.TBaseHelper.rightSize(startAndPrefix)); + return startAndPrefix == null ? null : startAndPrefix.array(); + } + + public ByteBuffer bufferForStartAndPrefix() { + return startAndPrefix; + } + + /** + * the prefix (and thus start row) of the keys you want + */ + public scannerOpenWithPrefix_args setStartAndPrefix(byte[] startAndPrefix) { + setStartAndPrefix(startAndPrefix == null ? (ByteBuffer)null : ByteBuffer.wrap(startAndPrefix)); + return this; + } + + public scannerOpenWithPrefix_args setStartAndPrefix(ByteBuffer startAndPrefix) { + this.startAndPrefix = startAndPrefix; + return this; + } + + public void unsetStartAndPrefix() { + this.startAndPrefix = null; + } + + /** Returns true if field startAndPrefix is set (has been assigned a value) and false otherwise */ + public boolean isSetStartAndPrefix() { + return this.startAndPrefix != null; + } + + public void setStartAndPrefixIsSet(boolean value) { + if (!value) { + this.startAndPrefix = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * the columns you want returned + */ + public List getColumns() { + return this.columns; + } + + /** + * the columns you want returned + */ + public scannerOpenWithPrefix_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpenWithPrefix_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case START_AND_PREFIX: + if (value == null) { + unsetStartAndPrefix(); + } else { + setStartAndPrefix((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case START_AND_PREFIX: + return getStartAndPrefix(); + + case COLUMNS: + return getColumns(); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case START_AND_PREFIX: + return isSetStartAndPrefix(); + case COLUMNS: + return isSetColumns(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithPrefix_args) + return this.equals((scannerOpenWithPrefix_args)that); + return false; + } + + public boolean equals(scannerOpenWithPrefix_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_startAndPrefix = true && this.isSetStartAndPrefix(); + boolean that_present_startAndPrefix = true && that.isSetStartAndPrefix(); + if (this_present_startAndPrefix || that_present_startAndPrefix) { + if (!(this_present_startAndPrefix && that_present_startAndPrefix)) + return false; + if (!this.startAndPrefix.equals(that.startAndPrefix)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithPrefix_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithPrefix_args typedOther = (scannerOpenWithPrefix_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartAndPrefix()).compareTo(typedOther.isSetStartAndPrefix()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartAndPrefix()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startAndPrefix, typedOther.startAndPrefix); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithPrefix_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startAndPrefix:"); + if (this.startAndPrefix == null) { + sb.append("null"); + } else { + sb.append(this.startAndPrefix); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithPrefix_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithPrefix_argsStandardScheme getScheme() { + return new scannerOpenWithPrefix_argsStandardScheme(); + } + } + + private static class scannerOpenWithPrefix_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_AND_PREFIX + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startAndPrefix = iprot.readBinary(); + struct.setStartAndPrefixIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list488 = iprot.readListBegin(); + struct.columns = new ArrayList(_list488.size); + for (int _i489 = 0; _i489 < _list488.size; ++_i489) + { + ByteBuffer _elem490; // optional + _elem490 = iprot.readBinary(); + struct.columns.add(_elem490); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map491 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map491.size); + for (int _i492 = 0; _i492 < _map491.size; ++_i492) + { + ByteBuffer _key493; // required + ByteBuffer _val494; // required + _key493 = iprot.readBinary(); + _val494 = iprot.readBinary(); + struct.attributes.put(_key493, _val494); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.startAndPrefix != null) { + oprot.writeFieldBegin(START_AND_PREFIX_FIELD_DESC); + oprot.writeBinary(struct.startAndPrefix); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter495 : struct.columns) + { + oprot.writeBinary(_iter495); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter496 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter496.getKey()); + oprot.writeBinary(_iter496.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithPrefix_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithPrefix_argsTupleScheme getScheme() { + return new scannerOpenWithPrefix_argsTupleScheme(); + } + } + + private static class scannerOpenWithPrefix_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetStartAndPrefix()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetAttributes()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetStartAndPrefix()) { + oprot.writeBinary(struct.startAndPrefix); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter497 : struct.columns) + { + oprot.writeBinary(_iter497); + } + } + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter498 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter498.getKey()); + oprot.writeBinary(_iter498.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.startAndPrefix = iprot.readBinary(); + struct.setStartAndPrefixIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list499 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list499.size); + for (int _i500 = 0; _i500 < _list499.size; ++_i500) + { + ByteBuffer _elem501; // optional + _elem501 = iprot.readBinary(); + struct.columns.add(_elem501); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TMap _map502 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map502.size); + for (int _i503 = 0; _i503 < _map502.size; ++_i503) + { + ByteBuffer _key504; // required + ByteBuffer _val505; // required + _key504 = iprot.readBinary(); + _val505 = iprot.readBinary(); + struct.attributes.put(_key504, _val505); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpenWithPrefix_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithPrefix_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithPrefix_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithPrefix_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithPrefix_result.class, metaDataMap); + } + + public scannerOpenWithPrefix_result() { + } + + public scannerOpenWithPrefix_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithPrefix_result(scannerOpenWithPrefix_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpenWithPrefix_result deepCopy() { + return new scannerOpenWithPrefix_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpenWithPrefix_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpenWithPrefix_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithPrefix_result) + return this.equals((scannerOpenWithPrefix_result)that); + return false; + } + + public boolean equals(scannerOpenWithPrefix_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithPrefix_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithPrefix_result typedOther = (scannerOpenWithPrefix_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithPrefix_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithPrefix_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithPrefix_resultStandardScheme getScheme() { + return new scannerOpenWithPrefix_resultStandardScheme(); + } + } + + private static class scannerOpenWithPrefix_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithPrefix_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithPrefix_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithPrefix_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithPrefix_resultTupleScheme getScheme() { + return new scannerOpenWithPrefix_resultTupleScheme(); + } + } + + private static class scannerOpenWithPrefix_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithPrefix_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpenTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)4); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)5); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public ByteBuffer startRow; // required + /** + * 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. + */ + public List columns; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + START_ROW((short)2, "startRow"), + /** + * 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((short)3, "columns"), + /** + * timestamp + */ + TIMESTAMP((short)4, "timestamp"), + /** + * Scan attributes + */ + ATTRIBUTES((short)5, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // COLUMNS + return COLUMNS; + case 4: // TIMESTAMP + return TIMESTAMP; + case 5: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenTs_args.class, metaDataMap); + } + + public scannerOpenTs_args() { + } + + public scannerOpenTs_args( + ByteBuffer tableName, + ByteBuffer startRow, + List columns, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.startRow = startRow; + this.columns = columns; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenTs_args(scannerOpenTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpenTs_args deepCopy() { + return new scannerOpenTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpenTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public byte[] getStartRow() { + setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow)); + return startRow == null ? null : startRow.array(); + } + + public ByteBuffer bufferForStartRow() { + return startRow; + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public scannerOpenTs_args setStartRow(byte[] startRow) { + setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenTs_args setStartRow(ByteBuffer startRow) { + this.startRow = startRow; + return this; + } + + public void unsetStartRow() { + this.startRow = null; + } + + /** Returns true if field startRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * 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. + */ + public List getColumns() { + return this.columns; + } + + /** + * columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + */ + public scannerOpenTs_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public scannerOpenTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpenTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case START_ROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case START_ROW: + return getStartRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case START_ROW: + return isSetStartRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenTs_args) + return this.equals((scannerOpenTs_args)that); + return false; + } + + public boolean equals(scannerOpenTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); + if (this_present_startRow || that_present_startRow) { + if (!(this_present_startRow && that_present_startRow)) + return false; + if (!this.startRow.equals(that.startRow)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenTs_args typedOther = (scannerOpenTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenTs_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpenTs_argsStandardScheme getScheme() { + return new scannerOpenTs_argsStandardScheme(); + } + } + + private static class scannerOpenTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list506 = iprot.readListBegin(); + struct.columns = new ArrayList(_list506.size); + for (int _i507 = 0; _i507 < _list506.size; ++_i507) + { + ByteBuffer _elem508; // optional + _elem508 = iprot.readBinary(); + struct.columns.add(_elem508); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map509 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map509.size); + for (int _i510 = 0; _i510 < _map509.size; ++_i510) + { + ByteBuffer _key511; // required + ByteBuffer _val512; // required + _key511 = iprot.readBinary(); + _val512 = iprot.readBinary(); + struct.attributes.put(_key511, _val512); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.startRow != null) { + oprot.writeFieldBegin(START_ROW_FIELD_DESC); + oprot.writeBinary(struct.startRow); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter513 : struct.columns) + { + oprot.writeBinary(_iter513); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter514 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter514.getKey()); + oprot.writeBinary(_iter514.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenTs_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpenTs_argsTupleScheme getScheme() { + return new scannerOpenTs_argsTupleScheme(); + } + } + + private static class scannerOpenTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetStartRow()) { + optionals.set(1); + } + if (struct.isSetColumns()) { + optionals.set(2); + } + if (struct.isSetTimestamp()) { + optionals.set(3); + } + if (struct.isSetAttributes()) { + optionals.set(4); + } + oprot.writeBitSet(optionals, 5); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetStartRow()) { + oprot.writeBinary(struct.startRow); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter515 : struct.columns) + { + oprot.writeBinary(_iter515); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter516 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter516.getKey()); + oprot.writeBinary(_iter516.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(5); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } + if (incoming.get(2)) { + { + org.apache.thrift.protocol.TList _list517 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list517.size); + for (int _i518 = 0; _i518 < _list517.size; ++_i518) + { + ByteBuffer _elem519; // optional + _elem519 = iprot.readBinary(); + struct.columns.add(_elem519); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(3)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(4)) { + { + org.apache.thrift.protocol.TMap _map520 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map520.size); + for (int _i521 = 0; _i521 < _map520.size; ++_i521) + { + ByteBuffer _key522; // required + ByteBuffer _val523; // required + _key522 = iprot.readBinary(); + _val523 = iprot.readBinary(); + struct.attributes.put(_key522, _val523); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpenTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenTs_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenTs_result.class, metaDataMap); + } + + public scannerOpenTs_result() { + } + + public scannerOpenTs_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenTs_result(scannerOpenTs_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpenTs_result deepCopy() { + return new scannerOpenTs_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpenTs_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpenTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenTs_result) + return this.equals((scannerOpenTs_result)that); + return false; + } + + public boolean equals(scannerOpenTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenTs_result typedOther = (scannerOpenTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenTs_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenTs_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpenTs_resultStandardScheme getScheme() { + return new scannerOpenTs_resultStandardScheme(); + } + } + + private static class scannerOpenTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenTs_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpenTs_resultTupleScheme getScheme() { + return new scannerOpenTs_resultTupleScheme(); + } + } + + private static class scannerOpenTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerOpenWithStopTs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStopTs_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)5); + private static final org.apache.thrift.protocol.TField ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("attributes", org.apache.thrift.protocol.TType.MAP, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithStopTs_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithStopTs_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public ByteBuffer startRow; // required + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public ByteBuffer stopRow; // required + /** + * 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. + */ + public List columns; // required + /** + * timestamp + */ + public long timestamp; // required + /** + * Scan attributes + */ + public Map attributes; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + START_ROW((short)2, "startRow"), + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + STOP_ROW((short)3, "stopRow"), + /** + * 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((short)4, "columns"), + /** + * timestamp + */ + TIMESTAMP((short)5, "timestamp"), + /** + * Scan attributes + */ + ATTRIBUTES((short)6, "attributes"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // START_ROW + return START_ROW; + case 3: // STOP_ROW + return STOP_ROW; + case 4: // COLUMNS + return COLUMNS; + case 5: // TIMESTAMP + return TIMESTAMP; + case 6: // ATTRIBUTES + return ATTRIBUTES; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_args.class, metaDataMap); + } + + public scannerOpenWithStopTs_args() { + } + + public scannerOpenWithStopTs_args( + ByteBuffer tableName, + ByteBuffer startRow, + ByteBuffer stopRow, + List columns, + long timestamp, + Map attributes) + { + this(); + this.tableName = tableName; + this.startRow = startRow; + this.stopRow = stopRow; + this.columns = columns; + this.timestamp = timestamp; + setTimestampIsSet(true); + this.attributes = attributes; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStopTs_args(scannerOpenWithStopTs_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetStopRow()) { + this.stopRow = other.stopRow; + } + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + this.timestamp = other.timestamp; + if (other.isSetAttributes()) { + Map __this__attributes = new HashMap(); + for (Map.Entry other_element : other.attributes.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + ByteBuffer other_element_value = other_element.getValue(); + + ByteBuffer __this__attributes_copy_key = other_element_key; + + ByteBuffer __this__attributes_copy_value = other_element_value; + + __this__attributes.put(__this__attributes_copy_key, __this__attributes_copy_value); + } + this.attributes = __this__attributes; + } + } + + public scannerOpenWithStopTs_args deepCopy() { + return new scannerOpenWithStopTs_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.startRow = null; + this.stopRow = null; + this.columns = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.attributes = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public scannerOpenWithStopTs_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public scannerOpenWithStopTs_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public byte[] getStartRow() { + setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow)); + return startRow == null ? null : startRow.array(); + } + + public ByteBuffer bufferForStartRow() { + return startRow; + } + + /** + * Starting row in table to scan. + * Send "" (empty string) to start at the first row. + */ + public scannerOpenWithStopTs_args setStartRow(byte[] startRow) { + setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow)); + return this; + } + + public scannerOpenWithStopTs_args setStartRow(ByteBuffer startRow) { + this.startRow = startRow; + return this; + } + + public void unsetStartRow() { + this.startRow = null; + } + + /** Returns true if field startRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public byte[] getStopRow() { + setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow)); + return stopRow == null ? null : stopRow.array(); + } + + public ByteBuffer bufferForStopRow() { + return stopRow; + } + + /** + * row to stop scanning on. This row is *not* included in the + * scanner's results + */ + public scannerOpenWithStopTs_args setStopRow(byte[] stopRow) { + setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow)); + return this; + } + + public scannerOpenWithStopTs_args setStopRow(ByteBuffer stopRow) { + this.stopRow = stopRow; + return this; + } + + public void unsetStopRow() { + this.stopRow = null; + } + + /** Returns true if field stopRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStopRow() { + return this.stopRow != null; + } + + public void setStopRowIsSet(boolean value) { + if (!value) { + this.stopRow = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + /** + * 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. + */ + public List getColumns() { + return this.columns; + } + + /** + * columns to scan. If column name is a column family, all + * columns of the specified column family are returned. It's also possible + * to pass a regex in the column qualifier. + */ + public scannerOpenWithStopTs_args setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + /** + * timestamp + */ + public long getTimestamp() { + return this.timestamp; + } + + /** + * timestamp + */ + public scannerOpenWithStopTs_args setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getAttributesSize() { + return (this.attributes == null) ? 0 : this.attributes.size(); + } + + public void putToAttributes(ByteBuffer key, ByteBuffer val) { + if (this.attributes == null) { + this.attributes = new HashMap(); + } + this.attributes.put(key, val); + } + + /** + * Scan attributes + */ + public Map getAttributes() { + return this.attributes; + } + + /** + * Scan attributes + */ + public scannerOpenWithStopTs_args setAttributes(Map attributes) { + this.attributes = attributes; + return this; + } + + public void unsetAttributes() { + this.attributes = null; + } + + /** Returns true if field attributes is set (has been assigned a value) and false otherwise */ + public boolean isSetAttributes() { + return this.attributes != null; + } + + public void setAttributesIsSet(boolean value) { + if (!value) { + this.attributes = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case START_ROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((ByteBuffer)value); + } + break; + + case STOP_ROW: + if (value == null) { + unsetStopRow(); + } else { + setStopRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case ATTRIBUTES: + if (value == null) { + unsetAttributes(); + } else { + setAttributes((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case START_ROW: + return getStartRow(); + + case STOP_ROW: + return getStopRow(); + + case COLUMNS: + return getColumns(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case ATTRIBUTES: + return getAttributes(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case START_ROW: + return isSetStartRow(); + case STOP_ROW: + return isSetStopRow(); + case COLUMNS: + return isSetColumns(); + case TIMESTAMP: + return isSetTimestamp(); + case ATTRIBUTES: + return isSetAttributes(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithStopTs_args) + return this.equals((scannerOpenWithStopTs_args)that); + return false; + } + + public boolean equals(scannerOpenWithStopTs_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); + if (this_present_startRow || that_present_startRow) { + if (!(this_present_startRow && that_present_startRow)) + return false; + if (!this.startRow.equals(that.startRow)) + return false; + } + + boolean this_present_stopRow = true && this.isSetStopRow(); + boolean that_present_stopRow = true && that.isSetStopRow(); + if (this_present_stopRow || that_present_stopRow) { + if (!(this_present_stopRow && that_present_stopRow)) + return false; + if (!this.stopRow.equals(that.stopRow)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_attributes = true && this.isSetAttributes(); + boolean that_present_attributes = true && that.isSetAttributes(); + if (this_present_attributes || that_present_attributes) { + if (!(this_present_attributes && that_present_attributes)) + return false; + if (!this.attributes.equals(that.attributes)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithStopTs_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithStopTs_args typedOther = (scannerOpenWithStopTs_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStopRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAttributes()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithStopTs_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("stopRow:"); + if (this.stopRow == null) { + sb.append("null"); + } else { + sb.append(this.stopRow); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + if (!first) sb.append(", "); + sb.append("attributes:"); + if (this.attributes == null) { + sb.append("null"); + } else { + sb.append(this.attributes); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithStopTs_argsStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithStopTs_argsStandardScheme getScheme() { + return new scannerOpenWithStopTs_argsStandardScheme(); + } + } + + private static class scannerOpenWithStopTs_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // START_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // STOP_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list524 = iprot.readListBegin(); + struct.columns = new ArrayList(_list524.size); + for (int _i525 = 0; _i525 < _list524.size; ++_i525) + { + ByteBuffer _elem526; // optional + _elem526 = iprot.readBinary(); + struct.columns.add(_elem526); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // ATTRIBUTES + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map527 = iprot.readMapBegin(); + struct.attributes = new HashMap(2*_map527.size); + for (int _i528 = 0; _i528 < _map527.size; ++_i528) + { + ByteBuffer _key529; // required + ByteBuffer _val530; // required + _key529 = iprot.readBinary(); + _val530 = iprot.readBinary(); + struct.attributes.put(_key529, _val530); + } + iprot.readMapEnd(); + } + struct.setAttributesIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.startRow != null) { + oprot.writeFieldBegin(START_ROW_FIELD_DESC); + oprot.writeBinary(struct.startRow); + oprot.writeFieldEnd(); + } + if (struct.stopRow != null) { + oprot.writeFieldBegin(STOP_ROW_FIELD_DESC); + oprot.writeBinary(struct.stopRow); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter531 : struct.columns) + { + oprot.writeBinary(_iter531); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + if (struct.attributes != null) { + oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.attributes.size())); + for (Map.Entry _iter532 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter532.getKey()); + oprot.writeBinary(_iter532.getValue()); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithStopTs_argsTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithStopTs_argsTupleScheme getScheme() { + return new scannerOpenWithStopTs_argsTupleScheme(); + } + } + + private static class scannerOpenWithStopTs_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetStartRow()) { + optionals.set(1); + } + if (struct.isSetStopRow()) { + optionals.set(2); + } + if (struct.isSetColumns()) { + optionals.set(3); + } + if (struct.isSetTimestamp()) { + optionals.set(4); + } + if (struct.isSetAttributes()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetStartRow()) { + oprot.writeBinary(struct.startRow); + } + if (struct.isSetStopRow()) { + oprot.writeBinary(struct.stopRow); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter533 : struct.columns) + { + oprot.writeBinary(_iter533); + } + } + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetAttributes()) { + { + oprot.writeI32(struct.attributes.size()); + for (Map.Entry _iter534 : struct.attributes.entrySet()) + { + oprot.writeBinary(_iter534.getKey()); + oprot.writeBinary(_iter534.getValue()); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } + if (incoming.get(2)) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list535 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list535.size); + for (int _i536 = 0; _i536 < _list535.size; ++_i536) + { + ByteBuffer _elem537; // optional + _elem537 = iprot.readBinary(); + struct.columns.add(_elem537); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(4)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(5)) { + { + org.apache.thrift.protocol.TMap _map538 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.attributes = new HashMap(2*_map538.size); + for (int _i539 = 0; _i539 < _map538.size; ++_i539) + { + ByteBuffer _key540; // required + ByteBuffer _val541; // required + _key540 = iprot.readBinary(); + _val541 = iprot.readBinary(); + struct.attributes.put(_key540, _val541); + } + } + struct.setAttributesIsSet(true); + } + } + } + + } + + public static class scannerOpenWithStopTs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerOpenWithStopTs_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerOpenWithStopTs_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerOpenWithStopTs_resultTupleSchemeFactory()); + } + + public int success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __SUCCESS_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerOpenWithStopTs_result.class, metaDataMap); + } + + public scannerOpenWithStopTs_result() { + } + + public scannerOpenWithStopTs_result( + int success, + IOError io) + { + this(); + this.success = success; + setSuccessIsSet(true); + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public scannerOpenWithStopTs_result(scannerOpenWithStopTs_result other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.success = other.success; + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public scannerOpenWithStopTs_result deepCopy() { + return new scannerOpenWithStopTs_result(this); + } + + @Override + public void clear() { + setSuccessIsSet(false); + this.success = 0; + this.io = null; + } + + public int getSuccess() { + return this.success; + } + + public scannerOpenWithStopTs_result setSuccess(int success) { + this.success = success; + setSuccessIsSet(true); + return this; + } + + public void unsetSuccess() { + __isset_bit_vector.clear(__SUCCESS_ISSET_ID); + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return __isset_bit_vector.get(__SUCCESS_ISSET_ID); + } + + public void setSuccessIsSet(boolean value) { + __isset_bit_vector.set(__SUCCESS_ISSET_ID, value); + } + + public IOError getIo() { + return this.io; + } + + public scannerOpenWithStopTs_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((Integer)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return Integer.valueOf(getSuccess()); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerOpenWithStopTs_result) + return this.equals((scannerOpenWithStopTs_result)that); + return false; + } + + public boolean equals(scannerOpenWithStopTs_result that) { + if (that == null) + return false; + + boolean this_present_success = true; + boolean that_present_success = true; + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (this.success != that.success) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerOpenWithStopTs_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerOpenWithStopTs_result typedOther = (scannerOpenWithStopTs_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerOpenWithStopTs_result("); + boolean first = true; + + sb.append("success:"); + sb.append(this.success); + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerOpenWithStopTs_resultStandardSchemeFactory implements SchemeFactory { + public scannerOpenWithStopTs_resultStandardScheme getScheme() { + return new scannerOpenWithStopTs_resultStandardScheme(); + } + } + + private static class scannerOpenWithStopTs_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + oprot.writeI32(struct.success); + oprot.writeFieldEnd(); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerOpenWithStopTs_resultTupleSchemeFactory implements SchemeFactory { + public scannerOpenWithStopTs_resultTupleScheme getScheme() { + return new scannerOpenWithStopTs_resultTupleScheme(); + } + } + + private static class scannerOpenWithStopTs_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + oprot.writeI32(struct.success); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerOpenWithStopTs_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = iprot.readI32(); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class scannerGet_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGet_args"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerGet_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerGet_argsTupleSchemeFactory()); + } + + /** + * id of a scanner returned by scannerOpen + */ + public int id; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * id of a scanner returned by scannerOpen + */ + ID((short)1, "id"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ID + return ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerGet_args.class, metaDataMap); + } + + public scannerGet_args() { + } + + public scannerGet_args( + int id) + { + this(); + this.id = id; + setIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public scannerGet_args(scannerGet_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.id = other.id; + } + + public scannerGet_args deepCopy() { + return new scannerGet_args(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + } + + /** + * id of a scanner returned by scannerOpen + */ + public int getId() { + return this.id; + } + + /** + * id of a scanner returned by scannerOpen + */ + public scannerGet_args setId(int id) { + this.id = id; + setIdIsSet(true); + return this; + } + + public void unsetId() { + __isset_bit_vector.clear(__ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return __isset_bit_vector.get(__ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bit_vector.set(__ID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return Integer.valueOf(getId()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerGet_args) + return this.equals((scannerGet_args)that); + return false; + } + + public boolean equals(scannerGet_args that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerGet_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGet_args typedOther = (scannerGet_args)other; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerGet_args("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerGet_argsStandardSchemeFactory implements SchemeFactory { + public scannerGet_argsStandardScheme getScheme() { + return new scannerGet_argsStandardScheme(); + } + } + + private static class scannerGet_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGet_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerGet_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI32(struct.id); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerGet_argsTupleSchemeFactory implements SchemeFactory { + public scannerGet_argsTupleScheme getScheme() { + return new scannerGet_argsTupleScheme(); + } + } + + private static class scannerGet_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerGet_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetId()) { + oprot.writeI32(struct.id); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerGet_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } + } + } + + } + + public static class scannerGet_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGet_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerGet_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerGet_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerGet_result.class, metaDataMap); + } + + public scannerGet_result() { + } + + public scannerGet_result( + List success, + IOError io, + IllegalArgument ia) + { + this(); + this.success = success; + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public scannerGet_result(scannerGet_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public scannerGet_result deepCopy() { + return new scannerGet_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + this.ia = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public scannerGet_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public scannerGet_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public scannerGet_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerGet_result) + return this.equals((scannerGet_result)that); + return false; + } + + public boolean equals(scannerGet_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerGet_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGet_result typedOther = (scannerGet_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerGet_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerGet_resultStandardSchemeFactory implements SchemeFactory { + public scannerGet_resultStandardScheme getScheme() { + return new scannerGet_resultStandardScheme(); + } + } + + private static class scannerGet_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGet_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list542 = iprot.readListBegin(); + struct.success = new ArrayList(_list542.size); + for (int _i543 = 0; _i543 < _list542.size; ++_i543) + { + TRowResult _elem544; // optional + _elem544 = new TRowResult(); + _elem544.read(iprot); + struct.success.add(_elem544); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerGet_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter545 : struct.success) + { + _iter545.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerGet_resultTupleSchemeFactory implements SchemeFactory { + public scannerGet_resultTupleScheme getScheme() { + return new scannerGet_resultTupleScheme(); + } + } + + private static class scannerGet_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerGet_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + if (struct.isSetIa()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter546 : struct.success) + { + _iter546.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerGet_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list547 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list547.size); + for (int _i548 = 0; _i548 < _list547.size; ++_i548) + { + TRowResult _elem549; // optional + _elem549 = new TRowResult(); + _elem549.read(iprot); + struct.success.add(_elem549); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(2)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class scannerGetList_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGetList_args"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField NB_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("nbRows", org.apache.thrift.protocol.TType.I32, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerGetList_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerGetList_argsTupleSchemeFactory()); + } + + /** + * id of a scanner returned by scannerOpen + */ + public int id; // required + /** + * number of results to return + */ + public int nbRows; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * id of a scanner returned by scannerOpen + */ + ID((short)1, "id"), + /** + * number of results to return + */ + NB_ROWS((short)2, "nbRows"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ID + return ID; + case 2: // NB_ROWS + return NB_ROWS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private static final int __NBROWS_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + tmpMap.put(_Fields.NB_ROWS, new org.apache.thrift.meta_data.FieldMetaData("nbRows", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerGetList_args.class, metaDataMap); + } + + public scannerGetList_args() { + } + + public scannerGetList_args( + int id, + int nbRows) + { + this(); + this.id = id; + setIdIsSet(true); + this.nbRows = nbRows; + setNbRowsIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public scannerGetList_args(scannerGetList_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.id = other.id; + this.nbRows = other.nbRows; + } + + public scannerGetList_args deepCopy() { + return new scannerGetList_args(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + setNbRowsIsSet(false); + this.nbRows = 0; + } + + /** + * id of a scanner returned by scannerOpen + */ + public int getId() { + return this.id; + } + + /** + * id of a scanner returned by scannerOpen + */ + public scannerGetList_args setId(int id) { + this.id = id; + setIdIsSet(true); + return this; + } + + public void unsetId() { + __isset_bit_vector.clear(__ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return __isset_bit_vector.get(__ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bit_vector.set(__ID_ISSET_ID, value); + } + + /** + * number of results to return + */ + public int getNbRows() { + return this.nbRows; + } + + /** + * number of results to return + */ + public scannerGetList_args setNbRows(int nbRows) { + this.nbRows = nbRows; + setNbRowsIsSet(true); + return this; + } + + public void unsetNbRows() { + __isset_bit_vector.clear(__NBROWS_ISSET_ID); + } + + /** Returns true if field nbRows is set (has been assigned a value) and false otherwise */ + public boolean isSetNbRows() { + return __isset_bit_vector.get(__NBROWS_ISSET_ID); + } + + public void setNbRowsIsSet(boolean value) { + __isset_bit_vector.set(__NBROWS_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Integer)value); + } + break; + + case NB_ROWS: + if (value == null) { + unsetNbRows(); + } else { + setNbRows((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return Integer.valueOf(getId()); + + case NB_ROWS: + return Integer.valueOf(getNbRows()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ID: + return isSetId(); + case NB_ROWS: + return isSetNbRows(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerGetList_args) + return this.equals((scannerGetList_args)that); + return false; + } + + public boolean equals(scannerGetList_args that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + boolean this_present_nbRows = true; + boolean that_present_nbRows = true; + if (this_present_nbRows || that_present_nbRows) { + if (!(this_present_nbRows && that_present_nbRows)) + return false; + if (this.nbRows != that.nbRows) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerGetList_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGetList_args typedOther = (scannerGetList_args)other; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNbRows()).compareTo(typedOther.isSetNbRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNbRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nbRows, typedOther.nbRows); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerGetList_args("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + if (!first) sb.append(", "); + sb.append("nbRows:"); + sb.append(this.nbRows); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerGetList_argsStandardSchemeFactory implements SchemeFactory { + public scannerGetList_argsStandardScheme getScheme() { + return new scannerGetList_argsStandardScheme(); + } + } + + private static class scannerGetList_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGetList_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // NB_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.nbRows = iprot.readI32(); + struct.setNbRowsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerGetList_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI32(struct.id); + oprot.writeFieldEnd(); + oprot.writeFieldBegin(NB_ROWS_FIELD_DESC); + oprot.writeI32(struct.nbRows); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerGetList_argsTupleSchemeFactory implements SchemeFactory { + public scannerGetList_argsTupleScheme getScheme() { + return new scannerGetList_argsTupleScheme(); + } + } + + private static class scannerGetList_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerGetList_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetId()) { + optionals.set(0); + } + if (struct.isSetNbRows()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetId()) { + oprot.writeI32(struct.id); + } + if (struct.isSetNbRows()) { + oprot.writeI32(struct.nbRows); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerGetList_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } + if (incoming.get(1)) { + struct.nbRows = iprot.readI32(); + struct.setNbRowsIsSet(true); + } + } + } + + } + + public static class scannerGetList_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerGetList_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerGetList_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerGetList_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRowResult.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerGetList_result.class, metaDataMap); + } + + public scannerGetList_result() { + } + + public scannerGetList_result( + List success, + IOError io, + IllegalArgument ia) + { + this(); + this.success = success; + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public scannerGetList_result(scannerGetList_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TRowResult other_element : other.success) { + __this__success.add(new TRowResult(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public scannerGetList_result deepCopy() { + return new scannerGetList_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + this.ia = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TRowResult elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public scannerGetList_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public scannerGetList_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public scannerGetList_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerGetList_result) + return this.equals((scannerGetList_result)that); + return false; + } + + public boolean equals(scannerGetList_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerGetList_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerGetList_result typedOther = (scannerGetList_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerGetList_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerGetList_resultStandardSchemeFactory implements SchemeFactory { + public scannerGetList_resultStandardScheme getScheme() { + return new scannerGetList_resultStandardScheme(); + } + } + + private static class scannerGetList_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerGetList_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list550 = iprot.readListBegin(); + struct.success = new ArrayList(_list550.size); + for (int _i551 = 0; _i551 < _list550.size; ++_i551) + { + TRowResult _elem552; // optional + _elem552 = new TRowResult(); + _elem552.read(iprot); + struct.success.add(_elem552); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerGetList_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TRowResult _iter553 : struct.success) + { + _iter553.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerGetList_resultTupleSchemeFactory implements SchemeFactory { + public scannerGetList_resultTupleScheme getScheme() { + return new scannerGetList_resultTupleScheme(); + } + } + + private static class scannerGetList_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerGetList_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + if (struct.isSetIa()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TRowResult _iter554 : struct.success) + { + _iter554.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerGetList_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list555 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list555.size); + for (int _i556 = 0; _i556 < _list555.size; ++_i556) + { + TRowResult _elem557; // optional + _elem557 = new TRowResult(); + _elem557.read(iprot); + struct.success.add(_elem557); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(2)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class scannerClose_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerClose_args"); + + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerClose_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerClose_argsTupleSchemeFactory()); + } + + /** + * id of a scanner returned by scannerOpen + */ + public int id; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * id of a scanner returned by scannerOpen + */ + ID((short)1, "id"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ID + return ID; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "ScannerID"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerClose_args.class, metaDataMap); + } + + public scannerClose_args() { + } + + public scannerClose_args( + int id) + { + this(); + this.id = id; + setIdIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public scannerClose_args(scannerClose_args other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.id = other.id; + } + + public scannerClose_args deepCopy() { + return new scannerClose_args(this); + } + + @Override + public void clear() { + setIdIsSet(false); + this.id = 0; + } + + /** + * id of a scanner returned by scannerOpen + */ + public int getId() { + return this.id; + } + + /** + * id of a scanner returned by scannerOpen + */ + public scannerClose_args setId(int id) { + this.id = id; + setIdIsSet(true); + return this; + } + + public void unsetId() { + __isset_bit_vector.clear(__ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return __isset_bit_vector.get(__ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bit_vector.set(__ID_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ID: + if (value == null) { + unsetId(); + } else { + setId((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ID: + return Integer.valueOf(getId()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ID: + return isSetId(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerClose_args) + return this.equals((scannerClose_args)that); + return false; + } + + public boolean equals(scannerClose_args that) { + if (that == null) + return false; + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerClose_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerClose_args typedOther = (scannerClose_args)other; + + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerClose_args("); + boolean first = true; + + sb.append("id:"); + sb.append(this.id); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerClose_argsStandardSchemeFactory implements SchemeFactory { + public scannerClose_argsStandardScheme getScheme() { + return new scannerClose_argsStandardScheme(); + } + } + + private static class scannerClose_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerClose_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerClose_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI32(struct.id); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerClose_argsTupleSchemeFactory implements SchemeFactory { + public scannerClose_argsTupleScheme getScheme() { + return new scannerClose_argsTupleScheme(); + } + } + + private static class scannerClose_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerClose_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetId()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetId()) { + oprot.writeI32(struct.id); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerClose_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.id = iprot.readI32(); + struct.setIdIsSet(true); + } + } + } + + } + + public static class scannerClose_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scannerClose_result"); + + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + private static final org.apache.thrift.protocol.TField IA_FIELD_DESC = new org.apache.thrift.protocol.TField("ia", org.apache.thrift.protocol.TType.STRUCT, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new scannerClose_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new scannerClose_resultTupleSchemeFactory()); + } + + public IOError io; // required + public IllegalArgument ia; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IO((short)1, "io"), + IA((short)2, "ia"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IO + return IO; + case 2: // IA + return IA; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + tmpMap.put(_Fields.IA, new org.apache.thrift.meta_data.FieldMetaData("ia", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scannerClose_result.class, metaDataMap); + } + + public scannerClose_result() { + } + + public scannerClose_result( + IOError io, + IllegalArgument ia) + { + this(); + this.io = io; + this.ia = ia; + } + + /** + * Performs a deep copy on other. + */ + public scannerClose_result(scannerClose_result other) { + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + if (other.isSetIa()) { + this.ia = new IllegalArgument(other.ia); + } + } + + public scannerClose_result deepCopy() { + return new scannerClose_result(this); + } + + @Override + public void clear() { + this.io = null; + this.ia = null; + } + + public IOError getIo() { + return this.io; + } + + public scannerClose_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public IllegalArgument getIa() { + return this.ia; + } + + public scannerClose_result setIa(IllegalArgument ia) { + this.ia = ia; + return this; + } + + public void unsetIa() { + this.ia = null; + } + + /** Returns true if field ia is set (has been assigned a value) and false otherwise */ + public boolean isSetIa() { + return this.ia != null; + } + + public void setIaIsSet(boolean value) { + if (!value) { + this.ia = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + case IA: + if (value == null) { + unsetIa(); + } else { + setIa((IllegalArgument)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IO: + return getIo(); + + case IA: + return getIa(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IO: + return isSetIo(); + case IA: + return isSetIa(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof scannerClose_result) + return this.equals((scannerClose_result)that); + return false; + } + + public boolean equals(scannerClose_result that) { + if (that == null) + return false; + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + boolean this_present_ia = true && this.isSetIa(); + boolean that_present_ia = true && that.isSetIa(); + if (this_present_ia || that_present_ia) { + if (!(this_present_ia && that_present_ia)) + return false; + if (!this.ia.equals(that.ia)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(scannerClose_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + scannerClose_result typedOther = (scannerClose_result)other; + + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIa()).compareTo(typedOther.isSetIa()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIa()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ia, typedOther.ia); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("scannerClose_result("); + boolean first = true; + + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + if (!first) sb.append(", "); + sb.append("ia:"); + if (this.ia == null) { + sb.append("null"); + } else { + sb.append(this.ia); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class scannerClose_resultStandardSchemeFactory implements SchemeFactory { + public scannerClose_resultStandardScheme getScheme() { + return new scannerClose_resultStandardScheme(); + } + } + + private static class scannerClose_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, scannerClose_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // IA + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, scannerClose_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.ia != null) { + oprot.writeFieldBegin(IA_FIELD_DESC); + struct.ia.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class scannerClose_resultTupleSchemeFactory implements SchemeFactory { + public scannerClose_resultTupleScheme getScheme() { + return new scannerClose_resultTupleScheme(); + } + } + + private static class scannerClose_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, scannerClose_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIo()) { + optionals.set(0); + } + if (struct.isSetIa()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetIo()) { + struct.io.write(oprot); + } + if (struct.isSetIa()) { + struct.ia.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, scannerClose_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + if (incoming.get(1)) { + struct.ia = new IllegalArgument(); + struct.ia.read(iprot); + struct.setIaIsSet(true); + } + } + } + + } + + public static class getRowOrBefore_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowOrBefore_args"); + + private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FAMILY_FIELD_DESC = new org.apache.thrift.protocol.TField("family", org.apache.thrift.protocol.TType.STRING, (short)3); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowOrBefore_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowOrBefore_argsTupleSchemeFactory()); + } + + /** + * name of table + */ + public ByteBuffer tableName; // required + /** + * row key + */ + public ByteBuffer row; // required + /** + * column name + */ + public ByteBuffer family; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * name of table + */ + TABLE_NAME((short)1, "tableName"), + /** + * row key + */ + ROW((short)2, "row"), + /** + * column name + */ + FAMILY((short)3, "family"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE_NAME + return TABLE_NAME; + case 2: // ROW + return ROW; + case 3: // FAMILY + return FAMILY; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.FAMILY, new org.apache.thrift.meta_data.FieldMetaData("family", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowOrBefore_args.class, metaDataMap); + } + + public getRowOrBefore_args() { + } + + public getRowOrBefore_args( + ByteBuffer tableName, + ByteBuffer row, + ByteBuffer family) + { + this(); + this.tableName = tableName; + this.row = row; + this.family = family; + } + + /** + * Performs a deep copy on other. + */ + public getRowOrBefore_args(getRowOrBefore_args other) { + if (other.isSetTableName()) { + this.tableName = other.tableName; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetFamily()) { + this.family = other.family; + } + } + + public getRowOrBefore_args deepCopy() { + return new getRowOrBefore_args(this); + } + + @Override + public void clear() { + this.tableName = null; + this.row = null; + this.family = null; + } + + /** + * name of table + */ + public byte[] getTableName() { + setTableName(org.apache.thrift.TBaseHelper.rightSize(tableName)); + return tableName == null ? null : tableName.array(); + } + + public ByteBuffer bufferForTableName() { + return tableName; + } + + /** + * name of table + */ + public getRowOrBefore_args setTableName(byte[] tableName) { + setTableName(tableName == null ? (ByteBuffer)null : ByteBuffer.wrap(tableName)); + return this; + } + + public getRowOrBefore_args setTableName(ByteBuffer tableName) { + this.tableName = tableName; + return this; + } + + public void unsetTableName() { + this.tableName = null; + } + + /** Returns true if field tableName is set (has been assigned a value) and false otherwise */ + public boolean isSetTableName() { + return this.tableName != null; + } + + public void setTableNameIsSet(boolean value) { + if (!value) { + this.tableName = null; + } + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRowOrBefore_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRowOrBefore_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + /** + * column name + */ + public byte[] getFamily() { + setFamily(org.apache.thrift.TBaseHelper.rightSize(family)); + return family == null ? null : family.array(); + } + + public ByteBuffer bufferForFamily() { + return family; + } + + /** + * column name + */ + public getRowOrBefore_args setFamily(byte[] family) { + setFamily(family == null ? (ByteBuffer)null : ByteBuffer.wrap(family)); + return this; + } + + public getRowOrBefore_args setFamily(ByteBuffer family) { + this.family = family; + return this; + } + + public void unsetFamily() { + this.family = null; + } + + /** Returns true if field family is set (has been assigned a value) and false otherwise */ + public boolean isSetFamily() { + return this.family != null; + } + + public void setFamilyIsSet(boolean value) { + if (!value) { + this.family = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE_NAME: + if (value == null) { + unsetTableName(); + } else { + setTableName((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case FAMILY: + if (value == null) { + unsetFamily(); + } else { + setFamily((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE_NAME: + return getTableName(); + + case ROW: + return getRow(); + + case FAMILY: + return getFamily(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE_NAME: + return isSetTableName(); + case ROW: + return isSetRow(); + case FAMILY: + return isSetFamily(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowOrBefore_args) + return this.equals((getRowOrBefore_args)that); + return false; + } + + public boolean equals(getRowOrBefore_args that) { + if (that == null) + return false; + + boolean this_present_tableName = true && this.isSetTableName(); + boolean that_present_tableName = true && that.isSetTableName(); + if (this_present_tableName || that_present_tableName) { + if (!(this_present_tableName && that_present_tableName)) + return false; + if (!this.tableName.equals(that.tableName)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_family = true && this.isSetFamily(); + boolean that_present_family = true && that.isSetFamily(); + if (this_present_family || that_present_family) { + if (!(this_present_family && that_present_family)) + return false; + if (!this.family.equals(that.family)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowOrBefore_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowOrBefore_args typedOther = (getRowOrBefore_args)other; + + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTableName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFamily()).compareTo(typedOther.isSetFamily()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFamily()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.family, typedOther.family); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowOrBefore_args("); + boolean first = true; + + sb.append("tableName:"); + if (this.tableName == null) { + sb.append("null"); + } else { + sb.append(this.tableName); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("family:"); + if (this.family == null) { + sb.append("null"); + } else { + sb.append(this.family); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowOrBefore_argsStandardSchemeFactory implements SchemeFactory { + public getRowOrBefore_argsStandardScheme getScheme() { + return new getRowOrBefore_argsStandardScheme(); + } + } + + private static class getRowOrBefore_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowOrBefore_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // FAMILY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowOrBefore_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.tableName != null) { + oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC); + oprot.writeBinary(struct.tableName); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.family != null) { + oprot.writeFieldBegin(FAMILY_FIELD_DESC); + oprot.writeBinary(struct.family); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowOrBefore_argsTupleSchemeFactory implements SchemeFactory { + public getRowOrBefore_argsTupleScheme getScheme() { + return new getRowOrBefore_argsTupleScheme(); + } + } + + private static class getRowOrBefore_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowOrBefore_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTableName()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetFamily()) { + optionals.set(2); + } + oprot.writeBitSet(optionals, 3); + if (struct.isSetTableName()) { + oprot.writeBinary(struct.tableName); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetFamily()) { + oprot.writeBinary(struct.family); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowOrBefore_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(3); + if (incoming.get(0)) { + struct.tableName = iprot.readBinary(); + struct.setTableNameIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.family = iprot.readBinary(); + struct.setFamilyIsSet(true); + } + } + } + + } + + public static class getRowOrBefore_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRowOrBefore_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRowOrBefore_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRowOrBefore_resultTupleSchemeFactory()); + } + + public List success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRowOrBefore_result.class, metaDataMap); + } + + public getRowOrBefore_result() { + } + + public getRowOrBefore_result( + List success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRowOrBefore_result(getRowOrBefore_result other) { + if (other.isSetSuccess()) { + List __this__success = new ArrayList(); + for (TCell other_element : other.success) { + __this__success.add(new TCell(other_element)); + } + this.success = __this__success; + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRowOrBefore_result deepCopy() { + return new getRowOrBefore_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public int getSuccessSize() { + return (this.success == null) ? 0 : this.success.size(); + } + + public java.util.Iterator getSuccessIterator() { + return (this.success == null) ? null : this.success.iterator(); + } + + public void addToSuccess(TCell elem) { + if (this.success == null) { + this.success = new ArrayList(); + } + this.success.add(elem); + } + + public List getSuccess() { + return this.success; + } + + public getRowOrBefore_result setSuccess(List success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRowOrBefore_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((List)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRowOrBefore_result) + return this.equals((getRowOrBefore_result)that); + return false; + } + + public boolean equals(getRowOrBefore_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRowOrBefore_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRowOrBefore_result typedOther = (getRowOrBefore_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRowOrBefore_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRowOrBefore_resultStandardSchemeFactory implements SchemeFactory { + public getRowOrBefore_resultStandardScheme getScheme() { + return new getRowOrBefore_resultStandardScheme(); + } + } + + private static class getRowOrBefore_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRowOrBefore_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list558 = iprot.readListBegin(); + struct.success = new ArrayList(_list558.size); + for (int _i559 = 0; _i559 < _list558.size; ++_i559) + { + TCell _elem560; // optional + _elem560 = new TCell(); + _elem560.read(iprot); + struct.success.add(_elem560); + } + iprot.readListEnd(); + } + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRowOrBefore_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size())); + for (TCell _iter561 : struct.success) + { + _iter561.write(oprot); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRowOrBefore_resultTupleSchemeFactory implements SchemeFactory { + public getRowOrBefore_resultTupleScheme getScheme() { + return new getRowOrBefore_resultTupleScheme(); + } + } + + private static class getRowOrBefore_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRowOrBefore_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + { + oprot.writeI32(struct.success.size()); + for (TCell _iter562 : struct.success) + { + _iter562.write(oprot); + } + } + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRowOrBefore_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + { + org.apache.thrift.protocol.TList _list563 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.success = new ArrayList(_list563.size); + for (int _i564 = 0; _i564 < _list563.size; ++_i564) + { + TCell _elem565; // optional + _elem565 = new TCell(); + _elem565.read(iprot); + struct.success.add(_elem565); + } + } + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + + public static class getRegionInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionInfo_args"); + + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRegionInfo_argsStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRegionInfo_argsTupleSchemeFactory()); + } + + /** + * row key + */ + public ByteBuffer row; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + /** + * row key + */ + ROW((short)1, "row"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROW + return ROW; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionInfo_args.class, metaDataMap); + } + + public getRegionInfo_args() { + } + + public getRegionInfo_args( + ByteBuffer row) + { + this(); + this.row = row; + } + + /** + * Performs a deep copy on other. + */ + public getRegionInfo_args(getRegionInfo_args other) { + if (other.isSetRow()) { + this.row = other.row; + } + } + + public getRegionInfo_args deepCopy() { + return new getRegionInfo_args(this); + } + + @Override + public void clear() { + this.row = null; + } + + /** + * row key + */ + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + /** + * row key + */ + public getRegionInfo_args setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public getRegionInfo_args setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROW: + return getRow(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROW: + return isSetRow(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRegionInfo_args) + return this.equals((getRegionInfo_args)that); + return false; + } + + public boolean equals(getRegionInfo_args that) { + if (that == null) + return false; + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRegionInfo_args other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRegionInfo_args typedOther = (getRegionInfo_args)other; + + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRegionInfo_args("); + boolean first = true; + + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRegionInfo_argsStandardSchemeFactory implements SchemeFactory { + public getRegionInfo_argsStandardScheme getScheme() { + return new getRegionInfo_argsStandardScheme(); + } + } + + private static class getRegionInfo_argsStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionInfo_args struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionInfo_args struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRegionInfo_argsTupleSchemeFactory implements SchemeFactory { + public getRegionInfo_argsTupleScheme getScheme() { + return new getRegionInfo_argsTupleScheme(); + } + } + + private static class getRegionInfo_argsTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRegionInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRow()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRegionInfo_args struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + } + } + + } + + public static class getRegionInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getRegionInfo_result"); + + private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); + private static final org.apache.thrift.protocol.TField IO_FIELD_DESC = new org.apache.thrift.protocol.TField("io", org.apache.thrift.protocol.TType.STRUCT, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new getRegionInfo_resultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new getRegionInfo_resultTupleSchemeFactory()); + } + + public TRegionInfo success; // required + public IOError io; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + SUCCESS((short)0, "success"), + IO((short)1, "io"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 0: // SUCCESS + return SUCCESS; + case 1: // IO + return IO; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TRegionInfo.class))); + tmpMap.put(_Fields.IO, new org.apache.thrift.meta_data.FieldMetaData("io", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getRegionInfo_result.class, metaDataMap); + } + + public getRegionInfo_result() { + } + + public getRegionInfo_result( + TRegionInfo success, + IOError io) + { + this(); + this.success = success; + this.io = io; + } + + /** + * Performs a deep copy on other. + */ + public getRegionInfo_result(getRegionInfo_result other) { + if (other.isSetSuccess()) { + this.success = new TRegionInfo(other.success); + } + if (other.isSetIo()) { + this.io = new IOError(other.io); + } + } + + public getRegionInfo_result deepCopy() { + return new getRegionInfo_result(this); + } + + @Override + public void clear() { + this.success = null; + this.io = null; + } + + public TRegionInfo getSuccess() { + return this.success; + } + + public getRegionInfo_result setSuccess(TRegionInfo success) { + this.success = success; + return this; + } + + public void unsetSuccess() { + this.success = null; + } + + /** Returns true if field success is set (has been assigned a value) and false otherwise */ + public boolean isSetSuccess() { + return this.success != null; + } + + public void setSuccessIsSet(boolean value) { + if (!value) { + this.success = null; + } + } + + public IOError getIo() { + return this.io; + } + + public getRegionInfo_result setIo(IOError io) { + this.io = io; + return this; + } + + public void unsetIo() { + this.io = null; + } + + /** Returns true if field io is set (has been assigned a value) and false otherwise */ + public boolean isSetIo() { + return this.io != null; + } + + public void setIoIsSet(boolean value) { + if (!value) { + this.io = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case SUCCESS: + if (value == null) { + unsetSuccess(); + } else { + setSuccess((TRegionInfo)value); + } + break; + + case IO: + if (value == null) { + unsetIo(); + } else { + setIo((IOError)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case SUCCESS: + return getSuccess(); + + case IO: + return getIo(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case SUCCESS: + return isSetSuccess(); + case IO: + return isSetIo(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof getRegionInfo_result) + return this.equals((getRegionInfo_result)that); + return false; + } + + public boolean equals(getRegionInfo_result that) { + if (that == null) + return false; + + boolean this_present_success = true && this.isSetSuccess(); + boolean that_present_success = true && that.isSetSuccess(); + if (this_present_success || that_present_success) { + if (!(this_present_success && that_present_success)) + return false; + if (!this.success.equals(that.success)) + return false; + } + + boolean this_present_io = true && this.isSetIo(); + boolean that_present_io = true && that.isSetIo(); + if (this_present_io || that_present_io) { + if (!(this_present_io && that_present_io)) + return false; + if (!this.io.equals(that.io)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(getRegionInfo_result other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + getRegionInfo_result typedOther = (getRegionInfo_result)other; + + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetSuccess()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetIo()).compareTo(typedOther.isSetIo()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIo()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.io, typedOther.io); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("getRegionInfo_result("); + boolean first = true; + + sb.append("success:"); + if (this.success == null) { + sb.append("null"); + } else { + sb.append(this.success); + } + first = false; + if (!first) sb.append(", "); + sb.append("io:"); + if (this.io == null) { + sb.append("null"); + } else { + sb.append(this.io); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class getRegionInfo_resultStandardSchemeFactory implements SchemeFactory { + public getRegionInfo_resultStandardScheme getScheme() { + return new getRegionInfo_resultStandardScheme(); + } + } + + private static class getRegionInfo_resultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, getRegionInfo_result struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 0: // SUCCESS + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.success = new TRegionInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 1: // IO + if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, getRegionInfo_result struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.success != null) { + oprot.writeFieldBegin(SUCCESS_FIELD_DESC); + struct.success.write(oprot); + oprot.writeFieldEnd(); + } + if (struct.io != null) { + oprot.writeFieldBegin(IO_FIELD_DESC); + struct.io.write(oprot); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class getRegionInfo_resultTupleSchemeFactory implements SchemeFactory { + public getRegionInfo_resultTupleScheme getScheme() { + return new getRegionInfo_resultTupleScheme(); + } + } + + private static class getRegionInfo_resultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, getRegionInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetSuccess()) { + optionals.set(0); + } + if (struct.isSetIo()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetSuccess()) { + struct.success.write(oprot); + } + if (struct.isSetIo()) { + struct.io.write(oprot); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, getRegionInfo_result struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.success = new TRegionInfo(); + struct.success.read(iprot); + struct.setSuccessIsSet(true); + } + if (incoming.get(1)) { + struct.io = new IOError(); + struct.io.read(iprot); + struct.setIoIsSet(true); + } + } + } + + } + +} diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java new file mode 100644 index 0000000..11e31e3 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java @@ -0,0 +1,387 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 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. + */ +public class IOError extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError"); + + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IOErrorStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IOErrorTupleSchemeFactory()); + } + + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IOError.class, metaDataMap); + } + + public IOError() { + } + + public IOError( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public IOError(IOError other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public IOError deepCopy() { + return new IOError(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public IOError setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IOError) + return this.equals((IOError)that); + return false; + } + + public boolean equals(IOError that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(IOError other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IOError typedOther = (IOError)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("IOError("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class IOErrorStandardSchemeFactory implements SchemeFactory { + public IOErrorStandardScheme getScheme() { + return new IOErrorStandardScheme(); + } + } + + private static class IOErrorStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IOError struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IOError struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IOErrorTupleSchemeFactory implements SchemeFactory { + public IOErrorTupleScheme getScheme() { + return new IOErrorTupleScheme(); + } + } + + private static class IOErrorTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IOError struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IOError struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java new file mode 100644 index 0000000..ede215f --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java @@ -0,0 +1,386 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * An IllegalArgument exception indicates an illegal or invalid + * argument was passed into a procedure. + */ +public class IllegalArgument extends Exception implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument"); + + private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new IllegalArgumentStandardSchemeFactory()); + schemes.put(TupleScheme.class, new IllegalArgumentTupleSchemeFactory()); + } + + public String message; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + MESSAGE((short)1, "message"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // MESSAGE + return MESSAGE; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IllegalArgument.class, metaDataMap); + } + + public IllegalArgument() { + } + + public IllegalArgument( + String message) + { + this(); + this.message = message; + } + + /** + * Performs a deep copy on other. + */ + public IllegalArgument(IllegalArgument other) { + if (other.isSetMessage()) { + this.message = other.message; + } + } + + public IllegalArgument deepCopy() { + return new IllegalArgument(this); + } + + @Override + public void clear() { + this.message = null; + } + + public String getMessage() { + return this.message; + } + + public IllegalArgument setMessage(String message) { + this.message = message; + return this; + } + + public void unsetMessage() { + this.message = null; + } + + /** Returns true if field message is set (has been assigned a value) and false otherwise */ + public boolean isSetMessage() { + return this.message != null; + } + + public void setMessageIsSet(boolean value) { + if (!value) { + this.message = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case MESSAGE: + if (value == null) { + unsetMessage(); + } else { + setMessage((String)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case MESSAGE: + return getMessage(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case MESSAGE: + return isSetMessage(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof IllegalArgument) + return this.equals((IllegalArgument)that); + return false; + } + + public boolean equals(IllegalArgument that) { + if (that == null) + return false; + + boolean this_present_message = true && this.isSetMessage(); + boolean that_present_message = true && that.isSetMessage(); + if (this_present_message || that_present_message) { + if (!(this_present_message && that_present_message)) + return false; + if (!this.message.equals(that.message)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(IllegalArgument other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + IllegalArgument typedOther = (IllegalArgument)other; + + lastComparison = Boolean.valueOf(isSetMessage()).compareTo(typedOther.isSetMessage()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetMessage()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("IllegalArgument("); + boolean first = true; + + sb.append("message:"); + if (this.message == null) { + sb.append("null"); + } else { + sb.append(this.message); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class IllegalArgumentStandardSchemeFactory implements SchemeFactory { + public IllegalArgumentStandardScheme getScheme() { + return new IllegalArgumentStandardScheme(); + } + } + + private static class IllegalArgumentStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, IllegalArgument struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // MESSAGE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, IllegalArgument struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.message != null) { + oprot.writeFieldBegin(MESSAGE_FIELD_DESC); + oprot.writeString(struct.message); + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class IllegalArgumentTupleSchemeFactory implements SchemeFactory { + public IllegalArgumentTupleScheme getScheme() { + return new IllegalArgumentTupleScheme(); + } + } + + private static class IllegalArgumentTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, IllegalArgument struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetMessage()) { + optionals.set(0); + } + oprot.writeBitSet(optionals, 1); + if (struct.isSetMessage()) { + oprot.writeString(struct.message); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, IllegalArgument struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(1); + if (incoming.get(0)) { + struct.message = iprot.readString(); + struct.setMessageIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java new file mode 100644 index 0000000..ef1817f --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java @@ -0,0 +1,702 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A Mutation object is used to either update or delete a column-value. + */ +public class Mutation implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation"); + + private static final org.apache.thrift.protocol.TField IS_DELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDelete", org.apache.thrift.protocol.TType.BOOL, (short)1); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField WRITE_TO_WAL_FIELD_DESC = new org.apache.thrift.protocol.TField("writeToWAL", org.apache.thrift.protocol.TType.BOOL, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new MutationStandardSchemeFactory()); + schemes.put(TupleScheme.class, new MutationTupleSchemeFactory()); + } + + public boolean isDelete; // required + public ByteBuffer column; // required + public ByteBuffer value; // required + public boolean writeToWAL; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + IS_DELETE((short)1, "isDelete"), + COLUMN((short)2, "column"), + VALUE((short)3, "value"), + WRITE_TO_WAL((short)4, "writeToWAL"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // IS_DELETE + return IS_DELETE; + case 2: // COLUMN + return COLUMN; + case 3: // VALUE + return VALUE; + case 4: // WRITE_TO_WAL + return WRITE_TO_WAL; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ISDELETE_ISSET_ID = 0; + private static final int __WRITETOWAL_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.IS_DELETE, new org.apache.thrift.meta_data.FieldMetaData("isDelete", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.WRITE_TO_WAL, new org.apache.thrift.meta_data.FieldMetaData("writeToWAL", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap); + } + + public Mutation() { + this.isDelete = false; + + this.writeToWAL = true; + + } + + public Mutation( + boolean isDelete, + ByteBuffer column, + ByteBuffer value, + boolean writeToWAL) + { + this(); + this.isDelete = isDelete; + setIsDeleteIsSet(true); + this.column = column; + this.value = value; + this.writeToWAL = writeToWAL; + setWriteToWALIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public Mutation(Mutation other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + this.isDelete = other.isDelete; + if (other.isSetColumn()) { + this.column = other.column; + } + if (other.isSetValue()) { + this.value = other.value; + } + this.writeToWAL = other.writeToWAL; + } + + public Mutation deepCopy() { + return new Mutation(this); + } + + @Override + public void clear() { + this.isDelete = false; + + this.column = null; + this.value = null; + this.writeToWAL = true; + + } + + public boolean isIsDelete() { + return this.isDelete; + } + + public Mutation setIsDelete(boolean isDelete) { + this.isDelete = isDelete; + setIsDeleteIsSet(true); + return this; + } + + public void unsetIsDelete() { + __isset_bit_vector.clear(__ISDELETE_ISSET_ID); + } + + /** Returns true if field isDelete is set (has been assigned a value) and false otherwise */ + public boolean isSetIsDelete() { + return __isset_bit_vector.get(__ISDELETE_ISSET_ID); + } + + public void setIsDeleteIsSet(boolean value) { + __isset_bit_vector.set(__ISDELETE_ISSET_ID, value); + } + + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + public Mutation setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public Mutation setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public byte[] getValue() { + setValue(org.apache.thrift.TBaseHelper.rightSize(value)); + return value == null ? null : value.array(); + } + + public ByteBuffer bufferForValue() { + return value; + } + + public Mutation setValue(byte[] value) { + setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value)); + return this; + } + + public Mutation setValue(ByteBuffer value) { + this.value = value; + return this; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public boolean isWriteToWAL() { + return this.writeToWAL; + } + + public Mutation setWriteToWAL(boolean writeToWAL) { + this.writeToWAL = writeToWAL; + setWriteToWALIsSet(true); + return this; + } + + public void unsetWriteToWAL() { + __isset_bit_vector.clear(__WRITETOWAL_ISSET_ID); + } + + /** Returns true if field writeToWAL is set (has been assigned a value) and false otherwise */ + public boolean isSetWriteToWAL() { + return __isset_bit_vector.get(__WRITETOWAL_ISSET_ID); + } + + public void setWriteToWALIsSet(boolean value) { + __isset_bit_vector.set(__WRITETOWAL_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case IS_DELETE: + if (value == null) { + unsetIsDelete(); + } else { + setIsDelete((Boolean)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((ByteBuffer)value); + } + break; + + case WRITE_TO_WAL: + if (value == null) { + unsetWriteToWAL(); + } else { + setWriteToWAL((Boolean)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case IS_DELETE: + return Boolean.valueOf(isIsDelete()); + + case COLUMN: + return getColumn(); + + case VALUE: + return getValue(); + + case WRITE_TO_WAL: + return Boolean.valueOf(isWriteToWAL()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case IS_DELETE: + return isSetIsDelete(); + case COLUMN: + return isSetColumn(); + case VALUE: + return isSetValue(); + case WRITE_TO_WAL: + return isSetWriteToWAL(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof Mutation) + return this.equals((Mutation)that); + return false; + } + + public boolean equals(Mutation that) { + if (that == null) + return false; + + boolean this_present_isDelete = true; + boolean that_present_isDelete = true; + if (this_present_isDelete || that_present_isDelete) { + if (!(this_present_isDelete && that_present_isDelete)) + return false; + if (this.isDelete != that.isDelete) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); + if (this_present_value || that_present_value) { + if (!(this_present_value && that_present_value)) + return false; + if (!this.value.equals(that.value)) + return false; + } + + boolean this_present_writeToWAL = true; + boolean that_present_writeToWAL = true; + if (this_present_writeToWAL || that_present_writeToWAL) { + if (!(this_present_writeToWAL && that_present_writeToWAL)) + return false; + if (this.writeToWAL != that.writeToWAL) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(Mutation other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + Mutation typedOther = (Mutation)other; + + lastComparison = Boolean.valueOf(isSetIsDelete()).compareTo(typedOther.isSetIsDelete()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetIsDelete()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDelete, typedOther.isDelete); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetWriteToWAL()).compareTo(typedOther.isSetWriteToWAL()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetWriteToWAL()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.writeToWAL, typedOther.writeToWAL); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("Mutation("); + boolean first = true; + + sb.append("isDelete:"); + sb.append(this.isDelete); + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + first = false; + if (!first) sb.append(", "); + sb.append("writeToWAL:"); + sb.append(this.writeToWAL); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class MutationStandardSchemeFactory implements SchemeFactory { + public MutationStandardScheme getScheme() { + return new MutationStandardScheme(); + } + } + + private static class MutationStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, Mutation struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // IS_DELETE + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.isDelete = iprot.readBool(); + struct.setIsDeleteIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // WRITE_TO_WAL + if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { + struct.writeToWAL = iprot.readBool(); + struct.setWriteToWALIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, Mutation struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + oprot.writeFieldBegin(IS_DELETE_FIELD_DESC); + oprot.writeBool(struct.isDelete); + oprot.writeFieldEnd(); + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(struct.value); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(WRITE_TO_WAL_FIELD_DESC); + oprot.writeBool(struct.writeToWAL); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class MutationTupleSchemeFactory implements SchemeFactory { + public MutationTupleScheme getScheme() { + return new MutationTupleScheme(); + } + } + + private static class MutationTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetIsDelete()) { + optionals.set(0); + } + if (struct.isSetColumn()) { + optionals.set(1); + } + if (struct.isSetValue()) { + optionals.set(2); + } + if (struct.isSetWriteToWAL()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetIsDelete()) { + oprot.writeBool(struct.isDelete); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetValue()) { + oprot.writeBinary(struct.value); + } + if (struct.isSetWriteToWAL()) { + oprot.writeBool(struct.writeToWAL); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, Mutation struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.isDelete = iprot.readBool(); + struct.setIsDeleteIsSet(true); + } + if (incoming.get(1)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(2)) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } + if (incoming.get(3)) { + struct.writeToWAL = iprot.readBool(); + struct.setWriteToWALIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java new file mode 100644 index 0000000..6ee8ca7 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java @@ -0,0 +1,497 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 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. + */ +public class TCell implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell"); + + private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TCellStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TCellTupleSchemeFactory()); + } + + public ByteBuffer value; // required + public long timestamp; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + VALUE((short)1, "value"), + TIMESTAMP((short)2, "timestamp"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // VALUE + return VALUE; + case 2: // TIMESTAMP + return TIMESTAMP; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCell.class, metaDataMap); + } + + public TCell() { + } + + public TCell( + ByteBuffer value, + long timestamp) + { + this(); + this.value = value; + this.timestamp = timestamp; + setTimestampIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TCell(TCell other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetValue()) { + this.value = other.value; + } + this.timestamp = other.timestamp; + } + + public TCell deepCopy() { + return new TCell(this); + } + + @Override + public void clear() { + this.value = null; + setTimestampIsSet(false); + this.timestamp = 0; + } + + public byte[] getValue() { + setValue(org.apache.thrift.TBaseHelper.rightSize(value)); + return value == null ? null : value.array(); + } + + public ByteBuffer bufferForValue() { + return value; + } + + public TCell setValue(byte[] value) { + setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value)); + return this; + } + + public TCell setValue(ByteBuffer value) { + this.value = value; + return this; + } + + public void unsetValue() { + this.value = null; + } + + /** Returns true if field value is set (has been assigned a value) and false otherwise */ + public boolean isSetValue() { + return this.value != null; + } + + public void setValueIsSet(boolean value) { + if (!value) { + this.value = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public TCell setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case VALUE: + if (value == null) { + unsetValue(); + } else { + setValue((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case VALUE: + return getValue(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case VALUE: + return isSetValue(); + case TIMESTAMP: + return isSetTimestamp(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TCell) + return this.equals((TCell)that); + return false; + } + + public boolean equals(TCell that) { + if (that == null) + return false; + + boolean this_present_value = true && this.isSetValue(); + boolean that_present_value = true && that.isSetValue(); + if (this_present_value || that_present_value) { + if (!(this_present_value && that_present_value)) + return false; + if (!this.value.equals(that.value)) + return false; + } + + boolean this_present_timestamp = true; + boolean that_present_timestamp = true; + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TCell other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TCell typedOther = (TCell)other; + + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetValue()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TCell("); + boolean first = true; + + sb.append("value:"); + if (this.value == null) { + sb.append("null"); + } else { + sb.append(this.value); + } + first = false; + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TCellStandardSchemeFactory implements SchemeFactory { + public TCellStandardScheme getScheme() { + return new TCellStandardScheme(); + } + } + + private static class TCellStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TCell struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // VALUE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TCell struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.value != null) { + oprot.writeFieldBegin(VALUE_FIELD_DESC); + oprot.writeBinary(struct.value); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TCellTupleSchemeFactory implements SchemeFactory { + public TCellTupleScheme getScheme() { + return new TCellTupleScheme(); + } + } + + private static class TCellTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TCell struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetValue()) { + optionals.set(0); + } + if (struct.isSetTimestamp()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetValue()) { + oprot.writeBinary(struct.value); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TCell struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.value = iprot.readBinary(); + struct.setValueIsSet(true); + } + if (incoming.get(1)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java new file mode 100644 index 0000000..6d24aa0 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TIncrement.java @@ -0,0 +1,715 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * For increments that are not incrementColumnValue + * equivalents. + */ +public class TIncrement implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TIncrement"); + + private static final org.apache.thrift.protocol.TField TABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("table", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)3); + private static final org.apache.thrift.protocol.TField AMMOUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("ammount", org.apache.thrift.protocol.TType.I64, (short)4); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TIncrementStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TIncrementTupleSchemeFactory()); + } + + public ByteBuffer table; // required + public ByteBuffer row; // required + public ByteBuffer column; // required + public long ammount; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + TABLE((short)1, "table"), + ROW((short)2, "row"), + COLUMN((short)3, "column"), + AMMOUNT((short)4, "ammount"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // TABLE + return TABLE; + case 2: // ROW + return ROW; + case 3: // COLUMN + return COLUMN; + case 4: // AMMOUNT + return AMMOUNT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __AMMOUNT_ISSET_ID = 0; + private BitSet __isset_bit_vector = new BitSet(1); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TABLE, new org.apache.thrift.meta_data.FieldMetaData("table", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.AMMOUNT, new org.apache.thrift.meta_data.FieldMetaData("ammount", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TIncrement.class, metaDataMap); + } + + public TIncrement() { + } + + public TIncrement( + ByteBuffer table, + ByteBuffer row, + ByteBuffer column, + long ammount) + { + this(); + this.table = table; + this.row = row; + this.column = column; + this.ammount = ammount; + setAmmountIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TIncrement(TIncrement other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetTable()) { + this.table = other.table; + } + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumn()) { + this.column = other.column; + } + this.ammount = other.ammount; + } + + public TIncrement deepCopy() { + return new TIncrement(this); + } + + @Override + public void clear() { + this.table = null; + this.row = null; + this.column = null; + setAmmountIsSet(false); + this.ammount = 0; + } + + public byte[] getTable() { + setTable(org.apache.thrift.TBaseHelper.rightSize(table)); + return table == null ? null : table.array(); + } + + public ByteBuffer bufferForTable() { + return table; + } + + public TIncrement setTable(byte[] table) { + setTable(table == null ? (ByteBuffer)null : ByteBuffer.wrap(table)); + return this; + } + + public TIncrement setTable(ByteBuffer table) { + this.table = table; + return this; + } + + public void unsetTable() { + this.table = null; + } + + /** Returns true if field table is set (has been assigned a value) and false otherwise */ + public boolean isSetTable() { + return this.table != null; + } + + public void setTableIsSet(boolean value) { + if (!value) { + this.table = null; + } + } + + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + public TIncrement setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public TIncrement setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public byte[] getColumn() { + setColumn(org.apache.thrift.TBaseHelper.rightSize(column)); + return column == null ? null : column.array(); + } + + public ByteBuffer bufferForColumn() { + return column; + } + + public TIncrement setColumn(byte[] column) { + setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column)); + return this; + } + + public TIncrement setColumn(ByteBuffer column) { + this.column = column; + return this; + } + + public void unsetColumn() { + this.column = null; + } + + /** Returns true if field column is set (has been assigned a value) and false otherwise */ + public boolean isSetColumn() { + return this.column != null; + } + + public void setColumnIsSet(boolean value) { + if (!value) { + this.column = null; + } + } + + public long getAmmount() { + return this.ammount; + } + + public TIncrement setAmmount(long ammount) { + this.ammount = ammount; + setAmmountIsSet(true); + return this; + } + + public void unsetAmmount() { + __isset_bit_vector.clear(__AMMOUNT_ISSET_ID); + } + + /** Returns true if field ammount is set (has been assigned a value) and false otherwise */ + public boolean isSetAmmount() { + return __isset_bit_vector.get(__AMMOUNT_ISSET_ID); + } + + public void setAmmountIsSet(boolean value) { + __isset_bit_vector.set(__AMMOUNT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case TABLE: + if (value == null) { + unsetTable(); + } else { + setTable((ByteBuffer)value); + } + break; + + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMN: + if (value == null) { + unsetColumn(); + } else { + setColumn((ByteBuffer)value); + } + break; + + case AMMOUNT: + if (value == null) { + unsetAmmount(); + } else { + setAmmount((Long)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case TABLE: + return getTable(); + + case ROW: + return getRow(); + + case COLUMN: + return getColumn(); + + case AMMOUNT: + return Long.valueOf(getAmmount()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case TABLE: + return isSetTable(); + case ROW: + return isSetRow(); + case COLUMN: + return isSetColumn(); + case AMMOUNT: + return isSetAmmount(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TIncrement) + return this.equals((TIncrement)that); + return false; + } + + public boolean equals(TIncrement that) { + if (that == null) + return false; + + boolean this_present_table = true && this.isSetTable(); + boolean that_present_table = true && that.isSetTable(); + if (this_present_table || that_present_table) { + if (!(this_present_table && that_present_table)) + return false; + if (!this.table.equals(that.table)) + return false; + } + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_column = true && this.isSetColumn(); + boolean that_present_column = true && that.isSetColumn(); + if (this_present_column || that_present_column) { + if (!(this_present_column && that_present_column)) + return false; + if (!this.column.equals(that.column)) + return false; + } + + boolean this_present_ammount = true; + boolean that_present_ammount = true; + if (this_present_ammount || that_present_ammount) { + if (!(this_present_ammount && that_present_ammount)) + return false; + if (this.ammount != that.ammount) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TIncrement other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TIncrement typedOther = (TIncrement)other; + + lastComparison = Boolean.valueOf(isSetTable()).compareTo(typedOther.isSetTable()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTable()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.table, typedOther.table); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumn()).compareTo(typedOther.isSetColumn()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumn()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetAmmount()).compareTo(typedOther.isSetAmmount()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetAmmount()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ammount, typedOther.ammount); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TIncrement("); + boolean first = true; + + sb.append("table:"); + if (this.table == null) { + sb.append("null"); + } else { + sb.append(this.table); + } + first = false; + if (!first) sb.append(", "); + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("column:"); + if (this.column == null) { + sb.append("null"); + } else { + sb.append(this.column); + } + first = false; + if (!first) sb.append(", "); + sb.append("ammount:"); + sb.append(this.ammount); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TIncrementStandardSchemeFactory implements SchemeFactory { + public TIncrementStandardScheme getScheme() { + return new TIncrementStandardScheme(); + } + } + + private static class TIncrementStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TIncrement struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // TABLE + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // COLUMN + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // AMMOUNT + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.ammount = iprot.readI64(); + struct.setAmmountIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TIncrement struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.table != null) { + oprot.writeFieldBegin(TABLE_FIELD_DESC); + oprot.writeBinary(struct.table); + oprot.writeFieldEnd(); + } + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.column != null) { + oprot.writeFieldBegin(COLUMN_FIELD_DESC); + oprot.writeBinary(struct.column); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(AMMOUNT_FIELD_DESC); + oprot.writeI64(struct.ammount); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TIncrementTupleSchemeFactory implements SchemeFactory { + public TIncrementTupleScheme getScheme() { + return new TIncrementTupleScheme(); + } + } + + private static class TIncrementTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetTable()) { + optionals.set(0); + } + if (struct.isSetRow()) { + optionals.set(1); + } + if (struct.isSetColumn()) { + optionals.set(2); + } + if (struct.isSetAmmount()) { + optionals.set(3); + } + oprot.writeBitSet(optionals, 4); + if (struct.isSetTable()) { + oprot.writeBinary(struct.table); + } + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumn()) { + oprot.writeBinary(struct.column); + } + if (struct.isSetAmmount()) { + oprot.writeI64(struct.ammount); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TIncrement struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(4); + if (incoming.get(0)) { + struct.table = iprot.readBinary(); + struct.setTableIsSet(true); + } + if (incoming.get(1)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(2)) { + struct.column = iprot.readBinary(); + struct.setColumnIsSet(true); + } + if (incoming.get(3)) { + struct.ammount = iprot.readI64(); + struct.setAmmountIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java new file mode 100644 index 0000000..ed251e8 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java @@ -0,0 +1,1012 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A TRegionInfo contains information about an HTable region. + */ +public class TRegionInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo"); + + private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("startKey", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField END_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("endKey", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)4); + private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)5); + private static final org.apache.thrift.protocol.TField SERVER_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("serverName", org.apache.thrift.protocol.TType.STRING, (short)6); + private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)7); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TRegionInfoStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TRegionInfoTupleSchemeFactory()); + } + + public ByteBuffer startKey; // required + public ByteBuffer endKey; // required + public long id; // required + public ByteBuffer name; // required + public byte version; // required + public ByteBuffer serverName; // required + public int port; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + START_KEY((short)1, "startKey"), + END_KEY((short)2, "endKey"), + ID((short)3, "id"), + NAME((short)4, "name"), + VERSION((short)5, "version"), + SERVER_NAME((short)6, "serverName"), + PORT((short)7, "port"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // START_KEY + return START_KEY; + case 2: // END_KEY + return END_KEY; + case 3: // ID + return ID; + case 4: // NAME + return NAME; + case 5: // VERSION + return VERSION; + case 6: // SERVER_NAME + return SERVER_NAME; + case 7: // PORT + return PORT; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __ID_ISSET_ID = 0; + private static final int __VERSION_ISSET_ID = 1; + private static final int __PORT_ISSET_ID = 2; + private BitSet __isset_bit_vector = new BitSet(3); + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("startKey", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.END_KEY, new org.apache.thrift.meta_data.FieldMetaData("endKey", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE))); + tmpMap.put(_Fields.SERVER_NAME, new org.apache.thrift.meta_data.FieldMetaData("serverName", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap); + } + + public TRegionInfo() { + } + + public TRegionInfo( + ByteBuffer startKey, + ByteBuffer endKey, + long id, + ByteBuffer name, + byte version, + ByteBuffer serverName, + int port) + { + this(); + this.startKey = startKey; + this.endKey = endKey; + this.id = id; + setIdIsSet(true); + this.name = name; + this.version = version; + setVersionIsSet(true); + this.serverName = serverName; + this.port = port; + setPortIsSet(true); + } + + /** + * Performs a deep copy on other. + */ + public TRegionInfo(TRegionInfo other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetStartKey()) { + this.startKey = other.startKey; + } + if (other.isSetEndKey()) { + this.endKey = other.endKey; + } + this.id = other.id; + if (other.isSetName()) { + this.name = other.name; + } + this.version = other.version; + if (other.isSetServerName()) { + this.serverName = other.serverName; + } + this.port = other.port; + } + + public TRegionInfo deepCopy() { + return new TRegionInfo(this); + } + + @Override + public void clear() { + this.startKey = null; + this.endKey = null; + setIdIsSet(false); + this.id = 0; + this.name = null; + setVersionIsSet(false); + this.version = 0; + this.serverName = null; + setPortIsSet(false); + this.port = 0; + } + + public byte[] getStartKey() { + setStartKey(org.apache.thrift.TBaseHelper.rightSize(startKey)); + return startKey == null ? null : startKey.array(); + } + + public ByteBuffer bufferForStartKey() { + return startKey; + } + + public TRegionInfo setStartKey(byte[] startKey) { + setStartKey(startKey == null ? (ByteBuffer)null : ByteBuffer.wrap(startKey)); + return this; + } + + public TRegionInfo setStartKey(ByteBuffer startKey) { + this.startKey = startKey; + return this; + } + + public void unsetStartKey() { + this.startKey = null; + } + + /** Returns true if field startKey is set (has been assigned a value) and false otherwise */ + public boolean isSetStartKey() { + return this.startKey != null; + } + + public void setStartKeyIsSet(boolean value) { + if (!value) { + this.startKey = null; + } + } + + public byte[] getEndKey() { + setEndKey(org.apache.thrift.TBaseHelper.rightSize(endKey)); + return endKey == null ? null : endKey.array(); + } + + public ByteBuffer bufferForEndKey() { + return endKey; + } + + public TRegionInfo setEndKey(byte[] endKey) { + setEndKey(endKey == null ? (ByteBuffer)null : ByteBuffer.wrap(endKey)); + return this; + } + + public TRegionInfo setEndKey(ByteBuffer endKey) { + this.endKey = endKey; + return this; + } + + public void unsetEndKey() { + this.endKey = null; + } + + /** Returns true if field endKey is set (has been assigned a value) and false otherwise */ + public boolean isSetEndKey() { + return this.endKey != null; + } + + public void setEndKeyIsSet(boolean value) { + if (!value) { + this.endKey = null; + } + } + + public long getId() { + return this.id; + } + + public TRegionInfo setId(long id) { + this.id = id; + setIdIsSet(true); + return this; + } + + public void unsetId() { + __isset_bit_vector.clear(__ID_ISSET_ID); + } + + /** Returns true if field id is set (has been assigned a value) and false otherwise */ + public boolean isSetId() { + return __isset_bit_vector.get(__ID_ISSET_ID); + } + + public void setIdIsSet(boolean value) { + __isset_bit_vector.set(__ID_ISSET_ID, value); + } + + public byte[] getName() { + setName(org.apache.thrift.TBaseHelper.rightSize(name)); + return name == null ? null : name.array(); + } + + public ByteBuffer bufferForName() { + return name; + } + + public TRegionInfo setName(byte[] name) { + setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name)); + return this; + } + + public TRegionInfo setName(ByteBuffer name) { + this.name = name; + return this; + } + + public void unsetName() { + this.name = null; + } + + /** Returns true if field name is set (has been assigned a value) and false otherwise */ + public boolean isSetName() { + return this.name != null; + } + + public void setNameIsSet(boolean value) { + if (!value) { + this.name = null; + } + } + + public byte getVersion() { + return this.version; + } + + public TRegionInfo setVersion(byte version) { + this.version = version; + setVersionIsSet(true); + return this; + } + + public void unsetVersion() { + __isset_bit_vector.clear(__VERSION_ISSET_ID); + } + + /** Returns true if field version is set (has been assigned a value) and false otherwise */ + public boolean isSetVersion() { + return __isset_bit_vector.get(__VERSION_ISSET_ID); + } + + public void setVersionIsSet(boolean value) { + __isset_bit_vector.set(__VERSION_ISSET_ID, value); + } + + public byte[] getServerName() { + setServerName(org.apache.thrift.TBaseHelper.rightSize(serverName)); + return serverName == null ? null : serverName.array(); + } + + public ByteBuffer bufferForServerName() { + return serverName; + } + + public TRegionInfo setServerName(byte[] serverName) { + setServerName(serverName == null ? (ByteBuffer)null : ByteBuffer.wrap(serverName)); + return this; + } + + public TRegionInfo setServerName(ByteBuffer serverName) { + this.serverName = serverName; + return this; + } + + public void unsetServerName() { + this.serverName = null; + } + + /** Returns true if field serverName is set (has been assigned a value) and false otherwise */ + public boolean isSetServerName() { + return this.serverName != null; + } + + public void setServerNameIsSet(boolean value) { + if (!value) { + this.serverName = null; + } + } + + public int getPort() { + return this.port; + } + + public TRegionInfo setPort(int port) { + this.port = port; + setPortIsSet(true); + return this; + } + + public void unsetPort() { + __isset_bit_vector.clear(__PORT_ISSET_ID); + } + + /** Returns true if field port is set (has been assigned a value) and false otherwise */ + public boolean isSetPort() { + return __isset_bit_vector.get(__PORT_ISSET_ID); + } + + public void setPortIsSet(boolean value) { + __isset_bit_vector.set(__PORT_ISSET_ID, value); + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case START_KEY: + if (value == null) { + unsetStartKey(); + } else { + setStartKey((ByteBuffer)value); + } + break; + + case END_KEY: + if (value == null) { + unsetEndKey(); + } else { + setEndKey((ByteBuffer)value); + } + break; + + case ID: + if (value == null) { + unsetId(); + } else { + setId((Long)value); + } + break; + + case NAME: + if (value == null) { + unsetName(); + } else { + setName((ByteBuffer)value); + } + break; + + case VERSION: + if (value == null) { + unsetVersion(); + } else { + setVersion((Byte)value); + } + break; + + case SERVER_NAME: + if (value == null) { + unsetServerName(); + } else { + setServerName((ByteBuffer)value); + } + break; + + case PORT: + if (value == null) { + unsetPort(); + } else { + setPort((Integer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case START_KEY: + return getStartKey(); + + case END_KEY: + return getEndKey(); + + case ID: + return Long.valueOf(getId()); + + case NAME: + return getName(); + + case VERSION: + return Byte.valueOf(getVersion()); + + case SERVER_NAME: + return getServerName(); + + case PORT: + return Integer.valueOf(getPort()); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case START_KEY: + return isSetStartKey(); + case END_KEY: + return isSetEndKey(); + case ID: + return isSetId(); + case NAME: + return isSetName(); + case VERSION: + return isSetVersion(); + case SERVER_NAME: + return isSetServerName(); + case PORT: + return isSetPort(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TRegionInfo) + return this.equals((TRegionInfo)that); + return false; + } + + public boolean equals(TRegionInfo that) { + if (that == null) + return false; + + boolean this_present_startKey = true && this.isSetStartKey(); + boolean that_present_startKey = true && that.isSetStartKey(); + if (this_present_startKey || that_present_startKey) { + if (!(this_present_startKey && that_present_startKey)) + return false; + if (!this.startKey.equals(that.startKey)) + return false; + } + + boolean this_present_endKey = true && this.isSetEndKey(); + boolean that_present_endKey = true && that.isSetEndKey(); + if (this_present_endKey || that_present_endKey) { + if (!(this_present_endKey && that_present_endKey)) + return false; + if (!this.endKey.equals(that.endKey)) + return false; + } + + boolean this_present_id = true; + boolean that_present_id = true; + if (this_present_id || that_present_id) { + if (!(this_present_id && that_present_id)) + return false; + if (this.id != that.id) + return false; + } + + boolean this_present_name = true && this.isSetName(); + boolean that_present_name = true && that.isSetName(); + if (this_present_name || that_present_name) { + if (!(this_present_name && that_present_name)) + return false; + if (!this.name.equals(that.name)) + return false; + } + + boolean this_present_version = true; + boolean that_present_version = true; + if (this_present_version || that_present_version) { + if (!(this_present_version && that_present_version)) + return false; + if (this.version != that.version) + return false; + } + + boolean this_present_serverName = true && this.isSetServerName(); + boolean that_present_serverName = true && that.isSetServerName(); + if (this_present_serverName || that_present_serverName) { + if (!(this_present_serverName && that_present_serverName)) + return false; + if (!this.serverName.equals(that.serverName)) + return false; + } + + boolean this_present_port = true; + boolean that_present_port = true; + if (this_present_port || that_present_port) { + if (!(this_present_port && that_present_port)) + return false; + if (this.port != that.port) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TRegionInfo other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TRegionInfo typedOther = (TRegionInfo)other; + + lastComparison = Boolean.valueOf(isSetStartKey()).compareTo(typedOther.isSetStartKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, typedOther.startKey); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetEndKey()).compareTo(typedOther.isSetEndKey()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetEndKey()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, typedOther.endKey); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetId()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetName()).compareTo(typedOther.isSetName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetVersion()).compareTo(typedOther.isSetVersion()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetVersion()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, typedOther.version); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetServerName()).compareTo(typedOther.isSetServerName()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetServerName()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverName, typedOther.serverName); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetPort()).compareTo(typedOther.isSetPort()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetPort()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, typedOther.port); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TRegionInfo("); + boolean first = true; + + sb.append("startKey:"); + if (this.startKey == null) { + sb.append("null"); + } else { + sb.append(this.startKey); + } + first = false; + if (!first) sb.append(", "); + sb.append("endKey:"); + if (this.endKey == null) { + sb.append("null"); + } else { + sb.append(this.endKey); + } + first = false; + if (!first) sb.append(", "); + sb.append("id:"); + sb.append(this.id); + first = false; + if (!first) sb.append(", "); + sb.append("name:"); + if (this.name == null) { + sb.append("null"); + } else { + sb.append(this.name); + } + first = false; + if (!first) sb.append(", "); + sb.append("version:"); + sb.append(this.version); + first = false; + if (!first) sb.append(", "); + sb.append("serverName:"); + if (this.serverName == null) { + sb.append("null"); + } else { + sb.append(this.serverName); + } + first = false; + if (!first) sb.append(", "); + sb.append("port:"); + sb.append(this.port); + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TRegionInfoStandardSchemeFactory implements SchemeFactory { + public TRegionInfoStandardScheme getScheme() { + return new TRegionInfoStandardScheme(); + } + } + + private static class TRegionInfoStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TRegionInfo struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // START_KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startKey = iprot.readBinary(); + struct.setStartKeyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // END_KEY + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.endKey = iprot.readBinary(); + struct.setEndKeyIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // ID + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // VERSION + if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // SERVER_NAME + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.serverName = iprot.readBinary(); + struct.setServerNameIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 7: // PORT + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.port = iprot.readI32(); + struct.setPortIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TRegionInfo struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.startKey != null) { + oprot.writeFieldBegin(START_KEY_FIELD_DESC); + oprot.writeBinary(struct.startKey); + oprot.writeFieldEnd(); + } + if (struct.endKey != null) { + oprot.writeFieldBegin(END_KEY_FIELD_DESC); + oprot.writeBinary(struct.endKey); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(ID_FIELD_DESC); + oprot.writeI64(struct.id); + oprot.writeFieldEnd(); + if (struct.name != null) { + oprot.writeFieldBegin(NAME_FIELD_DESC); + oprot.writeBinary(struct.name); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(VERSION_FIELD_DESC); + oprot.writeByte(struct.version); + oprot.writeFieldEnd(); + if (struct.serverName != null) { + oprot.writeFieldBegin(SERVER_NAME_FIELD_DESC); + oprot.writeBinary(struct.serverName); + oprot.writeFieldEnd(); + } + oprot.writeFieldBegin(PORT_FIELD_DESC); + oprot.writeI32(struct.port); + oprot.writeFieldEnd(); + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TRegionInfoTupleSchemeFactory implements SchemeFactory { + public TRegionInfoTupleScheme getScheme() { + return new TRegionInfoTupleScheme(); + } + } + + private static class TRegionInfoTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TRegionInfo struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStartKey()) { + optionals.set(0); + } + if (struct.isSetEndKey()) { + optionals.set(1); + } + if (struct.isSetId()) { + optionals.set(2); + } + if (struct.isSetName()) { + optionals.set(3); + } + if (struct.isSetVersion()) { + optionals.set(4); + } + if (struct.isSetServerName()) { + optionals.set(5); + } + if (struct.isSetPort()) { + optionals.set(6); + } + oprot.writeBitSet(optionals, 7); + if (struct.isSetStartKey()) { + oprot.writeBinary(struct.startKey); + } + if (struct.isSetEndKey()) { + oprot.writeBinary(struct.endKey); + } + if (struct.isSetId()) { + oprot.writeI64(struct.id); + } + if (struct.isSetName()) { + oprot.writeBinary(struct.name); + } + if (struct.isSetVersion()) { + oprot.writeByte(struct.version); + } + if (struct.isSetServerName()) { + oprot.writeBinary(struct.serverName); + } + if (struct.isSetPort()) { + oprot.writeI32(struct.port); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TRegionInfo struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(7); + if (incoming.get(0)) { + struct.startKey = iprot.readBinary(); + struct.setStartKeyIsSet(true); + } + if (incoming.get(1)) { + struct.endKey = iprot.readBinary(); + struct.setEndKeyIsSet(true); + } + if (incoming.get(2)) { + struct.id = iprot.readI64(); + struct.setIdIsSet(true); + } + if (incoming.get(3)) { + struct.name = iprot.readBinary(); + struct.setNameIsSet(true); + } + if (incoming.get(4)) { + struct.version = iprot.readByte(); + struct.setVersionIsSet(true); + } + if (incoming.get(5)) { + struct.serverName = iprot.readBinary(); + struct.setServerNameIsSet(true); + } + if (incoming.get(6)) { + struct.port = iprot.readI32(); + struct.setPortIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java new file mode 100644 index 0000000..e1709b5 --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java @@ -0,0 +1,560 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * Holds row name and then a map of columns to cells. + */ +public class TRowResult implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult"); + + private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.MAP, (short)2); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TRowResultStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TRowResultTupleSchemeFactory()); + } + + public ByteBuffer row; // required + public Map columns; // required + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + ROW((short)1, "row"), + COLUMNS((short)2, "columns"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // ROW + return ROW; + case 2: // COLUMNS + return COLUMNS; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"), + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class)))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap); + } + + public TRowResult() { + } + + public TRowResult( + ByteBuffer row, + Map columns) + { + this(); + this.row = row; + this.columns = columns; + } + + /** + * Performs a deep copy on other. + */ + public TRowResult(TRowResult other) { + if (other.isSetRow()) { + this.row = other.row; + } + if (other.isSetColumns()) { + Map __this__columns = new HashMap(); + for (Map.Entry other_element : other.columns.entrySet()) { + + ByteBuffer other_element_key = other_element.getKey(); + TCell other_element_value = other_element.getValue(); + + ByteBuffer __this__columns_copy_key = other_element_key; + + TCell __this__columns_copy_value = new TCell(other_element_value); + + __this__columns.put(__this__columns_copy_key, __this__columns_copy_value); + } + this.columns = __this__columns; + } + } + + public TRowResult deepCopy() { + return new TRowResult(this); + } + + @Override + public void clear() { + this.row = null; + this.columns = null; + } + + public byte[] getRow() { + setRow(org.apache.thrift.TBaseHelper.rightSize(row)); + return row == null ? null : row.array(); + } + + public ByteBuffer bufferForRow() { + return row; + } + + public TRowResult setRow(byte[] row) { + setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row)); + return this; + } + + public TRowResult setRow(ByteBuffer row) { + this.row = row; + return this; + } + + public void unsetRow() { + this.row = null; + } + + /** Returns true if field row is set (has been assigned a value) and false otherwise */ + public boolean isSetRow() { + return this.row != null; + } + + public void setRowIsSet(boolean value) { + if (!value) { + this.row = null; + } + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public void putToColumns(ByteBuffer key, TCell val) { + if (this.columns == null) { + this.columns = new HashMap(); + } + this.columns.put(key, val); + } + + public Map getColumns() { + return this.columns; + } + + public TRowResult setColumns(Map columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case ROW: + if (value == null) { + unsetRow(); + } else { + setRow((ByteBuffer)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((Map)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case ROW: + return getRow(); + + case COLUMNS: + return getColumns(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case ROW: + return isSetRow(); + case COLUMNS: + return isSetColumns(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TRowResult) + return this.equals((TRowResult)that); + return false; + } + + public boolean equals(TRowResult that) { + if (that == null) + return false; + + boolean this_present_row = true && this.isSetRow(); + boolean that_present_row = true && that.isSetRow(); + if (this_present_row || that_present_row) { + if (!(this_present_row && that_present_row)) + return false; + if (!this.row.equals(that.row)) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TRowResult other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TRowResult typedOther = (TRowResult)other; + + lastComparison = Boolean.valueOf(isSetRow()).compareTo(typedOther.isSetRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TRowResult("); + boolean first = true; + + sb.append("row:"); + if (this.row == null) { + sb.append("null"); + } else { + sb.append(this.row); + } + first = false; + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TRowResultStandardSchemeFactory implements SchemeFactory { + public TRowResultStandardScheme getScheme() { + return new TRowResultStandardScheme(); + } + } + + private static class TRowResultStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TRowResult struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.MAP) { + { + org.apache.thrift.protocol.TMap _map8 = iprot.readMapBegin(); + struct.columns = new HashMap(2*_map8.size); + for (int _i9 = 0; _i9 < _map8.size; ++_i9) + { + ByteBuffer _key10; // required + TCell _val11; // required + _key10 = iprot.readBinary(); + _val11 = new TCell(); + _val11.read(iprot); + struct.columns.put(_key10, _val11); + } + iprot.readMapEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TRowResult struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.row != null) { + oprot.writeFieldBegin(ROW_FIELD_DESC); + oprot.writeBinary(struct.row); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.columns.size())); + for (Map.Entry _iter12 : struct.columns.entrySet()) + { + oprot.writeBinary(_iter12.getKey()); + _iter12.getValue().write(oprot); + } + oprot.writeMapEnd(); + } + oprot.writeFieldEnd(); + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TRowResultTupleSchemeFactory implements SchemeFactory { + public TRowResultTupleScheme getScheme() { + return new TRowResultTupleScheme(); + } + } + + private static class TRowResultTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetRow()) { + optionals.set(0); + } + if (struct.isSetColumns()) { + optionals.set(1); + } + oprot.writeBitSet(optionals, 2); + if (struct.isSetRow()) { + oprot.writeBinary(struct.row); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (Map.Entry _iter13 : struct.columns.entrySet()) + { + oprot.writeBinary(_iter13.getKey()); + _iter13.getValue().write(oprot); + } + } + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TRowResult struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(2); + if (incoming.get(0)) { + struct.row = iprot.readBinary(); + struct.setRowIsSet(true); + } + if (incoming.get(1)) { + { + org.apache.thrift.protocol.TMap _map14 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); + struct.columns = new HashMap(2*_map14.size); + for (int _i15 = 0; _i15 < _map14.size; ++_i15) + { + ByteBuffer _key16; // required + TCell _val17; // required + _key16 = iprot.readBinary(); + _val17 = new TCell(); + _val17.read(iprot); + struct.columns.put(_key16, _val17); + } + } + struct.setColumnsIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java new file mode 100644 index 0000000..f7cc05d --- /dev/null +++ hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/generated/TScan.java @@ -0,0 +1,966 @@ +/** + * Autogenerated by Thrift Compiler (0.8.0) + * + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * @generated + */ +package org.apache.hadoop.hbase.thrift.generated; + +import org.apache.thrift.scheme.IScheme; +import org.apache.thrift.scheme.SchemeFactory; +import org.apache.thrift.scheme.StandardScheme; + +import org.apache.thrift.scheme.TupleScheme; +import org.apache.thrift.protocol.TTupleProtocol; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.util.HashMap; +import java.util.EnumMap; +import java.util.Set; +import java.util.HashSet; +import java.util.EnumSet; +import java.util.Collections; +import java.util.BitSet; +import java.nio.ByteBuffer; +import java.util.Arrays; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * A Scan object is used to specify scanner parameters when opening a scanner. + */ +public class TScan implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TScan"); + + private static final org.apache.thrift.protocol.TField START_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("startRow", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField STOP_ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("stopRow", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)3); + private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField CACHING_FIELD_DESC = new org.apache.thrift.protocol.TField("caching", org.apache.thrift.protocol.TType.I32, (short)5); + private static final org.apache.thrift.protocol.TField FILTER_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("filterString", org.apache.thrift.protocol.TType.STRING, (short)6); + + private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); + static { + schemes.put(StandardScheme.class, new TScanStandardSchemeFactory()); + schemes.put(TupleScheme.class, new TScanTupleSchemeFactory()); + } + + public ByteBuffer startRow; // optional + public ByteBuffer stopRow; // optional + public long timestamp; // optional + public List columns; // optional + public int caching; // optional + public ByteBuffer filterString; // optional + + /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ + public enum _Fields implements org.apache.thrift.TFieldIdEnum { + START_ROW((short)1, "startRow"), + STOP_ROW((short)2, "stopRow"), + TIMESTAMP((short)3, "timestamp"), + COLUMNS((short)4, "columns"), + CACHING((short)5, "caching"), + FILTER_STRING((short)6, "filterString"); + + private static final Map byName = new HashMap(); + + static { + for (_Fields field : EnumSet.allOf(_Fields.class)) { + byName.put(field.getFieldName(), field); + } + } + + /** + * Find the _Fields constant that matches fieldId, or null if its not found. + */ + public static _Fields findByThriftId(int fieldId) { + switch(fieldId) { + case 1: // START_ROW + return START_ROW; + case 2: // STOP_ROW + return STOP_ROW; + case 3: // TIMESTAMP + return TIMESTAMP; + case 4: // COLUMNS + return COLUMNS; + case 5: // CACHING + return CACHING; + case 6: // FILTER_STRING + return FILTER_STRING; + default: + return null; + } + } + + /** + * Find the _Fields constant that matches fieldId, throwing an exception + * if it is not found. + */ + public static _Fields findByThriftIdOrThrow(int fieldId) { + _Fields fields = findByThriftId(fieldId); + if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); + return fields; + } + + /** + * Find the _Fields constant that matches name, or null if its not found. + */ + public static _Fields findByName(String name) { + return byName.get(name); + } + + private final short _thriftId; + private final String _fieldName; + + _Fields(short thriftId, String fieldName) { + _thriftId = thriftId; + _fieldName = fieldName; + } + + public short getThriftFieldId() { + return _thriftId; + } + + public String getFieldName() { + return _fieldName; + } + } + + // isset id assignments + private static final int __TIMESTAMP_ISSET_ID = 0; + private static final int __CACHING_ISSET_ID = 1; + private BitSet __isset_bit_vector = new BitSet(2); + private _Fields optionals[] = {_Fields.START_ROW,_Fields.STOP_ROW,_Fields.TIMESTAMP,_Fields.COLUMNS,_Fields.CACHING,_Fields.FILTER_STRING}; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; + static { + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.START_ROW, new org.apache.thrift.meta_data.FieldMetaData("startRow", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.STOP_ROW, new org.apache.thrift.meta_data.FieldMetaData("stopRow", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); + tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")))); + tmpMap.put(_Fields.CACHING, new org.apache.thrift.meta_data.FieldMetaData("caching", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FILTER_STRING, new org.apache.thrift.meta_data.FieldMetaData("filterString", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"))); + metaDataMap = Collections.unmodifiableMap(tmpMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TScan.class, metaDataMap); + } + + public TScan() { + } + + /** + * Performs a deep copy on other. + */ + public TScan(TScan other) { + __isset_bit_vector.clear(); + __isset_bit_vector.or(other.__isset_bit_vector); + if (other.isSetStartRow()) { + this.startRow = other.startRow; + } + if (other.isSetStopRow()) { + this.stopRow = other.stopRow; + } + this.timestamp = other.timestamp; + if (other.isSetColumns()) { + List __this__columns = new ArrayList(); + for (ByteBuffer other_element : other.columns) { + __this__columns.add(other_element); + } + this.columns = __this__columns; + } + this.caching = other.caching; + if (other.isSetFilterString()) { + this.filterString = other.filterString; + } + } + + public TScan deepCopy() { + return new TScan(this); + } + + @Override + public void clear() { + this.startRow = null; + this.stopRow = null; + setTimestampIsSet(false); + this.timestamp = 0; + this.columns = null; + setCachingIsSet(false); + this.caching = 0; + this.filterString = null; + } + + public byte[] getStartRow() { + setStartRow(org.apache.thrift.TBaseHelper.rightSize(startRow)); + return startRow == null ? null : startRow.array(); + } + + public ByteBuffer bufferForStartRow() { + return startRow; + } + + public TScan setStartRow(byte[] startRow) { + setStartRow(startRow == null ? (ByteBuffer)null : ByteBuffer.wrap(startRow)); + return this; + } + + public TScan setStartRow(ByteBuffer startRow) { + this.startRow = startRow; + return this; + } + + public void unsetStartRow() { + this.startRow = null; + } + + /** Returns true if field startRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStartRow() { + return this.startRow != null; + } + + public void setStartRowIsSet(boolean value) { + if (!value) { + this.startRow = null; + } + } + + public byte[] getStopRow() { + setStopRow(org.apache.thrift.TBaseHelper.rightSize(stopRow)); + return stopRow == null ? null : stopRow.array(); + } + + public ByteBuffer bufferForStopRow() { + return stopRow; + } + + public TScan setStopRow(byte[] stopRow) { + setStopRow(stopRow == null ? (ByteBuffer)null : ByteBuffer.wrap(stopRow)); + return this; + } + + public TScan setStopRow(ByteBuffer stopRow) { + this.stopRow = stopRow; + return this; + } + + public void unsetStopRow() { + this.stopRow = null; + } + + /** Returns true if field stopRow is set (has been assigned a value) and false otherwise */ + public boolean isSetStopRow() { + return this.stopRow != null; + } + + public void setStopRowIsSet(boolean value) { + if (!value) { + this.stopRow = null; + } + } + + public long getTimestamp() { + return this.timestamp; + } + + public TScan setTimestamp(long timestamp) { + this.timestamp = timestamp; + setTimestampIsSet(true); + return this; + } + + public void unsetTimestamp() { + __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID); + } + + /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */ + public boolean isSetTimestamp() { + return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID); + } + + public void setTimestampIsSet(boolean value) { + __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value); + } + + public int getColumnsSize() { + return (this.columns == null) ? 0 : this.columns.size(); + } + + public java.util.Iterator getColumnsIterator() { + return (this.columns == null) ? null : this.columns.iterator(); + } + + public void addToColumns(ByteBuffer elem) { + if (this.columns == null) { + this.columns = new ArrayList(); + } + this.columns.add(elem); + } + + public List getColumns() { + return this.columns; + } + + public TScan setColumns(List columns) { + this.columns = columns; + return this; + } + + public void unsetColumns() { + this.columns = null; + } + + /** Returns true if field columns is set (has been assigned a value) and false otherwise */ + public boolean isSetColumns() { + return this.columns != null; + } + + public void setColumnsIsSet(boolean value) { + if (!value) { + this.columns = null; + } + } + + public int getCaching() { + return this.caching; + } + + public TScan setCaching(int caching) { + this.caching = caching; + setCachingIsSet(true); + return this; + } + + public void unsetCaching() { + __isset_bit_vector.clear(__CACHING_ISSET_ID); + } + + /** Returns true if field caching is set (has been assigned a value) and false otherwise */ + public boolean isSetCaching() { + return __isset_bit_vector.get(__CACHING_ISSET_ID); + } + + public void setCachingIsSet(boolean value) { + __isset_bit_vector.set(__CACHING_ISSET_ID, value); + } + + public byte[] getFilterString() { + setFilterString(org.apache.thrift.TBaseHelper.rightSize(filterString)); + return filterString == null ? null : filterString.array(); + } + + public ByteBuffer bufferForFilterString() { + return filterString; + } + + public TScan setFilterString(byte[] filterString) { + setFilterString(filterString == null ? (ByteBuffer)null : ByteBuffer.wrap(filterString)); + return this; + } + + public TScan setFilterString(ByteBuffer filterString) { + this.filterString = filterString; + return this; + } + + public void unsetFilterString() { + this.filterString = null; + } + + /** Returns true if field filterString is set (has been assigned a value) and false otherwise */ + public boolean isSetFilterString() { + return this.filterString != null; + } + + public void setFilterStringIsSet(boolean value) { + if (!value) { + this.filterString = null; + } + } + + public void setFieldValue(_Fields field, Object value) { + switch (field) { + case START_ROW: + if (value == null) { + unsetStartRow(); + } else { + setStartRow((ByteBuffer)value); + } + break; + + case STOP_ROW: + if (value == null) { + unsetStopRow(); + } else { + setStopRow((ByteBuffer)value); + } + break; + + case TIMESTAMP: + if (value == null) { + unsetTimestamp(); + } else { + setTimestamp((Long)value); + } + break; + + case COLUMNS: + if (value == null) { + unsetColumns(); + } else { + setColumns((List)value); + } + break; + + case CACHING: + if (value == null) { + unsetCaching(); + } else { + setCaching((Integer)value); + } + break; + + case FILTER_STRING: + if (value == null) { + unsetFilterString(); + } else { + setFilterString((ByteBuffer)value); + } + break; + + } + } + + public Object getFieldValue(_Fields field) { + switch (field) { + case START_ROW: + return getStartRow(); + + case STOP_ROW: + return getStopRow(); + + case TIMESTAMP: + return Long.valueOf(getTimestamp()); + + case COLUMNS: + return getColumns(); + + case CACHING: + return Integer.valueOf(getCaching()); + + case FILTER_STRING: + return getFilterString(); + + } + throw new IllegalStateException(); + } + + /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ + public boolean isSet(_Fields field) { + if (field == null) { + throw new IllegalArgumentException(); + } + + switch (field) { + case START_ROW: + return isSetStartRow(); + case STOP_ROW: + return isSetStopRow(); + case TIMESTAMP: + return isSetTimestamp(); + case COLUMNS: + return isSetColumns(); + case CACHING: + return isSetCaching(); + case FILTER_STRING: + return isSetFilterString(); + } + throw new IllegalStateException(); + } + + @Override + public boolean equals(Object that) { + if (that == null) + return false; + if (that instanceof TScan) + return this.equals((TScan)that); + return false; + } + + public boolean equals(TScan that) { + if (that == null) + return false; + + boolean this_present_startRow = true && this.isSetStartRow(); + boolean that_present_startRow = true && that.isSetStartRow(); + if (this_present_startRow || that_present_startRow) { + if (!(this_present_startRow && that_present_startRow)) + return false; + if (!this.startRow.equals(that.startRow)) + return false; + } + + boolean this_present_stopRow = true && this.isSetStopRow(); + boolean that_present_stopRow = true && that.isSetStopRow(); + if (this_present_stopRow || that_present_stopRow) { + if (!(this_present_stopRow && that_present_stopRow)) + return false; + if (!this.stopRow.equals(that.stopRow)) + return false; + } + + boolean this_present_timestamp = true && this.isSetTimestamp(); + boolean that_present_timestamp = true && that.isSetTimestamp(); + if (this_present_timestamp || that_present_timestamp) { + if (!(this_present_timestamp && that_present_timestamp)) + return false; + if (this.timestamp != that.timestamp) + return false; + } + + boolean this_present_columns = true && this.isSetColumns(); + boolean that_present_columns = true && that.isSetColumns(); + if (this_present_columns || that_present_columns) { + if (!(this_present_columns && that_present_columns)) + return false; + if (!this.columns.equals(that.columns)) + return false; + } + + boolean this_present_caching = true && this.isSetCaching(); + boolean that_present_caching = true && that.isSetCaching(); + if (this_present_caching || that_present_caching) { + if (!(this_present_caching && that_present_caching)) + return false; + if (this.caching != that.caching) + return false; + } + + boolean this_present_filterString = true && this.isSetFilterString(); + boolean that_present_filterString = true && that.isSetFilterString(); + if (this_present_filterString || that_present_filterString) { + if (!(this_present_filterString && that_present_filterString)) + return false; + if (!this.filterString.equals(that.filterString)) + return false; + } + + return true; + } + + @Override + public int hashCode() { + return 0; + } + + public int compareTo(TScan other) { + if (!getClass().equals(other.getClass())) { + return getClass().getName().compareTo(other.getClass().getName()); + } + + int lastComparison = 0; + TScan typedOther = (TScan)other; + + lastComparison = Boolean.valueOf(isSetStartRow()).compareTo(typedOther.isSetStartRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStartRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRow, typedOther.startRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetStopRow()).compareTo(typedOther.isSetStopRow()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetStopRow()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stopRow, typedOther.stopRow); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetTimestamp()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetColumns()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetCaching()).compareTo(typedOther.isSetCaching()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetCaching()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.caching, typedOther.caching); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetFilterString()).compareTo(typedOther.isSetFilterString()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetFilterString()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.filterString, typedOther.filterString); + if (lastComparison != 0) { + return lastComparison; + } + } + return 0; + } + + public _Fields fieldForId(int fieldId) { + return _Fields.findByThriftId(fieldId); + } + + public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { + schemes.get(iprot.getScheme()).getScheme().read(iprot, this); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { + schemes.get(oprot.getScheme()).getScheme().write(oprot, this); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("TScan("); + boolean first = true; + + if (isSetStartRow()) { + sb.append("startRow:"); + if (this.startRow == null) { + sb.append("null"); + } else { + sb.append(this.startRow); + } + first = false; + } + if (isSetStopRow()) { + if (!first) sb.append(", "); + sb.append("stopRow:"); + if (this.stopRow == null) { + sb.append("null"); + } else { + sb.append(this.stopRow); + } + first = false; + } + if (isSetTimestamp()) { + if (!first) sb.append(", "); + sb.append("timestamp:"); + sb.append(this.timestamp); + first = false; + } + if (isSetColumns()) { + if (!first) sb.append(", "); + sb.append("columns:"); + if (this.columns == null) { + sb.append("null"); + } else { + sb.append(this.columns); + } + first = false; + } + if (isSetCaching()) { + if (!first) sb.append(", "); + sb.append("caching:"); + sb.append(this.caching); + first = false; + } + if (isSetFilterString()) { + if (!first) sb.append(", "); + sb.append("filterString:"); + if (this.filterString == null) { + sb.append("null"); + } else { + sb.append(this.filterString); + } + first = false; + } + sb.append(")"); + return sb.toString(); + } + + public void validate() throws org.apache.thrift.TException { + // check for required fields + } + + private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { + try { + write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { + try { + // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. + __isset_bit_vector = new BitSet(1); + read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); + } catch (org.apache.thrift.TException te) { + throw new java.io.IOException(te); + } + } + + private static class TScanStandardSchemeFactory implements SchemeFactory { + public TScanStandardScheme getScheme() { + return new TScanStandardScheme(); + } + } + + private static class TScanStandardScheme extends StandardScheme { + + public void read(org.apache.thrift.protocol.TProtocol iprot, TScan struct) throws org.apache.thrift.TException { + org.apache.thrift.protocol.TField schemeField; + iprot.readStructBegin(); + while (true) + { + schemeField = iprot.readFieldBegin(); + if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { + break; + } + switch (schemeField.id) { + case 1: // START_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 2: // STOP_ROW + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 3: // TIMESTAMP + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 4: // COLUMNS + if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { + { + org.apache.thrift.protocol.TList _list18 = iprot.readListBegin(); + struct.columns = new ArrayList(_list18.size); + for (int _i19 = 0; _i19 < _list18.size; ++_i19) + { + ByteBuffer _elem20; // optional + _elem20 = iprot.readBinary(); + struct.columns.add(_elem20); + } + iprot.readListEnd(); + } + struct.setColumnsIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 5: // CACHING + if (schemeField.type == org.apache.thrift.protocol.TType.I32) { + struct.caching = iprot.readI32(); + struct.setCachingIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + case 6: // FILTER_STRING + if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } else { + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + break; + default: + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); + } + iprot.readFieldEnd(); + } + iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + struct.validate(); + } + + public void write(org.apache.thrift.protocol.TProtocol oprot, TScan struct) throws org.apache.thrift.TException { + struct.validate(); + + oprot.writeStructBegin(STRUCT_DESC); + if (struct.startRow != null) { + if (struct.isSetStartRow()) { + oprot.writeFieldBegin(START_ROW_FIELD_DESC); + oprot.writeBinary(struct.startRow); + oprot.writeFieldEnd(); + } + } + if (struct.stopRow != null) { + if (struct.isSetStopRow()) { + oprot.writeFieldBegin(STOP_ROW_FIELD_DESC); + oprot.writeBinary(struct.stopRow); + oprot.writeFieldEnd(); + } + } + if (struct.isSetTimestamp()) { + oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC); + oprot.writeI64(struct.timestamp); + oprot.writeFieldEnd(); + } + if (struct.columns != null) { + if (struct.isSetColumns()) { + oprot.writeFieldBegin(COLUMNS_FIELD_DESC); + { + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size())); + for (ByteBuffer _iter21 : struct.columns) + { + oprot.writeBinary(_iter21); + } + oprot.writeListEnd(); + } + oprot.writeFieldEnd(); + } + } + if (struct.isSetCaching()) { + oprot.writeFieldBegin(CACHING_FIELD_DESC); + oprot.writeI32(struct.caching); + oprot.writeFieldEnd(); + } + if (struct.filterString != null) { + if (struct.isSetFilterString()) { + oprot.writeFieldBegin(FILTER_STRING_FIELD_DESC); + oprot.writeBinary(struct.filterString); + oprot.writeFieldEnd(); + } + } + oprot.writeFieldStop(); + oprot.writeStructEnd(); + } + + } + + private static class TScanTupleSchemeFactory implements SchemeFactory { + public TScanTupleScheme getScheme() { + return new TScanTupleScheme(); + } + } + + private static class TScanTupleScheme extends TupleScheme { + + @Override + public void write(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException { + TTupleProtocol oprot = (TTupleProtocol) prot; + BitSet optionals = new BitSet(); + if (struct.isSetStartRow()) { + optionals.set(0); + } + if (struct.isSetStopRow()) { + optionals.set(1); + } + if (struct.isSetTimestamp()) { + optionals.set(2); + } + if (struct.isSetColumns()) { + optionals.set(3); + } + if (struct.isSetCaching()) { + optionals.set(4); + } + if (struct.isSetFilterString()) { + optionals.set(5); + } + oprot.writeBitSet(optionals, 6); + if (struct.isSetStartRow()) { + oprot.writeBinary(struct.startRow); + } + if (struct.isSetStopRow()) { + oprot.writeBinary(struct.stopRow); + } + if (struct.isSetTimestamp()) { + oprot.writeI64(struct.timestamp); + } + if (struct.isSetColumns()) { + { + oprot.writeI32(struct.columns.size()); + for (ByteBuffer _iter22 : struct.columns) + { + oprot.writeBinary(_iter22); + } + } + } + if (struct.isSetCaching()) { + oprot.writeI32(struct.caching); + } + if (struct.isSetFilterString()) { + oprot.writeBinary(struct.filterString); + } + } + + @Override + public void read(org.apache.thrift.protocol.TProtocol prot, TScan struct) throws org.apache.thrift.TException { + TTupleProtocol iprot = (TTupleProtocol) prot; + BitSet incoming = iprot.readBitSet(6); + if (incoming.get(0)) { + struct.startRow = iprot.readBinary(); + struct.setStartRowIsSet(true); + } + if (incoming.get(1)) { + struct.stopRow = iprot.readBinary(); + struct.setStopRowIsSet(true); + } + if (incoming.get(2)) { + struct.timestamp = iprot.readI64(); + struct.setTimestampIsSet(true); + } + if (incoming.get(3)) { + { + org.apache.thrift.protocol.TList _list23 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); + struct.columns = new ArrayList(_list23.size); + for (int _i24 = 0; _i24 < _list23.size; ++_i24) + { + ByteBuffer _elem25; // optional + _elem25 = iprot.readBinary(); + struct.columns.add(_elem25); + } + } + struct.setColumnsIsSet(true); + } + if (incoming.get(4)) { + struct.caching = iprot.readI32(); + struct.setCachingIsSet(true); + } + if (incoming.get(5)) { + struct.filterString = iprot.readBinary(); + struct.setFilterStringIsSet(true); + } + } + } + +} + diff --git hbase-examples/src/main/perl/DemoClient.pl hbase-examples/src/main/perl/DemoClient.pl new file mode 100644 index 0000000..36af9da --- /dev/null +++ hbase-examples/src/main/perl/DemoClient.pl @@ -0,0 +1,290 @@ +#!/usr/bin/perl +# Copyright 2011 The Apache Software Foundation +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +use strict; +use warnings; + +# Change the path here to point to your thrift directory. +use lib '/Users/sergey/Downloads/thrift/lib/perl/lib'; +use lib 'gen-perl'; + +use Thrift::Socket; +use Thrift::BufferedTransport; +use Thrift::BinaryProtocol; +use Hbase::Hbase; +use Data::Dumper; + +sub printRow($) +{ + my $rowresult = shift; + + return if (!$rowresult || @{$rowresult} < 1); + # rowresult is presummed to be a Hbase::TRowResult object + + printf ("row: {%s}, cols: \n", $rowresult->[0]->{row}); + my $values = $rowresult->[0]->{columns}; + foreach my $key ( sort ( keys %{$values} ) ) + { + printf ("{%s} => {%s}\n", $key, $values->{$key}->{value}); + } +} + +my $host = $ARGV[0] || "localhost"; +my $port = $ARGV[1] || 9090; + +my $socket = Thrift::Socket->new ($host, $port); +$socket->setSendTimeout (10000); # Ten seconds (value is in millisec) +$socket->setRecvTimeout (20000); # Twenty seconds (value is in millisec) + +my $transport = Thrift::BufferedTransport->new ($socket); +my $protocol = Thrift::BinaryProtocol->new ($transport); +my $client = Hbase::HbaseClient->new ($protocol); + +eval { + $transport->open (); +}; +if ($@) +{ + print "Unable to connect: $@->{message}\n"; + exit 1; +} + +my $demo_table = "demo_table"; + +print "scanning tables...\n"; + +# +# Search for all the tables in the HBase DB, return value is an arrayref +# +my $tables = $client->getTableNames(); +foreach my $table (sort @{$tables}) +{ + print " found {$table}\n"; + # This client will re-create the $demo_table, so we need to drop it first + if ($table eq $demo_table) + { + # Before we can drop a table, it has to be disabled first + if ($client->isTableEnabled ($table)) + { + print " disabling table: {$table}\n"; + $client->disableTable ($table); + } + # We assume the table has been disabled at this point + print " deleting table: {$table}\n"; + $client->deleteTable ($table); + } +} + +# +# Create the demo table with two column families, entry: and unused: +# +my $columns = [ + Hbase::ColumnDescriptor->new ( { name => "entry:", maxVersions => 10 } ), + Hbase::ColumnDescriptor->new ( { name => "unused:" } ), + ]; + +print "creating table: {$demo_table}\n"; +eval { + # This can throw Hbase::IllegalArgument (HASH) + $client->createTable ( $demo_table, $columns ); +}; +if ($@) +{ + die "ERROR: Unable to create table {$demo_table}: $@->{message}\n"; +} + +print "column families in {$demo_table}:\n"; +my $descriptors = $client->getColumnDescriptors ($demo_table); +foreach my $col (sort keys %{$descriptors}) +{ + printf (" column: {%s}, maxVer: {%s}\n", $descriptors->{$col}->{name}, $descriptors->{$col}->{maxVersions} ); +} + +my %dummy_attributes = (); + +# +# Test UTF-8 handling +# +my $invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1"; +my $valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; + +# non-utf8 is fine for data +my $key = "foo"; +my $mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => $invalid } ) ]; +$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); + +# try emptry strings +$key = ""; +$mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => "" } ) ]; +$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); + +# this row name is valid utf8 +$key = "foo"; +# This is another way to use the Mutation class +my $mutation = Hbase::Mutation->new (); +$mutation->{column} = "entry:$key"; +$mutation->{value} = $valid; +$mutations = [ $mutation ]; +$client->mutateRow ( $demo_table, $key, $mutations, %dummy_attributes ); + +# non-utf8 is not allowed in row names +eval { + $mutations = [ Hbase::Mutation->new ( { column => "entry:$key", value => $invalid } ) ]; + # this can throw a TApplicationException (HASH) error + $client->mutateRow ($demo_table, $key, $mutations, %dummy_attributes); + die ("shouldn't get here!"); +}; +if ($@) +{ + print "expected error: $@->{message}\n"; +} + +# +# Run a scanner on the rows we just created +# +print "Starting scanner...\n"; +$key = ""; +# scannerOpen expects ( table, key, ) +# if key is empty, it searches for all entries in the table +# if column descriptors is empty, it searches for all column descriptors within the table +my $scanner = $client->scannerOpen ( $demo_table, $key, [ "entry:" ], %dummy_attributes ); +eval { + + # scannerGet returns an empty arrayref (instead of an undef) to indicate no results + my $result = $client->scannerGet ( $scanner ); + while ( $result && @{$result} > 0 ) + { + printRow ( $result ); + $result = $client->scannerGet ( $scanner ); + } + + $client->scannerClose ( $scanner ); + print "Scanner finished\n"; +}; +if ($@) +{ + $client->scannerClose ( $scanner ); + print "Scanner finished\n"; +} + +# +# Run some operations on a bunch of rows +# +for (my $e = 100; $e > 0; $e--) +{ + # format row keys as "00000" to "00100"; + my $row = sprintf ("%05d", $e); + + $mutations = [ Hbase::Mutation->new ( { column => "unused:", value => "DELETE_ME" } ) ]; + $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); + printRow ( $client->getRow ( $demo_table, $row ) ); + $client->deleteAllRow ( $demo_table, $row ); + + $mutations = [ + Hbase::Mutation->new ( { column => "entry:num", value => "0" } ), + Hbase::Mutation->new ( { column => "entry:foo", value => "FOO" } ), + ]; + $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); + printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); + + $mutations = [ + Hbase::Mutation->new ( { column => "entry:foo", isDelete => 1 } ), + Hbase::Mutation->new ( { column => "entry:num", value => -1 } ), + ]; + $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); + printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); + + $mutations = [ + Hbase::Mutation->new ( { column => "entry:num", value => $e } ), + Hbase::Mutation->new ( { column => "entry:sqr", value => $e * $e } ), + ]; + $client->mutateRow ( $demo_table, $row, $mutations, %dummy_attributes ); + printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); + + $mutations = [ + Hbase::Mutation->new ( { column => "entry:num", value => -999 } ), + Hbase::Mutation->new ( { column => "entry:sqr", isDelete => 1 } ), + ]; + + # mutateRowTs => modify the row entry at the specified timestamp (ts) + $client->mutateRowTs ( $demo_table, $row, $mutations, 1, %dummy_attributes ); # shouldn't override latest + printRow ( $client->getRow ( $demo_table, $row, %dummy_attributes ) ); + + my $versions = $client->getVer ( $demo_table, $row, "entry:num", 10, %dummy_attributes ); + printf ( "row: {%s}, values: \n", $row ); + foreach my $v ( @{$versions} ) + { + printf ( " {%s} @ {%s}\n", $v->{value}, $v->{timestamp} ); + } + + eval { + + my $result = $client->get ( $demo_table, $row, "entry:foo", %dummy_attributes ); + + # Unfortunately, the API returns an empty arrayref instead of undef + # to signify a "not found", which makes it slightly inconvenient. + die "shouldn't get here!" if ($result && @{$result} > 0); + + if (!$result || ($result && @{$result} < 1)) + { + print "expected: {$row} not found in {$demo_table}\n"; + } + }; + if ($@) + { + print "expected error: $@\n"; + } +} + +my $column_descriptor = $client->getColumnDescriptors ( $demo_table ); +$columns = []; +foreach my $col ( keys %{$column_descriptor} ) +{ + my $colname = $column_descriptor->{$col}->{name}; + print "column with name: {$colname}\n"; + push ( @{$columns}, $colname); +} + +print "Starting scanner...\n"; +$scanner = $client->scannerOpenWithStop ( $demo_table, "00020", "00040", $columns, %dummy_attributes ); +eval { + + # scannerGet returns an empty arrayref (instead of an undef) to indicate no results + my $result = $client->scannerGet ( $scanner ); + while ( $result && @$result > 0 ) + { + printRow ( $result ); + $result = $client->scannerGet ( $scanner ); + } + + $client->scannerClose ( $scanner ); + print "Scanner finished\n"; +}; +if ($@) +{ + $client->scannerClose ( $scanner ); + print "Scanner finished\n"; +} + +$transport->close (); + +exit 0; + diff --git hbase-examples/src/main/perl/gen-perl/Hbase/Constants.pm hbase-examples/src/main/perl/gen-perl/Hbase/Constants.pm new file mode 100644 index 0000000..98d9663 --- /dev/null +++ hbase-examples/src/main/perl/gen-perl/Hbase/Constants.pm @@ -0,0 +1,13 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +package Hbase::Constants; +require 5.6.0; +use strict; +use warnings; +use Thrift; + + +1; diff --git hbase-examples/src/main/perl/gen-perl/Hbase/Hbase.pm hbase-examples/src/main/perl/gen-perl/Hbase/Hbase.pm new file mode 100644 index 0000000..53b21ff --- /dev/null +++ hbase-examples/src/main/perl/gen-perl/Hbase/Hbase.pm @@ -0,0 +1,12633 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +require 5.6.0; +use strict; +use warnings; +use Thrift; + +use Hbase::Types; + +# HELPER FUNCTIONS AND STRUCTURES + +package Hbase::Hbase_enableTable_args; +use base qw(Class::Accessor); +Hbase::Hbase_enableTable_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_enableTable_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_enableTable_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_enableTable_result; +use base qw(Class::Accessor); +Hbase::Hbase_enableTable_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_enableTable_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_enableTable_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_disableTable_args; +use base qw(Class::Accessor); +Hbase::Hbase_disableTable_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_disableTable_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_disableTable_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_disableTable_result; +use base qw(Class::Accessor); +Hbase::Hbase_disableTable_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_disableTable_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_disableTable_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_isTableEnabled_args; +use base qw(Class::Accessor); +Hbase::Hbase_isTableEnabled_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_isTableEnabled_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_isTableEnabled_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_isTableEnabled_result; +use base qw(Class::Accessor); +Hbase::Hbase_isTableEnabled_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_isTableEnabled_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::BOOL) { + $xfer += $input->readBool(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_isTableEnabled_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_compact_args; +use base qw(Class::Accessor); +Hbase::Hbase_compact_args->mk_accessors( qw( tableNameOrRegionName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableNameOrRegionName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableNameOrRegionName}) { + $self->{tableNameOrRegionName} = $vals->{tableNameOrRegionName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_compact_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableNameOrRegionName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_compact_args'); + if (defined $self->{tableNameOrRegionName}) { + $xfer += $output->writeFieldBegin('tableNameOrRegionName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableNameOrRegionName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_compact_result; +use base qw(Class::Accessor); +Hbase::Hbase_compact_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_compact_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_compact_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_majorCompact_args; +use base qw(Class::Accessor); +Hbase::Hbase_majorCompact_args->mk_accessors( qw( tableNameOrRegionName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableNameOrRegionName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableNameOrRegionName}) { + $self->{tableNameOrRegionName} = $vals->{tableNameOrRegionName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_majorCompact_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableNameOrRegionName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_majorCompact_args'); + if (defined $self->{tableNameOrRegionName}) { + $xfer += $output->writeFieldBegin('tableNameOrRegionName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableNameOrRegionName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_majorCompact_result; +use base qw(Class::Accessor); +Hbase::Hbase_majorCompact_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_majorCompact_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_majorCompact_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getTableNames_args; +use base qw(Class::Accessor); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getTableNames_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableNames_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getTableNames_result; +use base qw(Class::Accessor); +Hbase::Hbase_getTableNames_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getTableNames_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size23 = 0; + $self->{success} = []; + my $_etype26 = 0; + $xfer += $input->readListBegin(\$_etype26, \$_size23); + for (my $_i27 = 0; $_i27 < $_size23; ++$_i27) + { + my $elem28 = undef; + $xfer += $input->readString(\$elem28); + push(@{$self->{success}},$elem28); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableNames_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{success}})); + { + foreach my $iter29 (@{$self->{success}}) + { + $xfer += $output->writeString($iter29); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getColumnDescriptors_args; +use base qw(Class::Accessor); +Hbase::Hbase_getColumnDescriptors_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getColumnDescriptors_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getColumnDescriptors_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getColumnDescriptors_result; +use base qw(Class::Accessor); +Hbase::Hbase_getColumnDescriptors_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getColumnDescriptors_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::MAP) { + { + my $_size30 = 0; + $self->{success} = {}; + my $_ktype31 = 0; + my $_vtype32 = 0; + $xfer += $input->readMapBegin(\$_ktype31, \$_vtype32, \$_size30); + for (my $_i34 = 0; $_i34 < $_size30; ++$_i34) + { + my $key35 = ''; + my $val36 = new Hbase::ColumnDescriptor(); + $xfer += $input->readString(\$key35); + $val36 = new Hbase::ColumnDescriptor(); + $xfer += $val36->read($input); + $self->{success}->{$key35} = $val36; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getColumnDescriptors_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{success}})); + { + while( my ($kiter37,$viter38) = each %{$self->{success}}) + { + $xfer += $output->writeString($kiter37); + $xfer += ${viter38}->write($output); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getTableRegions_args; +use base qw(Class::Accessor); +Hbase::Hbase_getTableRegions_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getTableRegions_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableRegions_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getTableRegions_result; +use base qw(Class::Accessor); +Hbase::Hbase_getTableRegions_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getTableRegions_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size39 = 0; + $self->{success} = []; + my $_etype42 = 0; + $xfer += $input->readListBegin(\$_etype42, \$_size39); + for (my $_i43 = 0; $_i43 < $_size39; ++$_i43) + { + my $elem44 = undef; + $elem44 = new Hbase::TRegionInfo(); + $xfer += $elem44->read($input); + push(@{$self->{success}},$elem44); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableRegions_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter45 (@{$self->{success}}) + { + $xfer += ${iter45}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_createTable_args; +use base qw(Class::Accessor); +Hbase::Hbase_createTable_args->mk_accessors( qw( tableName columnFamilies ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{columnFamilies} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{columnFamilies}) { + $self->{columnFamilies} = $vals->{columnFamilies}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_createTable_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size46 = 0; + $self->{columnFamilies} = []; + my $_etype49 = 0; + $xfer += $input->readListBegin(\$_etype49, \$_size46); + for (my $_i50 = 0; $_i50 < $_size46; ++$_i50) + { + my $elem51 = undef; + $elem51 = new Hbase::ColumnDescriptor(); + $xfer += $elem51->read($input); + push(@{$self->{columnFamilies}},$elem51); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_createTable_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columnFamilies}) { + $xfer += $output->writeFieldBegin('columnFamilies', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columnFamilies}})); + { + foreach my $iter52 (@{$self->{columnFamilies}}) + { + $xfer += ${iter52}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_createTable_result; +use base qw(Class::Accessor); +Hbase::Hbase_createTable_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + $self->{exist} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + if (defined $vals->{exist}) { + $self->{exist} = $vals->{exist}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_createTable_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRUCT) { + $self->{exist} = new Hbase::AlreadyExists(); + $xfer += $self->{exist}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_createTable_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{exist}) { + $xfer += $output->writeFieldBegin('exist', TType::STRUCT, 3); + $xfer += $self->{exist}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteTable_args; +use base qw(Class::Accessor); +Hbase::Hbase_deleteTable_args->mk_accessors( qw( tableName ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteTable_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteTable_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteTable_result; +use base qw(Class::Accessor); +Hbase::Hbase_deleteTable_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteTable_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteTable_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_get_args; +use base qw(Class::Accessor); +Hbase::Hbase_get_args->mk_accessors( qw( tableName row column attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_get_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size53 = 0; + $self->{attributes} = {}; + my $_ktype54 = 0; + my $_vtype55 = 0; + $xfer += $input->readMapBegin(\$_ktype54, \$_vtype55, \$_size53); + for (my $_i57 = 0; $_i57 < $_size53; ++$_i57) + { + my $key58 = ''; + my $val59 = ''; + $xfer += $input->readString(\$key58); + $xfer += $input->readString(\$val59); + $self->{attributes}->{$key58} = $val59; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_get_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter60,$viter61) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter60); + $xfer += $output->writeString($viter61); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_get_result; +use base qw(Class::Accessor); +Hbase::Hbase_get_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_get_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size62 = 0; + $self->{success} = []; + my $_etype65 = 0; + $xfer += $input->readListBegin(\$_etype65, \$_size62); + for (my $_i66 = 0; $_i66 < $_size62; ++$_i66) + { + my $elem67 = undef; + $elem67 = new Hbase::TCell(); + $xfer += $elem67->read($input); + push(@{$self->{success}},$elem67); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_get_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter68 (@{$self->{success}}) + { + $xfer += ${iter68}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getVer_args; +use base qw(Class::Accessor); +Hbase::Hbase_getVer_args->mk_accessors( qw( tableName row column numVersions attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{numVersions} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{numVersions}) { + $self->{numVersions} = $vals->{numVersions}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getVer_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{numVersions}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size69 = 0; + $self->{attributes} = {}; + my $_ktype70 = 0; + my $_vtype71 = 0; + $xfer += $input->readMapBegin(\$_ktype70, \$_vtype71, \$_size69); + for (my $_i73 = 0; $_i73 < $_size69; ++$_i73) + { + my $key74 = ''; + my $val75 = ''; + $xfer += $input->readString(\$key74); + $xfer += $input->readString(\$val75); + $self->{attributes}->{$key74} = $val75; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVer_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{numVersions}) { + $xfer += $output->writeFieldBegin('numVersions', TType::I32, 4); + $xfer += $output->writeI32($self->{numVersions}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter76,$viter77) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getVer_result; +use base qw(Class::Accessor); +Hbase::Hbase_getVer_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getVer_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size78 = 0; + $self->{success} = []; + my $_etype81 = 0; + $xfer += $input->readListBegin(\$_etype81, \$_size78); + for (my $_i82 = 0; $_i82 < $_size78; ++$_i82) + { + my $elem83 = undef; + $elem83 = new Hbase::TCell(); + $xfer += $elem83->read($input); + push(@{$self->{success}},$elem83); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVer_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter84 (@{$self->{success}}) + { + $xfer += ${iter84}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getVerTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_getVerTs_args->mk_accessors( qw( tableName row column timestamp numVersions attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{timestamp} = undef; + $self->{numVersions} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{numVersions}) { + $self->{numVersions} = $vals->{numVersions}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getVerTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{numVersions}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^6$/ && do{ if ($ftype == TType::MAP) { + { + my $_size85 = 0; + $self->{attributes} = {}; + my $_ktype86 = 0; + my $_vtype87 = 0; + $xfer += $input->readMapBegin(\$_ktype86, \$_vtype87, \$_size85); + for (my $_i89 = 0; $_i89 < $_size85; ++$_i89) + { + my $key90 = ''; + my $val91 = ''; + $xfer += $input->readString(\$key90); + $xfer += $input->readString(\$val91); + $self->{attributes}->{$key90} = $val91; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVerTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{numVersions}) { + $xfer += $output->writeFieldBegin('numVersions', TType::I32, 5); + $xfer += $output->writeI32($self->{numVersions}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 6); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter92,$viter93) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter92); + $xfer += $output->writeString($viter93); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getVerTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_getVerTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getVerTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size94 = 0; + $self->{success} = []; + my $_etype97 = 0; + $xfer += $input->readListBegin(\$_etype97, \$_size94); + for (my $_i98 = 0; $_i98 < $_size94; ++$_i98) + { + my $elem99 = undef; + $elem99 = new Hbase::TCell(); + $xfer += $elem99->read($input); + push(@{$self->{success}},$elem99); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVerTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter100 (@{$self->{success}}) + { + $xfer += ${iter100}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRow_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRow_args->mk_accessors( qw( tableName row attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRow_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::MAP) { + { + my $_size101 = 0; + $self->{attributes} = {}; + my $_ktype102 = 0; + my $_vtype103 = 0; + $xfer += $input->readMapBegin(\$_ktype102, \$_vtype103, \$_size101); + for (my $_i105 = 0; $_i105 < $_size101; ++$_i105) + { + my $key106 = ''; + my $val107 = ''; + $xfer += $input->readString(\$key106); + $xfer += $input->readString(\$val107); + $self->{attributes}->{$key106} = $val107; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRow_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter108,$viter109) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter108); + $xfer += $output->writeString($viter109); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRow_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRow_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRow_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size110 = 0; + $self->{success} = []; + my $_etype113 = 0; + $xfer += $input->readListBegin(\$_etype113, \$_size110); + for (my $_i114 = 0; $_i114 < $_size110; ++$_i114) + { + my $elem115 = undef; + $elem115 = new Hbase::TRowResult(); + $xfer += $elem115->read($input); + push(@{$self->{success}},$elem115); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRow_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter116 (@{$self->{success}}) + { + $xfer += ${iter116}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowWithColumns_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowWithColumns_args->mk_accessors( qw( tableName row columns attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{columns} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowWithColumns_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size117 = 0; + $self->{columns} = []; + my $_etype120 = 0; + $xfer += $input->readListBegin(\$_etype120, \$_size117); + for (my $_i121 = 0; $_i121 < $_size117; ++$_i121) + { + my $elem122 = undef; + $xfer += $input->readString(\$elem122); + push(@{$self->{columns}},$elem122); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size123 = 0; + $self->{attributes} = {}; + my $_ktype124 = 0; + my $_vtype125 = 0; + $xfer += $input->readMapBegin(\$_ktype124, \$_vtype125, \$_size123); + for (my $_i127 = 0; $_i127 < $_size123; ++$_i127) + { + my $key128 = ''; + my $val129 = ''; + $xfer += $input->readString(\$key128); + $xfer += $input->readString(\$val129); + $self->{attributes}->{$key128} = $val129; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumns_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter130 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter130); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter131,$viter132) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter131); + $xfer += $output->writeString($viter132); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowWithColumns_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowWithColumns_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowWithColumns_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size133 = 0; + $self->{success} = []; + my $_etype136 = 0; + $xfer += $input->readListBegin(\$_etype136, \$_size133); + for (my $_i137 = 0; $_i137 < $_size133; ++$_i137) + { + my $elem138 = undef; + $elem138 = new Hbase::TRowResult(); + $xfer += $elem138->read($input); + push(@{$self->{success}},$elem138); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumns_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter139 (@{$self->{success}}) + { + $xfer += ${iter139}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowTs_args->mk_accessors( qw( tableName row timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size140 = 0; + $self->{attributes} = {}; + my $_ktype141 = 0; + my $_vtype142 = 0; + $xfer += $input->readMapBegin(\$_ktype141, \$_vtype142, \$_size140); + for (my $_i144 = 0; $_i144 < $_size140; ++$_i144) + { + my $key145 = ''; + my $val146 = ''; + $xfer += $input->readString(\$key145); + $xfer += $input->readString(\$val146); + $self->{attributes}->{$key145} = $val146; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter147,$viter148) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter147); + $xfer += $output->writeString($viter148); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size149 = 0; + $self->{success} = []; + my $_etype152 = 0; + $xfer += $input->readListBegin(\$_etype152, \$_size149); + for (my $_i153 = 0; $_i153 < $_size149; ++$_i153) + { + my $elem154 = undef; + $elem154 = new Hbase::TRowResult(); + $xfer += $elem154->read($input); + push(@{$self->{success}},$elem154); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter155 (@{$self->{success}}) + { + $xfer += ${iter155}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowWithColumnsTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowWithColumnsTs_args->mk_accessors( qw( tableName row columns timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{columns} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowWithColumnsTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size156 = 0; + $self->{columns} = []; + my $_etype159 = 0; + $xfer += $input->readListBegin(\$_etype159, \$_size156); + for (my $_i160 = 0; $_i160 < $_size156; ++$_i160) + { + my $elem161 = undef; + $xfer += $input->readString(\$elem161); + push(@{$self->{columns}},$elem161); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size162 = 0; + $self->{attributes} = {}; + my $_ktype163 = 0; + my $_vtype164 = 0; + $xfer += $input->readMapBegin(\$_ktype163, \$_vtype164, \$_size162); + for (my $_i166 = 0; $_i166 < $_size162; ++$_i166) + { + my $key167 = ''; + my $val168 = ''; + $xfer += $input->readString(\$key167); + $xfer += $input->readString(\$val168); + $self->{attributes}->{$key167} = $val168; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumnsTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter169 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter169); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter170,$viter171) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter170); + $xfer += $output->writeString($viter171); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowWithColumnsTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowWithColumnsTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowWithColumnsTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size172 = 0; + $self->{success} = []; + my $_etype175 = 0; + $xfer += $input->readListBegin(\$_etype175, \$_size172); + for (my $_i176 = 0; $_i176 < $_size172; ++$_i176) + { + my $elem177 = undef; + $elem177 = new Hbase::TRowResult(); + $xfer += $elem177->read($input); + push(@{$self->{success}},$elem177); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumnsTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter178 (@{$self->{success}}) + { + $xfer += ${iter178}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRows_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRows_args->mk_accessors( qw( tableName rows attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rows} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rows}) { + $self->{rows} = $vals->{rows}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRows_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size179 = 0; + $self->{rows} = []; + my $_etype182 = 0; + $xfer += $input->readListBegin(\$_etype182, \$_size179); + for (my $_i183 = 0; $_i183 < $_size179; ++$_i183) + { + my $elem184 = undef; + $xfer += $input->readString(\$elem184); + push(@{$self->{rows}},$elem184); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::MAP) { + { + my $_size185 = 0; + $self->{attributes} = {}; + my $_ktype186 = 0; + my $_vtype187 = 0; + $xfer += $input->readMapBegin(\$_ktype186, \$_vtype187, \$_size185); + for (my $_i189 = 0; $_i189 < $_size185; ++$_i189) + { + my $key190 = ''; + my $val191 = ''; + $xfer += $input->readString(\$key190); + $xfer += $input->readString(\$val191); + $self->{attributes}->{$key190} = $val191; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRows_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rows}) { + $xfer += $output->writeFieldBegin('rows', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{rows}})); + { + foreach my $iter192 (@{$self->{rows}}) + { + $xfer += $output->writeString($iter192); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter193,$viter194) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter193); + $xfer += $output->writeString($viter194); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRows_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRows_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRows_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size195 = 0; + $self->{success} = []; + my $_etype198 = 0; + $xfer += $input->readListBegin(\$_etype198, \$_size195); + for (my $_i199 = 0; $_i199 < $_size195; ++$_i199) + { + my $elem200 = undef; + $elem200 = new Hbase::TRowResult(); + $xfer += $elem200->read($input); + push(@{$self->{success}},$elem200); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRows_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter201 (@{$self->{success}}) + { + $xfer += ${iter201}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsWithColumns_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsWithColumns_args->mk_accessors( qw( tableName rows columns attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rows} = undef; + $self->{columns} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rows}) { + $self->{rows} = $vals->{rows}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsWithColumns_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size202 = 0; + $self->{rows} = []; + my $_etype205 = 0; + $xfer += $input->readListBegin(\$_etype205, \$_size202); + for (my $_i206 = 0; $_i206 < $_size202; ++$_i206) + { + my $elem207 = undef; + $xfer += $input->readString(\$elem207); + push(@{$self->{rows}},$elem207); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size208 = 0; + $self->{columns} = []; + my $_etype211 = 0; + $xfer += $input->readListBegin(\$_etype211, \$_size208); + for (my $_i212 = 0; $_i212 < $_size208; ++$_i212) + { + my $elem213 = undef; + $xfer += $input->readString(\$elem213); + push(@{$self->{columns}},$elem213); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size214 = 0; + $self->{attributes} = {}; + my $_ktype215 = 0; + my $_vtype216 = 0; + $xfer += $input->readMapBegin(\$_ktype215, \$_vtype216, \$_size214); + for (my $_i218 = 0; $_i218 < $_size214; ++$_i218) + { + my $key219 = ''; + my $val220 = ''; + $xfer += $input->readString(\$key219); + $xfer += $input->readString(\$val220); + $self->{attributes}->{$key219} = $val220; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumns_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rows}) { + $xfer += $output->writeFieldBegin('rows', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{rows}})); + { + foreach my $iter221 (@{$self->{rows}}) + { + $xfer += $output->writeString($iter221); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter222 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter222); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter223,$viter224) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter223); + $xfer += $output->writeString($viter224); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsWithColumns_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsWithColumns_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsWithColumns_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size225 = 0; + $self->{success} = []; + my $_etype228 = 0; + $xfer += $input->readListBegin(\$_etype228, \$_size225); + for (my $_i229 = 0; $_i229 < $_size225; ++$_i229) + { + my $elem230 = undef; + $elem230 = new Hbase::TRowResult(); + $xfer += $elem230->read($input); + push(@{$self->{success}},$elem230); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumns_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter231 (@{$self->{success}}) + { + $xfer += ${iter231}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsTs_args->mk_accessors( qw( tableName rows timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rows} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rows}) { + $self->{rows} = $vals->{rows}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size232 = 0; + $self->{rows} = []; + my $_etype235 = 0; + $xfer += $input->readListBegin(\$_etype235, \$_size232); + for (my $_i236 = 0; $_i236 < $_size232; ++$_i236) + { + my $elem237 = undef; + $xfer += $input->readString(\$elem237); + push(@{$self->{rows}},$elem237); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size238 = 0; + $self->{attributes} = {}; + my $_ktype239 = 0; + my $_vtype240 = 0; + $xfer += $input->readMapBegin(\$_ktype239, \$_vtype240, \$_size238); + for (my $_i242 = 0; $_i242 < $_size238; ++$_i242) + { + my $key243 = ''; + my $val244 = ''; + $xfer += $input->readString(\$key243); + $xfer += $input->readString(\$val244); + $self->{attributes}->{$key243} = $val244; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rows}) { + $xfer += $output->writeFieldBegin('rows', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{rows}})); + { + foreach my $iter245 (@{$self->{rows}}) + { + $xfer += $output->writeString($iter245); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter246,$viter247) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter246); + $xfer += $output->writeString($viter247); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size248 = 0; + $self->{success} = []; + my $_etype251 = 0; + $xfer += $input->readListBegin(\$_etype251, \$_size248); + for (my $_i252 = 0; $_i252 < $_size248; ++$_i252) + { + my $elem253 = undef; + $elem253 = new Hbase::TRowResult(); + $xfer += $elem253->read($input); + push(@{$self->{success}},$elem253); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter254 (@{$self->{success}}) + { + $xfer += ${iter254}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsWithColumnsTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsWithColumnsTs_args->mk_accessors( qw( tableName rows columns timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rows} = undef; + $self->{columns} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rows}) { + $self->{rows} = $vals->{rows}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsWithColumnsTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size255 = 0; + $self->{rows} = []; + my $_etype258 = 0; + $xfer += $input->readListBegin(\$_etype258, \$_size255); + for (my $_i259 = 0; $_i259 < $_size255; ++$_i259) + { + my $elem260 = undef; + $xfer += $input->readString(\$elem260); + push(@{$self->{rows}},$elem260); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size261 = 0; + $self->{columns} = []; + my $_etype264 = 0; + $xfer += $input->readListBegin(\$_etype264, \$_size261); + for (my $_i265 = 0; $_i265 < $_size261; ++$_i265) + { + my $elem266 = undef; + $xfer += $input->readString(\$elem266); + push(@{$self->{columns}},$elem266); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size267 = 0; + $self->{attributes} = {}; + my $_ktype268 = 0; + my $_vtype269 = 0; + $xfer += $input->readMapBegin(\$_ktype268, \$_vtype269, \$_size267); + for (my $_i271 = 0; $_i271 < $_size267; ++$_i271) + { + my $key272 = ''; + my $val273 = ''; + $xfer += $input->readString(\$key272); + $xfer += $input->readString(\$val273); + $self->{attributes}->{$key272} = $val273; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumnsTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rows}) { + $xfer += $output->writeFieldBegin('rows', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{rows}})); + { + foreach my $iter274 (@{$self->{rows}}) + { + $xfer += $output->writeString($iter274); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter275 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter275); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter276,$viter277) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter276); + $xfer += $output->writeString($viter277); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowsWithColumnsTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowsWithColumnsTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowsWithColumnsTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size278 = 0; + $self->{success} = []; + my $_etype281 = 0; + $xfer += $input->readListBegin(\$_etype281, \$_size278); + for (my $_i282 = 0; $_i282 < $_size278; ++$_i282) + { + my $elem283 = undef; + $elem283 = new Hbase::TRowResult(); + $xfer += $elem283->read($input); + push(@{$self->{success}},$elem283); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumnsTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter284 (@{$self->{success}}) + { + $xfer += ${iter284}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRow_args; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRow_args->mk_accessors( qw( tableName row mutations attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{mutations} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{mutations}) { + $self->{mutations} = $vals->{mutations}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRow_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size285 = 0; + $self->{mutations} = []; + my $_etype288 = 0; + $xfer += $input->readListBegin(\$_etype288, \$_size285); + for (my $_i289 = 0; $_i289 < $_size285; ++$_i289) + { + my $elem290 = undef; + $elem290 = new Hbase::Mutation(); + $xfer += $elem290->read($input); + push(@{$self->{mutations}},$elem290); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size291 = 0; + $self->{attributes} = {}; + my $_ktype292 = 0; + my $_vtype293 = 0; + $xfer += $input->readMapBegin(\$_ktype292, \$_vtype293, \$_size291); + for (my $_i295 = 0; $_i295 < $_size291; ++$_i295) + { + my $key296 = ''; + my $val297 = ''; + $xfer += $input->readString(\$key296); + $xfer += $input->readString(\$val297); + $self->{attributes}->{$key296} = $val297; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRow_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{mutations}) { + $xfer += $output->writeFieldBegin('mutations', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{mutations}})); + { + foreach my $iter298 (@{$self->{mutations}}) + { + $xfer += ${iter298}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter299,$viter300) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter299); + $xfer += $output->writeString($viter300); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRow_result; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRow_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRow_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRow_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRowTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRowTs_args->mk_accessors( qw( tableName row mutations timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{mutations} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{mutations}) { + $self->{mutations} = $vals->{mutations}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRowTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size301 = 0; + $self->{mutations} = []; + my $_etype304 = 0; + $xfer += $input->readListBegin(\$_etype304, \$_size301); + for (my $_i305 = 0; $_i305 < $_size301; ++$_i305) + { + my $elem306 = undef; + $elem306 = new Hbase::Mutation(); + $xfer += $elem306->read($input); + push(@{$self->{mutations}},$elem306); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size307 = 0; + $self->{attributes} = {}; + my $_ktype308 = 0; + my $_vtype309 = 0; + $xfer += $input->readMapBegin(\$_ktype308, \$_vtype309, \$_size307); + for (my $_i311 = 0; $_i311 < $_size307; ++$_i311) + { + my $key312 = ''; + my $val313 = ''; + $xfer += $input->readString(\$key312); + $xfer += $input->readString(\$val313); + $self->{attributes}->{$key312} = $val313; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{mutations}) { + $xfer += $output->writeFieldBegin('mutations', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{mutations}})); + { + foreach my $iter314 (@{$self->{mutations}}) + { + $xfer += ${iter314}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter315,$viter316) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter315); + $xfer += $output->writeString($viter316); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRowTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRowTs_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRowTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowTs_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRows_args; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRows_args->mk_accessors( qw( tableName rowBatches attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rowBatches} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rowBatches}) { + $self->{rowBatches} = $vals->{rowBatches}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRows_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size317 = 0; + $self->{rowBatches} = []; + my $_etype320 = 0; + $xfer += $input->readListBegin(\$_etype320, \$_size317); + for (my $_i321 = 0; $_i321 < $_size317; ++$_i321) + { + my $elem322 = undef; + $elem322 = new Hbase::BatchMutation(); + $xfer += $elem322->read($input); + push(@{$self->{rowBatches}},$elem322); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::MAP) { + { + my $_size323 = 0; + $self->{attributes} = {}; + my $_ktype324 = 0; + my $_vtype325 = 0; + $xfer += $input->readMapBegin(\$_ktype324, \$_vtype325, \$_size323); + for (my $_i327 = 0; $_i327 < $_size323; ++$_i327) + { + my $key328 = ''; + my $val329 = ''; + $xfer += $input->readString(\$key328); + $xfer += $input->readString(\$val329); + $self->{attributes}->{$key328} = $val329; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRows_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rowBatches}) { + $xfer += $output->writeFieldBegin('rowBatches', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{rowBatches}})); + { + foreach my $iter330 (@{$self->{rowBatches}}) + { + $xfer += ${iter330}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter331,$viter332) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter331); + $xfer += $output->writeString($viter332); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRows_result; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRows_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRows_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRows_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRowsTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRowsTs_args->mk_accessors( qw( tableName rowBatches timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{rowBatches} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{rowBatches}) { + $self->{rowBatches} = $vals->{rowBatches}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRowsTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size333 = 0; + $self->{rowBatches} = []; + my $_etype336 = 0; + $xfer += $input->readListBegin(\$_etype336, \$_size333); + for (my $_i337 = 0; $_i337 < $_size333; ++$_i337) + { + my $elem338 = undef; + $elem338 = new Hbase::BatchMutation(); + $xfer += $elem338->read($input); + push(@{$self->{rowBatches}},$elem338); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size339 = 0; + $self->{attributes} = {}; + my $_ktype340 = 0; + my $_vtype341 = 0; + $xfer += $input->readMapBegin(\$_ktype340, \$_vtype341, \$_size339); + for (my $_i343 = 0; $_i343 < $_size339; ++$_i343) + { + my $key344 = ''; + my $val345 = ''; + $xfer += $input->readString(\$key344); + $xfer += $input->readString(\$val345); + $self->{attributes}->{$key344} = $val345; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowsTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{rowBatches}) { + $xfer += $output->writeFieldBegin('rowBatches', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{rowBatches}})); + { + foreach my $iter346 (@{$self->{rowBatches}}) + { + $xfer += ${iter346}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter347,$viter348) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter347); + $xfer += $output->writeString($viter348); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_mutateRowsTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_mutateRowsTs_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_mutateRowsTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowsTs_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_atomicIncrement_args; +use base qw(Class::Accessor); +Hbase::Hbase_atomicIncrement_args->mk_accessors( qw( tableName row column value ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{value} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{value}) { + $self->{value} = $vals->{value}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_atomicIncrement_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{value}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_atomicIncrement_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{value}) { + $xfer += $output->writeFieldBegin('value', TType::I64, 4); + $xfer += $output->writeI64($self->{value}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_atomicIncrement_result; +use base qw(Class::Accessor); +Hbase::Hbase_atomicIncrement_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_atomicIncrement_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_atomicIncrement_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I64, 0); + $xfer += $output->writeI64($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAll_args; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAll_args->mk_accessors( qw( tableName row column attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAll_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size349 = 0; + $self->{attributes} = {}; + my $_ktype350 = 0; + my $_vtype351 = 0; + $xfer += $input->readMapBegin(\$_ktype350, \$_vtype351, \$_size349); + for (my $_i353 = 0; $_i353 < $_size349; ++$_i353) + { + my $key354 = ''; + my $val355 = ''; + $xfer += $input->readString(\$key354); + $xfer += $input->readString(\$val355); + $self->{attributes}->{$key354} = $val355; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAll_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter356,$viter357) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter356); + $xfer += $output->writeString($viter357); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAll_result; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAll_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAll_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAll_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllTs_args->mk_accessors( qw( tableName row column timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size358 = 0; + $self->{attributes} = {}; + my $_ktype359 = 0; + my $_vtype360 = 0; + $xfer += $input->readMapBegin(\$_ktype359, \$_vtype360, \$_size358); + for (my $_i362 = 0; $_i362 < $_size358; ++$_i362) + { + my $key363 = ''; + my $val364 = ''; + $xfer += $input->readString(\$key363); + $xfer += $input->readString(\$val364); + $self->{attributes}->{$key363} = $val364; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter365,$viter366) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter365); + $xfer += $output->writeString($viter366); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllTs_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllTs_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllRow_args; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllRow_args->mk_accessors( qw( tableName row attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllRow_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::MAP) { + { + my $_size367 = 0; + $self->{attributes} = {}; + my $_ktype368 = 0; + my $_vtype369 = 0; + $xfer += $input->readMapBegin(\$_ktype368, \$_vtype369, \$_size367); + for (my $_i371 = 0; $_i371 < $_size367; ++$_i371) + { + my $key372 = ''; + my $val373 = ''; + $xfer += $input->readString(\$key372); + $xfer += $input->readString(\$val373); + $self->{attributes}->{$key372} = $val373; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRow_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter374,$viter375) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter374); + $xfer += $output->writeString($viter375); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllRow_result; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllRow_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllRow_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRow_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_increment_args; +use base qw(Class::Accessor); +Hbase::Hbase_increment_args->mk_accessors( qw( increment ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{increment} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{increment}) { + $self->{increment} = $vals->{increment}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_increment_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{increment} = new Hbase::TIncrement(); + $xfer += $self->{increment}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_increment_args'); + if (defined $self->{increment}) { + $xfer += $output->writeFieldBegin('increment', TType::STRUCT, 1); + $xfer += $self->{increment}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_increment_result; +use base qw(Class::Accessor); +Hbase::Hbase_increment_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_increment_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_increment_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_incrementRows_args; +use base qw(Class::Accessor); +Hbase::Hbase_incrementRows_args->mk_accessors( qw( increments ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{increments} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{increments}) { + $self->{increments} = $vals->{increments}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_incrementRows_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::LIST) { + { + my $_size376 = 0; + $self->{increments} = []; + my $_etype379 = 0; + $xfer += $input->readListBegin(\$_etype379, \$_size376); + for (my $_i380 = 0; $_i380 < $_size376; ++$_i380) + { + my $elem381 = undef; + $elem381 = new Hbase::TIncrement(); + $xfer += $elem381->read($input); + push(@{$self->{increments}},$elem381); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_incrementRows_args'); + if (defined $self->{increments}) { + $xfer += $output->writeFieldBegin('increments', TType::LIST, 1); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{increments}})); + { + foreach my $iter382 (@{$self->{increments}}) + { + $xfer += ${iter382}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_incrementRows_result; +use base qw(Class::Accessor); +Hbase::Hbase_incrementRows_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_incrementRows_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_incrementRows_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllRowTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllRowTs_args->mk_accessors( qw( tableName row timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllRowTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size383 = 0; + $self->{attributes} = {}; + my $_ktype384 = 0; + my $_vtype385 = 0; + $xfer += $input->readMapBegin(\$_ktype384, \$_vtype385, \$_size383); + for (my $_i387 = 0; $_i387 < $_size383; ++$_i387) + { + my $key388 = ''; + my $val389 = ''; + $xfer += $input->readString(\$key388); + $xfer += $input->readString(\$val389); + $self->{attributes}->{$key388} = $val389; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRowTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter390,$viter391) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter390); + $xfer += $output->writeString($viter391); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_deleteAllRowTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_deleteAllRowTs_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_deleteAllRowTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRowTs_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithScan_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithScan_args->mk_accessors( qw( tableName scan attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{scan} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{scan}) { + $self->{scan} = $vals->{scan}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithScan_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{scan} = new Hbase::TScan(); + $xfer += $self->{scan}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::MAP) { + { + my $_size392 = 0; + $self->{attributes} = {}; + my $_ktype393 = 0; + my $_vtype394 = 0; + $xfer += $input->readMapBegin(\$_ktype393, \$_vtype394, \$_size392); + for (my $_i396 = 0; $_i396 < $_size392; ++$_i396) + { + my $key397 = ''; + my $val398 = ''; + $xfer += $input->readString(\$key397); + $xfer += $input->readString(\$val398); + $self->{attributes}->{$key397} = $val398; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithScan_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{scan}) { + $xfer += $output->writeFieldBegin('scan', TType::STRUCT, 2); + $xfer += $self->{scan}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter399,$viter400) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter399); + $xfer += $output->writeString($viter400); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithScan_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithScan_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithScan_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithScan_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpen_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpen_args->mk_accessors( qw( tableName startRow columns attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{startRow} = undef; + $self->{columns} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{startRow}) { + $self->{startRow} = $vals->{startRow}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpen_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size401 = 0; + $self->{columns} = []; + my $_etype404 = 0; + $xfer += $input->readListBegin(\$_etype404, \$_size401); + for (my $_i405 = 0; $_i405 < $_size401; ++$_i405) + { + my $elem406 = undef; + $xfer += $input->readString(\$elem406); + push(@{$self->{columns}},$elem406); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size407 = 0; + $self->{attributes} = {}; + my $_ktype408 = 0; + my $_vtype409 = 0; + $xfer += $input->readMapBegin(\$_ktype408, \$_vtype409, \$_size407); + for (my $_i411 = 0; $_i411 < $_size407; ++$_i411) + { + my $key412 = ''; + my $val413 = ''; + $xfer += $input->readString(\$key412); + $xfer += $input->readString(\$val413); + $self->{attributes}->{$key412} = $val413; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpen_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{startRow}) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($self->{startRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter414 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter414); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter415,$viter416) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter415); + $xfer += $output->writeString($viter416); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpen_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpen_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpen_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpen_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithStop_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithStop_args->mk_accessors( qw( tableName startRow stopRow columns attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{startRow} = undef; + $self->{stopRow} = undef; + $self->{columns} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{startRow}) { + $self->{startRow} = $vals->{startRow}; + } + if (defined $vals->{stopRow}) { + $self->{stopRow} = $vals->{stopRow}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithStop_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{stopRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::LIST) { + { + my $_size417 = 0; + $self->{columns} = []; + my $_etype420 = 0; + $xfer += $input->readListBegin(\$_etype420, \$_size417); + for (my $_i421 = 0; $_i421 < $_size417; ++$_i421) + { + my $elem422 = undef; + $xfer += $input->readString(\$elem422); + push(@{$self->{columns}},$elem422); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size423 = 0; + $self->{attributes} = {}; + my $_ktype424 = 0; + my $_vtype425 = 0; + $xfer += $input->readMapBegin(\$_ktype424, \$_vtype425, \$_size423); + for (my $_i427 = 0; $_i427 < $_size423; ++$_i427) + { + my $key428 = ''; + my $val429 = ''; + $xfer += $input->readString(\$key428); + $xfer += $input->readString(\$val429); + $self->{attributes}->{$key428} = $val429; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStop_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{startRow}) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($self->{startRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{stopRow}) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 3); + $xfer += $output->writeString($self->{stopRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 4); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter430 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter430); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter431,$viter432) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter431); + $xfer += $output->writeString($viter432); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithStop_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithStop_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithStop_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStop_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithPrefix_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithPrefix_args->mk_accessors( qw( tableName startAndPrefix columns attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{startAndPrefix} = undef; + $self->{columns} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{startAndPrefix}) { + $self->{startAndPrefix} = $vals->{startAndPrefix}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithPrefix_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startAndPrefix}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size433 = 0; + $self->{columns} = []; + my $_etype436 = 0; + $xfer += $input->readListBegin(\$_etype436, \$_size433); + for (my $_i437 = 0; $_i437 < $_size433; ++$_i437) + { + my $elem438 = undef; + $xfer += $input->readString(\$elem438); + push(@{$self->{columns}},$elem438); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::MAP) { + { + my $_size439 = 0; + $self->{attributes} = {}; + my $_ktype440 = 0; + my $_vtype441 = 0; + $xfer += $input->readMapBegin(\$_ktype440, \$_vtype441, \$_size439); + for (my $_i443 = 0; $_i443 < $_size439; ++$_i443) + { + my $key444 = ''; + my $val445 = ''; + $xfer += $input->readString(\$key444); + $xfer += $input->readString(\$val445); + $self->{attributes}->{$key444} = $val445; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithPrefix_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{startAndPrefix}) { + $xfer += $output->writeFieldBegin('startAndPrefix', TType::STRING, 2); + $xfer += $output->writeString($self->{startAndPrefix}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter446 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter446); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter447,$viter448) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter447); + $xfer += $output->writeString($viter448); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithPrefix_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithPrefix_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithPrefix_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithPrefix_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenTs_args->mk_accessors( qw( tableName startRow columns timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{startRow} = undef; + $self->{columns} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{startRow}) { + $self->{startRow} = $vals->{startRow}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::LIST) { + { + my $_size449 = 0; + $self->{columns} = []; + my $_etype452 = 0; + $xfer += $input->readListBegin(\$_etype452, \$_size449); + for (my $_i453 = 0; $_i453 < $_size449; ++$_i453) + { + my $elem454 = undef; + $xfer += $input->readString(\$elem454); + push(@{$self->{columns}},$elem454); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::MAP) { + { + my $_size455 = 0; + $self->{attributes} = {}; + my $_ktype456 = 0; + my $_vtype457 = 0; + $xfer += $input->readMapBegin(\$_ktype456, \$_vtype457, \$_size455); + for (my $_i459 = 0; $_i459 < $_size455; ++$_i459) + { + my $key460 = ''; + my $val461 = ''; + $xfer += $input->readString(\$key460); + $xfer += $input->readString(\$val461); + $self->{attributes}->{$key460} = $val461; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{startRow}) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($self->{startRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 3); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter462 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter462); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter463,$viter464) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter463); + $xfer += $output->writeString($viter464); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithStopTs_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithStopTs_args->mk_accessors( qw( tableName startRow stopRow columns timestamp attributes ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{startRow} = undef; + $self->{stopRow} = undef; + $self->{columns} = undef; + $self->{timestamp} = undef; + $self->{attributes} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{startRow}) { + $self->{startRow} = $vals->{startRow}; + } + if (defined $vals->{stopRow}) { + $self->{stopRow} = $vals->{stopRow}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{attributes}) { + $self->{attributes} = $vals->{attributes}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithStopTs_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{stopRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::LIST) { + { + my $_size465 = 0; + $self->{columns} = []; + my $_etype468 = 0; + $xfer += $input->readListBegin(\$_etype468, \$_size465); + for (my $_i469 = 0; $_i469 < $_size465; ++$_i469) + { + my $elem470 = undef; + $xfer += $input->readString(\$elem470); + push(@{$self->{columns}},$elem470); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^6$/ && do{ if ($ftype == TType::MAP) { + { + my $_size471 = 0; + $self->{attributes} = {}; + my $_ktype472 = 0; + my $_vtype473 = 0; + $xfer += $input->readMapBegin(\$_ktype472, \$_vtype473, \$_size471); + for (my $_i475 = 0; $_i475 < $_size471; ++$_i475) + { + my $key476 = ''; + my $val477 = ''; + $xfer += $input->readString(\$key476); + $xfer += $input->readString(\$val477); + $self->{attributes}->{$key476} = $val477; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStopTs_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{startRow}) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($self->{startRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{stopRow}) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 3); + $xfer += $output->writeString($self->{stopRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 4); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter478 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter478); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 5); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{attributes}) { + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 6); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{attributes}})); + { + while( my ($kiter479,$viter480) = each %{$self->{attributes}}) + { + $xfer += $output->writeString($kiter479); + $xfer += $output->writeString($viter480); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerOpenWithStopTs_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerOpenWithStopTs_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerOpenWithStopTs_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{success}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStopTs_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($self->{success}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerGet_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerGet_args->mk_accessors( qw( id ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{id} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{id}) { + $self->{id} = $vals->{id}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerGet_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{id}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGet_args'); + if (defined $self->{id}) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($self->{id}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerGet_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerGet_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerGet_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size481 = 0; + $self->{success} = []; + my $_etype484 = 0; + $xfer += $input->readListBegin(\$_etype484, \$_size481); + for (my $_i485 = 0; $_i485 < $_size481; ++$_i485) + { + my $elem486 = undef; + $elem486 = new Hbase::TRowResult(); + $xfer += $elem486->read($input); + push(@{$self->{success}},$elem486); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGet_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter487 (@{$self->{success}}) + { + $xfer += ${iter487}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerGetList_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerGetList_args->mk_accessors( qw( id nbRows ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{id} = undef; + $self->{nbRows} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{id}) { + $self->{id} = $vals->{id}; + } + if (defined $vals->{nbRows}) { + $self->{nbRows} = $vals->{nbRows}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerGetList_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{id}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{nbRows}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGetList_args'); + if (defined $self->{id}) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($self->{id}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{nbRows}) { + $xfer += $output->writeFieldBegin('nbRows', TType::I32, 2); + $xfer += $output->writeI32($self->{nbRows}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerGetList_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerGetList_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerGetList_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size488 = 0; + $self->{success} = []; + my $_etype491 = 0; + $xfer += $input->readListBegin(\$_etype491, \$_size488); + for (my $_i492 = 0; $_i492 < $_size488; ++$_i492) + { + my $elem493 = undef; + $elem493 = new Hbase::TRowResult(); + $xfer += $elem493->read($input); + push(@{$self->{success}},$elem493); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGetList_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter494 (@{$self->{success}}) + { + $xfer += ${iter494}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerClose_args; +use base qw(Class::Accessor); +Hbase::Hbase_scannerClose_args->mk_accessors( qw( id ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{id} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{id}) { + $self->{id} = $vals->{id}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerClose_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{id}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerClose_args'); + if (defined $self->{id}) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($self->{id}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_scannerClose_result; +use base qw(Class::Accessor); +Hbase::Hbase_scannerClose_result->mk_accessors( qw( ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{io} = undef; + $self->{ia} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + if (defined $vals->{ia}) { + $self->{ia} = $vals->{ia}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_scannerClose_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRUCT) { + $self->{ia} = new Hbase::IllegalArgument(); + $xfer += $self->{ia}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerClose_result'); + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ia}) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $self->{ia}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowOrBefore_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRowOrBefore_args->mk_accessors( qw( tableName row family ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{tableName} = undef; + $self->{row} = undef; + $self->{family} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{tableName}) { + $self->{tableName} = $vals->{tableName}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{family}) { + $self->{family} = $vals->{family}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowOrBefore_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{tableName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{family}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowOrBefore_args'); + if (defined $self->{tableName}) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($self->{tableName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{family}) { + $xfer += $output->writeFieldBegin('family', TType::STRING, 3); + $xfer += $output->writeString($self->{family}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRowOrBefore_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRowOrBefore_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRowOrBefore_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::LIST) { + { + my $_size495 = 0; + $self->{success} = []; + my $_etype498 = 0; + $xfer += $input->readListBegin(\$_etype498, \$_size495); + for (my $_i499 = 0; $_i499 < $_size495; ++$_i499) + { + my $elem500 = undef; + $elem500 = new Hbase::TCell(); + $xfer += $elem500->read($input); + push(@{$self->{success}},$elem500); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowOrBefore_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::LIST, 0); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{success}})); + { + foreach my $iter501 (@{$self->{success}}) + { + $xfer += ${iter501}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRegionInfo_args; +use base qw(Class::Accessor); +Hbase::Hbase_getRegionInfo_args->mk_accessors( qw( row ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{row} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRegionInfo_args'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRegionInfo_args'); + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Hbase_getRegionInfo_result; +use base qw(Class::Accessor); +Hbase::Hbase_getRegionInfo_result->mk_accessors( qw( success ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{success} = undef; + $self->{io} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{success}) { + $self->{success} = $vals->{success}; + } + if (defined $vals->{io}) { + $self->{io} = $vals->{io}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Hbase_getRegionInfo_result'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^0$/ && do{ if ($ftype == TType::STRUCT) { + $self->{success} = new Hbase::TRegionInfo(); + $xfer += $self->{success}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^1$/ && do{ if ($ftype == TType::STRUCT) { + $self->{io} = new Hbase::IOError(); + $xfer += $self->{io}->read($input); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRegionInfo_result'); + if (defined $self->{success}) { + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $self->{success}->write($output); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{io}) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $self->{io}->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::HbaseIf; + +use strict; + + +sub enableTable{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub disableTable{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub isTableEnabled{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub compact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + die 'implement interface'; +} + +sub majorCompact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + die 'implement interface'; +} + +sub getTableNames{ + my $self = shift; + + die 'implement interface'; +} + +sub getColumnDescriptors{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub getTableRegions{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub createTable{ + my $self = shift; + my $tableName = shift; + my $columnFamilies = shift; + + die 'implement interface'; +} + +sub deleteTable{ + my $self = shift; + my $tableName = shift; + + die 'implement interface'; +} + +sub get{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getVer{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $numVersions = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getVerTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $numVersions = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowWithColumns{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRows{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowsWithColumns{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub getRowsWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub mutateRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub mutateRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub mutateRows{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub mutateRowsTs{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub atomicIncrement{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $value = shift; + + die 'implement interface'; +} + +sub deleteAll{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub deleteAllTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub deleteAllRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub increment{ + my $self = shift; + my $increment = shift; + + die 'implement interface'; +} + +sub incrementRows{ + my $self = shift; + my $increments = shift; + + die 'implement interface'; +} + +sub deleteAllRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpenWithScan{ + my $self = shift; + my $tableName = shift; + my $scan = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpen{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpenWithStop{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpenWithPrefix{ + my $self = shift; + my $tableName = shift; + my $startAndPrefix = shift; + my $columns = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpenTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerOpenWithStopTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + die 'implement interface'; +} + +sub scannerGet{ + my $self = shift; + my $id = shift; + + die 'implement interface'; +} + +sub scannerGetList{ + my $self = shift; + my $id = shift; + my $nbRows = shift; + + die 'implement interface'; +} + +sub scannerClose{ + my $self = shift; + my $id = shift; + + die 'implement interface'; +} + +sub getRowOrBefore{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $family = shift; + + die 'implement interface'; +} + +sub getRegionInfo{ + my $self = shift; + my $row = shift; + + die 'implement interface'; +} + +package Hbase::HbaseRest; + +use strict; + + +sub new { + my ($classname, $impl) = @_; + my $self ={ impl => $impl }; + + return bless($self,$classname); +} + +sub enableTable{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->enableTable($tableName); +} + +sub disableTable{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->disableTable($tableName); +} + +sub isTableEnabled{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->isTableEnabled($tableName); +} + +sub compact{ + my ($self, $request) = @_; + + my $tableNameOrRegionName = ($request->{'tableNameOrRegionName'}) ? $request->{'tableNameOrRegionName'} : undef; + return $self->{impl}->compact($tableNameOrRegionName); +} + +sub majorCompact{ + my ($self, $request) = @_; + + my $tableNameOrRegionName = ($request->{'tableNameOrRegionName'}) ? $request->{'tableNameOrRegionName'} : undef; + return $self->{impl}->majorCompact($tableNameOrRegionName); +} + +sub getTableNames{ + my ($self, $request) = @_; + + return $self->{impl}->getTableNames(); +} + +sub getColumnDescriptors{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->getColumnDescriptors($tableName); +} + +sub getTableRegions{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->getTableRegions($tableName); +} + +sub createTable{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $columnFamilies = ($request->{'columnFamilies'}) ? $request->{'columnFamilies'} : undef; + return $self->{impl}->createTable($tableName, $columnFamilies); +} + +sub deleteTable{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + return $self->{impl}->deleteTable($tableName); +} + +sub get{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->get($tableName, $row, $column, $attributes); +} + +sub getVer{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $numVersions = ($request->{'numVersions'}) ? $request->{'numVersions'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getVer($tableName, $row, $column, $numVersions, $attributes); +} + +sub getVerTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $numVersions = ($request->{'numVersions'}) ? $request->{'numVersions'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getVerTs($tableName, $row, $column, $timestamp, $numVersions, $attributes); +} + +sub getRow{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRow($tableName, $row, $attributes); +} + +sub getRowWithColumns{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowWithColumns($tableName, $row, $columns, $attributes); +} + +sub getRowTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowTs($tableName, $row, $timestamp, $attributes); +} + +sub getRowWithColumnsTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowWithColumnsTs($tableName, $row, $columns, $timestamp, $attributes); +} + +sub getRows{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rows = ($request->{'rows'}) ? $request->{'rows'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRows($tableName, $rows, $attributes); +} + +sub getRowsWithColumns{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rows = ($request->{'rows'}) ? $request->{'rows'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowsWithColumns($tableName, $rows, $columns, $attributes); +} + +sub getRowsTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rows = ($request->{'rows'}) ? $request->{'rows'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowsTs($tableName, $rows, $timestamp, $attributes); +} + +sub getRowsWithColumnsTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rows = ($request->{'rows'}) ? $request->{'rows'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->getRowsWithColumnsTs($tableName, $rows, $columns, $timestamp, $attributes); +} + +sub mutateRow{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $mutations = ($request->{'mutations'}) ? $request->{'mutations'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->mutateRow($tableName, $row, $mutations, $attributes); +} + +sub mutateRowTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $mutations = ($request->{'mutations'}) ? $request->{'mutations'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->mutateRowTs($tableName, $row, $mutations, $timestamp, $attributes); +} + +sub mutateRows{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rowBatches = ($request->{'rowBatches'}) ? $request->{'rowBatches'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->mutateRows($tableName, $rowBatches, $attributes); +} + +sub mutateRowsTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $rowBatches = ($request->{'rowBatches'}) ? $request->{'rowBatches'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->mutateRowsTs($tableName, $rowBatches, $timestamp, $attributes); +} + +sub atomicIncrement{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $value = ($request->{'value'}) ? $request->{'value'} : undef; + return $self->{impl}->atomicIncrement($tableName, $row, $column, $value); +} + +sub deleteAll{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->deleteAll($tableName, $row, $column, $attributes); +} + +sub deleteAllTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $column = ($request->{'column'}) ? $request->{'column'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->deleteAllTs($tableName, $row, $column, $timestamp, $attributes); +} + +sub deleteAllRow{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->deleteAllRow($tableName, $row, $attributes); +} + +sub increment{ + my ($self, $request) = @_; + + my $increment = ($request->{'increment'}) ? $request->{'increment'} : undef; + return $self->{impl}->increment($increment); +} + +sub incrementRows{ + my ($self, $request) = @_; + + my $increments = ($request->{'increments'}) ? $request->{'increments'} : undef; + return $self->{impl}->incrementRows($increments); +} + +sub deleteAllRowTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->deleteAllRowTs($tableName, $row, $timestamp, $attributes); +} + +sub scannerOpenWithScan{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $scan = ($request->{'scan'}) ? $request->{'scan'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpenWithScan($tableName, $scan, $attributes); +} + +sub scannerOpen{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $startRow = ($request->{'startRow'}) ? $request->{'startRow'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpen($tableName, $startRow, $columns, $attributes); +} + +sub scannerOpenWithStop{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $startRow = ($request->{'startRow'}) ? $request->{'startRow'} : undef; + my $stopRow = ($request->{'stopRow'}) ? $request->{'stopRow'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpenWithStop($tableName, $startRow, $stopRow, $columns, $attributes); +} + +sub scannerOpenWithPrefix{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $startAndPrefix = ($request->{'startAndPrefix'}) ? $request->{'startAndPrefix'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpenWithPrefix($tableName, $startAndPrefix, $columns, $attributes); +} + +sub scannerOpenTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $startRow = ($request->{'startRow'}) ? $request->{'startRow'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpenTs($tableName, $startRow, $columns, $timestamp, $attributes); +} + +sub scannerOpenWithStopTs{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $startRow = ($request->{'startRow'}) ? $request->{'startRow'} : undef; + my $stopRow = ($request->{'stopRow'}) ? $request->{'stopRow'} : undef; + my $columns = ($request->{'columns'}) ? $request->{'columns'} : undef; + my $timestamp = ($request->{'timestamp'}) ? $request->{'timestamp'} : undef; + my $attributes = ($request->{'attributes'}) ? $request->{'attributes'} : undef; + return $self->{impl}->scannerOpenWithStopTs($tableName, $startRow, $stopRow, $columns, $timestamp, $attributes); +} + +sub scannerGet{ + my ($self, $request) = @_; + + my $id = ($request->{'id'}) ? $request->{'id'} : undef; + return $self->{impl}->scannerGet($id); +} + +sub scannerGetList{ + my ($self, $request) = @_; + + my $id = ($request->{'id'}) ? $request->{'id'} : undef; + my $nbRows = ($request->{'nbRows'}) ? $request->{'nbRows'} : undef; + return $self->{impl}->scannerGetList($id, $nbRows); +} + +sub scannerClose{ + my ($self, $request) = @_; + + my $id = ($request->{'id'}) ? $request->{'id'} : undef; + return $self->{impl}->scannerClose($id); +} + +sub getRowOrBefore{ + my ($self, $request) = @_; + + my $tableName = ($request->{'tableName'}) ? $request->{'tableName'} : undef; + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + my $family = ($request->{'family'}) ? $request->{'family'} : undef; + return $self->{impl}->getRowOrBefore($tableName, $row, $family); +} + +sub getRegionInfo{ + my ($self, $request) = @_; + + my $row = ($request->{'row'}) ? $request->{'row'} : undef; + return $self->{impl}->getRegionInfo($row); +} + +package Hbase::HbaseClient; + + +use base qw(Hbase::HbaseIf); +sub new { + my ($classname, $input, $output) = @_; + my $self = {}; + $self->{input} = $input; + $self->{output} = defined $output ? $output : $input; + $self->{seqid} = 0; + return bless($self,$classname); +} + +sub enableTable{ + my $self = shift; + my $tableName = shift; + + $self->send_enableTable($tableName); + $self->recv_enableTable(); +} + +sub send_enableTable{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('enableTable', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_enableTable_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_enableTable{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_enableTable_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub disableTable{ + my $self = shift; + my $tableName = shift; + + $self->send_disableTable($tableName); + $self->recv_disableTable(); +} + +sub send_disableTable{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('disableTable', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_disableTable_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_disableTable{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_disableTable_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub isTableEnabled{ + my $self = shift; + my $tableName = shift; + + $self->send_isTableEnabled($tableName); + return $self->recv_isTableEnabled(); +} + +sub send_isTableEnabled{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('isTableEnabled', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_isTableEnabled_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_isTableEnabled{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_isTableEnabled_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "isTableEnabled failed: unknown result"; +} +sub compact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + $self->send_compact($tableNameOrRegionName); + $self->recv_compact(); +} + +sub send_compact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + $self->{output}->writeMessageBegin('compact', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_compact_args(); + $args->{tableNameOrRegionName} = $tableNameOrRegionName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_compact{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_compact_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub majorCompact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + $self->send_majorCompact($tableNameOrRegionName); + $self->recv_majorCompact(); +} + +sub send_majorCompact{ + my $self = shift; + my $tableNameOrRegionName = shift; + + $self->{output}->writeMessageBegin('majorCompact', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_majorCompact_args(); + $args->{tableNameOrRegionName} = $tableNameOrRegionName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_majorCompact{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_majorCompact_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub getTableNames{ + my $self = shift; + + $self->send_getTableNames(); + return $self->recv_getTableNames(); +} + +sub send_getTableNames{ + my $self = shift; + + $self->{output}->writeMessageBegin('getTableNames', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getTableNames_args(); + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getTableNames{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getTableNames_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getTableNames failed: unknown result"; +} +sub getColumnDescriptors{ + my $self = shift; + my $tableName = shift; + + $self->send_getColumnDescriptors($tableName); + return $self->recv_getColumnDescriptors(); +} + +sub send_getColumnDescriptors{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('getColumnDescriptors', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getColumnDescriptors_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getColumnDescriptors{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getColumnDescriptors_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getColumnDescriptors failed: unknown result"; +} +sub getTableRegions{ + my $self = shift; + my $tableName = shift; + + $self->send_getTableRegions($tableName); + return $self->recv_getTableRegions(); +} + +sub send_getTableRegions{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('getTableRegions', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getTableRegions_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getTableRegions{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getTableRegions_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getTableRegions failed: unknown result"; +} +sub createTable{ + my $self = shift; + my $tableName = shift; + my $columnFamilies = shift; + + $self->send_createTable($tableName, $columnFamilies); + $self->recv_createTable(); +} + +sub send_createTable{ + my $self = shift; + my $tableName = shift; + my $columnFamilies = shift; + + $self->{output}->writeMessageBegin('createTable', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_createTable_args(); + $args->{tableName} = $tableName; + $args->{columnFamilies} = $columnFamilies; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_createTable{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_createTable_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + if (defined $result->{exist}) { + die $result->{exist}; + } + return; +} +sub deleteTable{ + my $self = shift; + my $tableName = shift; + + $self->send_deleteTable($tableName); + $self->recv_deleteTable(); +} + +sub send_deleteTable{ + my $self = shift; + my $tableName = shift; + + $self->{output}->writeMessageBegin('deleteTable', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_deleteTable_args(); + $args->{tableName} = $tableName; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_deleteTable{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_deleteTable_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub get{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + $self->send_get($tableName, $row, $column, $attributes); + return $self->recv_get(); +} + +sub send_get{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('get', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_get_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_get{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_get_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "get failed: unknown result"; +} +sub getVer{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $numVersions = shift; + my $attributes = shift; + + $self->send_getVer($tableName, $row, $column, $numVersions, $attributes); + return $self->recv_getVer(); +} + +sub send_getVer{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $numVersions = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getVer', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getVer_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{numVersions} = $numVersions; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getVer{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getVer_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getVer failed: unknown result"; +} +sub getVerTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $numVersions = shift; + my $attributes = shift; + + $self->send_getVerTs($tableName, $row, $column, $timestamp, $numVersions, $attributes); + return $self->recv_getVerTs(); +} + +sub send_getVerTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $numVersions = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getVerTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getVerTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{timestamp} = $timestamp; + $args->{numVersions} = $numVersions; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getVerTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getVerTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getVerTs failed: unknown result"; +} +sub getRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + $self->send_getRow($tableName, $row, $attributes); + return $self->recv_getRow(); +} + +sub send_getRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRow', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRow_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRow{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRow_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRow failed: unknown result"; +} +sub getRowWithColumns{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $attributes = shift; + + $self->send_getRowWithColumns($tableName, $row, $columns, $attributes); + return $self->recv_getRowWithColumns(); +} + +sub send_getRowWithColumns{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowWithColumns', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowWithColumns_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{columns} = $columns; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowWithColumns{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowWithColumns_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowWithColumns failed: unknown result"; +} +sub getRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_getRowTs($tableName, $row, $timestamp, $attributes); + return $self->recv_getRowTs(); +} + +sub send_getRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowTs failed: unknown result"; +} +sub getRowWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_getRowWithColumnsTs($tableName, $row, $columns, $timestamp, $attributes); + return $self->recv_getRowWithColumnsTs(); +} + +sub send_getRowWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowWithColumnsTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowWithColumnsTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{columns} = $columns; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowWithColumnsTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowWithColumnsTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowWithColumnsTs failed: unknown result"; +} +sub getRows{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $attributes = shift; + + $self->send_getRows($tableName, $rows, $attributes); + return $self->recv_getRows(); +} + +sub send_getRows{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRows', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRows_args(); + $args->{tableName} = $tableName; + $args->{rows} = $rows; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRows{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRows_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRows failed: unknown result"; +} +sub getRowsWithColumns{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $attributes = shift; + + $self->send_getRowsWithColumns($tableName, $rows, $columns, $attributes); + return $self->recv_getRowsWithColumns(); +} + +sub send_getRowsWithColumns{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowsWithColumns', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowsWithColumns_args(); + $args->{tableName} = $tableName; + $args->{rows} = $rows; + $args->{columns} = $columns; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowsWithColumns{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowsWithColumns_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowsWithColumns failed: unknown result"; +} +sub getRowsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_getRowsTs($tableName, $rows, $timestamp, $attributes); + return $self->recv_getRowsTs(); +} + +sub send_getRowsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowsTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowsTs_args(); + $args->{tableName} = $tableName; + $args->{rows} = $rows; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowsTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowsTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowsTs failed: unknown result"; +} +sub getRowsWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_getRowsWithColumnsTs($tableName, $rows, $columns, $timestamp, $attributes); + return $self->recv_getRowsWithColumnsTs(); +} + +sub send_getRowsWithColumnsTs{ + my $self = shift; + my $tableName = shift; + my $rows = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('getRowsWithColumnsTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowsWithColumnsTs_args(); + $args->{tableName} = $tableName; + $args->{rows} = $rows; + $args->{columns} = $columns; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowsWithColumnsTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowsWithColumnsTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowsWithColumnsTs failed: unknown result"; +} +sub mutateRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $attributes = shift; + + $self->send_mutateRow($tableName, $row, $mutations, $attributes); + $self->recv_mutateRow(); +} + +sub send_mutateRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('mutateRow', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_mutateRow_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{mutations} = $mutations; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_mutateRow{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_mutateRow_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + return; +} +sub mutateRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_mutateRowTs($tableName, $row, $mutations, $timestamp, $attributes); + $self->recv_mutateRowTs(); +} + +sub send_mutateRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $mutations = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('mutateRowTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_mutateRowTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{mutations} = $mutations; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_mutateRowTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_mutateRowTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + return; +} +sub mutateRows{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $attributes = shift; + + $self->send_mutateRows($tableName, $rowBatches, $attributes); + $self->recv_mutateRows(); +} + +sub send_mutateRows{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('mutateRows', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_mutateRows_args(); + $args->{tableName} = $tableName; + $args->{rowBatches} = $rowBatches; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_mutateRows{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_mutateRows_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + return; +} +sub mutateRowsTs{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_mutateRowsTs($tableName, $rowBatches, $timestamp, $attributes); + $self->recv_mutateRowsTs(); +} + +sub send_mutateRowsTs{ + my $self = shift; + my $tableName = shift; + my $rowBatches = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('mutateRowsTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_mutateRowsTs_args(); + $args->{tableName} = $tableName; + $args->{rowBatches} = $rowBatches; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_mutateRowsTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_mutateRowsTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + return; +} +sub atomicIncrement{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $value = shift; + + $self->send_atomicIncrement($tableName, $row, $column, $value); + return $self->recv_atomicIncrement(); +} + +sub send_atomicIncrement{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $value = shift; + + $self->{output}->writeMessageBegin('atomicIncrement', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_atomicIncrement_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{value} = $value; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_atomicIncrement{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_atomicIncrement_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + die "atomicIncrement failed: unknown result"; +} +sub deleteAll{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + $self->send_deleteAll($tableName, $row, $column, $attributes); + $self->recv_deleteAll(); +} + +sub send_deleteAll{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('deleteAll', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_deleteAll_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_deleteAll{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_deleteAll_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub deleteAllTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_deleteAllTs($tableName, $row, $column, $timestamp, $attributes); + $self->recv_deleteAllTs(); +} + +sub send_deleteAllTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $column = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('deleteAllTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_deleteAllTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{column} = $column; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_deleteAllTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_deleteAllTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub deleteAllRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + $self->send_deleteAllRow($tableName, $row, $attributes); + $self->recv_deleteAllRow(); +} + +sub send_deleteAllRow{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('deleteAllRow', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_deleteAllRow_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_deleteAllRow{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_deleteAllRow_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub increment{ + my $self = shift; + my $increment = shift; + + $self->send_increment($increment); + $self->recv_increment(); +} + +sub send_increment{ + my $self = shift; + my $increment = shift; + + $self->{output}->writeMessageBegin('increment', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_increment_args(); + $args->{increment} = $increment; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_increment{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_increment_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub incrementRows{ + my $self = shift; + my $increments = shift; + + $self->send_incrementRows($increments); + $self->recv_incrementRows(); +} + +sub send_incrementRows{ + my $self = shift; + my $increments = shift; + + $self->{output}->writeMessageBegin('incrementRows', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_incrementRows_args(); + $args->{increments} = $increments; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_incrementRows{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_incrementRows_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub deleteAllRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_deleteAllRowTs($tableName, $row, $timestamp, $attributes); + $self->recv_deleteAllRowTs(); +} + +sub send_deleteAllRowTs{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('deleteAllRowTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_deleteAllRowTs_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_deleteAllRowTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_deleteAllRowTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + return; +} +sub scannerOpenWithScan{ + my $self = shift; + my $tableName = shift; + my $scan = shift; + my $attributes = shift; + + $self->send_scannerOpenWithScan($tableName, $scan, $attributes); + return $self->recv_scannerOpenWithScan(); +} + +sub send_scannerOpenWithScan{ + my $self = shift; + my $tableName = shift; + my $scan = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpenWithScan', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpenWithScan_args(); + $args->{tableName} = $tableName; + $args->{scan} = $scan; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpenWithScan{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpenWithScan_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpenWithScan failed: unknown result"; +} +sub scannerOpen{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $attributes = shift; + + $self->send_scannerOpen($tableName, $startRow, $columns, $attributes); + return $self->recv_scannerOpen(); +} + +sub send_scannerOpen{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpen', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpen_args(); + $args->{tableName} = $tableName; + $args->{startRow} = $startRow; + $args->{columns} = $columns; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpen{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpen_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpen failed: unknown result"; +} +sub scannerOpenWithStop{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $attributes = shift; + + $self->send_scannerOpenWithStop($tableName, $startRow, $stopRow, $columns, $attributes); + return $self->recv_scannerOpenWithStop(); +} + +sub send_scannerOpenWithStop{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpenWithStop', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpenWithStop_args(); + $args->{tableName} = $tableName; + $args->{startRow} = $startRow; + $args->{stopRow} = $stopRow; + $args->{columns} = $columns; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpenWithStop{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpenWithStop_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpenWithStop failed: unknown result"; +} +sub scannerOpenWithPrefix{ + my $self = shift; + my $tableName = shift; + my $startAndPrefix = shift; + my $columns = shift; + my $attributes = shift; + + $self->send_scannerOpenWithPrefix($tableName, $startAndPrefix, $columns, $attributes); + return $self->recv_scannerOpenWithPrefix(); +} + +sub send_scannerOpenWithPrefix{ + my $self = shift; + my $tableName = shift; + my $startAndPrefix = shift; + my $columns = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpenWithPrefix', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpenWithPrefix_args(); + $args->{tableName} = $tableName; + $args->{startAndPrefix} = $startAndPrefix; + $args->{columns} = $columns; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpenWithPrefix{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpenWithPrefix_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpenWithPrefix failed: unknown result"; +} +sub scannerOpenTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_scannerOpenTs($tableName, $startRow, $columns, $timestamp, $attributes); + return $self->recv_scannerOpenTs(); +} + +sub send_scannerOpenTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpenTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpenTs_args(); + $args->{tableName} = $tableName; + $args->{startRow} = $startRow; + $args->{columns} = $columns; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpenTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpenTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpenTs failed: unknown result"; +} +sub scannerOpenWithStopTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->send_scannerOpenWithStopTs($tableName, $startRow, $stopRow, $columns, $timestamp, $attributes); + return $self->recv_scannerOpenWithStopTs(); +} + +sub send_scannerOpenWithStopTs{ + my $self = shift; + my $tableName = shift; + my $startRow = shift; + my $stopRow = shift; + my $columns = shift; + my $timestamp = shift; + my $attributes = shift; + + $self->{output}->writeMessageBegin('scannerOpenWithStopTs', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerOpenWithStopTs_args(); + $args->{tableName} = $tableName; + $args->{startRow} = $startRow; + $args->{stopRow} = $stopRow; + $args->{columns} = $columns; + $args->{timestamp} = $timestamp; + $args->{attributes} = $attributes; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerOpenWithStopTs{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerOpenWithStopTs_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "scannerOpenWithStopTs failed: unknown result"; +} +sub scannerGet{ + my $self = shift; + my $id = shift; + + $self->send_scannerGet($id); + return $self->recv_scannerGet(); +} + +sub send_scannerGet{ + my $self = shift; + my $id = shift; + + $self->{output}->writeMessageBegin('scannerGet', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerGet_args(); + $args->{id} = $id; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerGet{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerGet_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + die "scannerGet failed: unknown result"; +} +sub scannerGetList{ + my $self = shift; + my $id = shift; + my $nbRows = shift; + + $self->send_scannerGetList($id, $nbRows); + return $self->recv_scannerGetList(); +} + +sub send_scannerGetList{ + my $self = shift; + my $id = shift; + my $nbRows = shift; + + $self->{output}->writeMessageBegin('scannerGetList', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerGetList_args(); + $args->{id} = $id; + $args->{nbRows} = $nbRows; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerGetList{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerGetList_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + die "scannerGetList failed: unknown result"; +} +sub scannerClose{ + my $self = shift; + my $id = shift; + + $self->send_scannerClose($id); + $self->recv_scannerClose(); +} + +sub send_scannerClose{ + my $self = shift; + my $id = shift; + + $self->{output}->writeMessageBegin('scannerClose', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_scannerClose_args(); + $args->{id} = $id; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_scannerClose{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_scannerClose_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{io}) { + die $result->{io}; + } + if (defined $result->{ia}) { + die $result->{ia}; + } + return; +} +sub getRowOrBefore{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $family = shift; + + $self->send_getRowOrBefore($tableName, $row, $family); + return $self->recv_getRowOrBefore(); +} + +sub send_getRowOrBefore{ + my $self = shift; + my $tableName = shift; + my $row = shift; + my $family = shift; + + $self->{output}->writeMessageBegin('getRowOrBefore', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRowOrBefore_args(); + $args->{tableName} = $tableName; + $args->{row} = $row; + $args->{family} = $family; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRowOrBefore{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRowOrBefore_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRowOrBefore failed: unknown result"; +} +sub getRegionInfo{ + my $self = shift; + my $row = shift; + + $self->send_getRegionInfo($row); + return $self->recv_getRegionInfo(); +} + +sub send_getRegionInfo{ + my $self = shift; + my $row = shift; + + $self->{output}->writeMessageBegin('getRegionInfo', TMessageType::CALL, $self->{seqid}); + my $args = new Hbase::Hbase_getRegionInfo_args(); + $args->{row} = $row; + $args->write($self->{output}); + $self->{output}->writeMessageEnd(); + $self->{output}->getTransport()->flush(); +} + +sub recv_getRegionInfo{ + my $self = shift; + + my $rseqid = 0; + my $fname; + my $mtype = 0; + + $self->{input}->readMessageBegin(\$fname, \$mtype, \$rseqid); + if ($mtype == TMessageType::EXCEPTION) { + my $x = new TApplicationException(); + $x->read($self->{input}); + $self->{input}->readMessageEnd(); + die $x; + } + my $result = new Hbase::Hbase_getRegionInfo_result(); + $result->read($self->{input}); + $self->{input}->readMessageEnd(); + + if (defined $result->{success} ) { + return $result->{success}; + } + if (defined $result->{io}) { + die $result->{io}; + } + die "getRegionInfo failed: unknown result"; +} +package Hbase::HbaseProcessor; + +use strict; + + +sub new { + my ($classname, $handler) = @_; + my $self = {}; + $self->{handler} = $handler; + return bless ($self, $classname); +} + +sub process { + my ($self, $input, $output) = @_; + my $rseqid = 0; + my $fname = undef; + my $mtype = 0; + + $input->readMessageBegin(\$fname, \$mtype, \$rseqid); + my $methodname = 'process_'.$fname; + if (!$self->can($methodname)) { + $input->skip(TType::STRUCT); + $input->readMessageEnd(); + my $x = new TApplicationException('Function '.$fname.' not implemented.', TApplicationException::UNKNOWN_METHOD); + $output->writeMessageBegin($fname, TMessageType::EXCEPTION, $rseqid); + $x->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); + return; + } + $self->$methodname($rseqid, $input, $output); + return 1; +} + +sub process_enableTable { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_enableTable_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_enableTable_result(); + eval { + $self->{handler}->enableTable($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('enableTable', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_disableTable { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_disableTable_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_disableTable_result(); + eval { + $self->{handler}->disableTable($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('disableTable', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_isTableEnabled { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_isTableEnabled_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_isTableEnabled_result(); + eval { + $result->{success} = $self->{handler}->isTableEnabled($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('isTableEnabled', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_compact { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_compact_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_compact_result(); + eval { + $self->{handler}->compact($args->tableNameOrRegionName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('compact', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_majorCompact { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_majorCompact_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_majorCompact_result(); + eval { + $self->{handler}->majorCompact($args->tableNameOrRegionName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('majorCompact', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getTableNames { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getTableNames_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getTableNames_result(); + eval { + $result->{success} = $self->{handler}->getTableNames(); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getTableNames', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getColumnDescriptors { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getColumnDescriptors_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getColumnDescriptors_result(); + eval { + $result->{success} = $self->{handler}->getColumnDescriptors($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getColumnDescriptors', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getTableRegions { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getTableRegions_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getTableRegions_result(); + eval { + $result->{success} = $self->{handler}->getTableRegions($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getTableRegions', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_createTable { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_createTable_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_createTable_result(); + eval { + $self->{handler}->createTable($args->tableName, $args->columnFamilies); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::AlreadyExists') ){ + $result->{exist} = $@; + } + $output->writeMessageBegin('createTable', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_deleteTable { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_deleteTable_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_deleteTable_result(); + eval { + $self->{handler}->deleteTable($args->tableName); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('deleteTable', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_get { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_get_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_get_result(); + eval { + $result->{success} = $self->{handler}->get($args->tableName, $args->row, $args->column, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('get', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getVer { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getVer_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getVer_result(); + eval { + $result->{success} = $self->{handler}->getVer($args->tableName, $args->row, $args->column, $args->numVersions, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getVer', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getVerTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getVerTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getVerTs_result(); + eval { + $result->{success} = $self->{handler}->getVerTs($args->tableName, $args->row, $args->column, $args->timestamp, $args->numVersions, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getVerTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRow { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRow_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRow_result(); + eval { + $result->{success} = $self->{handler}->getRow($args->tableName, $args->row, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRow', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowWithColumns { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowWithColumns_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowWithColumns_result(); + eval { + $result->{success} = $self->{handler}->getRowWithColumns($args->tableName, $args->row, $args->columns, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowWithColumns', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowTs_result(); + eval { + $result->{success} = $self->{handler}->getRowTs($args->tableName, $args->row, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowWithColumnsTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowWithColumnsTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowWithColumnsTs_result(); + eval { + $result->{success} = $self->{handler}->getRowWithColumnsTs($args->tableName, $args->row, $args->columns, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowWithColumnsTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRows { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRows_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRows_result(); + eval { + $result->{success} = $self->{handler}->getRows($args->tableName, $args->rows, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRows', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowsWithColumns { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowsWithColumns_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowsWithColumns_result(); + eval { + $result->{success} = $self->{handler}->getRowsWithColumns($args->tableName, $args->rows, $args->columns, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowsWithColumns', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowsTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowsTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowsTs_result(); + eval { + $result->{success} = $self->{handler}->getRowsTs($args->tableName, $args->rows, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowsTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowsWithColumnsTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowsWithColumnsTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowsWithColumnsTs_result(); + eval { + $result->{success} = $self->{handler}->getRowsWithColumnsTs($args->tableName, $args->rows, $args->columns, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowsWithColumnsTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_mutateRow { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_mutateRow_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_mutateRow_result(); + eval { + $self->{handler}->mutateRow($args->tableName, $args->row, $args->mutations, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('mutateRow', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_mutateRowTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_mutateRowTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_mutateRowTs_result(); + eval { + $self->{handler}->mutateRowTs($args->tableName, $args->row, $args->mutations, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('mutateRowTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_mutateRows { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_mutateRows_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_mutateRows_result(); + eval { + $self->{handler}->mutateRows($args->tableName, $args->rowBatches, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('mutateRows', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_mutateRowsTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_mutateRowsTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_mutateRowsTs_result(); + eval { + $self->{handler}->mutateRowsTs($args->tableName, $args->rowBatches, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('mutateRowsTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_atomicIncrement { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_atomicIncrement_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_atomicIncrement_result(); + eval { + $result->{success} = $self->{handler}->atomicIncrement($args->tableName, $args->row, $args->column, $args->value); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('atomicIncrement', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_deleteAll { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_deleteAll_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_deleteAll_result(); + eval { + $self->{handler}->deleteAll($args->tableName, $args->row, $args->column, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('deleteAll', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_deleteAllTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_deleteAllTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_deleteAllTs_result(); + eval { + $self->{handler}->deleteAllTs($args->tableName, $args->row, $args->column, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('deleteAllTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_deleteAllRow { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_deleteAllRow_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_deleteAllRow_result(); + eval { + $self->{handler}->deleteAllRow($args->tableName, $args->row, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('deleteAllRow', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_increment { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_increment_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_increment_result(); + eval { + $self->{handler}->increment($args->increment); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('increment', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_incrementRows { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_incrementRows_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_incrementRows_result(); + eval { + $self->{handler}->incrementRows($args->increments); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('incrementRows', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_deleteAllRowTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_deleteAllRowTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_deleteAllRowTs_result(); + eval { + $self->{handler}->deleteAllRowTs($args->tableName, $args->row, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('deleteAllRowTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpenWithScan { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpenWithScan_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpenWithScan_result(); + eval { + $result->{success} = $self->{handler}->scannerOpenWithScan($args->tableName, $args->scan, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpenWithScan', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpen { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpen_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpen_result(); + eval { + $result->{success} = $self->{handler}->scannerOpen($args->tableName, $args->startRow, $args->columns, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpen', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpenWithStop { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpenWithStop_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpenWithStop_result(); + eval { + $result->{success} = $self->{handler}->scannerOpenWithStop($args->tableName, $args->startRow, $args->stopRow, $args->columns, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpenWithStop', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpenWithPrefix { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpenWithPrefix_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpenWithPrefix_result(); + eval { + $result->{success} = $self->{handler}->scannerOpenWithPrefix($args->tableName, $args->startAndPrefix, $args->columns, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpenWithPrefix', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpenTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpenTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpenTs_result(); + eval { + $result->{success} = $self->{handler}->scannerOpenTs($args->tableName, $args->startRow, $args->columns, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpenTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerOpenWithStopTs { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerOpenWithStopTs_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerOpenWithStopTs_result(); + eval { + $result->{success} = $self->{handler}->scannerOpenWithStopTs($args->tableName, $args->startRow, $args->stopRow, $args->columns, $args->timestamp, $args->attributes); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('scannerOpenWithStopTs', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerGet { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerGet_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerGet_result(); + eval { + $result->{success} = $self->{handler}->scannerGet($args->id); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('scannerGet', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerGetList { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerGetList_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerGetList_result(); + eval { + $result->{success} = $self->{handler}->scannerGetList($args->id, $args->nbRows); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('scannerGetList', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_scannerClose { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_scannerClose_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_scannerClose_result(); + eval { + $self->{handler}->scannerClose($args->id); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + }; if( UNIVERSAL::isa($@,'Hbase::IllegalArgument') ){ + $result->{ia} = $@; + } + $output->writeMessageBegin('scannerClose', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRowOrBefore { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRowOrBefore_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRowOrBefore_result(); + eval { + $result->{success} = $self->{handler}->getRowOrBefore($args->tableName, $args->row, $args->family); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRowOrBefore', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +sub process_getRegionInfo { + my ($self, $seqid, $input, $output) = @_; + my $args = new Hbase::Hbase_getRegionInfo_args(); + $args->read($input); + $input->readMessageEnd(); + my $result = new Hbase::Hbase_getRegionInfo_result(); + eval { + $result->{success} = $self->{handler}->getRegionInfo($args->row); + }; if( UNIVERSAL::isa($@,'Hbase::IOError') ){ + $result->{io} = $@; + } + $output->writeMessageBegin('getRegionInfo', TMessageType::REPLY, $seqid); + $result->write($output); + $output->writeMessageEnd(); + $output->getTransport()->flush(); +} + +1; diff --git hbase-examples/src/main/perl/gen-perl/Hbase/Types.pm hbase-examples/src/main/perl/gen-perl/Hbase/Types.pm new file mode 100644 index 0000000..bb0ee1b --- /dev/null +++ hbase-examples/src/main/perl/gen-perl/Hbase/Types.pm @@ -0,0 +1,1207 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +require 5.6.0; +use strict; +use warnings; +use Thrift; + +package Hbase::TCell; +use base qw(Class::Accessor); +Hbase::TCell->mk_accessors( qw( value timestamp ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{value} = undef; + $self->{timestamp} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{value}) { + $self->{value} = $vals->{value}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'TCell'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{value}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('TCell'); + if (defined $self->{value}) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 1); + $xfer += $output->writeString($self->{value}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::ColumnDescriptor; +use base qw(Class::Accessor); +Hbase::ColumnDescriptor->mk_accessors( qw( name maxVersions compression inMemory bloomFilterType bloomFilterVectorSize bloomFilterNbHashes blockCacheEnabled timeToLive ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{name} = undef; + $self->{maxVersions} = 3; + $self->{compression} = "NONE"; + $self->{inMemory} = 0; + $self->{bloomFilterType} = "NONE"; + $self->{bloomFilterVectorSize} = 0; + $self->{bloomFilterNbHashes} = 0; + $self->{blockCacheEnabled} = 0; + $self->{timeToLive} = -1; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{name}) { + $self->{name} = $vals->{name}; + } + if (defined $vals->{maxVersions}) { + $self->{maxVersions} = $vals->{maxVersions}; + } + if (defined $vals->{compression}) { + $self->{compression} = $vals->{compression}; + } + if (defined $vals->{inMemory}) { + $self->{inMemory} = $vals->{inMemory}; + } + if (defined $vals->{bloomFilterType}) { + $self->{bloomFilterType} = $vals->{bloomFilterType}; + } + if (defined $vals->{bloomFilterVectorSize}) { + $self->{bloomFilterVectorSize} = $vals->{bloomFilterVectorSize}; + } + if (defined $vals->{bloomFilterNbHashes}) { + $self->{bloomFilterNbHashes} = $vals->{bloomFilterNbHashes}; + } + if (defined $vals->{blockCacheEnabled}) { + $self->{blockCacheEnabled} = $vals->{blockCacheEnabled}; + } + if (defined $vals->{timeToLive}) { + $self->{timeToLive} = $vals->{timeToLive}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'ColumnDescriptor'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{name}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{maxVersions}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{compression}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::BOOL) { + $xfer += $input->readBool(\$self->{inMemory}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{bloomFilterType}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^6$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{bloomFilterVectorSize}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^7$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{bloomFilterNbHashes}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^8$/ && do{ if ($ftype == TType::BOOL) { + $xfer += $input->readBool(\$self->{blockCacheEnabled}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^9$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{timeToLive}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('ColumnDescriptor'); + if (defined $self->{name}) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($self->{name}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{maxVersions}) { + $xfer += $output->writeFieldBegin('maxVersions', TType::I32, 2); + $xfer += $output->writeI32($self->{maxVersions}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{compression}) { + $xfer += $output->writeFieldBegin('compression', TType::STRING, 3); + $xfer += $output->writeString($self->{compression}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{inMemory}) { + $xfer += $output->writeFieldBegin('inMemory', TType::BOOL, 4); + $xfer += $output->writeBool($self->{inMemory}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{bloomFilterType}) { + $xfer += $output->writeFieldBegin('bloomFilterType', TType::STRING, 5); + $xfer += $output->writeString($self->{bloomFilterType}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{bloomFilterVectorSize}) { + $xfer += $output->writeFieldBegin('bloomFilterVectorSize', TType::I32, 6); + $xfer += $output->writeI32($self->{bloomFilterVectorSize}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{bloomFilterNbHashes}) { + $xfer += $output->writeFieldBegin('bloomFilterNbHashes', TType::I32, 7); + $xfer += $output->writeI32($self->{bloomFilterNbHashes}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{blockCacheEnabled}) { + $xfer += $output->writeFieldBegin('blockCacheEnabled', TType::BOOL, 8); + $xfer += $output->writeBool($self->{blockCacheEnabled}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timeToLive}) { + $xfer += $output->writeFieldBegin('timeToLive', TType::I32, 9); + $xfer += $output->writeI32($self->{timeToLive}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::TRegionInfo; +use base qw(Class::Accessor); +Hbase::TRegionInfo->mk_accessors( qw( startKey endKey id name version serverName port ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{startKey} = undef; + $self->{endKey} = undef; + $self->{id} = undef; + $self->{name} = undef; + $self->{version} = undef; + $self->{serverName} = undef; + $self->{port} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{startKey}) { + $self->{startKey} = $vals->{startKey}; + } + if (defined $vals->{endKey}) { + $self->{endKey} = $vals->{endKey}; + } + if (defined $vals->{id}) { + $self->{id} = $vals->{id}; + } + if (defined $vals->{name}) { + $self->{name} = $vals->{name}; + } + if (defined $vals->{version}) { + $self->{version} = $vals->{version}; + } + if (defined $vals->{serverName}) { + $self->{serverName} = $vals->{serverName}; + } + if (defined $vals->{port}) { + $self->{port} = $vals->{port}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'TRegionInfo'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startKey}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{endKey}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{id}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{name}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::BYTE) { + $xfer += $input->readByte(\$self->{version}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^6$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{serverName}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^7$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{port}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('TRegionInfo'); + if (defined $self->{startKey}) { + $xfer += $output->writeFieldBegin('startKey', TType::STRING, 1); + $xfer += $output->writeString($self->{startKey}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{endKey}) { + $xfer += $output->writeFieldBegin('endKey', TType::STRING, 2); + $xfer += $output->writeString($self->{endKey}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{id}) { + $xfer += $output->writeFieldBegin('id', TType::I64, 3); + $xfer += $output->writeI64($self->{id}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{name}) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 4); + $xfer += $output->writeString($self->{name}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{version}) { + $xfer += $output->writeFieldBegin('version', TType::BYTE, 5); + $xfer += $output->writeByte($self->{version}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{serverName}) { + $xfer += $output->writeFieldBegin('serverName', TType::STRING, 6); + $xfer += $output->writeString($self->{serverName}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{port}) { + $xfer += $output->writeFieldBegin('port', TType::I32, 7); + $xfer += $output->writeI32($self->{port}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::Mutation; +use base qw(Class::Accessor); +Hbase::Mutation->mk_accessors( qw( isDelete column value writeToWAL ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{isDelete} = 0; + $self->{column} = undef; + $self->{value} = undef; + $self->{writeToWAL} = 1; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{isDelete}) { + $self->{isDelete} = $vals->{isDelete}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{value}) { + $self->{value} = $vals->{value}; + } + if (defined $vals->{writeToWAL}) { + $self->{writeToWAL} = $vals->{writeToWAL}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'Mutation'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::BOOL) { + $xfer += $input->readBool(\$self->{isDelete}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{value}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::BOOL) { + $xfer += $input->readBool(\$self->{writeToWAL}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('Mutation'); + if (defined $self->{isDelete}) { + $xfer += $output->writeFieldBegin('isDelete', TType::BOOL, 1); + $xfer += $output->writeBool($self->{isDelete}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 2); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{value}) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 3); + $xfer += $output->writeString($self->{value}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{writeToWAL}) { + $xfer += $output->writeFieldBegin('writeToWAL', TType::BOOL, 4); + $xfer += $output->writeBool($self->{writeToWAL}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::BatchMutation; +use base qw(Class::Accessor); +Hbase::BatchMutation->mk_accessors( qw( row mutations ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{row} = undef; + $self->{mutations} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{mutations}) { + $self->{mutations} = $vals->{mutations}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'BatchMutation'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::LIST) { + { + my $_size0 = 0; + $self->{mutations} = []; + my $_etype3 = 0; + $xfer += $input->readListBegin(\$_etype3, \$_size0); + for (my $_i4 = 0; $_i4 < $_size0; ++$_i4) + { + my $elem5 = undef; + $elem5 = new Hbase::Mutation(); + $xfer += $elem5->read($input); + push(@{$self->{mutations}},$elem5); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('BatchMutation'); + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{mutations}) { + $xfer += $output->writeFieldBegin('mutations', TType::LIST, 2); + { + $xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{mutations}})); + { + foreach my $iter6 (@{$self->{mutations}}) + { + $xfer += ${iter6}->write($output); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::TIncrement; +use base qw(Class::Accessor); +Hbase::TIncrement->mk_accessors( qw( table row column ammount ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{table} = undef; + $self->{row} = undef; + $self->{column} = undef; + $self->{ammount} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{table}) { + $self->{table} = $vals->{table}; + } + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{column}) { + $self->{column} = $vals->{column}; + } + if (defined $vals->{ammount}) { + $self->{ammount} = $vals->{ammount}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'TIncrement'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{table}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{column}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{ammount}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('TIncrement'); + if (defined $self->{table}) { + $xfer += $output->writeFieldBegin('table', TType::STRING, 1); + $xfer += $output->writeString($self->{table}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{column}) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($self->{column}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{ammount}) { + $xfer += $output->writeFieldBegin('ammount', TType::I64, 4); + $xfer += $output->writeI64($self->{ammount}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::TRowResult; +use base qw(Class::Accessor); +Hbase::TRowResult->mk_accessors( qw( row columns ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{row} = undef; + $self->{columns} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{row}) { + $self->{row} = $vals->{row}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'TRowResult'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{row}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::MAP) { + { + my $_size7 = 0; + $self->{columns} = {}; + my $_ktype8 = 0; + my $_vtype9 = 0; + $xfer += $input->readMapBegin(\$_ktype8, \$_vtype9, \$_size7); + for (my $_i11 = 0; $_i11 < $_size7; ++$_i11) + { + my $key12 = ''; + my $val13 = new Hbase::TCell(); + $xfer += $input->readString(\$key12); + $val13 = new Hbase::TCell(); + $xfer += $val13->read($input); + $self->{columns}->{$key12} = $val13; + } + $xfer += $input->readMapEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('TRowResult'); + if (defined $self->{row}) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($self->{row}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::MAP, 2); + { + $xfer += $output->writeMapBegin(TType::STRING, TType::STRUCT, scalar(keys %{$self->{columns}})); + { + while( my ($kiter14,$viter15) = each %{$self->{columns}}) + { + $xfer += $output->writeString($kiter14); + $xfer += ${viter15}->write($output); + } + } + $xfer += $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::TScan; +use base qw(Class::Accessor); +Hbase::TScan->mk_accessors( qw( startRow stopRow timestamp columns caching filterString ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{startRow} = undef; + $self->{stopRow} = undef; + $self->{timestamp} = undef; + $self->{columns} = undef; + $self->{caching} = undef; + $self->{filterString} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{startRow}) { + $self->{startRow} = $vals->{startRow}; + } + if (defined $vals->{stopRow}) { + $self->{stopRow} = $vals->{stopRow}; + } + if (defined $vals->{timestamp}) { + $self->{timestamp} = $vals->{timestamp}; + } + if (defined $vals->{columns}) { + $self->{columns} = $vals->{columns}; + } + if (defined $vals->{caching}) { + $self->{caching} = $vals->{caching}; + } + if (defined $vals->{filterString}) { + $self->{filterString} = $vals->{filterString}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'TScan'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{startRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^2$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{stopRow}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^3$/ && do{ if ($ftype == TType::I64) { + $xfer += $input->readI64(\$self->{timestamp}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^4$/ && do{ if ($ftype == TType::LIST) { + { + my $_size16 = 0; + $self->{columns} = []; + my $_etype19 = 0; + $xfer += $input->readListBegin(\$_etype19, \$_size16); + for (my $_i20 = 0; $_i20 < $_size16; ++$_i20) + { + my $elem21 = undef; + $xfer += $input->readString(\$elem21); + push(@{$self->{columns}},$elem21); + } + $xfer += $input->readListEnd(); + } + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^5$/ && do{ if ($ftype == TType::I32) { + $xfer += $input->readI32(\$self->{caching}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + /^6$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{filterString}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('TScan'); + if (defined $self->{startRow}) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 1); + $xfer += $output->writeString($self->{startRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{stopRow}) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 2); + $xfer += $output->writeString($self->{stopRow}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{timestamp}) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($self->{timestamp}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{columns}) { + $xfer += $output->writeFieldBegin('columns', TType::LIST, 4); + { + $xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{columns}})); + { + foreach my $iter22 (@{$self->{columns}}) + { + $xfer += $output->writeString($iter22); + } + } + $xfer += $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{caching}) { + $xfer += $output->writeFieldBegin('caching', TType::I32, 5); + $xfer += $output->writeI32($self->{caching}); + $xfer += $output->writeFieldEnd(); + } + if (defined $self->{filterString}) { + $xfer += $output->writeFieldBegin('filterString', TType::STRING, 6); + $xfer += $output->writeString($self->{filterString}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::IOError; +use base qw(Thrift::TException); +use base qw(Class::Accessor); +Hbase::IOError->mk_accessors( qw( message ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{message} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{message}) { + $self->{message} = $vals->{message}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'IOError'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{message}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('IOError'); + if (defined $self->{message}) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($self->{message}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::IllegalArgument; +use base qw(Thrift::TException); +use base qw(Class::Accessor); +Hbase::IllegalArgument->mk_accessors( qw( message ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{message} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{message}) { + $self->{message} = $vals->{message}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'IllegalArgument'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{message}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('IllegalArgument'); + if (defined $self->{message}) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($self->{message}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +package Hbase::AlreadyExists; +use base qw(Thrift::TException); +use base qw(Class::Accessor); +Hbase::AlreadyExists->mk_accessors( qw( message ) ); + +sub new { + my $classname = shift; + my $self = {}; + my $vals = shift || {}; + $self->{message} = undef; + if (UNIVERSAL::isa($vals,'HASH')) { + if (defined $vals->{message}) { + $self->{message} = $vals->{message}; + } + } + return bless ($self, $classname); +} + +sub getName { + return 'AlreadyExists'; +} + +sub read { + my ($self, $input) = @_; + my $xfer = 0; + my $fname; + my $ftype = 0; + my $fid = 0; + $xfer += $input->readStructBegin(\$fname); + while (1) + { + $xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); + if ($ftype == TType::STOP) { + last; + } + SWITCH: for($fid) + { + /^1$/ && do{ if ($ftype == TType::STRING) { + $xfer += $input->readString(\$self->{message}); + } else { + $xfer += $input->skip($ftype); + } + last; }; + $xfer += $input->skip($ftype); + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; +} + +sub write { + my ($self, $output) = @_; + my $xfer = 0; + $xfer += $output->writeStructBegin('AlreadyExists'); + if (defined $self->{message}) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($self->{message}); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; +} + +1; diff --git hbase-examples/src/main/php/DemoClient.php hbase-examples/src/main/php/DemoClient.php new file mode 100644 index 0000000..00b268e --- /dev/null +++ hbase-examples/src/main/php/DemoClient.php @@ -0,0 +1,280 @@ +row}, cols: \n" ); + $values = $rowresult->columns; + asort( $values ); + foreach ( $values as $k=>$v ) { + echo( " {$k} => {$v->value}\n" ); + } +} + +$socket = new TSocket( 'localhost', 9090 ); +$socket->setSendTimeout( 10000 ); // Ten seconds (too long for production, but this is just a demo ;) +$socket->setRecvTimeout( 20000 ); // Twenty seconds +$transport = new TBufferedTransport( $socket ); +$protocol = new TBinaryProtocol( $transport ); +$client = new HbaseClient( $protocol ); + +$transport->open(); + +$t = 'demo_table'; + +?> + +DemoClient + + +

+getTableNames();
+sort( $tables );
+foreach ( $tables as $name ) {
+  echo( "  found: {$name}\n" );
+  if ( $name == $t ) {
+    if ($client->isTableEnabled( $name )) {
+      echo( "    disabling table: {$name}\n");
+      $client->disableTable( $name );
+    }
+    echo( "    deleting table: {$name}\n" );
+    $client->deleteTable( $name );
+  }
+}
+
+#
+# Create the demo table with two column families, entry: and unused:
+#
+$columns = array(
+  new ColumnDescriptor( array(
+    'name' => 'entry:',
+    'maxVersions' => 10
+  ) ),
+  new ColumnDescriptor( array(
+    'name' => 'unused:'
+  ) )
+);
+
+echo( "creating table: {$t}\n" );
+try {
+  $client->createTable( $t, $columns );
+} catch ( AlreadyExists $ae ) {
+  echo( "WARN: {$ae->message}\n" );
+}
+
+echo( "column families in {$t}:\n" );
+$descriptors = $client->getColumnDescriptors( $t );
+asort( $descriptors );
+foreach ( $descriptors as $col ) {
+  echo( "  column: {$col->name}, maxVer: {$col->maxVersions}\n" );
+}
+$dummy_attributes = array();
+#
+# Test UTF-8 handling
+#
+$invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1";
+$valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB";
+
+# non-utf8 is fine for data
+$mutations = array(
+  new Mutation( array(
+    'column' => 'entry:foo',
+    'value' => $invalid
+  ) ),
+);
+$client->mutateRow( $t, "foo", $mutations, $dummy_attributes );
+
+# try empty strings
+$mutations = array(
+  new Mutation( array(
+    'column' => 'entry:',
+    'value' => ""
+  ) ),
+);
+$client->mutateRow( $t, "", $mutations, $dummy_attributes );
+
+# this row name is valid utf8
+$mutations = array(
+  new Mutation( array(
+    'column' => 'entry:foo',
+    'value' => $valid
+  ) ),
+);
+$client->mutateRow( $t, $valid, $mutations, $dummy_attributes );
+
+# non-utf8 is not allowed in row names
+try {
+  $mutations = array(
+    new Mutation( array(
+      'column' => 'entry:foo',
+      'value' => $invalid
+    ) ),
+  );
+  $client->mutateRow( $t, $invalid, $mutations, $dummy_attributes );
+  throw new Exception( "shouldn't get here!" );
+} catch ( IOError $e ) {
+  echo( "expected error: {$e->message}\n" );
+}
+
+# Run a scanner on the rows we just created
+echo( "Starting scanner...\n" );
+$scanner = $client->scannerOpen( $t, "", array( "entry:" ), $dummy_attributes );
+try {
+  while (true) printRow( $client->scannerGet( $scanner ) );
+} catch ( NotFound $nf ) {
+  $client->scannerClose( $scanner );
+  echo( "Scanner finished\n" );
+}
+
+#
+# Run some operations on a bunch of rows.
+#
+for ($e=100; $e>=0; $e--) {
+
+  # format row keys as "00000" to "00100"
+  $row = str_pad( $e, 5, '0', STR_PAD_LEFT );
+
+  $mutations = array(
+    new Mutation( array(
+      'column' => 'unused:',
+      'value' => "DELETE_ME"
+    ) ),
+  );
+  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
+  printRow( $client->getRow( $t, $row, $dummy_attributes ));
+  $client->deleteAllRow( $t, $row, $dummy_attributes );
+
+  $mutations = array(
+    new Mutation( array(
+      'column' => 'entry:num',
+      'value' => "0"
+    ) ),
+    new Mutation( array(
+      'column' => 'entry:foo',
+      'value' => "FOO"
+    ) ),
+  );
+  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
+  printRow( $client->getRow( $t, $row, $dummy_attributes ));
+
+  $mutations = array(
+    new Mutation( array(
+      'column' => 'entry:foo',
+      'isDelete' => 1
+    ) ),
+    new Mutation( array(
+      'column' => 'entry:num',
+      'value' => '-1'
+    ) ),
+  );
+  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
+  printRow( $client->getRow( $t, $row, $dummy_attributes ) );
+
+  $mutations = array(
+    new Mutation( array(
+      'column' => "entry:num",
+      'value' => $e
+    ) ),
+    new Mutation( array(
+      'column' => "entry:sqr",
+      'value' => $e * $e
+    ) ),
+  );
+  $client->mutateRow( $t, $row, $mutations, $dummy_attributes );
+  printRow( $client->getRow( $t, $row, $dummy_attributes ));
+  
+  $mutations = array(
+    new Mutation( array(
+      'column' => 'entry:num',
+      'value' => '-999'
+    ) ),
+    new Mutation( array(
+      'column' => 'entry:sqr',
+      'isDelete' => 1
+    ) ),
+  );
+  $client->mutateRowTs( $t, $row, $mutations, 1, $dummy_attributes ); # shouldn't override latest
+  printRow( $client->getRow( $t, $row, $dummy_attributes ) );
+
+  $versions = $client->getVer( $t, $row, "entry:num", 10, $dummy_attributes );
+  echo( "row: {$row}, values: \n" );
+  foreach ( $versions as $v ) echo( "  {$v->value};\n" );
+  
+  try {
+    $client->get( $t, $row, "entry:foo", $dummy_attributes );
+    throw new Exception ( "shouldn't get here! " );
+  } catch ( NotFound $nf ) {
+    # blank
+  }
+
+}
+
+$columns = array();
+foreach ( $client->getColumnDescriptors($t) as $col=>$desc ) {
+  echo("column with name: {$desc->name}\n");
+  $columns[] = $desc->name.":";
+}
+
+echo( "Starting scanner...\n" );
+$scanner = $client->scannerOpenWithStop( $t, "00020", "00040", $columns, $dummy_attributes );
+try {
+  while (true) printRow( $client->scannerGet( $scanner ) );
+} catch ( NotFound $nf ) {
+  $client->scannerClose( $scanner );
+  echo( "Scanner finished\n" );
+}
+  
+$transport->close();
+
+?>
+
+ + + diff --git hbase-examples/src/main/php/gen-php/Hbase/Hbase.php hbase-examples/src/main/php/gen-php/Hbase/Hbase.php new file mode 100644 index 0000000..a3d01fc --- /dev/null +++ hbase-examples/src/main/php/gen-php/Hbase/Hbase.php @@ -0,0 +1,13070 @@ +input_ = $input; + $this->output_ = $output ? $output : $input; + } + + public function enableTable($tableName) + { + $this->send_enableTable($tableName); + $this->recv_enableTable(); + } + + public function send_enableTable($tableName) + { + $args = new Hbase_enableTable_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'enableTable', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('enableTable', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_enableTable() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_enableTable_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_enableTable_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function disableTable($tableName) + { + $this->send_disableTable($tableName); + $this->recv_disableTable(); + } + + public function send_disableTable($tableName) + { + $args = new Hbase_disableTable_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'disableTable', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('disableTable', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_disableTable() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_disableTable_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_disableTable_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function isTableEnabled($tableName) + { + $this->send_isTableEnabled($tableName); + return $this->recv_isTableEnabled(); + } + + public function send_isTableEnabled($tableName) + { + $args = new Hbase_isTableEnabled_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'isTableEnabled', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('isTableEnabled', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_isTableEnabled() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_isTableEnabled_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_isTableEnabled_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("isTableEnabled failed: unknown result"); + } + + public function compact($tableNameOrRegionName) + { + $this->send_compact($tableNameOrRegionName); + $this->recv_compact(); + } + + public function send_compact($tableNameOrRegionName) + { + $args = new Hbase_compact_args(); + $args->tableNameOrRegionName = $tableNameOrRegionName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'compact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('compact', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_compact() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_compact_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_compact_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function majorCompact($tableNameOrRegionName) + { + $this->send_majorCompact($tableNameOrRegionName); + $this->recv_majorCompact(); + } + + public function send_majorCompact($tableNameOrRegionName) + { + $args = new Hbase_majorCompact_args(); + $args->tableNameOrRegionName = $tableNameOrRegionName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'majorCompact', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('majorCompact', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_majorCompact() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_majorCompact_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_majorCompact_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function getTableNames() + { + $this->send_getTableNames(); + return $this->recv_getTableNames(); + } + + public function send_getTableNames() + { + $args = new Hbase_getTableNames_args(); + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getTableNames', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getTableNames', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getTableNames() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getTableNames_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getTableNames_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getTableNames failed: unknown result"); + } + + public function getColumnDescriptors($tableName) + { + $this->send_getColumnDescriptors($tableName); + return $this->recv_getColumnDescriptors(); + } + + public function send_getColumnDescriptors($tableName) + { + $args = new Hbase_getColumnDescriptors_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getColumnDescriptors', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getColumnDescriptors', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getColumnDescriptors() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getColumnDescriptors_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getColumnDescriptors_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getColumnDescriptors failed: unknown result"); + } + + public function getTableRegions($tableName) + { + $this->send_getTableRegions($tableName); + return $this->recv_getTableRegions(); + } + + public function send_getTableRegions($tableName) + { + $args = new Hbase_getTableRegions_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getTableRegions', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getTableRegions', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getTableRegions() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getTableRegions_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getTableRegions_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getTableRegions failed: unknown result"); + } + + public function createTable($tableName, $columnFamilies) + { + $this->send_createTable($tableName, $columnFamilies); + $this->recv_createTable(); + } + + public function send_createTable($tableName, $columnFamilies) + { + $args = new Hbase_createTable_args(); + $args->tableName = $tableName; + $args->columnFamilies = $columnFamilies; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'createTable', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('createTable', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_createTable() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_createTable_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_createTable_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + if ($result->exist !== null) { + throw $result->exist; + } + return; + } + + public function deleteTable($tableName) + { + $this->send_deleteTable($tableName); + $this->recv_deleteTable(); + } + + public function send_deleteTable($tableName) + { + $args = new Hbase_deleteTable_args(); + $args->tableName = $tableName; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteTable', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteTable', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteTable() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_deleteTable_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_deleteTable_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function get($tableName, $row, $column, $attributes) + { + $this->send_get($tableName, $row, $column, $attributes); + return $this->recv_get(); + } + + public function send_get($tableName, $row, $column, $attributes) + { + $args = new Hbase_get_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'get', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('get', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_get() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_get_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_get_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("get failed: unknown result"); + } + + public function getVer($tableName, $row, $column, $numVersions, $attributes) + { + $this->send_getVer($tableName, $row, $column, $numVersions, $attributes); + return $this->recv_getVer(); + } + + public function send_getVer($tableName, $row, $column, $numVersions, $attributes) + { + $args = new Hbase_getVer_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->numVersions = $numVersions; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getVer', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getVer', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getVer() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getVer_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getVer_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getVer failed: unknown result"); + } + + public function getVerTs($tableName, $row, $column, $timestamp, $numVersions, $attributes) + { + $this->send_getVerTs($tableName, $row, $column, $timestamp, $numVersions, $attributes); + return $this->recv_getVerTs(); + } + + public function send_getVerTs($tableName, $row, $column, $timestamp, $numVersions, $attributes) + { + $args = new Hbase_getVerTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->timestamp = $timestamp; + $args->numVersions = $numVersions; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getVerTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getVerTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getVerTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getVerTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getVerTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getVerTs failed: unknown result"); + } + + public function getRow($tableName, $row, $attributes) + { + $this->send_getRow($tableName, $row, $attributes); + return $this->recv_getRow(); + } + + public function send_getRow($tableName, $row, $attributes) + { + $args = new Hbase_getRow_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRow', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRow() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRow_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRow_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRow failed: unknown result"); + } + + public function getRowWithColumns($tableName, $row, $columns, $attributes) + { + $this->send_getRowWithColumns($tableName, $row, $columns, $attributes); + return $this->recv_getRowWithColumns(); + } + + public function send_getRowWithColumns($tableName, $row, $columns, $attributes) + { + $args = new Hbase_getRowWithColumns_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->columns = $columns; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowWithColumns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowWithColumns', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowWithColumns() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowWithColumns_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowWithColumns_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowWithColumns failed: unknown result"); + } + + public function getRowTs($tableName, $row, $timestamp, $attributes) + { + $this->send_getRowTs($tableName, $row, $timestamp, $attributes); + return $this->recv_getRowTs(); + } + + public function send_getRowTs($tableName, $row, $timestamp, $attributes) + { + $args = new Hbase_getRowTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowTs failed: unknown result"); + } + + public function getRowWithColumnsTs($tableName, $row, $columns, $timestamp, $attributes) + { + $this->send_getRowWithColumnsTs($tableName, $row, $columns, $timestamp, $attributes); + return $this->recv_getRowWithColumnsTs(); + } + + public function send_getRowWithColumnsTs($tableName, $row, $columns, $timestamp, $attributes) + { + $args = new Hbase_getRowWithColumnsTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->columns = $columns; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowWithColumnsTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowWithColumnsTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowWithColumnsTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowWithColumnsTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowWithColumnsTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowWithColumnsTs failed: unknown result"); + } + + public function getRows($tableName, $rows, $attributes) + { + $this->send_getRows($tableName, $rows, $attributes); + return $this->recv_getRows(); + } + + public function send_getRows($tableName, $rows, $attributes) + { + $args = new Hbase_getRows_args(); + $args->tableName = $tableName; + $args->rows = $rows; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRows', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRows() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRows_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRows_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRows failed: unknown result"); + } + + public function getRowsWithColumns($tableName, $rows, $columns, $attributes) + { + $this->send_getRowsWithColumns($tableName, $rows, $columns, $attributes); + return $this->recv_getRowsWithColumns(); + } + + public function send_getRowsWithColumns($tableName, $rows, $columns, $attributes) + { + $args = new Hbase_getRowsWithColumns_args(); + $args->tableName = $tableName; + $args->rows = $rows; + $args->columns = $columns; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowsWithColumns', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowsWithColumns', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowsWithColumns() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowsWithColumns_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowsWithColumns_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowsWithColumns failed: unknown result"); + } + + public function getRowsTs($tableName, $rows, $timestamp, $attributes) + { + $this->send_getRowsTs($tableName, $rows, $timestamp, $attributes); + return $this->recv_getRowsTs(); + } + + public function send_getRowsTs($tableName, $rows, $timestamp, $attributes) + { + $args = new Hbase_getRowsTs_args(); + $args->tableName = $tableName; + $args->rows = $rows; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowsTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowsTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowsTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowsTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowsTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowsTs failed: unknown result"); + } + + public function getRowsWithColumnsTs($tableName, $rows, $columns, $timestamp, $attributes) + { + $this->send_getRowsWithColumnsTs($tableName, $rows, $columns, $timestamp, $attributes); + return $this->recv_getRowsWithColumnsTs(); + } + + public function send_getRowsWithColumnsTs($tableName, $rows, $columns, $timestamp, $attributes) + { + $args = new Hbase_getRowsWithColumnsTs_args(); + $args->tableName = $tableName; + $args->rows = $rows; + $args->columns = $columns; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowsWithColumnsTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowsWithColumnsTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowsWithColumnsTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowsWithColumnsTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowsWithColumnsTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowsWithColumnsTs failed: unknown result"); + } + + public function mutateRow($tableName, $row, $mutations, $attributes) + { + $this->send_mutateRow($tableName, $row, $mutations, $attributes); + $this->recv_mutateRow(); + } + + public function send_mutateRow($tableName, $row, $mutations, $attributes) + { + $args = new Hbase_mutateRow_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->mutations = $mutations; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mutateRow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mutateRow', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mutateRow() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_mutateRow_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_mutateRow_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + return; + } + + public function mutateRowTs($tableName, $row, $mutations, $timestamp, $attributes) + { + $this->send_mutateRowTs($tableName, $row, $mutations, $timestamp, $attributes); + $this->recv_mutateRowTs(); + } + + public function send_mutateRowTs($tableName, $row, $mutations, $timestamp, $attributes) + { + $args = new Hbase_mutateRowTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->mutations = $mutations; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mutateRowTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mutateRowTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mutateRowTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_mutateRowTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_mutateRowTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + return; + } + + public function mutateRows($tableName, $rowBatches, $attributes) + { + $this->send_mutateRows($tableName, $rowBatches, $attributes); + $this->recv_mutateRows(); + } + + public function send_mutateRows($tableName, $rowBatches, $attributes) + { + $args = new Hbase_mutateRows_args(); + $args->tableName = $tableName; + $args->rowBatches = $rowBatches; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mutateRows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mutateRows', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mutateRows() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_mutateRows_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_mutateRows_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + return; + } + + public function mutateRowsTs($tableName, $rowBatches, $timestamp, $attributes) + { + $this->send_mutateRowsTs($tableName, $rowBatches, $timestamp, $attributes); + $this->recv_mutateRowsTs(); + } + + public function send_mutateRowsTs($tableName, $rowBatches, $timestamp, $attributes) + { + $args = new Hbase_mutateRowsTs_args(); + $args->tableName = $tableName; + $args->rowBatches = $rowBatches; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'mutateRowsTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('mutateRowsTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_mutateRowsTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_mutateRowsTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_mutateRowsTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + return; + } + + public function atomicIncrement($tableName, $row, $column, $value) + { + $this->send_atomicIncrement($tableName, $row, $column, $value); + return $this->recv_atomicIncrement(); + } + + public function send_atomicIncrement($tableName, $row, $column, $value) + { + $args = new Hbase_atomicIncrement_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->value = $value; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'atomicIncrement', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('atomicIncrement', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_atomicIncrement() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_atomicIncrement_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_atomicIncrement_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + throw new Exception("atomicIncrement failed: unknown result"); + } + + public function deleteAll($tableName, $row, $column, $attributes) + { + $this->send_deleteAll($tableName, $row, $column, $attributes); + $this->recv_deleteAll(); + } + + public function send_deleteAll($tableName, $row, $column, $attributes) + { + $args = new Hbase_deleteAll_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteAll', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteAll', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteAll() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_deleteAll_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_deleteAll_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function deleteAllTs($tableName, $row, $column, $timestamp, $attributes) + { + $this->send_deleteAllTs($tableName, $row, $column, $timestamp, $attributes); + $this->recv_deleteAllTs(); + } + + public function send_deleteAllTs($tableName, $row, $column, $timestamp, $attributes) + { + $args = new Hbase_deleteAllTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->column = $column; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteAllTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteAllTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteAllTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_deleteAllTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_deleteAllTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function deleteAllRow($tableName, $row, $attributes) + { + $this->send_deleteAllRow($tableName, $row, $attributes); + $this->recv_deleteAllRow(); + } + + public function send_deleteAllRow($tableName, $row, $attributes) + { + $args = new Hbase_deleteAllRow_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteAllRow', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteAllRow', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteAllRow() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_deleteAllRow_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_deleteAllRow_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function increment($increment) + { + $this->send_increment($increment); + $this->recv_increment(); + } + + public function send_increment($increment) + { + $args = new Hbase_increment_args(); + $args->increment = $increment; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'increment', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('increment', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_increment() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_increment_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_increment_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function incrementRows($increments) + { + $this->send_incrementRows($increments); + $this->recv_incrementRows(); + } + + public function send_incrementRows($increments) + { + $args = new Hbase_incrementRows_args(); + $args->increments = $increments; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'incrementRows', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('incrementRows', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_incrementRows() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_incrementRows_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_incrementRows_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function deleteAllRowTs($tableName, $row, $timestamp, $attributes) + { + $this->send_deleteAllRowTs($tableName, $row, $timestamp, $attributes); + $this->recv_deleteAllRowTs(); + } + + public function send_deleteAllRowTs($tableName, $row, $timestamp, $attributes) + { + $args = new Hbase_deleteAllRowTs_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'deleteAllRowTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('deleteAllRowTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_deleteAllRowTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_deleteAllRowTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_deleteAllRowTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + return; + } + + public function scannerOpenWithScan($tableName, $scan, $attributes) + { + $this->send_scannerOpenWithScan($tableName, $scan, $attributes); + return $this->recv_scannerOpenWithScan(); + } + + public function send_scannerOpenWithScan($tableName, $scan, $attributes) + { + $args = new Hbase_scannerOpenWithScan_args(); + $args->tableName = $tableName; + $args->scan = $scan; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpenWithScan', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpenWithScan', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpenWithScan() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpenWithScan_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpenWithScan_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpenWithScan failed: unknown result"); + } + + public function scannerOpen($tableName, $startRow, $columns, $attributes) + { + $this->send_scannerOpen($tableName, $startRow, $columns, $attributes); + return $this->recv_scannerOpen(); + } + + public function send_scannerOpen($tableName, $startRow, $columns, $attributes) + { + $args = new Hbase_scannerOpen_args(); + $args->tableName = $tableName; + $args->startRow = $startRow; + $args->columns = $columns; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpen', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpen', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpen() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpen_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpen_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpen failed: unknown result"); + } + + public function scannerOpenWithStop($tableName, $startRow, $stopRow, $columns, $attributes) + { + $this->send_scannerOpenWithStop($tableName, $startRow, $stopRow, $columns, $attributes); + return $this->recv_scannerOpenWithStop(); + } + + public function send_scannerOpenWithStop($tableName, $startRow, $stopRow, $columns, $attributes) + { + $args = new Hbase_scannerOpenWithStop_args(); + $args->tableName = $tableName; + $args->startRow = $startRow; + $args->stopRow = $stopRow; + $args->columns = $columns; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpenWithStop', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpenWithStop', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpenWithStop() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpenWithStop_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpenWithStop_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpenWithStop failed: unknown result"); + } + + public function scannerOpenWithPrefix($tableName, $startAndPrefix, $columns, $attributes) + { + $this->send_scannerOpenWithPrefix($tableName, $startAndPrefix, $columns, $attributes); + return $this->recv_scannerOpenWithPrefix(); + } + + public function send_scannerOpenWithPrefix($tableName, $startAndPrefix, $columns, $attributes) + { + $args = new Hbase_scannerOpenWithPrefix_args(); + $args->tableName = $tableName; + $args->startAndPrefix = $startAndPrefix; + $args->columns = $columns; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpenWithPrefix', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpenWithPrefix', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpenWithPrefix() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpenWithPrefix_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpenWithPrefix_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpenWithPrefix failed: unknown result"); + } + + public function scannerOpenTs($tableName, $startRow, $columns, $timestamp, $attributes) + { + $this->send_scannerOpenTs($tableName, $startRow, $columns, $timestamp, $attributes); + return $this->recv_scannerOpenTs(); + } + + public function send_scannerOpenTs($tableName, $startRow, $columns, $timestamp, $attributes) + { + $args = new Hbase_scannerOpenTs_args(); + $args->tableName = $tableName; + $args->startRow = $startRow; + $args->columns = $columns; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpenTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpenTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpenTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpenTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpenTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpenTs failed: unknown result"); + } + + public function scannerOpenWithStopTs($tableName, $startRow, $stopRow, $columns, $timestamp, $attributes) + { + $this->send_scannerOpenWithStopTs($tableName, $startRow, $stopRow, $columns, $timestamp, $attributes); + return $this->recv_scannerOpenWithStopTs(); + } + + public function send_scannerOpenWithStopTs($tableName, $startRow, $stopRow, $columns, $timestamp, $attributes) + { + $args = new Hbase_scannerOpenWithStopTs_args(); + $args->tableName = $tableName; + $args->startRow = $startRow; + $args->stopRow = $stopRow; + $args->columns = $columns; + $args->timestamp = $timestamp; + $args->attributes = $attributes; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerOpenWithStopTs', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerOpenWithStopTs', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerOpenWithStopTs() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerOpenWithStopTs_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerOpenWithStopTs_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("scannerOpenWithStopTs failed: unknown result"); + } + + public function scannerGet($id) + { + $this->send_scannerGet($id); + return $this->recv_scannerGet(); + } + + public function send_scannerGet($id) + { + $args = new Hbase_scannerGet_args(); + $args->id = $id; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerGet', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerGet', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerGet() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerGet_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerGet_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + throw new Exception("scannerGet failed: unknown result"); + } + + public function scannerGetList($id, $nbRows) + { + $this->send_scannerGetList($id, $nbRows); + return $this->recv_scannerGetList(); + } + + public function send_scannerGetList($id, $nbRows) + { + $args = new Hbase_scannerGetList_args(); + $args->id = $id; + $args->nbRows = $nbRows; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerGetList', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerGetList', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerGetList() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerGetList_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerGetList_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + throw new Exception("scannerGetList failed: unknown result"); + } + + public function scannerClose($id) + { + $this->send_scannerClose($id); + $this->recv_scannerClose(); + } + + public function send_scannerClose($id) + { + $args = new Hbase_scannerClose_args(); + $args->id = $id; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'scannerClose', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('scannerClose', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_scannerClose() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_scannerClose_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_scannerClose_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->io !== null) { + throw $result->io; + } + if ($result->ia !== null) { + throw $result->ia; + } + return; + } + + public function getRowOrBefore($tableName, $row, $family) + { + $this->send_getRowOrBefore($tableName, $row, $family); + return $this->recv_getRowOrBefore(); + } + + public function send_getRowOrBefore($tableName, $row, $family) + { + $args = new Hbase_getRowOrBefore_args(); + $args->tableName = $tableName; + $args->row = $row; + $args->family = $family; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRowOrBefore', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRowOrBefore', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRowOrBefore() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRowOrBefore_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRowOrBefore_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRowOrBefore failed: unknown result"); + } + + public function getRegionInfo($row) + { + $this->send_getRegionInfo($row); + return $this->recv_getRegionInfo(); + } + + public function send_getRegionInfo($row) + { + $args = new Hbase_getRegionInfo_args(); + $args->row = $row; + $bin_accel = ($this->output_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_write_binary'); + if ($bin_accel) + { + thrift_protocol_write_binary($this->output_, 'getRegionInfo', TMessageType::CALL, $args, $this->seqid_, $this->output_->isStrictWrite()); + } + else + { + $this->output_->writeMessageBegin('getRegionInfo', TMessageType::CALL, $this->seqid_); + $args->write($this->output_); + $this->output_->writeMessageEnd(); + $this->output_->getTransport()->flush(); + } + } + + public function recv_getRegionInfo() + { + $bin_accel = ($this->input_ instanceof TProtocol::$TBINARYPROTOCOLACCELERATED) && function_exists('thrift_protocol_read_binary'); + if ($bin_accel) $result = thrift_protocol_read_binary($this->input_, 'Hbase_getRegionInfo_result', $this->input_->isStrictRead()); + else + { + $rseqid = 0; + $fname = null; + $mtype = 0; + + $this->input_->readMessageBegin($fname, $mtype, $rseqid); + if ($mtype == TMessageType::EXCEPTION) { + $x = new TApplicationException(); + $x->read($this->input_); + $this->input_->readMessageEnd(); + throw $x; + } + $result = new Hbase_getRegionInfo_result(); + $result->read($this->input_); + $this->input_->readMessageEnd(); + } + if ($result->success !== null) { + return $result->success; + } + if ($result->io !== null) { + throw $result->io; + } + throw new Exception("getRegionInfo failed: unknown result"); + } + +} + +// HELPER FUNCTIONS AND STRUCTURES + +class Hbase_enableTable_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_enableTable_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_enableTable_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_enableTable_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_enableTable_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_enableTable_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_disableTable_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_disableTable_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_disableTable_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_disableTable_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_disableTable_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_disableTable_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_isTableEnabled_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_isTableEnabled_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_isTableEnabled_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_isTableEnabled_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::BOOL, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_isTableEnabled_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_isTableEnabled_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::BOOL, 0); + $xfer += $output->writeBool($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_compact_args { + static $_TSPEC; + + public $tableNameOrRegionName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableNameOrRegionName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableNameOrRegionName'])) { + $this->tableNameOrRegionName = $vals['tableNameOrRegionName']; + } + } + } + + public function getName() { + return 'Hbase_compact_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableNameOrRegionName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_compact_args'); + if ($this->tableNameOrRegionName !== null) { + $xfer += $output->writeFieldBegin('tableNameOrRegionName', TType::STRING, 1); + $xfer += $output->writeString($this->tableNameOrRegionName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_compact_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_compact_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_compact_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_majorCompact_args { + static $_TSPEC; + + public $tableNameOrRegionName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableNameOrRegionName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableNameOrRegionName'])) { + $this->tableNameOrRegionName = $vals['tableNameOrRegionName']; + } + } + } + + public function getName() { + return 'Hbase_majorCompact_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableNameOrRegionName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_majorCompact_args'); + if ($this->tableNameOrRegionName !== null) { + $xfer += $output->writeFieldBegin('tableNameOrRegionName', TType::STRING, 1); + $xfer += $output->writeString($this->tableNameOrRegionName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_majorCompact_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_majorCompact_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_majorCompact_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getTableNames_args { + static $_TSPEC; + + + public function __construct() { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + ); + } + } + + public function getName() { + return 'Hbase_getTableNames_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableNames_args'); + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getTableNames_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getTableNames_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size23 = 0; + $_etype26 = 0; + $xfer += $input->readListBegin($_etype26, $_size23); + for ($_i27 = 0; $_i27 < $_size23; ++$_i27) + { + $elem28 = null; + $xfer += $input->readString($elem28); + $this->success []= $elem28; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableNames_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRING, count($this->success)); + { + foreach ($this->success as $iter29) + { + $xfer += $output->writeString($iter29); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getColumnDescriptors_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_getColumnDescriptors_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getColumnDescriptors_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getColumnDescriptors_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'ColumnDescriptor', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getColumnDescriptors_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::MAP) { + $this->success = array(); + $_size30 = 0; + $_ktype31 = 0; + $_vtype32 = 0; + $xfer += $input->readMapBegin($_ktype31, $_vtype32, $_size30); + for ($_i34 = 0; $_i34 < $_size30; ++$_i34) + { + $key35 = ''; + $val36 = new ColumnDescriptor(); + $xfer += $input->readString($key35); + $val36 = new ColumnDescriptor(); + $xfer += $val36->read($input); + $this->success[$key35] = $val36; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getColumnDescriptors_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::MAP, 0); + { + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->success)); + { + foreach ($this->success as $kiter37 => $viter38) + { + $xfer += $output->writeString($kiter37); + $xfer += $viter38->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getTableRegions_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_getTableRegions_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableRegions_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getTableRegions_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRegionInfo', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getTableRegions_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size39 = 0; + $_etype42 = 0; + $xfer += $input->readListBegin($_etype42, $_size39); + for ($_i43 = 0; $_i43 < $_size39; ++$_i43) + { + $elem44 = null; + $elem44 = new TRegionInfo(); + $xfer += $elem44->read($input); + $this->success []= $elem44; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getTableRegions_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter45) + { + $xfer += $iter45->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_createTable_args { + static $_TSPEC; + + public $tableName = null; + public $columnFamilies = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'columnFamilies', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'ColumnDescriptor', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['columnFamilies'])) { + $this->columnFamilies = $vals['columnFamilies']; + } + } + } + + public function getName() { + return 'Hbase_createTable_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->columnFamilies = array(); + $_size46 = 0; + $_etype49 = 0; + $xfer += $input->readListBegin($_etype49, $_size46); + for ($_i50 = 0; $_i50 < $_size46; ++$_i50) + { + $elem51 = null; + $elem51 = new ColumnDescriptor(); + $xfer += $elem51->read($input); + $this->columnFamilies []= $elem51; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_createTable_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->columnFamilies !== null) { + if (!is_array($this->columnFamilies)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columnFamilies', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->columnFamilies)); + { + foreach ($this->columnFamilies as $iter52) + { + $xfer += $iter52->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_createTable_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + public $exist = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + 3 => array( + 'var' => 'exist', + 'type' => TType::STRUCT, + 'class' => 'AlreadyExists', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + if (isset($vals['exist'])) { + $this->exist = $vals['exist']; + } + } + } + + public function getName() { + return 'Hbase_createTable_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRUCT) { + $this->exist = new AlreadyExists(); + $xfer += $this->exist->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_createTable_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->exist !== null) { + $xfer += $output->writeFieldBegin('exist', TType::STRUCT, 3); + $xfer += $this->exist->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteTable_args { + static $_TSPEC; + + public $tableName = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + } + } + + public function getName() { + return 'Hbase_deleteTable_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteTable_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteTable_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_deleteTable_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteTable_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_get_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_get_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size53 = 0; + $_ktype54 = 0; + $_vtype55 = 0; + $xfer += $input->readMapBegin($_ktype54, $_vtype55, $_size53); + for ($_i57 = 0; $_i57 < $_size53; ++$_i57) + { + $key58 = ''; + $val59 = ''; + $xfer += $input->readString($key58); + $xfer += $input->readString($val59); + $this->attributes[$key58] = $val59; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_get_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter60 => $viter61) + { + $xfer += $output->writeString($kiter60); + $xfer += $output->writeString($viter61); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_get_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TCell', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_get_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size62 = 0; + $_etype65 = 0; + $xfer += $input->readListBegin($_etype65, $_size62); + for ($_i66 = 0; $_i66 < $_size62; ++$_i66) + { + $elem67 = null; + $elem67 = new TCell(); + $xfer += $elem67->read($input); + $this->success []= $elem67; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_get_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter68) + { + $xfer += $iter68->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getVer_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $numVersions = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'numVersions', + 'type' => TType::I32, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['numVersions'])) { + $this->numVersions = $vals['numVersions']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getVer_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numVersions); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size69 = 0; + $_ktype70 = 0; + $_vtype71 = 0; + $xfer += $input->readMapBegin($_ktype70, $_vtype71, $_size69); + for ($_i73 = 0; $_i73 < $_size69; ++$_i73) + { + $key74 = ''; + $val75 = ''; + $xfer += $input->readString($key74); + $xfer += $input->readString($val75); + $this->attributes[$key74] = $val75; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVer_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->numVersions !== null) { + $xfer += $output->writeFieldBegin('numVersions', TType::I32, 4); + $xfer += $output->writeI32($this->numVersions); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter76 => $viter77) + { + $xfer += $output->writeString($kiter76); + $xfer += $output->writeString($viter77); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getVer_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TCell', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getVer_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size78 = 0; + $_etype81 = 0; + $xfer += $input->readListBegin($_etype81, $_size78); + for ($_i82 = 0; $_i82 < $_size78; ++$_i82) + { + $elem83 = null; + $elem83 = new TCell(); + $xfer += $elem83->read($input); + $this->success []= $elem83; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVer_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter84) + { + $xfer += $iter84->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getVerTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $timestamp = null; + public $numVersions = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'numVersions', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['numVersions'])) { + $this->numVersions = $vals['numVersions']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getVerTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->numVersions); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size85 = 0; + $_ktype86 = 0; + $_vtype87 = 0; + $xfer += $input->readMapBegin($_ktype86, $_vtype87, $_size85); + for ($_i89 = 0; $_i89 < $_size85; ++$_i89) + { + $key90 = ''; + $val91 = ''; + $xfer += $input->readString($key90); + $xfer += $input->readString($val91); + $this->attributes[$key90] = $val91; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVerTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->numVersions !== null) { + $xfer += $output->writeFieldBegin('numVersions', TType::I32, 5); + $xfer += $output->writeI32($this->numVersions); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 6); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter92 => $viter93) + { + $xfer += $output->writeString($kiter92); + $xfer += $output->writeString($viter93); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getVerTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TCell', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getVerTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size94 = 0; + $_etype97 = 0; + $xfer += $input->readListBegin($_etype97, $_size94); + for ($_i98 = 0; $_i98 < $_size94; ++$_i98) + { + $elem99 = null; + $elem99 = new TCell(); + $xfer += $elem99->read($input); + $this->success []= $elem99; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getVerTs_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter100) + { + $xfer += $iter100->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRow_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRow_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size101 = 0; + $_ktype102 = 0; + $_vtype103 = 0; + $xfer += $input->readMapBegin($_ktype102, $_vtype103, $_size101); + for ($_i105 = 0; $_i105 < $_size101; ++$_i105) + { + $key106 = ''; + $val107 = ''; + $xfer += $input->readString($key106); + $xfer += $input->readString($val107); + $this->attributes[$key106] = $val107; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRow_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter108 => $viter109) + { + $xfer += $output->writeString($kiter108); + $xfer += $output->writeString($viter109); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRow_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRow_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size110 = 0; + $_etype113 = 0; + $xfer += $input->readListBegin($_etype113, $_size110); + for ($_i114 = 0; $_i114 < $_size110; ++$_i114) + { + $elem115 = null; + $elem115 = new TRowResult(); + $xfer += $elem115->read($input); + $this->success []= $elem115; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRow_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter116) + { + $xfer += $iter116->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowWithColumns_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $columns = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowWithColumns_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size117 = 0; + $_etype120 = 0; + $xfer += $input->readListBegin($_etype120, $_size117); + for ($_i121 = 0; $_i121 < $_size117; ++$_i121) + { + $elem122 = null; + $xfer += $input->readString($elem122); + $this->columns []= $elem122; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size123 = 0; + $_ktype124 = 0; + $_vtype125 = 0; + $xfer += $input->readMapBegin($_ktype124, $_vtype125, $_size123); + for ($_i127 = 0; $_i127 < $_size123; ++$_i127) + { + $key128 = ''; + $val129 = ''; + $xfer += $input->readString($key128); + $xfer += $input->readString($val129); + $this->attributes[$key128] = $val129; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumns_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter130) + { + $xfer += $output->writeString($iter130); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter131 => $viter132) + { + $xfer += $output->writeString($kiter131); + $xfer += $output->writeString($viter132); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowWithColumns_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowWithColumns_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size133 = 0; + $_etype136 = 0; + $xfer += $input->readListBegin($_etype136, $_size133); + for ($_i137 = 0; $_i137 < $_size133; ++$_i137) + { + $elem138 = null; + $elem138 = new TRowResult(); + $xfer += $elem138->read($input); + $this->success []= $elem138; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumns_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter139) + { + $xfer += $iter139->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size140 = 0; + $_ktype141 = 0; + $_vtype142 = 0; + $xfer += $input->readMapBegin($_ktype141, $_vtype142, $_size140); + for ($_i144 = 0; $_i144 < $_size140; ++$_i144) + { + $key145 = ''; + $val146 = ''; + $xfer += $input->readString($key145); + $xfer += $input->readString($val146); + $this->attributes[$key145] = $val146; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter147 => $viter148) + { + $xfer += $output->writeString($kiter147); + $xfer += $output->writeString($viter148); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size149 = 0; + $_etype152 = 0; + $xfer += $input->readListBegin($_etype152, $_size149); + for ($_i153 = 0; $_i153 < $_size149; ++$_i153) + { + $elem154 = null; + $elem154 = new TRowResult(); + $xfer += $elem154->read($input); + $this->success []= $elem154; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowTs_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter155) + { + $xfer += $iter155->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowWithColumnsTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $columns = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowWithColumnsTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size156 = 0; + $_etype159 = 0; + $xfer += $input->readListBegin($_etype159, $_size156); + for ($_i160 = 0; $_i160 < $_size156; ++$_i160) + { + $elem161 = null; + $xfer += $input->readString($elem161); + $this->columns []= $elem161; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size162 = 0; + $_ktype163 = 0; + $_vtype164 = 0; + $xfer += $input->readMapBegin($_ktype163, $_vtype164, $_size162); + for ($_i166 = 0; $_i166 < $_size162; ++$_i166) + { + $key167 = ''; + $val168 = ''; + $xfer += $input->readString($key167); + $xfer += $input->readString($val168); + $this->attributes[$key167] = $val168; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumnsTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter169) + { + $xfer += $output->writeString($iter169); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter170 => $viter171) + { + $xfer += $output->writeString($kiter170); + $xfer += $output->writeString($viter171); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowWithColumnsTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowWithColumnsTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size172 = 0; + $_etype175 = 0; + $xfer += $input->readListBegin($_etype175, $_size172); + for ($_i176 = 0; $_i176 < $_size172; ++$_i176) + { + $elem177 = null; + $elem177 = new TRowResult(); + $xfer += $elem177->read($input); + $this->success []= $elem177; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowWithColumnsTs_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter178) + { + $xfer += $iter178->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRows_args { + static $_TSPEC; + + public $tableName = null; + public $rows = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rows', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rows'])) { + $this->rows = $vals['rows']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRows_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rows = array(); + $_size179 = 0; + $_etype182 = 0; + $xfer += $input->readListBegin($_etype182, $_size179); + for ($_i183 = 0; $_i183 < $_size179; ++$_i183) + { + $elem184 = null; + $xfer += $input->readString($elem184); + $this->rows []= $elem184; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size185 = 0; + $_ktype186 = 0; + $_vtype187 = 0; + $xfer += $input->readMapBegin($_ktype186, $_vtype187, $_size185); + for ($_i189 = 0; $_i189 < $_size185; ++$_i189) + { + $key190 = ''; + $val191 = ''; + $xfer += $input->readString($key190); + $xfer += $input->readString($val191); + $this->attributes[$key190] = $val191; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRows_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rows !== null) { + if (!is_array($this->rows)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rows', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->rows)); + { + foreach ($this->rows as $iter192) + { + $xfer += $output->writeString($iter192); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter193 => $viter194) + { + $xfer += $output->writeString($kiter193); + $xfer += $output->writeString($viter194); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRows_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRows_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size195 = 0; + $_etype198 = 0; + $xfer += $input->readListBegin($_etype198, $_size195); + for ($_i199 = 0; $_i199 < $_size195; ++$_i199) + { + $elem200 = null; + $elem200 = new TRowResult(); + $xfer += $elem200->read($input); + $this->success []= $elem200; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRows_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter201) + { + $xfer += $iter201->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsWithColumns_args { + static $_TSPEC; + + public $tableName = null; + public $rows = null; + public $columns = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rows', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rows'])) { + $this->rows = $vals['rows']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowsWithColumns_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rows = array(); + $_size202 = 0; + $_etype205 = 0; + $xfer += $input->readListBegin($_etype205, $_size202); + for ($_i206 = 0; $_i206 < $_size202; ++$_i206) + { + $elem207 = null; + $xfer += $input->readString($elem207); + $this->rows []= $elem207; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size208 = 0; + $_etype211 = 0; + $xfer += $input->readListBegin($_etype211, $_size208); + for ($_i212 = 0; $_i212 < $_size208; ++$_i212) + { + $elem213 = null; + $xfer += $input->readString($elem213); + $this->columns []= $elem213; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size214 = 0; + $_ktype215 = 0; + $_vtype216 = 0; + $xfer += $input->readMapBegin($_ktype215, $_vtype216, $_size214); + for ($_i218 = 0; $_i218 < $_size214; ++$_i218) + { + $key219 = ''; + $val220 = ''; + $xfer += $input->readString($key219); + $xfer += $input->readString($val220); + $this->attributes[$key219] = $val220; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumns_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rows !== null) { + if (!is_array($this->rows)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rows', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->rows)); + { + foreach ($this->rows as $iter221) + { + $xfer += $output->writeString($iter221); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter222) + { + $xfer += $output->writeString($iter222); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter223 => $viter224) + { + $xfer += $output->writeString($kiter223); + $xfer += $output->writeString($viter224); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsWithColumns_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowsWithColumns_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size225 = 0; + $_etype228 = 0; + $xfer += $input->readListBegin($_etype228, $_size225); + for ($_i229 = 0; $_i229 < $_size225; ++$_i229) + { + $elem230 = null; + $elem230 = new TRowResult(); + $xfer += $elem230->read($input); + $this->success []= $elem230; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumns_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter231) + { + $xfer += $iter231->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsTs_args { + static $_TSPEC; + + public $tableName = null; + public $rows = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rows', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rows'])) { + $this->rows = $vals['rows']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowsTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rows = array(); + $_size232 = 0; + $_etype235 = 0; + $xfer += $input->readListBegin($_etype235, $_size232); + for ($_i236 = 0; $_i236 < $_size232; ++$_i236) + { + $elem237 = null; + $xfer += $input->readString($elem237); + $this->rows []= $elem237; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size238 = 0; + $_ktype239 = 0; + $_vtype240 = 0; + $xfer += $input->readMapBegin($_ktype239, $_vtype240, $_size238); + for ($_i242 = 0; $_i242 < $_size238; ++$_i242) + { + $key243 = ''; + $val244 = ''; + $xfer += $input->readString($key243); + $xfer += $input->readString($val244); + $this->attributes[$key243] = $val244; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rows !== null) { + if (!is_array($this->rows)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rows', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->rows)); + { + foreach ($this->rows as $iter245) + { + $xfer += $output->writeString($iter245); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter246 => $viter247) + { + $xfer += $output->writeString($kiter246); + $xfer += $output->writeString($viter247); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowsTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size248 = 0; + $_etype251 = 0; + $xfer += $input->readListBegin($_etype251, $_size248); + for ($_i252 = 0; $_i252 < $_size248; ++$_i252) + { + $elem253 = null; + $elem253 = new TRowResult(); + $xfer += $elem253->read($input); + $this->success []= $elem253; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsTs_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter254) + { + $xfer += $iter254->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsWithColumnsTs_args { + static $_TSPEC; + + public $tableName = null; + public $rows = null; + public $columns = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rows', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rows'])) { + $this->rows = $vals['rows']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_getRowsWithColumnsTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rows = array(); + $_size255 = 0; + $_etype258 = 0; + $xfer += $input->readListBegin($_etype258, $_size255); + for ($_i259 = 0; $_i259 < $_size255; ++$_i259) + { + $elem260 = null; + $xfer += $input->readString($elem260); + $this->rows []= $elem260; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size261 = 0; + $_etype264 = 0; + $xfer += $input->readListBegin($_etype264, $_size261); + for ($_i265 = 0; $_i265 < $_size261; ++$_i265) + { + $elem266 = null; + $xfer += $input->readString($elem266); + $this->columns []= $elem266; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size267 = 0; + $_ktype268 = 0; + $_vtype269 = 0; + $xfer += $input->readMapBegin($_ktype268, $_vtype269, $_size267); + for ($_i271 = 0; $_i271 < $_size267; ++$_i271) + { + $key272 = ''; + $val273 = ''; + $xfer += $input->readString($key272); + $xfer += $input->readString($val273); + $this->attributes[$key272] = $val273; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumnsTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rows !== null) { + if (!is_array($this->rows)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rows', TType::LST, 2); + { + $output->writeListBegin(TType::STRING, count($this->rows)); + { + foreach ($this->rows as $iter274) + { + $xfer += $output->writeString($iter274); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter275) + { + $xfer += $output->writeString($iter275); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter276 => $viter277) + { + $xfer += $output->writeString($kiter276); + $xfer += $output->writeString($viter277); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowsWithColumnsTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowsWithColumnsTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size278 = 0; + $_etype281 = 0; + $xfer += $input->readListBegin($_etype281, $_size278); + for ($_i282 = 0; $_i282 < $_size278; ++$_i282) + { + $elem283 = null; + $elem283 = new TRowResult(); + $xfer += $elem283->read($input); + $this->success []= $elem283; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowsWithColumnsTs_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter284) + { + $xfer += $iter284->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRow_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $mutations = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'mutations', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Mutation', + ), + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['mutations'])) { + $this->mutations = $vals['mutations']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_mutateRow_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->mutations = array(); + $_size285 = 0; + $_etype288 = 0; + $xfer += $input->readListBegin($_etype288, $_size285); + for ($_i289 = 0; $_i289 < $_size285; ++$_i289) + { + $elem290 = null; + $elem290 = new Mutation(); + $xfer += $elem290->read($input); + $this->mutations []= $elem290; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size291 = 0; + $_ktype292 = 0; + $_vtype293 = 0; + $xfer += $input->readMapBegin($_ktype292, $_vtype293, $_size291); + for ($_i295 = 0; $_i295 < $_size291; ++$_i295) + { + $key296 = ''; + $val297 = ''; + $xfer += $input->readString($key296); + $xfer += $input->readString($val297); + $this->attributes[$key296] = $val297; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRow_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->mutations !== null) { + if (!is_array($this->mutations)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mutations', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->mutations)); + { + foreach ($this->mutations as $iter298) + { + $xfer += $iter298->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter299 => $viter300) + { + $xfer += $output->writeString($kiter299); + $xfer += $output->writeString($viter300); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRow_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_mutateRow_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRow_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRowTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $mutations = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'mutations', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Mutation', + ), + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['mutations'])) { + $this->mutations = $vals['mutations']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_mutateRowTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->mutations = array(); + $_size301 = 0; + $_etype304 = 0; + $xfer += $input->readListBegin($_etype304, $_size301); + for ($_i305 = 0; $_i305 < $_size301; ++$_i305) + { + $elem306 = null; + $elem306 = new Mutation(); + $xfer += $elem306->read($input); + $this->mutations []= $elem306; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size307 = 0; + $_ktype308 = 0; + $_vtype309 = 0; + $xfer += $input->readMapBegin($_ktype308, $_vtype309, $_size307); + for ($_i311 = 0; $_i311 < $_size307; ++$_i311) + { + $key312 = ''; + $val313 = ''; + $xfer += $input->readString($key312); + $xfer += $input->readString($val313); + $this->attributes[$key312] = $val313; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->mutations !== null) { + if (!is_array($this->mutations)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mutations', TType::LST, 3); + { + $output->writeListBegin(TType::STRUCT, count($this->mutations)); + { + foreach ($this->mutations as $iter314) + { + $xfer += $iter314->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter315 => $viter316) + { + $xfer += $output->writeString($kiter315); + $xfer += $output->writeString($viter316); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRowTs_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_mutateRowTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowTs_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRows_args { + static $_TSPEC; + + public $tableName = null; + public $rowBatches = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rowBatches', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'BatchMutation', + ), + ), + 3 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rowBatches'])) { + $this->rowBatches = $vals['rowBatches']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_mutateRows_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rowBatches = array(); + $_size317 = 0; + $_etype320 = 0; + $xfer += $input->readListBegin($_etype320, $_size317); + for ($_i321 = 0; $_i321 < $_size317; ++$_i321) + { + $elem322 = null; + $elem322 = new BatchMutation(); + $xfer += $elem322->read($input); + $this->rowBatches []= $elem322; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size323 = 0; + $_ktype324 = 0; + $_vtype325 = 0; + $xfer += $input->readMapBegin($_ktype324, $_vtype325, $_size323); + for ($_i327 = 0; $_i327 < $_size323; ++$_i327) + { + $key328 = ''; + $val329 = ''; + $xfer += $input->readString($key328); + $xfer += $input->readString($val329); + $this->attributes[$key328] = $val329; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRows_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rowBatches !== null) { + if (!is_array($this->rowBatches)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rowBatches', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->rowBatches)); + { + foreach ($this->rowBatches as $iter330) + { + $xfer += $iter330->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter331 => $viter332) + { + $xfer += $output->writeString($kiter331); + $xfer += $output->writeString($viter332); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRows_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_mutateRows_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRows_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRowsTs_args { + static $_TSPEC; + + public $tableName = null; + public $rowBatches = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'rowBatches', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'BatchMutation', + ), + ), + 3 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['rowBatches'])) { + $this->rowBatches = $vals['rowBatches']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_mutateRowsTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->rowBatches = array(); + $_size333 = 0; + $_etype336 = 0; + $xfer += $input->readListBegin($_etype336, $_size333); + for ($_i337 = 0; $_i337 < $_size333; ++$_i337) + { + $elem338 = null; + $elem338 = new BatchMutation(); + $xfer += $elem338->read($input); + $this->rowBatches []= $elem338; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size339 = 0; + $_ktype340 = 0; + $_vtype341 = 0; + $xfer += $input->readMapBegin($_ktype340, $_vtype341, $_size339); + for ($_i343 = 0; $_i343 < $_size339; ++$_i343) + { + $key344 = ''; + $val345 = ''; + $xfer += $input->readString($key344); + $xfer += $input->readString($val345); + $this->attributes[$key344] = $val345; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowsTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->rowBatches !== null) { + if (!is_array($this->rowBatches)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('rowBatches', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->rowBatches)); + { + foreach ($this->rowBatches as $iter346) + { + $xfer += $iter346->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter347 => $viter348) + { + $xfer += $output->writeString($kiter347); + $xfer += $output->writeString($viter348); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_mutateRowsTs_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_mutateRowsTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_mutateRowsTs_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_atomicIncrement_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $value = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'value', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + } + } + + public function getName() { + return 'Hbase_atomicIncrement_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->value); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_atomicIncrement_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::I64, 4); + $xfer += $output->writeI64($this->value); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_atomicIncrement_result { + static $_TSPEC; + + public $success = null; + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I64, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_atomicIncrement_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_atomicIncrement_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I64, 0); + $xfer += $output->writeI64($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAll_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_deleteAll_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size349 = 0; + $_ktype350 = 0; + $_vtype351 = 0; + $xfer += $input->readMapBegin($_ktype350, $_vtype351, $_size349); + for ($_i353 = 0; $_i353 < $_size349; ++$_i353) + { + $key354 = ''; + $val355 = ''; + $xfer += $input->readString($key354); + $xfer += $input->readString($val355); + $this->attributes[$key354] = $val355; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAll_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter356 => $viter357) + { + $xfer += $output->writeString($kiter356); + $xfer += $output->writeString($viter357); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAll_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_deleteAll_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAll_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $column = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size358 = 0; + $_ktype359 = 0; + $_vtype360 = 0; + $xfer += $input->readMapBegin($_ktype359, $_vtype360, $_size358); + for ($_i362 = 0; $_i362 < $_size358; ++$_i362) + { + $key363 = ''; + $val364 = ''; + $xfer += $input->readString($key363); + $xfer += $input->readString($val364); + $this->attributes[$key363] = $val364; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter365 => $viter366) + { + $xfer += $output->writeString($kiter365); + $xfer += $output->writeString($viter366); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllTs_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllTs_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllRow_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllRow_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size367 = 0; + $_ktype368 = 0; + $_vtype369 = 0; + $xfer += $input->readMapBegin($_ktype368, $_vtype369, $_size367); + for ($_i371 = 0; $_i371 < $_size367; ++$_i371) + { + $key372 = ''; + $val373 = ''; + $xfer += $input->readString($key372); + $xfer += $input->readString($val373); + $this->attributes[$key372] = $val373; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRow_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter374 => $viter375) + { + $xfer += $output->writeString($kiter374); + $xfer += $output->writeString($viter375); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllRow_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllRow_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRow_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_increment_args { + static $_TSPEC; + + public $increment = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'increment', + 'type' => TType::STRUCT, + 'class' => 'TIncrement', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['increment'])) { + $this->increment = $vals['increment']; + } + } + } + + public function getName() { + return 'Hbase_increment_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->increment = new TIncrement(); + $xfer += $this->increment->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_increment_args'); + if ($this->increment !== null) { + if (!is_object($this->increment)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('increment', TType::STRUCT, 1); + $xfer += $this->increment->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_increment_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_increment_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_increment_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_incrementRows_args { + static $_TSPEC; + + public $increments = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'increments', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TIncrement', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['increments'])) { + $this->increments = $vals['increments']; + } + } + } + + public function getName() { + return 'Hbase_incrementRows_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::LST) { + $this->increments = array(); + $_size376 = 0; + $_etype379 = 0; + $xfer += $input->readListBegin($_etype379, $_size376); + for ($_i380 = 0; $_i380 < $_size376; ++$_i380) + { + $elem381 = null; + $elem381 = new TIncrement(); + $xfer += $elem381->read($input); + $this->increments []= $elem381; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_incrementRows_args'); + if ($this->increments !== null) { + if (!is_array($this->increments)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('increments', TType::LST, 1); + { + $output->writeListBegin(TType::STRUCT, count($this->increments)); + { + foreach ($this->increments as $iter382) + { + $xfer += $iter382->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_incrementRows_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_incrementRows_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_incrementRows_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllRowTs_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllRowTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size383 = 0; + $_ktype384 = 0; + $_vtype385 = 0; + $xfer += $input->readMapBegin($_ktype384, $_vtype385, $_size383); + for ($_i387 = 0; $_i387 < $_size383; ++$_i387) + { + $key388 = ''; + $val389 = ''; + $xfer += $input->readString($key388); + $xfer += $input->readString($val389); + $this->attributes[$key388] = $val389; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRowTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter390 => $viter391) + { + $xfer += $output->writeString($kiter390); + $xfer += $output->writeString($viter391); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_deleteAllRowTs_result { + static $_TSPEC; + + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_deleteAllRowTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_deleteAllRowTs_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithScan_args { + static $_TSPEC; + + public $tableName = null; + public $scan = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'scan', + 'type' => TType::STRUCT, + 'class' => 'TScan', + ), + 3 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['scan'])) { + $this->scan = $vals['scan']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithScan_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->scan = new TScan(); + $xfer += $this->scan->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size392 = 0; + $_ktype393 = 0; + $_vtype394 = 0; + $xfer += $input->readMapBegin($_ktype393, $_vtype394, $_size392); + for ($_i396 = 0; $_i396 < $_size392; ++$_i396) + { + $key397 = ''; + $val398 = ''; + $xfer += $input->readString($key397); + $xfer += $input->readString($val398); + $this->attributes[$key397] = $val398; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithScan_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->scan !== null) { + if (!is_object($this->scan)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('scan', TType::STRUCT, 2); + $xfer += $this->scan->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 3); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter399 => $viter400) + { + $xfer += $output->writeString($kiter399); + $xfer += $output->writeString($viter400); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithScan_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithScan_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithScan_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpen_args { + static $_TSPEC; + + public $tableName = null; + public $startRow = null; + public $columns = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'startRow', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['startRow'])) { + $this->startRow = $vals['startRow']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpen_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size401 = 0; + $_etype404 = 0; + $xfer += $input->readListBegin($_etype404, $_size401); + for ($_i405 = 0; $_i405 < $_size401; ++$_i405) + { + $elem406 = null; + $xfer += $input->readString($elem406); + $this->columns []= $elem406; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size407 = 0; + $_ktype408 = 0; + $_vtype409 = 0; + $xfer += $input->readMapBegin($_ktype408, $_vtype409, $_size407); + for ($_i411 = 0; $_i411 < $_size407; ++$_i411) + { + $key412 = ''; + $val413 = ''; + $xfer += $input->readString($key412); + $xfer += $input->readString($val413); + $this->attributes[$key412] = $val413; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpen_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->startRow !== null) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($this->startRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter414) + { + $xfer += $output->writeString($iter414); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter415 => $viter416) + { + $xfer += $output->writeString($kiter415); + $xfer += $output->writeString($viter416); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpen_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpen_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpen_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithStop_args { + static $_TSPEC; + + public $tableName = null; + public $startRow = null; + public $stopRow = null; + public $columns = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'startRow', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'stopRow', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['startRow'])) { + $this->startRow = $vals['startRow']; + } + if (isset($vals['stopRow'])) { + $this->stopRow = $vals['stopRow']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithStop_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->stopRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size417 = 0; + $_etype420 = 0; + $xfer += $input->readListBegin($_etype420, $_size417); + for ($_i421 = 0; $_i421 < $_size417; ++$_i421) + { + $elem422 = null; + $xfer += $input->readString($elem422); + $this->columns []= $elem422; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size423 = 0; + $_ktype424 = 0; + $_vtype425 = 0; + $xfer += $input->readMapBegin($_ktype424, $_vtype425, $_size423); + for ($_i427 = 0; $_i427 < $_size423; ++$_i427) + { + $key428 = ''; + $val429 = ''; + $xfer += $input->readString($key428); + $xfer += $input->readString($val429); + $this->attributes[$key428] = $val429; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStop_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->startRow !== null) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($this->startRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->stopRow !== null) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 3); + $xfer += $output->writeString($this->stopRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter430) + { + $xfer += $output->writeString($iter430); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter431 => $viter432) + { + $xfer += $output->writeString($kiter431); + $xfer += $output->writeString($viter432); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithStop_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithStop_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStop_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithPrefix_args { + static $_TSPEC; + + public $tableName = null; + public $startAndPrefix = null; + public $columns = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'startAndPrefix', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['startAndPrefix'])) { + $this->startAndPrefix = $vals['startAndPrefix']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithPrefix_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startAndPrefix); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size433 = 0; + $_etype436 = 0; + $xfer += $input->readListBegin($_etype436, $_size433); + for ($_i437 = 0; $_i437 < $_size433; ++$_i437) + { + $elem438 = null; + $xfer += $input->readString($elem438); + $this->columns []= $elem438; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size439 = 0; + $_ktype440 = 0; + $_vtype441 = 0; + $xfer += $input->readMapBegin($_ktype440, $_vtype441, $_size439); + for ($_i443 = 0; $_i443 < $_size439; ++$_i443) + { + $key444 = ''; + $val445 = ''; + $xfer += $input->readString($key444); + $xfer += $input->readString($val445); + $this->attributes[$key444] = $val445; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithPrefix_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->startAndPrefix !== null) { + $xfer += $output->writeFieldBegin('startAndPrefix', TType::STRING, 2); + $xfer += $output->writeString($this->startAndPrefix); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter446) + { + $xfer += $output->writeString($iter446); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 4); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter447 => $viter448) + { + $xfer += $output->writeString($kiter447); + $xfer += $output->writeString($viter448); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithPrefix_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithPrefix_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithPrefix_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenTs_args { + static $_TSPEC; + + public $tableName = null; + public $startRow = null; + public $columns = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'startRow', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 4 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 5 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['startRow'])) { + $this->startRow = $vals['startRow']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size449 = 0; + $_etype452 = 0; + $xfer += $input->readListBegin($_etype452, $_size449); + for ($_i453 = 0; $_i453 < $_size449; ++$_i453) + { + $elem454 = null; + $xfer += $input->readString($elem454); + $this->columns []= $elem454; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size455 = 0; + $_ktype456 = 0; + $_vtype457 = 0; + $xfer += $input->readMapBegin($_ktype456, $_vtype457, $_size455); + for ($_i459 = 0; $_i459 < $_size455; ++$_i459) + { + $key460 = ''; + $val461 = ''; + $xfer += $input->readString($key460); + $xfer += $input->readString($val461); + $this->attributes[$key460] = $val461; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->startRow !== null) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($this->startRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 3); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter462) + { + $xfer += $output->writeString($iter462); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 4); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 5); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter463 => $viter464) + { + $xfer += $output->writeString($kiter463); + $xfer += $output->writeString($viter464); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenTs_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithStopTs_args { + static $_TSPEC; + + public $tableName = null; + public $startRow = null; + public $stopRow = null; + public $columns = null; + public $timestamp = null; + public $attributes = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'startRow', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'stopRow', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 6 => array( + 'var' => 'attributes', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRING, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRING, + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['startRow'])) { + $this->startRow = $vals['startRow']; + } + if (isset($vals['stopRow'])) { + $this->stopRow = $vals['stopRow']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['attributes'])) { + $this->attributes = $vals['attributes']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithStopTs_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->stopRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size465 = 0; + $_etype468 = 0; + $xfer += $input->readListBegin($_etype468, $_size465); + for ($_i469 = 0; $_i469 < $_size465; ++$_i469) + { + $elem470 = null; + $xfer += $input->readString($elem470); + $this->columns []= $elem470; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::MAP) { + $this->attributes = array(); + $_size471 = 0; + $_ktype472 = 0; + $_vtype473 = 0; + $xfer += $input->readMapBegin($_ktype472, $_vtype473, $_size471); + for ($_i475 = 0; $_i475 < $_size471; ++$_i475) + { + $key476 = ''; + $val477 = ''; + $xfer += $input->readString($key476); + $xfer += $input->readString($val477); + $this->attributes[$key476] = $val477; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStopTs_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->startRow !== null) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 2); + $xfer += $output->writeString($this->startRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->stopRow !== null) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 3); + $xfer += $output->writeString($this->stopRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter478) + { + $xfer += $output->writeString($iter478); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 5); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->attributes !== null) { + if (!is_array($this->attributes)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('attributes', TType::MAP, 6); + { + $output->writeMapBegin(TType::STRING, TType::STRING, count($this->attributes)); + { + foreach ($this->attributes as $kiter479 => $viter480) + { + $xfer += $output->writeString($kiter479); + $xfer += $output->writeString($viter480); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerOpenWithStopTs_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::I32, + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_scannerOpenWithStopTs_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->success); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerOpenWithStopTs_result'); + if ($this->success !== null) { + $xfer += $output->writeFieldBegin('success', TType::I32, 0); + $xfer += $output->writeI32($this->success); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerGet_args { + static $_TSPEC; + + public $id = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + } + } + + public function getName() { + return 'Hbase_scannerGet_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGet_args'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($this->id); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerGet_result { + static $_TSPEC; + + public $success = null; + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_scannerGet_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size481 = 0; + $_etype484 = 0; + $xfer += $input->readListBegin($_etype484, $_size481); + for ($_i485 = 0; $_i485 < $_size481; ++$_i485) + { + $elem486 = null; + $elem486 = new TRowResult(); + $xfer += $elem486->read($input); + $this->success []= $elem486; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGet_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter487) + { + $xfer += $iter487->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerGetList_args { + static $_TSPEC; + + public $id = null; + public $nbRows = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I32, + ), + 2 => array( + 'var' => 'nbRows', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['nbRows'])) { + $this->nbRows = $vals['nbRows']; + } + } + } + + public function getName() { + return 'Hbase_scannerGetList_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->nbRows); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGetList_args'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->nbRows !== null) { + $xfer += $output->writeFieldBegin('nbRows', TType::I32, 2); + $xfer += $output->writeI32($this->nbRows); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerGetList_result { + static $_TSPEC; + + public $success = null; + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TRowResult', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_scannerGetList_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size488 = 0; + $_etype491 = 0; + $xfer += $input->readListBegin($_etype491, $_size488); + for ($_i492 = 0; $_i492 < $_size488; ++$_i492) + { + $elem493 = null; + $elem493 = new TRowResult(); + $xfer += $elem493->read($input); + $this->success []= $elem493; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerGetList_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter494) + { + $xfer += $iter494->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerClose_args { + static $_TSPEC; + + public $id = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'id', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + } + } + + public function getName() { + return 'Hbase_scannerClose_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerClose_args'); + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I32, 1); + $xfer += $output->writeI32($this->id); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_scannerClose_result { + static $_TSPEC; + + public $io = null; + public $ia = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + 2 => array( + 'var' => 'ia', + 'type' => TType::STRUCT, + 'class' => 'IllegalArgument', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + if (isset($vals['ia'])) { + $this->ia = $vals['ia']; + } + } + } + + public function getName() { + return 'Hbase_scannerClose_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRUCT) { + $this->ia = new IllegalArgument(); + $xfer += $this->ia->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_scannerClose_result'); + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->ia !== null) { + $xfer += $output->writeFieldBegin('ia', TType::STRUCT, 2); + $xfer += $this->ia->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowOrBefore_args { + static $_TSPEC; + + public $tableName = null; + public $row = null; + public $family = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'tableName', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'family', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['tableName'])) { + $this->tableName = $vals['tableName']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['family'])) { + $this->family = $vals['family']; + } + } + } + + public function getName() { + return 'Hbase_getRowOrBefore_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->tableName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->family); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowOrBefore_args'); + if ($this->tableName !== null) { + $xfer += $output->writeFieldBegin('tableName', TType::STRING, 1); + $xfer += $output->writeString($this->tableName); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->family !== null) { + $xfer += $output->writeFieldBegin('family', TType::STRING, 3); + $xfer += $output->writeString($this->family); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRowOrBefore_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'TCell', + ), + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRowOrBefore_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::LST) { + $this->success = array(); + $_size495 = 0; + $_etype498 = 0; + $xfer += $input->readListBegin($_etype498, $_size495); + for ($_i499 = 0; $_i499 < $_size495; ++$_i499) + { + $elem500 = null; + $elem500 = new TCell(); + $xfer += $elem500->read($input); + $this->success []= $elem500; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRowOrBefore_result'); + if ($this->success !== null) { + if (!is_array($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::LST, 0); + { + $output->writeListBegin(TType::STRUCT, count($this->success)); + { + foreach ($this->success as $iter501) + { + $xfer += $iter501->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRegionInfo_args { + static $_TSPEC; + + public $row = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + } + } + + public function getName() { + return 'Hbase_getRegionInfo_args'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRegionInfo_args'); + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Hbase_getRegionInfo_result { + static $_TSPEC; + + public $success = null; + public $io = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 0 => array( + 'var' => 'success', + 'type' => TType::STRUCT, + 'class' => 'TRegionInfo', + ), + 1 => array( + 'var' => 'io', + 'type' => TType::STRUCT, + 'class' => 'IOError', + ), + ); + } + if (is_array($vals)) { + if (isset($vals['success'])) { + $this->success = $vals['success']; + } + if (isset($vals['io'])) { + $this->io = $vals['io']; + } + } + } + + public function getName() { + return 'Hbase_getRegionInfo_result'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 0: + if ($ftype == TType::STRUCT) { + $this->success = new TRegionInfo(); + $xfer += $this->success->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + case 1: + if ($ftype == TType::STRUCT) { + $this->io = new IOError(); + $xfer += $this->io->read($input); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Hbase_getRegionInfo_result'); + if ($this->success !== null) { + if (!is_object($this->success)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('success', TType::STRUCT, 0); + $xfer += $this->success->write($output); + $xfer += $output->writeFieldEnd(); + } + if ($this->io !== null) { + $xfer += $output->writeFieldBegin('io', TType::STRUCT, 1); + $xfer += $this->io->write($output); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git hbase-examples/src/main/php/gen-php/Hbase/Hbase_types.php hbase-examples/src/main/php/gen-php/Hbase/Hbase_types.php new file mode 100644 index 0000000..bf6b4fa --- /dev/null +++ hbase-examples/src/main/php/gen-php/Hbase/Hbase_types.php @@ -0,0 +1,1453 @@ + array( + 'var' => 'value', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + } + } + + public function getName() { + return 'TCell'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->value); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TCell'); + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 1); + $xfer += $output->writeString($this->value); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 2); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class ColumnDescriptor { + static $_TSPEC; + + public $name = null; + public $maxVersions = 3; + public $compression = "NONE"; + public $inMemory = false; + public $bloomFilterType = "NONE"; + public $bloomFilterVectorSize = 0; + public $bloomFilterNbHashes = 0; + public $blockCacheEnabled = false; + public $timeToLive = -1; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'maxVersions', + 'type' => TType::I32, + ), + 3 => array( + 'var' => 'compression', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'inMemory', + 'type' => TType::BOOL, + ), + 5 => array( + 'var' => 'bloomFilterType', + 'type' => TType::STRING, + ), + 6 => array( + 'var' => 'bloomFilterVectorSize', + 'type' => TType::I32, + ), + 7 => array( + 'var' => 'bloomFilterNbHashes', + 'type' => TType::I32, + ), + 8 => array( + 'var' => 'blockCacheEnabled', + 'type' => TType::BOOL, + ), + 9 => array( + 'var' => 'timeToLive', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['maxVersions'])) { + $this->maxVersions = $vals['maxVersions']; + } + if (isset($vals['compression'])) { + $this->compression = $vals['compression']; + } + if (isset($vals['inMemory'])) { + $this->inMemory = $vals['inMemory']; + } + if (isset($vals['bloomFilterType'])) { + $this->bloomFilterType = $vals['bloomFilterType']; + } + if (isset($vals['bloomFilterVectorSize'])) { + $this->bloomFilterVectorSize = $vals['bloomFilterVectorSize']; + } + if (isset($vals['bloomFilterNbHashes'])) { + $this->bloomFilterNbHashes = $vals['bloomFilterNbHashes']; + } + if (isset($vals['blockCacheEnabled'])) { + $this->blockCacheEnabled = $vals['blockCacheEnabled']; + } + if (isset($vals['timeToLive'])) { + $this->timeToLive = $vals['timeToLive']; + } + } + } + + public function getName() { + return 'ColumnDescriptor'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->maxVersions); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->compression); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->inMemory); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->bloomFilterType); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->bloomFilterVectorSize); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->bloomFilterNbHashes); + } else { + $xfer += $input->skip($ftype); + } + break; + case 8: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->blockCacheEnabled); + } else { + $xfer += $input->skip($ftype); + } + break; + case 9: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->timeToLive); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('ColumnDescriptor'); + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 1); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->maxVersions !== null) { + $xfer += $output->writeFieldBegin('maxVersions', TType::I32, 2); + $xfer += $output->writeI32($this->maxVersions); + $xfer += $output->writeFieldEnd(); + } + if ($this->compression !== null) { + $xfer += $output->writeFieldBegin('compression', TType::STRING, 3); + $xfer += $output->writeString($this->compression); + $xfer += $output->writeFieldEnd(); + } + if ($this->inMemory !== null) { + $xfer += $output->writeFieldBegin('inMemory', TType::BOOL, 4); + $xfer += $output->writeBool($this->inMemory); + $xfer += $output->writeFieldEnd(); + } + if ($this->bloomFilterType !== null) { + $xfer += $output->writeFieldBegin('bloomFilterType', TType::STRING, 5); + $xfer += $output->writeString($this->bloomFilterType); + $xfer += $output->writeFieldEnd(); + } + if ($this->bloomFilterVectorSize !== null) { + $xfer += $output->writeFieldBegin('bloomFilterVectorSize', TType::I32, 6); + $xfer += $output->writeI32($this->bloomFilterVectorSize); + $xfer += $output->writeFieldEnd(); + } + if ($this->bloomFilterNbHashes !== null) { + $xfer += $output->writeFieldBegin('bloomFilterNbHashes', TType::I32, 7); + $xfer += $output->writeI32($this->bloomFilterNbHashes); + $xfer += $output->writeFieldEnd(); + } + if ($this->blockCacheEnabled !== null) { + $xfer += $output->writeFieldBegin('blockCacheEnabled', TType::BOOL, 8); + $xfer += $output->writeBool($this->blockCacheEnabled); + $xfer += $output->writeFieldEnd(); + } + if ($this->timeToLive !== null) { + $xfer += $output->writeFieldBegin('timeToLive', TType::I32, 9); + $xfer += $output->writeI32($this->timeToLive); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TRegionInfo { + static $_TSPEC; + + public $startKey = null; + public $endKey = null; + public $id = null; + public $name = null; + public $version = null; + public $serverName = null; + public $port = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'startKey', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'endKey', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'id', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'name', + 'type' => TType::STRING, + ), + 5 => array( + 'var' => 'version', + 'type' => TType::BYTE, + ), + 6 => array( + 'var' => 'serverName', + 'type' => TType::STRING, + ), + 7 => array( + 'var' => 'port', + 'type' => TType::I32, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['startKey'])) { + $this->startKey = $vals['startKey']; + } + if (isset($vals['endKey'])) { + $this->endKey = $vals['endKey']; + } + if (isset($vals['id'])) { + $this->id = $vals['id']; + } + if (isset($vals['name'])) { + $this->name = $vals['name']; + } + if (isset($vals['version'])) { + $this->version = $vals['version']; + } + if (isset($vals['serverName'])) { + $this->serverName = $vals['serverName']; + } + if (isset($vals['port'])) { + $this->port = $vals['port']; + } + } + } + + public function getName() { + return 'TRegionInfo'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startKey); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->endKey); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->id); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->name); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::BYTE) { + $xfer += $input->readByte($this->version); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->serverName); + } else { + $xfer += $input->skip($ftype); + } + break; + case 7: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->port); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TRegionInfo'); + if ($this->startKey !== null) { + $xfer += $output->writeFieldBegin('startKey', TType::STRING, 1); + $xfer += $output->writeString($this->startKey); + $xfer += $output->writeFieldEnd(); + } + if ($this->endKey !== null) { + $xfer += $output->writeFieldBegin('endKey', TType::STRING, 2); + $xfer += $output->writeString($this->endKey); + $xfer += $output->writeFieldEnd(); + } + if ($this->id !== null) { + $xfer += $output->writeFieldBegin('id', TType::I64, 3); + $xfer += $output->writeI64($this->id); + $xfer += $output->writeFieldEnd(); + } + if ($this->name !== null) { + $xfer += $output->writeFieldBegin('name', TType::STRING, 4); + $xfer += $output->writeString($this->name); + $xfer += $output->writeFieldEnd(); + } + if ($this->version !== null) { + $xfer += $output->writeFieldBegin('version', TType::BYTE, 5); + $xfer += $output->writeByte($this->version); + $xfer += $output->writeFieldEnd(); + } + if ($this->serverName !== null) { + $xfer += $output->writeFieldBegin('serverName', TType::STRING, 6); + $xfer += $output->writeString($this->serverName); + $xfer += $output->writeFieldEnd(); + } + if ($this->port !== null) { + $xfer += $output->writeFieldBegin('port', TType::I32, 7); + $xfer += $output->writeI32($this->port); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class Mutation { + static $_TSPEC; + + public $isDelete = false; + public $column = null; + public $value = null; + public $writeToWAL = true; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'isDelete', + 'type' => TType::BOOL, + ), + 2 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'value', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'writeToWAL', + 'type' => TType::BOOL, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['isDelete'])) { + $this->isDelete = $vals['isDelete']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['value'])) { + $this->value = $vals['value']; + } + if (isset($vals['writeToWAL'])) { + $this->writeToWAL = $vals['writeToWAL']; + } + } + } + + public function getName() { + return 'Mutation'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->isDelete); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->value); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::BOOL) { + $xfer += $input->readBool($this->writeToWAL); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('Mutation'); + if ($this->isDelete !== null) { + $xfer += $output->writeFieldBegin('isDelete', TType::BOOL, 1); + $xfer += $output->writeBool($this->isDelete); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 2); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->value !== null) { + $xfer += $output->writeFieldBegin('value', TType::STRING, 3); + $xfer += $output->writeString($this->value); + $xfer += $output->writeFieldEnd(); + } + if ($this->writeToWAL !== null) { + $xfer += $output->writeFieldBegin('writeToWAL', TType::BOOL, 4); + $xfer += $output->writeBool($this->writeToWAL); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class BatchMutation { + static $_TSPEC; + + public $row = null; + public $mutations = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'mutations', + 'type' => TType::LST, + 'etype' => TType::STRUCT, + 'elem' => array( + 'type' => TType::STRUCT, + 'class' => 'Mutation', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['mutations'])) { + $this->mutations = $vals['mutations']; + } + } + } + + public function getName() { + return 'BatchMutation'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::LST) { + $this->mutations = array(); + $_size0 = 0; + $_etype3 = 0; + $xfer += $input->readListBegin($_etype3, $_size0); + for ($_i4 = 0; $_i4 < $_size0; ++$_i4) + { + $elem5 = null; + $elem5 = new Mutation(); + $xfer += $elem5->read($input); + $this->mutations []= $elem5; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('BatchMutation'); + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->mutations !== null) { + if (!is_array($this->mutations)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('mutations', TType::LST, 2); + { + $output->writeListBegin(TType::STRUCT, count($this->mutations)); + { + foreach ($this->mutations as $iter6) + { + $xfer += $iter6->write($output); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TIncrement { + static $_TSPEC; + + public $table = null; + public $row = null; + public $column = null; + public $ammount = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'table', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'column', + 'type' => TType::STRING, + ), + 4 => array( + 'var' => 'ammount', + 'type' => TType::I64, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['table'])) { + $this->table = $vals['table']; + } + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['column'])) { + $this->column = $vals['column']; + } + if (isset($vals['ammount'])) { + $this->ammount = $vals['ammount']; + } + } + } + + public function getName() { + return 'TIncrement'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->table); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->column); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->ammount); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TIncrement'); + if ($this->table !== null) { + $xfer += $output->writeFieldBegin('table', TType::STRING, 1); + $xfer += $output->writeString($this->table); + $xfer += $output->writeFieldEnd(); + } + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 2); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->column !== null) { + $xfer += $output->writeFieldBegin('column', TType::STRING, 3); + $xfer += $output->writeString($this->column); + $xfer += $output->writeFieldEnd(); + } + if ($this->ammount !== null) { + $xfer += $output->writeFieldBegin('ammount', TType::I64, 4); + $xfer += $output->writeI64($this->ammount); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TRowResult { + static $_TSPEC; + + public $row = null; + public $columns = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'row', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'columns', + 'type' => TType::MAP, + 'ktype' => TType::STRING, + 'vtype' => TType::STRUCT, + 'key' => array( + 'type' => TType::STRING, + ), + 'val' => array( + 'type' => TType::STRUCT, + 'class' => 'TCell', + ), + ), + ); + } + if (is_array($vals)) { + if (isset($vals['row'])) { + $this->row = $vals['row']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + } + } + + public function getName() { + return 'TRowResult'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->row); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::MAP) { + $this->columns = array(); + $_size7 = 0; + $_ktype8 = 0; + $_vtype9 = 0; + $xfer += $input->readMapBegin($_ktype8, $_vtype9, $_size7); + for ($_i11 = 0; $_i11 < $_size7; ++$_i11) + { + $key12 = ''; + $val13 = new TCell(); + $xfer += $input->readString($key12); + $val13 = new TCell(); + $xfer += $val13->read($input); + $this->columns[$key12] = $val13; + } + $xfer += $input->readMapEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TRowResult'); + if ($this->row !== null) { + $xfer += $output->writeFieldBegin('row', TType::STRING, 1); + $xfer += $output->writeString($this->row); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::MAP, 2); + { + $output->writeMapBegin(TType::STRING, TType::STRUCT, count($this->columns)); + { + foreach ($this->columns as $kiter14 => $viter15) + { + $xfer += $output->writeString($kiter14); + $xfer += $viter15->write($output); + } + } + $output->writeMapEnd(); + } + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class TScan { + static $_TSPEC; + + public $startRow = null; + public $stopRow = null; + public $timestamp = null; + public $columns = null; + public $caching = null; + public $filterString = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'startRow', + 'type' => TType::STRING, + ), + 2 => array( + 'var' => 'stopRow', + 'type' => TType::STRING, + ), + 3 => array( + 'var' => 'timestamp', + 'type' => TType::I64, + ), + 4 => array( + 'var' => 'columns', + 'type' => TType::LST, + 'etype' => TType::STRING, + 'elem' => array( + 'type' => TType::STRING, + ), + ), + 5 => array( + 'var' => 'caching', + 'type' => TType::I32, + ), + 6 => array( + 'var' => 'filterString', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['startRow'])) { + $this->startRow = $vals['startRow']; + } + if (isset($vals['stopRow'])) { + $this->stopRow = $vals['stopRow']; + } + if (isset($vals['timestamp'])) { + $this->timestamp = $vals['timestamp']; + } + if (isset($vals['columns'])) { + $this->columns = $vals['columns']; + } + if (isset($vals['caching'])) { + $this->caching = $vals['caching']; + } + if (isset($vals['filterString'])) { + $this->filterString = $vals['filterString']; + } + } + } + + public function getName() { + return 'TScan'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->startRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 2: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->stopRow); + } else { + $xfer += $input->skip($ftype); + } + break; + case 3: + if ($ftype == TType::I64) { + $xfer += $input->readI64($this->timestamp); + } else { + $xfer += $input->skip($ftype); + } + break; + case 4: + if ($ftype == TType::LST) { + $this->columns = array(); + $_size16 = 0; + $_etype19 = 0; + $xfer += $input->readListBegin($_etype19, $_size16); + for ($_i20 = 0; $_i20 < $_size16; ++$_i20) + { + $elem21 = null; + $xfer += $input->readString($elem21); + $this->columns []= $elem21; + } + $xfer += $input->readListEnd(); + } else { + $xfer += $input->skip($ftype); + } + break; + case 5: + if ($ftype == TType::I32) { + $xfer += $input->readI32($this->caching); + } else { + $xfer += $input->skip($ftype); + } + break; + case 6: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->filterString); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('TScan'); + if ($this->startRow !== null) { + $xfer += $output->writeFieldBegin('startRow', TType::STRING, 1); + $xfer += $output->writeString($this->startRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->stopRow !== null) { + $xfer += $output->writeFieldBegin('stopRow', TType::STRING, 2); + $xfer += $output->writeString($this->stopRow); + $xfer += $output->writeFieldEnd(); + } + if ($this->timestamp !== null) { + $xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); + $xfer += $output->writeI64($this->timestamp); + $xfer += $output->writeFieldEnd(); + } + if ($this->columns !== null) { + if (!is_array($this->columns)) { + throw new TProtocolException('Bad type in structure.', TProtocolException::INVALID_DATA); + } + $xfer += $output->writeFieldBegin('columns', TType::LST, 4); + { + $output->writeListBegin(TType::STRING, count($this->columns)); + { + foreach ($this->columns as $iter22) + { + $xfer += $output->writeString($iter22); + } + } + $output->writeListEnd(); + } + $xfer += $output->writeFieldEnd(); + } + if ($this->caching !== null) { + $xfer += $output->writeFieldBegin('caching', TType::I32, 5); + $xfer += $output->writeI32($this->caching); + $xfer += $output->writeFieldEnd(); + } + if ($this->filterString !== null) { + $xfer += $output->writeFieldBegin('filterString', TType::STRING, 6); + $xfer += $output->writeString($this->filterString); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class IOError extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'IOError'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('IOError'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class IllegalArgument extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'IllegalArgument'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('IllegalArgument'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +class AlreadyExists extends TException { + static $_TSPEC; + + public $message = null; + + public function __construct($vals=null) { + if (!isset(self::$_TSPEC)) { + self::$_TSPEC = array( + 1 => array( + 'var' => 'message', + 'type' => TType::STRING, + ), + ); + } + if (is_array($vals)) { + if (isset($vals['message'])) { + $this->message = $vals['message']; + } + } + } + + public function getName() { + return 'AlreadyExists'; + } + + public function read($input) + { + $xfer = 0; + $fname = null; + $ftype = 0; + $fid = 0; + $xfer += $input->readStructBegin($fname); + while (true) + { + $xfer += $input->readFieldBegin($fname, $ftype, $fid); + if ($ftype == TType::STOP) { + break; + } + switch ($fid) + { + case 1: + if ($ftype == TType::STRING) { + $xfer += $input->readString($this->message); + } else { + $xfer += $input->skip($ftype); + } + break; + default: + $xfer += $input->skip($ftype); + break; + } + $xfer += $input->readFieldEnd(); + } + $xfer += $input->readStructEnd(); + return $xfer; + } + + public function write($output) { + $xfer = 0; + $xfer += $output->writeStructBegin('AlreadyExists'); + if ($this->message !== null) { + $xfer += $output->writeFieldBegin('message', TType::STRING, 1); + $xfer += $output->writeString($this->message); + $xfer += $output->writeFieldEnd(); + } + $xfer += $output->writeFieldStop(); + $xfer += $output->writeStructEnd(); + return $xfer; + } + +} + +?> diff --git hbase-examples/src/main/python/DemoClient.py hbase-examples/src/main/python/DemoClient.py new file mode 100644 index 0000000..0d41226 --- /dev/null +++ hbase-examples/src/main/python/DemoClient.py @@ -0,0 +1,218 @@ +#!/usr/bin/python +''' + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +''' + +import sys +import time +import os + +# Modify this import path to point to the correct location to thrift. +thrift_path = os.path.abspath('/Users/sergey/Downloads/thrift/lib/py/build/lib.macosx-10.8-intel-2.7') +sys.path.append(thrift_path) +gen_py_path = os.path.abspath('gen-py') +sys.path.append(gen_py_path) + +from thrift import Thrift +from thrift.transport import TSocket, TTransport +from thrift.protocol import TBinaryProtocol +from hbase import ttypes +from hbase.Hbase import Client, ColumnDescriptor, Mutation + +def printVersions(row, versions): + print "row: " + row + ", values: ", + for cell in versions: + print cell.value + "; ", + print + +def printRow(entry): + print "row: " + entry.row + ", cols:", + for k in sorted(entry.columns): + print k + " => " + entry.columns[k].value, + print + + +def demo_client(host, port, is_framed_transport): + + # Make socket + socket = TSocket.TSocket(host, port) + + # Make transport + if is_framed_transport: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) + + # Wrap in a protocol + protocol = TBinaryProtocol.TBinaryProtocol(transport) + + # Create a client to use the protocol encoder + client = Client(protocol) + + # Connect! + transport.open() + + t = "demo_table" + + # + # Scan all tables, look for the demo table and delete it. + # + print "scanning tables..." + for table in client.getTableNames(): + print " found: %s" %(table) + if table == t: + if client.isTableEnabled(table): + print " disabling table: %s" %(t) + client.disableTable(table) + print " deleting table: %s" %(t) + client.deleteTable(table) + + columns = [] + col = ColumnDescriptor() + col.name = 'entry:' + col.maxVersions = 10 + columns.append(col) + col = ColumnDescriptor() + col.name = 'unused:' + columns.append(col) + + try: + print "creating table: %s" %(t) + client.createTable(t, columns) + except AlreadyExists, ae: + print "WARN: " + ae.message + + cols = client.getColumnDescriptors(t) + print "column families in %s" %(t) + for col_name in cols.keys(): + col = cols[col_name] + print " column: %s, maxVer: %d" % (col.name, col.maxVersions) + + dummy_attributes = {} + # + # Test UTF-8 handling + # + invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1" + valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; + + # non-utf8 is fine for data + mutations = [Mutation(column="entry:foo",value=invalid)] + print str(mutations) + client.mutateRow(t, "foo", mutations, dummy_attributes) + + # try empty strings + mutations = [Mutation(column="entry:", value="")] + client.mutateRow(t, "", mutations, dummy_attributes) + + # this row name is valid utf8 + mutations = [Mutation(column="entry:foo", value=valid)] + client.mutateRow(t, valid, mutations, dummy_attributes) + + # non-utf8 is not allowed in row names + try: + mutations = [Mutation(column="entry:foo", value=invalid)] + client.mutateRow(t, invalid, mutations, dummy_attributes) + except ttypes.IOError, e: + print 'expected exception: %s' %(e.message) + + # Run a scanner on the rows we just created + print "Starting scanner..." + scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes) + + r = client.scannerGet(scanner) + while r: + printRow(r[0]) + r = client.scannerGet(scanner) + print "Scanner finished" + + # + # Run some operations on a bunch of rows. + # + for e in range(100, 0, -1): + # format row keys as "00000" to "00100" + row = "%0.5d" % (e) + + mutations = [Mutation(column="unused:", value="DELETE_ME")] + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)[0]) + client.deleteAllRow(t, row, dummy_attributes) + + mutations = [Mutation(column="entry:num", value="0"), + Mutation(column="entry:foo", value="FOO")] + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)[0]); + + mutations = [Mutation(column="entry:foo",isDelete=True), + Mutation(column="entry:num",value="-1")] + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)[0]) + + mutations = [Mutation(column="entry:num", value=str(e)), + Mutation(column="entry:sqr", value=str(e*e))] + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)[0]) + + time.sleep(0.05) + + mutations = [Mutation(column="entry:num",value="-999"), + Mutation(column="entry:sqr",isDelete=True)] + client.mutateRowTs(t, row, mutations, 1, dummy_attributes) # shouldn't override latest + printRow(client.getRow(t, row, dummy_attributes)[0]) + + versions = client.getVer(t, row, "entry:num", 10, dummy_attributes) + printVersions(row, versions) + if len(versions) != 3: + print("FATAL: wrong # of versions") + sys.exit(-1) + + r = client.get(t, row, "entry:foo", dummy_attributes) + # just to be explicit, we get lists back, if it's empty there was no matching row. + if len(r) > 0: + raise "shouldn't get here!" + + columnNames = [] + for (col, desc) in client.getColumnDescriptors(t).items(): + print "column with name: "+desc.name + print desc + columnNames.append(desc.name+":") + + print "Starting scanner..." + scanner = client.scannerOpenWithStop(t, "00020", "00040", columnNames, dummy_attributes) + + r = client.scannerGet(scanner) + while r: + printRow(r[0]) + r = client.scannerGet(scanner) + + client.scannerClose(scanner) + print "Scanner finished" + + transport.close() + + +if __name__ == '__main__': + + import sys + if len(sys.argv) < 3: + print 'usage: %s ' % __file__ + sys.exit(1) + + host = sys.argv[1] + port = sys.argv[2] + is_framed_transport = False + demo_client(host, port, is_framed_transport) + diff --git hbase-examples/src/main/python/gen-py/__init__.py hbase-examples/src/main/python/gen-py/__init__.py new file mode 100644 index 0000000..e69de29 diff --git hbase-examples/src/main/python/gen-py/hbase/Hbase-remote hbase-examples/src/main/python/gen-py/hbase/Hbase-remote new file mode 100755 index 0000000..9585ad5 --- /dev/null +++ hbase-examples/src/main/python/gen-py/hbase/Hbase-remote @@ -0,0 +1,382 @@ +#!/usr/bin/env python +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +import sys +import pprint +from urlparse import urlparse +from thrift.transport import TTransport +from thrift.transport import TSocket +from thrift.transport import THttpClient +from thrift.protocol import TBinaryProtocol + +import Hbase +from ttypes import * + +if len(sys.argv) <= 1 or sys.argv[1] == '--help': + print '' + print 'Usage: ' + sys.argv[0] + ' [-h host[:port]] [-u url] [-f[ramed]] function [arg1 [arg2...]]' + print '' + print 'Functions:' + print ' void enableTable(Bytes tableName)' + print ' void disableTable(Bytes tableName)' + print ' bool isTableEnabled(Bytes tableName)' + print ' void compact(Bytes tableNameOrRegionName)' + print ' void majorCompact(Bytes tableNameOrRegionName)' + print ' getTableNames()' + print ' getColumnDescriptors(Text tableName)' + print ' getTableRegions(Text tableName)' + print ' void createTable(Text tableName, columnFamilies)' + print ' void deleteTable(Text tableName)' + print ' get(Text tableName, Text row, Text column, attributes)' + print ' getVer(Text tableName, Text row, Text column, i32 numVersions, attributes)' + print ' getVerTs(Text tableName, Text row, Text column, i64 timestamp, i32 numVersions, attributes)' + print ' getRow(Text tableName, Text row, attributes)' + print ' getRowWithColumns(Text tableName, Text row, columns, attributes)' + print ' getRowTs(Text tableName, Text row, i64 timestamp, attributes)' + print ' getRowWithColumnsTs(Text tableName, Text row, columns, i64 timestamp, attributes)' + print ' getRows(Text tableName, rows, attributes)' + print ' getRowsWithColumns(Text tableName, rows, columns, attributes)' + print ' getRowsTs(Text tableName, rows, i64 timestamp, attributes)' + print ' getRowsWithColumnsTs(Text tableName, rows, columns, i64 timestamp, attributes)' + print ' void mutateRow(Text tableName, Text row, mutations, attributes)' + print ' void mutateRowTs(Text tableName, Text row, mutations, i64 timestamp, attributes)' + print ' void mutateRows(Text tableName, rowBatches, attributes)' + print ' void mutateRowsTs(Text tableName, rowBatches, i64 timestamp, attributes)' + print ' i64 atomicIncrement(Text tableName, Text row, Text column, i64 value)' + print ' void deleteAll(Text tableName, Text row, Text column, attributes)' + print ' void deleteAllTs(Text tableName, Text row, Text column, i64 timestamp, attributes)' + print ' void deleteAllRow(Text tableName, Text row, attributes)' + print ' void increment(TIncrement increment)' + print ' void incrementRows( increments)' + print ' void deleteAllRowTs(Text tableName, Text row, i64 timestamp, attributes)' + print ' ScannerID scannerOpenWithScan(Text tableName, TScan scan, attributes)' + print ' ScannerID scannerOpen(Text tableName, Text startRow, columns, attributes)' + print ' ScannerID scannerOpenWithStop(Text tableName, Text startRow, Text stopRow, columns, attributes)' + print ' ScannerID scannerOpenWithPrefix(Text tableName, Text startAndPrefix, columns, attributes)' + print ' ScannerID scannerOpenTs(Text tableName, Text startRow, columns, i64 timestamp, attributes)' + print ' ScannerID scannerOpenWithStopTs(Text tableName, Text startRow, Text stopRow, columns, i64 timestamp, attributes)' + print ' scannerGet(ScannerID id)' + print ' scannerGetList(ScannerID id, i32 nbRows)' + print ' void scannerClose(ScannerID id)' + print ' getRowOrBefore(Text tableName, Text row, Text family)' + print ' TRegionInfo getRegionInfo(Text row)' + print '' + sys.exit(0) + +pp = pprint.PrettyPrinter(indent = 2) +host = 'localhost' +port = 9090 +uri = '' +framed = False +http = False +argi = 1 + +if sys.argv[argi] == '-h': + parts = sys.argv[argi+1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + argi += 2 + +if sys.argv[argi] == '-u': + url = urlparse(sys.argv[argi+1]) + parts = url[1].split(':') + host = parts[0] + if len(parts) > 1: + port = int(parts[1]) + else: + port = 80 + uri = url[2] + if url[4]: + uri += '?%s' % url[4] + http = True + argi += 2 + +if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed': + framed = True + argi += 1 + +cmd = sys.argv[argi] +args = sys.argv[argi+1:] + +if http: + transport = THttpClient.THttpClient(host, port, uri) +else: + socket = TSocket.TSocket(host, port) + if framed: + transport = TTransport.TFramedTransport(socket) + else: + transport = TTransport.TBufferedTransport(socket) +protocol = TBinaryProtocol.TBinaryProtocol(transport) +client = Hbase.Client(protocol) +transport.open() + +if cmd == 'enableTable': + if len(args) != 1: + print 'enableTable requires 1 args' + sys.exit(1) + pp.pprint(client.enableTable(eval(args[0]),)) + +elif cmd == 'disableTable': + if len(args) != 1: + print 'disableTable requires 1 args' + sys.exit(1) + pp.pprint(client.disableTable(eval(args[0]),)) + +elif cmd == 'isTableEnabled': + if len(args) != 1: + print 'isTableEnabled requires 1 args' + sys.exit(1) + pp.pprint(client.isTableEnabled(eval(args[0]),)) + +elif cmd == 'compact': + if len(args) != 1: + print 'compact requires 1 args' + sys.exit(1) + pp.pprint(client.compact(eval(args[0]),)) + +elif cmd == 'majorCompact': + if len(args) != 1: + print 'majorCompact requires 1 args' + sys.exit(1) + pp.pprint(client.majorCompact(eval(args[0]),)) + +elif cmd == 'getTableNames': + if len(args) != 0: + print 'getTableNames requires 0 args' + sys.exit(1) + pp.pprint(client.getTableNames()) + +elif cmd == 'getColumnDescriptors': + if len(args) != 1: + print 'getColumnDescriptors requires 1 args' + sys.exit(1) + pp.pprint(client.getColumnDescriptors(eval(args[0]),)) + +elif cmd == 'getTableRegions': + if len(args) != 1: + print 'getTableRegions requires 1 args' + sys.exit(1) + pp.pprint(client.getTableRegions(eval(args[0]),)) + +elif cmd == 'createTable': + if len(args) != 2: + print 'createTable requires 2 args' + sys.exit(1) + pp.pprint(client.createTable(eval(args[0]),eval(args[1]),)) + +elif cmd == 'deleteTable': + if len(args) != 1: + print 'deleteTable requires 1 args' + sys.exit(1) + pp.pprint(client.deleteTable(eval(args[0]),)) + +elif cmd == 'get': + if len(args) != 4: + print 'get requires 4 args' + sys.exit(1) + pp.pprint(client.get(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'getVer': + if len(args) != 5: + print 'getVer requires 5 args' + sys.exit(1) + pp.pprint(client.getVer(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'getVerTs': + if len(args) != 6: + print 'getVerTs requires 6 args' + sys.exit(1) + pp.pprint(client.getVerTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) + +elif cmd == 'getRow': + if len(args) != 3: + print 'getRow requires 3 args' + sys.exit(1) + pp.pprint(client.getRow(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'getRowWithColumns': + if len(args) != 4: + print 'getRowWithColumns requires 4 args' + sys.exit(1) + pp.pprint(client.getRowWithColumns(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'getRowTs': + if len(args) != 4: + print 'getRowTs requires 4 args' + sys.exit(1) + pp.pprint(client.getRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'getRowWithColumnsTs': + if len(args) != 5: + print 'getRowWithColumnsTs requires 5 args' + sys.exit(1) + pp.pprint(client.getRowWithColumnsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'getRows': + if len(args) != 3: + print 'getRows requires 3 args' + sys.exit(1) + pp.pprint(client.getRows(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'getRowsWithColumns': + if len(args) != 4: + print 'getRowsWithColumns requires 4 args' + sys.exit(1) + pp.pprint(client.getRowsWithColumns(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'getRowsTs': + if len(args) != 4: + print 'getRowsTs requires 4 args' + sys.exit(1) + pp.pprint(client.getRowsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'getRowsWithColumnsTs': + if len(args) != 5: + print 'getRowsWithColumnsTs requires 5 args' + sys.exit(1) + pp.pprint(client.getRowsWithColumnsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'mutateRow': + if len(args) != 4: + print 'mutateRow requires 4 args' + sys.exit(1) + pp.pprint(client.mutateRow(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'mutateRowTs': + if len(args) != 5: + print 'mutateRowTs requires 5 args' + sys.exit(1) + pp.pprint(client.mutateRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'mutateRows': + if len(args) != 3: + print 'mutateRows requires 3 args' + sys.exit(1) + pp.pprint(client.mutateRows(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'mutateRowsTs': + if len(args) != 4: + print 'mutateRowsTs requires 4 args' + sys.exit(1) + pp.pprint(client.mutateRowsTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'atomicIncrement': + if len(args) != 4: + print 'atomicIncrement requires 4 args' + sys.exit(1) + pp.pprint(client.atomicIncrement(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'deleteAll': + if len(args) != 4: + print 'deleteAll requires 4 args' + sys.exit(1) + pp.pprint(client.deleteAll(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'deleteAllTs': + if len(args) != 5: + print 'deleteAllTs requires 5 args' + sys.exit(1) + pp.pprint(client.deleteAllTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'deleteAllRow': + if len(args) != 3: + print 'deleteAllRow requires 3 args' + sys.exit(1) + pp.pprint(client.deleteAllRow(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'increment': + if len(args) != 1: + print 'increment requires 1 args' + sys.exit(1) + pp.pprint(client.increment(eval(args[0]),)) + +elif cmd == 'incrementRows': + if len(args) != 1: + print 'incrementRows requires 1 args' + sys.exit(1) + pp.pprint(client.incrementRows(eval(args[0]),)) + +elif cmd == 'deleteAllRowTs': + if len(args) != 4: + print 'deleteAllRowTs requires 4 args' + sys.exit(1) + pp.pprint(client.deleteAllRowTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'scannerOpenWithScan': + if len(args) != 3: + print 'scannerOpenWithScan requires 3 args' + sys.exit(1) + pp.pprint(client.scannerOpenWithScan(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'scannerOpen': + if len(args) != 4: + print 'scannerOpen requires 4 args' + sys.exit(1) + pp.pprint(client.scannerOpen(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'scannerOpenWithStop': + if len(args) != 5: + print 'scannerOpenWithStop requires 5 args' + sys.exit(1) + pp.pprint(client.scannerOpenWithStop(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'scannerOpenWithPrefix': + if len(args) != 4: + print 'scannerOpenWithPrefix requires 4 args' + sys.exit(1) + pp.pprint(client.scannerOpenWithPrefix(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),)) + +elif cmd == 'scannerOpenTs': + if len(args) != 5: + print 'scannerOpenTs requires 5 args' + sys.exit(1) + pp.pprint(client.scannerOpenTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),)) + +elif cmd == 'scannerOpenWithStopTs': + if len(args) != 6: + print 'scannerOpenWithStopTs requires 6 args' + sys.exit(1) + pp.pprint(client.scannerOpenWithStopTs(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),)) + +elif cmd == 'scannerGet': + if len(args) != 1: + print 'scannerGet requires 1 args' + sys.exit(1) + pp.pprint(client.scannerGet(eval(args[0]),)) + +elif cmd == 'scannerGetList': + if len(args) != 2: + print 'scannerGetList requires 2 args' + sys.exit(1) + pp.pprint(client.scannerGetList(eval(args[0]),eval(args[1]),)) + +elif cmd == 'scannerClose': + if len(args) != 1: + print 'scannerClose requires 1 args' + sys.exit(1) + pp.pprint(client.scannerClose(eval(args[0]),)) + +elif cmd == 'getRowOrBefore': + if len(args) != 3: + print 'getRowOrBefore requires 3 args' + sys.exit(1) + pp.pprint(client.getRowOrBefore(eval(args[0]),eval(args[1]),eval(args[2]),)) + +elif cmd == 'getRegionInfo': + if len(args) != 1: + print 'getRegionInfo requires 1 args' + sys.exit(1) + pp.pprint(client.getRegionInfo(eval(args[0]),)) + +else: + print 'Unrecognized method %s' % cmd + sys.exit(1) + +transport.close() diff --git hbase-examples/src/main/python/gen-py/hbase/Hbase.py hbase-examples/src/main/python/gen-py/hbase/Hbase.py new file mode 100644 index 0000000..56358a3 --- /dev/null +++ hbase-examples/src/main/python/gen-py/hbase/Hbase.py @@ -0,0 +1,10286 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException +from ttypes import * +from thrift.Thrift import TProcessor +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + +class Iface: + def enableTable(self, tableName): + """ + Brings a table on-line (enables it) + + Parameters: + - tableName: name of the table + """ + pass + + def disableTable(self, tableName): + """ + Disables a table (takes it off-line) If it is being served, the master + will tell the servers to stop serving it. + + Parameters: + - tableName: name of the table + """ + pass + + def isTableEnabled(self, tableName): + """ + @return true if table is on-line + + Parameters: + - tableName: name of the table to check + """ + pass + + def compact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + """ + pass + + def majorCompact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + """ + pass + + def getTableNames(self, ): + """ + List all the userspace tables. + + @return returns a list of names + """ + pass + + def getColumnDescriptors(self, tableName): + """ + List all the column families assoicated with a table. + + @return list of column family descriptors + + Parameters: + - tableName: table name + """ + pass + + def getTableRegions(self, tableName): + """ + List the regions associated with a table. + + @return list of region descriptors + + Parameters: + - tableName: table name + """ + pass + + def createTable(self, tableName, columnFamilies): + """ + Create a table with the specified column families. The name + field for each ColumnDescriptor must be set and must end in a + colon (:). All other fields are optional and will get default + values if not explicitly specified. + + @throws IllegalArgument if an input parameter is invalid + + @throws AlreadyExists if the table name already exists + + Parameters: + - tableName: name of table to create + - columnFamilies: list of column family descriptors + """ + pass + + def deleteTable(self, tableName): + """ + Deletes a table + + @throws IOError if table doesn't exist on server or there was some other + problem + + Parameters: + - tableName: name of table to delete + """ + pass + + def get(self, tableName, row, column, attributes): + """ + Get a single TCell for the specified table, row, and column at the + latest timestamp. Returns an empty list if no such value exists. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - attributes: Get attributes + """ + pass + + def getVer(self, tableName, row, column, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + pass + + def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. Only versions less than or equal to the specified + timestamp will be returned. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - timestamp: timestamp + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + pass + + def getRow(self, tableName, row, attributes): + """ + Get all the data for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - attributes: Get attributes + """ + pass + + def getRowWithColumns(self, tableName, row, columns, attributes): + """ + Get the specified columns for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + pass + + def getRowTs(self, tableName, row, timestamp, attributes): + """ + Get all the data for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of the table + - row: row key + - timestamp: timestamp + - attributes: Get attributes + """ + pass + + def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + pass + + def getRows(self, tableName, rows, attributes): + """ + Get all the data for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - attributes: Get attributes + """ + pass + + def getRowsWithColumns(self, tableName, rows, columns, attributes): + """ + Get the specified columns for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + pass + + def getRowsTs(self, tableName, rows, timestamp, attributes): + """ + Get all the data for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of the table + - rows: row keys + - timestamp: timestamp + - attributes: Get attributes + """ + pass + + def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + pass + + def mutateRow(self, tableName, row, mutations, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - attributes: Mutation attributes + """ + pass + + def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - timestamp: timestamp + - attributes: Mutation attributes + """ + pass + + def mutateRows(self, tableName, rowBatches, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - attributes: Mutation attributes + """ + pass + + def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - timestamp: timestamp + - attributes: Mutation attributes + """ + pass + + def atomicIncrement(self, tableName, row, column, value): + """ + Atomically increment the column value specified. Returns the next value post increment. + + Parameters: + - tableName: name of table + - row: row to increment + - column: name of column + - value: amount to increment by + """ + pass + + def deleteAll(self, tableName, row, column, attributes): + """ + Delete all cells that match the passed row and column. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - attributes: Delete attributes + """ + pass + + def deleteAllTs(self, tableName, row, column, timestamp, attributes): + """ + Delete all cells that match the passed row and column and whose + timestamp is equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - timestamp: timestamp + - attributes: Delete attributes + """ + pass + + def deleteAllRow(self, tableName, row, attributes): + """ + Completely delete the row's cells. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - attributes: Delete attributes + """ + pass + + def increment(self, increment): + """ + Increment a cell by the ammount. + Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. + False is the default. Turn to true if you need the extra performance and can accept some + data loss if a thrift server dies with increments still in the queue. + + Parameters: + - increment: The single increment to apply + """ + pass + + def incrementRows(self, increments): + """ + Parameters: + - increments: The list of increments + """ + pass + + def deleteAllRowTs(self, tableName, row, timestamp, attributes): + """ + Completely delete the row's cells marked with a timestamp + equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - timestamp: timestamp + - attributes: Delete attributes + """ + pass + + def scannerOpenWithScan(self, tableName, scan, attributes): + """ + Get a scanner on the current table, using the Scan instance + for the scan parameters. + + Parameters: + - tableName: name of table + - scan: Scan instance + - attributes: Scan attributes + """ + pass + + def scannerOpen(self, tableName, startRow, columns, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + pass + + def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + pass + + def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + """ + Open a scanner for a given prefix. That is all rows will have the specified + prefix. No other rows will be returned. + + @return scanner id to use with other scanner calls + + Parameters: + - tableName: name of table + - startAndPrefix: the prefix (and thus start row) of the keys you want + - columns: the columns you want returned + - attributes: Scan attributes + """ + pass + + def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + Only values with the specified timestamp are returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + pass + + def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. Only values with the specified timestamp are + returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + pass + + def scannerGet(self, id): + """ + Returns the scanner's current row value and advances to the next + row in the table. When there are no more rows in the table, or a key + greater-than-or-equal-to the scanner's specified stopRow is reached, + an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + """ + pass + + def scannerGetList(self, id, nbRows): + """ + Returns, starting at the scanner's current row value nbRows worth of + rows and advances to the next row in the table. When there are no more + rows in the table, or a key greater-than-or-equal-to the scanner's + specified stopRow is reached, an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + - nbRows: number of results to return + """ + pass + + def scannerClose(self, id): + """ + Closes the server-state associated with an open scanner. + + @throws IllegalArgument if ScannerID is invalid + + Parameters: + - id: id of a scanner returned by scannerOpen + """ + pass + + def getRowOrBefore(self, tableName, row, family): + """ + Get the row just before the specified one. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - family: column name + """ + pass + + def getRegionInfo(self, row): + """ + Get the regininfo for the specified row. It scans + the metatable to find region's start and end keys. + + @return value for specified row/column + + Parameters: + - row: row key + """ + pass + + +class Client(Iface): + def __init__(self, iprot, oprot=None): + self._iprot = self._oprot = iprot + if oprot is not None: + self._oprot = oprot + self._seqid = 0 + + def enableTable(self, tableName): + """ + Brings a table on-line (enables it) + + Parameters: + - tableName: name of the table + """ + self.send_enableTable(tableName) + self.recv_enableTable() + + def send_enableTable(self, tableName): + self._oprot.writeMessageBegin('enableTable', TMessageType.CALL, self._seqid) + args = enableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_enableTable(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = enableTable_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def disableTable(self, tableName): + """ + Disables a table (takes it off-line) If it is being served, the master + will tell the servers to stop serving it. + + Parameters: + - tableName: name of the table + """ + self.send_disableTable(tableName) + self.recv_disableTable() + + def send_disableTable(self, tableName): + self._oprot.writeMessageBegin('disableTable', TMessageType.CALL, self._seqid) + args = disableTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_disableTable(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = disableTable_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def isTableEnabled(self, tableName): + """ + @return true if table is on-line + + Parameters: + - tableName: name of the table to check + """ + self.send_isTableEnabled(tableName) + return self.recv_isTableEnabled() + + def send_isTableEnabled(self, tableName): + self._oprot.writeMessageBegin('isTableEnabled', TMessageType.CALL, self._seqid) + args = isTableEnabled_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_isTableEnabled(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = isTableEnabled_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "isTableEnabled failed: unknown result"); + + def compact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + """ + self.send_compact(tableNameOrRegionName) + self.recv_compact() + + def send_compact(self, tableNameOrRegionName): + self._oprot.writeMessageBegin('compact', TMessageType.CALL, self._seqid) + args = compact_args() + args.tableNameOrRegionName = tableNameOrRegionName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_compact(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = compact_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def majorCompact(self, tableNameOrRegionName): + """ + Parameters: + - tableNameOrRegionName + """ + self.send_majorCompact(tableNameOrRegionName) + self.recv_majorCompact() + + def send_majorCompact(self, tableNameOrRegionName): + self._oprot.writeMessageBegin('majorCompact', TMessageType.CALL, self._seqid) + args = majorCompact_args() + args.tableNameOrRegionName = tableNameOrRegionName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_majorCompact(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = majorCompact_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def getTableNames(self, ): + """ + List all the userspace tables. + + @return returns a list of names + """ + self.send_getTableNames() + return self.recv_getTableNames() + + def send_getTableNames(self, ): + self._oprot.writeMessageBegin('getTableNames', TMessageType.CALL, self._seqid) + args = getTableNames_args() + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableNames(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getTableNames_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableNames failed: unknown result"); + + def getColumnDescriptors(self, tableName): + """ + List all the column families assoicated with a table. + + @return list of column family descriptors + + Parameters: + - tableName: table name + """ + self.send_getColumnDescriptors(tableName) + return self.recv_getColumnDescriptors() + + def send_getColumnDescriptors(self, tableName): + self._oprot.writeMessageBegin('getColumnDescriptors', TMessageType.CALL, self._seqid) + args = getColumnDescriptors_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getColumnDescriptors(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getColumnDescriptors_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getColumnDescriptors failed: unknown result"); + + def getTableRegions(self, tableName): + """ + List the regions associated with a table. + + @return list of region descriptors + + Parameters: + - tableName: table name + """ + self.send_getTableRegions(tableName) + return self.recv_getTableRegions() + + def send_getTableRegions(self, tableName): + self._oprot.writeMessageBegin('getTableRegions', TMessageType.CALL, self._seqid) + args = getTableRegions_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getTableRegions(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getTableRegions_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getTableRegions failed: unknown result"); + + def createTable(self, tableName, columnFamilies): + """ + Create a table with the specified column families. The name + field for each ColumnDescriptor must be set and must end in a + colon (:). All other fields are optional and will get default + values if not explicitly specified. + + @throws IllegalArgument if an input parameter is invalid + + @throws AlreadyExists if the table name already exists + + Parameters: + - tableName: name of table to create + - columnFamilies: list of column family descriptors + """ + self.send_createTable(tableName, columnFamilies) + self.recv_createTable() + + def send_createTable(self, tableName, columnFamilies): + self._oprot.writeMessageBegin('createTable', TMessageType.CALL, self._seqid) + args = createTable_args() + args.tableName = tableName + args.columnFamilies = columnFamilies + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_createTable(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = createTable_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + if result.exist is not None: + raise result.exist + return + + def deleteTable(self, tableName): + """ + Deletes a table + + @throws IOError if table doesn't exist on server or there was some other + problem + + Parameters: + - tableName: name of table to delete + """ + self.send_deleteTable(tableName) + self.recv_deleteTable() + + def send_deleteTable(self, tableName): + self._oprot.writeMessageBegin('deleteTable', TMessageType.CALL, self._seqid) + args = deleteTable_args() + args.tableName = tableName + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteTable(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteTable_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def get(self, tableName, row, column, attributes): + """ + Get a single TCell for the specified table, row, and column at the + latest timestamp. Returns an empty list if no such value exists. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - attributes: Get attributes + """ + self.send_get(tableName, row, column, attributes) + return self.recv_get() + + def send_get(self, tableName, row, column, attributes): + self._oprot.writeMessageBegin('get', TMessageType.CALL, self._seqid) + args = get_args() + args.tableName = tableName + args.row = row + args.column = column + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_get(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = get_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "get failed: unknown result"); + + def getVer(self, tableName, row, column, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + self.send_getVer(tableName, row, column, numVersions, attributes) + return self.recv_getVer() + + def send_getVer(self, tableName, row, column, numVersions, attributes): + self._oprot.writeMessageBegin('getVer', TMessageType.CALL, self._seqid) + args = getVer_args() + args.tableName = tableName + args.row = row + args.column = column + args.numVersions = numVersions + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getVer(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getVer_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getVer failed: unknown result"); + + def getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + """ + Get the specified number of versions for the specified table, + row, and column. Only versions less than or equal to the specified + timestamp will be returned. + + @return list of cells for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - column: column name + - timestamp: timestamp + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + self.send_getVerTs(tableName, row, column, timestamp, numVersions, attributes) + return self.recv_getVerTs() + + def send_getVerTs(self, tableName, row, column, timestamp, numVersions, attributes): + self._oprot.writeMessageBegin('getVerTs', TMessageType.CALL, self._seqid) + args = getVerTs_args() + args.tableName = tableName + args.row = row + args.column = column + args.timestamp = timestamp + args.numVersions = numVersions + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getVerTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getVerTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getVerTs failed: unknown result"); + + def getRow(self, tableName, row, attributes): + """ + Get all the data for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - attributes: Get attributes + """ + self.send_getRow(tableName, row, attributes) + return self.recv_getRow() + + def send_getRow(self, tableName, row, attributes): + self._oprot.writeMessageBegin('getRow', TMessageType.CALL, self._seqid) + args = getRow_args() + args.tableName = tableName + args.row = row + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRow(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRow_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRow failed: unknown result"); + + def getRowWithColumns(self, tableName, row, columns, attributes): + """ + Get the specified columns for the specified table and row at the latest + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + self.send_getRowWithColumns(tableName, row, columns, attributes) + return self.recv_getRowWithColumns() + + def send_getRowWithColumns(self, tableName, row, columns, attributes): + self._oprot.writeMessageBegin('getRowWithColumns', TMessageType.CALL, self._seqid) + args = getRowWithColumns_args() + args.tableName = tableName + args.row = row + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowWithColumns(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowWithColumns_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumns failed: unknown result"); + + def getRowTs(self, tableName, row, timestamp, attributes): + """ + Get all the data for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of the table + - row: row key + - timestamp: timestamp + - attributes: Get attributes + """ + self.send_getRowTs(tableName, row, timestamp, attributes) + return self.recv_getRowTs() + + def send_getRowTs(self, tableName, row, timestamp, attributes): + self._oprot.writeMessageBegin('getRowTs', TMessageType.CALL, self._seqid) + args = getRowTs_args() + args.tableName = tableName + args.row = row + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowTs failed: unknown result"); + + def getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and row at the specified + timestamp. Returns an empty list if the row does not exist. + + @return TRowResult containing the row and map of columns to TCells + + Parameters: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + self.send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes) + return self.recv_getRowWithColumnsTs() + + def send_getRowWithColumnsTs(self, tableName, row, columns, timestamp, attributes): + self._oprot.writeMessageBegin('getRowWithColumnsTs', TMessageType.CALL, self._seqid) + args = getRowWithColumnsTs_args() + args.tableName = tableName + args.row = row + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowWithColumnsTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowWithColumnsTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowWithColumnsTs failed: unknown result"); + + def getRows(self, tableName, rows, attributes): + """ + Get all the data for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - attributes: Get attributes + """ + self.send_getRows(tableName, rows, attributes) + return self.recv_getRows() + + def send_getRows(self, tableName, rows, attributes): + self._oprot.writeMessageBegin('getRows', TMessageType.CALL, self._seqid) + args = getRows_args() + args.tableName = tableName + args.rows = rows + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRows(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRows_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRows failed: unknown result"); + + def getRowsWithColumns(self, tableName, rows, columns, attributes): + """ + Get the specified columns for the specified table and rows at the latest + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + self.send_getRowsWithColumns(tableName, rows, columns, attributes) + return self.recv_getRowsWithColumns() + + def send_getRowsWithColumns(self, tableName, rows, columns, attributes): + self._oprot.writeMessageBegin('getRowsWithColumns', TMessageType.CALL, self._seqid) + args = getRowsWithColumns_args() + args.tableName = tableName + args.rows = rows + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsWithColumns(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowsWithColumns_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumns failed: unknown result"); + + def getRowsTs(self, tableName, rows, timestamp, attributes): + """ + Get all the data for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of the table + - rows: row keys + - timestamp: timestamp + - attributes: Get attributes + """ + self.send_getRowsTs(tableName, rows, timestamp, attributes) + return self.recv_getRowsTs() + + def send_getRowsTs(self, tableName, rows, timestamp, attributes): + self._oprot.writeMessageBegin('getRowsTs', TMessageType.CALL, self._seqid) + args = getRowsTs_args() + args.tableName = tableName + args.rows = rows + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowsTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsTs failed: unknown result"); + + def getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + """ + Get the specified columns for the specified table and rows at the specified + timestamp. Returns an empty list if no rows exist. + + @return TRowResult containing the rows and map of columns to TCells + + Parameters: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + self.send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes) + return self.recv_getRowsWithColumnsTs() + + def send_getRowsWithColumnsTs(self, tableName, rows, columns, timestamp, attributes): + self._oprot.writeMessageBegin('getRowsWithColumnsTs', TMessageType.CALL, self._seqid) + args = getRowsWithColumnsTs_args() + args.tableName = tableName + args.rows = rows + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowsWithColumnsTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowsWithColumnsTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowsWithColumnsTs failed: unknown result"); + + def mutateRow(self, tableName, row, mutations, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - attributes: Mutation attributes + """ + self.send_mutateRow(tableName, row, mutations, attributes) + self.recv_mutateRow() + + def send_mutateRow(self, tableName, row, mutations, attributes): + self._oprot.writeMessageBegin('mutateRow', TMessageType.CALL, self._seqid) + args = mutateRow_args() + args.tableName = tableName + args.row = row + args.mutations = mutations + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRow(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = mutateRow_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + """ + Apply a series of mutations (updates/deletes) to a row in a + single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - timestamp: timestamp + - attributes: Mutation attributes + """ + self.send_mutateRowTs(tableName, row, mutations, timestamp, attributes) + self.recv_mutateRowTs() + + def send_mutateRowTs(self, tableName, row, mutations, timestamp, attributes): + self._oprot.writeMessageBegin('mutateRowTs', TMessageType.CALL, self._seqid) + args = mutateRowTs_args() + args.tableName = tableName + args.row = row + args.mutations = mutations + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRowTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = mutateRowTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRows(self, tableName, rowBatches, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. Default current timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - attributes: Mutation attributes + """ + self.send_mutateRows(tableName, rowBatches, attributes) + self.recv_mutateRows() + + def send_mutateRows(self, tableName, rowBatches, attributes): + self._oprot.writeMessageBegin('mutateRows', TMessageType.CALL, self._seqid) + args = mutateRows_args() + args.tableName = tableName + args.rowBatches = rowBatches + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRows(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = mutateRows_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + """ + Apply a series of batches (each a series of mutations on a single row) + in a single transaction. If an exception is thrown, then the + transaction is aborted. The specified timestamp is used, and + all entries will have an identical timestamp. + + Parameters: + - tableName: name of table + - rowBatches: list of row batches + - timestamp: timestamp + - attributes: Mutation attributes + """ + self.send_mutateRowsTs(tableName, rowBatches, timestamp, attributes) + self.recv_mutateRowsTs() + + def send_mutateRowsTs(self, tableName, rowBatches, timestamp, attributes): + self._oprot.writeMessageBegin('mutateRowsTs', TMessageType.CALL, self._seqid) + args = mutateRowsTs_args() + args.tableName = tableName + args.rowBatches = rowBatches + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_mutateRowsTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = mutateRowsTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def atomicIncrement(self, tableName, row, column, value): + """ + Atomically increment the column value specified. Returns the next value post increment. + + Parameters: + - tableName: name of table + - row: row to increment + - column: name of column + - value: amount to increment by + """ + self.send_atomicIncrement(tableName, row, column, value) + return self.recv_atomicIncrement() + + def send_atomicIncrement(self, tableName, row, column, value): + self._oprot.writeMessageBegin('atomicIncrement', TMessageType.CALL, self._seqid) + args = atomicIncrement_args() + args.tableName = tableName + args.row = row + args.column = column + args.value = value + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_atomicIncrement(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = atomicIncrement_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "atomicIncrement failed: unknown result"); + + def deleteAll(self, tableName, row, column, attributes): + """ + Delete all cells that match the passed row and column. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - attributes: Delete attributes + """ + self.send_deleteAll(tableName, row, column, attributes) + self.recv_deleteAll() + + def send_deleteAll(self, tableName, row, column, attributes): + self._oprot.writeMessageBegin('deleteAll', TMessageType.CALL, self._seqid) + args = deleteAll_args() + args.tableName = tableName + args.row = row + args.column = column + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAll(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteAll_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllTs(self, tableName, row, column, timestamp, attributes): + """ + Delete all cells that match the passed row and column and whose + timestamp is equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - timestamp: timestamp + - attributes: Delete attributes + """ + self.send_deleteAllTs(tableName, row, column, timestamp, attributes) + self.recv_deleteAllTs() + + def send_deleteAllTs(self, tableName, row, column, timestamp, attributes): + self._oprot.writeMessageBegin('deleteAllTs', TMessageType.CALL, self._seqid) + args = deleteAllTs_args() + args.tableName = tableName + args.row = row + args.column = column + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteAllTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllRow(self, tableName, row, attributes): + """ + Completely delete the row's cells. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - attributes: Delete attributes + """ + self.send_deleteAllRow(tableName, row, attributes) + self.recv_deleteAllRow() + + def send_deleteAllRow(self, tableName, row, attributes): + self._oprot.writeMessageBegin('deleteAllRow', TMessageType.CALL, self._seqid) + args = deleteAllRow_args() + args.tableName = tableName + args.row = row + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllRow(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteAllRow_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def increment(self, increment): + """ + Increment a cell by the ammount. + Increments can be applied async if hbase.regionserver.thrift.coalesceIncrement is set to true. + False is the default. Turn to true if you need the extra performance and can accept some + data loss if a thrift server dies with increments still in the queue. + + Parameters: + - increment: The single increment to apply + """ + self.send_increment(increment) + self.recv_increment() + + def send_increment(self, increment): + self._oprot.writeMessageBegin('increment', TMessageType.CALL, self._seqid) + args = increment_args() + args.increment = increment + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_increment(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = increment_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def incrementRows(self, increments): + """ + Parameters: + - increments: The list of increments + """ + self.send_incrementRows(increments) + self.recv_incrementRows() + + def send_incrementRows(self, increments): + self._oprot.writeMessageBegin('incrementRows', TMessageType.CALL, self._seqid) + args = incrementRows_args() + args.increments = increments + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_incrementRows(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = incrementRows_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def deleteAllRowTs(self, tableName, row, timestamp, attributes): + """ + Completely delete the row's cells marked with a timestamp + equal-to or older than the passed timestamp. + + Parameters: + - tableName: name of table + - row: key of the row to be completely deleted. + - timestamp: timestamp + - attributes: Delete attributes + """ + self.send_deleteAllRowTs(tableName, row, timestamp, attributes) + self.recv_deleteAllRowTs() + + def send_deleteAllRowTs(self, tableName, row, timestamp, attributes): + self._oprot.writeMessageBegin('deleteAllRowTs', TMessageType.CALL, self._seqid) + args = deleteAllRowTs_args() + args.tableName = tableName + args.row = row + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_deleteAllRowTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = deleteAllRowTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + return + + def scannerOpenWithScan(self, tableName, scan, attributes): + """ + Get a scanner on the current table, using the Scan instance + for the scan parameters. + + Parameters: + - tableName: name of table + - scan: Scan instance + - attributes: Scan attributes + """ + self.send_scannerOpenWithScan(tableName, scan, attributes) + return self.recv_scannerOpenWithScan() + + def send_scannerOpenWithScan(self, tableName, scan, attributes): + self._oprot.writeMessageBegin('scannerOpenWithScan', TMessageType.CALL, self._seqid) + args = scannerOpenWithScan_args() + args.tableName = tableName + args.scan = scan + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithScan(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpenWithScan_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithScan failed: unknown result"); + + def scannerOpen(self, tableName, startRow, columns, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + self.send_scannerOpen(tableName, startRow, columns, attributes) + return self.recv_scannerOpen() + + def send_scannerOpen(self, tableName, startRow, columns, attributes): + self._oprot.writeMessageBegin('scannerOpen', TMessageType.CALL, self._seqid) + args = scannerOpen_args() + args.tableName = tableName + args.startRow = startRow + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpen(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpen_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpen failed: unknown result"); + + def scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + self.send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes) + return self.recv_scannerOpenWithStop() + + def send_scannerOpenWithStop(self, tableName, startRow, stopRow, columns, attributes): + self._oprot.writeMessageBegin('scannerOpenWithStop', TMessageType.CALL, self._seqid) + args = scannerOpenWithStop_args() + args.tableName = tableName + args.startRow = startRow + args.stopRow = stopRow + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithStop(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpenWithStop_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStop failed: unknown result"); + + def scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + """ + Open a scanner for a given prefix. That is all rows will have the specified + prefix. No other rows will be returned. + + @return scanner id to use with other scanner calls + + Parameters: + - tableName: name of table + - startAndPrefix: the prefix (and thus start row) of the keys you want + - columns: the columns you want returned + - attributes: Scan attributes + """ + self.send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes) + return self.recv_scannerOpenWithPrefix() + + def send_scannerOpenWithPrefix(self, tableName, startAndPrefix, columns, attributes): + self._oprot.writeMessageBegin('scannerOpenWithPrefix', TMessageType.CALL, self._seqid) + args = scannerOpenWithPrefix_args() + args.tableName = tableName + args.startAndPrefix = startAndPrefix + args.columns = columns + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithPrefix(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpenWithPrefix_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithPrefix failed: unknown result"); + + def scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting at the specified row and + ending at the last row in the table. Return the specified columns. + Only values with the specified timestamp are returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + self.send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes) + return self.recv_scannerOpenTs() + + def send_scannerOpenTs(self, tableName, startRow, columns, timestamp, attributes): + self._oprot.writeMessageBegin('scannerOpenTs', TMessageType.CALL, self._seqid) + args = scannerOpenTs_args() + args.tableName = tableName + args.startRow = startRow + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpenTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenTs failed: unknown result"); + + def scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + """ + Get a scanner on the current table starting and stopping at the + specified rows. ending at the last row in the table. Return the + specified columns. Only values with the specified timestamp are + returned. + + @return scanner id to be used with other scanner procedures + + Parameters: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + self.send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes) + return self.recv_scannerOpenWithStopTs() + + def send_scannerOpenWithStopTs(self, tableName, startRow, stopRow, columns, timestamp, attributes): + self._oprot.writeMessageBegin('scannerOpenWithStopTs', TMessageType.CALL, self._seqid) + args = scannerOpenWithStopTs_args() + args.tableName = tableName + args.startRow = startRow + args.stopRow = stopRow + args.columns = columns + args.timestamp = timestamp + args.attributes = attributes + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerOpenWithStopTs(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerOpenWithStopTs_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerOpenWithStopTs failed: unknown result"); + + def scannerGet(self, id): + """ + Returns the scanner's current row value and advances to the next + row in the table. When there are no more rows in the table, or a key + greater-than-or-equal-to the scanner's specified stopRow is reached, + an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + """ + self.send_scannerGet(id) + return self.recv_scannerGet() + + def send_scannerGet(self, id): + self._oprot.writeMessageBegin('scannerGet', TMessageType.CALL, self._seqid) + args = scannerGet_args() + args.id = id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerGet(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerGet_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGet failed: unknown result"); + + def scannerGetList(self, id, nbRows): + """ + Returns, starting at the scanner's current row value nbRows worth of + rows and advances to the next row in the table. When there are no more + rows in the table, or a key greater-than-or-equal-to the scanner's + specified stopRow is reached, an empty list is returned. + + @return a TRowResult containing the current row and a map of the columns to TCells. + + @throws IllegalArgument if ScannerID is invalid + + @throws NotFound when the scanner reaches the end + + Parameters: + - id: id of a scanner returned by scannerOpen + - nbRows: number of results to return + """ + self.send_scannerGetList(id, nbRows) + return self.recv_scannerGetList() + + def send_scannerGetList(self, id, nbRows): + self._oprot.writeMessageBegin('scannerGetList', TMessageType.CALL, self._seqid) + args = scannerGetList_args() + args.id = id + args.nbRows = nbRows + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerGetList(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerGetList_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + raise TApplicationException(TApplicationException.MISSING_RESULT, "scannerGetList failed: unknown result"); + + def scannerClose(self, id): + """ + Closes the server-state associated with an open scanner. + + @throws IllegalArgument if ScannerID is invalid + + Parameters: + - id: id of a scanner returned by scannerOpen + """ + self.send_scannerClose(id) + self.recv_scannerClose() + + def send_scannerClose(self, id): + self._oprot.writeMessageBegin('scannerClose', TMessageType.CALL, self._seqid) + args = scannerClose_args() + args.id = id + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_scannerClose(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = scannerClose_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.io is not None: + raise result.io + if result.ia is not None: + raise result.ia + return + + def getRowOrBefore(self, tableName, row, family): + """ + Get the row just before the specified one. + + @return value for specified row/column + + Parameters: + - tableName: name of table + - row: row key + - family: column name + """ + self.send_getRowOrBefore(tableName, row, family) + return self.recv_getRowOrBefore() + + def send_getRowOrBefore(self, tableName, row, family): + self._oprot.writeMessageBegin('getRowOrBefore', TMessageType.CALL, self._seqid) + args = getRowOrBefore_args() + args.tableName = tableName + args.row = row + args.family = family + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRowOrBefore(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRowOrBefore_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRowOrBefore failed: unknown result"); + + def getRegionInfo(self, row): + """ + Get the regininfo for the specified row. It scans + the metatable to find region's start and end keys. + + @return value for specified row/column + + Parameters: + - row: row key + """ + self.send_getRegionInfo(row) + return self.recv_getRegionInfo() + + def send_getRegionInfo(self, row): + self._oprot.writeMessageBegin('getRegionInfo', TMessageType.CALL, self._seqid) + args = getRegionInfo_args() + args.row = row + args.write(self._oprot) + self._oprot.writeMessageEnd() + self._oprot.trans.flush() + + def recv_getRegionInfo(self, ): + (fname, mtype, rseqid) = self._iprot.readMessageBegin() + if mtype == TMessageType.EXCEPTION: + x = TApplicationException() + x.read(self._iprot) + self._iprot.readMessageEnd() + raise x + result = getRegionInfo_result() + result.read(self._iprot) + self._iprot.readMessageEnd() + if result.success is not None: + return result.success + if result.io is not None: + raise result.io + raise TApplicationException(TApplicationException.MISSING_RESULT, "getRegionInfo failed: unknown result"); + + +class Processor(Iface, TProcessor): + def __init__(self, handler): + self._handler = handler + self._processMap = {} + self._processMap["enableTable"] = Processor.process_enableTable + self._processMap["disableTable"] = Processor.process_disableTable + self._processMap["isTableEnabled"] = Processor.process_isTableEnabled + self._processMap["compact"] = Processor.process_compact + self._processMap["majorCompact"] = Processor.process_majorCompact + self._processMap["getTableNames"] = Processor.process_getTableNames + self._processMap["getColumnDescriptors"] = Processor.process_getColumnDescriptors + self._processMap["getTableRegions"] = Processor.process_getTableRegions + self._processMap["createTable"] = Processor.process_createTable + self._processMap["deleteTable"] = Processor.process_deleteTable + self._processMap["get"] = Processor.process_get + self._processMap["getVer"] = Processor.process_getVer + self._processMap["getVerTs"] = Processor.process_getVerTs + self._processMap["getRow"] = Processor.process_getRow + self._processMap["getRowWithColumns"] = Processor.process_getRowWithColumns + self._processMap["getRowTs"] = Processor.process_getRowTs + self._processMap["getRowWithColumnsTs"] = Processor.process_getRowWithColumnsTs + self._processMap["getRows"] = Processor.process_getRows + self._processMap["getRowsWithColumns"] = Processor.process_getRowsWithColumns + self._processMap["getRowsTs"] = Processor.process_getRowsTs + self._processMap["getRowsWithColumnsTs"] = Processor.process_getRowsWithColumnsTs + self._processMap["mutateRow"] = Processor.process_mutateRow + self._processMap["mutateRowTs"] = Processor.process_mutateRowTs + self._processMap["mutateRows"] = Processor.process_mutateRows + self._processMap["mutateRowsTs"] = Processor.process_mutateRowsTs + self._processMap["atomicIncrement"] = Processor.process_atomicIncrement + self._processMap["deleteAll"] = Processor.process_deleteAll + self._processMap["deleteAllTs"] = Processor.process_deleteAllTs + self._processMap["deleteAllRow"] = Processor.process_deleteAllRow + self._processMap["increment"] = Processor.process_increment + self._processMap["incrementRows"] = Processor.process_incrementRows + self._processMap["deleteAllRowTs"] = Processor.process_deleteAllRowTs + self._processMap["scannerOpenWithScan"] = Processor.process_scannerOpenWithScan + self._processMap["scannerOpen"] = Processor.process_scannerOpen + self._processMap["scannerOpenWithStop"] = Processor.process_scannerOpenWithStop + self._processMap["scannerOpenWithPrefix"] = Processor.process_scannerOpenWithPrefix + self._processMap["scannerOpenTs"] = Processor.process_scannerOpenTs + self._processMap["scannerOpenWithStopTs"] = Processor.process_scannerOpenWithStopTs + self._processMap["scannerGet"] = Processor.process_scannerGet + self._processMap["scannerGetList"] = Processor.process_scannerGetList + self._processMap["scannerClose"] = Processor.process_scannerClose + self._processMap["getRowOrBefore"] = Processor.process_getRowOrBefore + self._processMap["getRegionInfo"] = Processor.process_getRegionInfo + + def process(self, iprot, oprot): + (name, type, seqid) = iprot.readMessageBegin() + if name not in self._processMap: + iprot.skip(TType.STRUCT) + iprot.readMessageEnd() + x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name)) + oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid) + x.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + return + else: + self._processMap[name](self, seqid, iprot, oprot) + return True + + def process_enableTable(self, seqid, iprot, oprot): + args = enableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = enableTable_result() + try: + self._handler.enableTable(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("enableTable", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_disableTable(self, seqid, iprot, oprot): + args = disableTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = disableTable_result() + try: + self._handler.disableTable(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("disableTable", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_isTableEnabled(self, seqid, iprot, oprot): + args = isTableEnabled_args() + args.read(iprot) + iprot.readMessageEnd() + result = isTableEnabled_result() + try: + result.success = self._handler.isTableEnabled(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("isTableEnabled", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_compact(self, seqid, iprot, oprot): + args = compact_args() + args.read(iprot) + iprot.readMessageEnd() + result = compact_result() + try: + self._handler.compact(args.tableNameOrRegionName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("compact", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_majorCompact(self, seqid, iprot, oprot): + args = majorCompact_args() + args.read(iprot) + iprot.readMessageEnd() + result = majorCompact_result() + try: + self._handler.majorCompact(args.tableNameOrRegionName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("majorCompact", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableNames(self, seqid, iprot, oprot): + args = getTableNames_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableNames_result() + try: + result.success = self._handler.getTableNames() + except IOError, io: + result.io = io + oprot.writeMessageBegin("getTableNames", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getColumnDescriptors(self, seqid, iprot, oprot): + args = getColumnDescriptors_args() + args.read(iprot) + iprot.readMessageEnd() + result = getColumnDescriptors_result() + try: + result.success = self._handler.getColumnDescriptors(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getColumnDescriptors", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getTableRegions(self, seqid, iprot, oprot): + args = getTableRegions_args() + args.read(iprot) + iprot.readMessageEnd() + result = getTableRegions_result() + try: + result.success = self._handler.getTableRegions(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getTableRegions", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_createTable(self, seqid, iprot, oprot): + args = createTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = createTable_result() + try: + self._handler.createTable(args.tableName, args.columnFamilies) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + except AlreadyExists, exist: + result.exist = exist + oprot.writeMessageBegin("createTable", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteTable(self, seqid, iprot, oprot): + args = deleteTable_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteTable_result() + try: + self._handler.deleteTable(args.tableName) + except IOError, io: + result.io = io + oprot.writeMessageBegin("deleteTable", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_get(self, seqid, iprot, oprot): + args = get_args() + args.read(iprot) + iprot.readMessageEnd() + result = get_result() + try: + result.success = self._handler.get(args.tableName, args.row, args.column, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("get", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getVer(self, seqid, iprot, oprot): + args = getVer_args() + args.read(iprot) + iprot.readMessageEnd() + result = getVer_result() + try: + result.success = self._handler.getVer(args.tableName, args.row, args.column, args.numVersions, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getVer", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getVerTs(self, seqid, iprot, oprot): + args = getVerTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getVerTs_result() + try: + result.success = self._handler.getVerTs(args.tableName, args.row, args.column, args.timestamp, args.numVersions, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getVerTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRow(self, seqid, iprot, oprot): + args = getRow_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRow_result() + try: + result.success = self._handler.getRow(args.tableName, args.row, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRow", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowWithColumns(self, seqid, iprot, oprot): + args = getRowWithColumns_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowWithColumns_result() + try: + result.success = self._handler.getRowWithColumns(args.tableName, args.row, args.columns, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowWithColumns", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowTs(self, seqid, iprot, oprot): + args = getRowTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowTs_result() + try: + result.success = self._handler.getRowTs(args.tableName, args.row, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowWithColumnsTs(self, seqid, iprot, oprot): + args = getRowWithColumnsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowWithColumnsTs_result() + try: + result.success = self._handler.getRowWithColumnsTs(args.tableName, args.row, args.columns, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowWithColumnsTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRows(self, seqid, iprot, oprot): + args = getRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRows_result() + try: + result.success = self._handler.getRows(args.tableName, args.rows, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRows", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsWithColumns(self, seqid, iprot, oprot): + args = getRowsWithColumns_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsWithColumns_result() + try: + result.success = self._handler.getRowsWithColumns(args.tableName, args.rows, args.columns, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowsWithColumns", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsTs(self, seqid, iprot, oprot): + args = getRowsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsTs_result() + try: + result.success = self._handler.getRowsTs(args.tableName, args.rows, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowsTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowsWithColumnsTs(self, seqid, iprot, oprot): + args = getRowsWithColumnsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowsWithColumnsTs_result() + try: + result.success = self._handler.getRowsWithColumnsTs(args.tableName, args.rows, args.columns, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowsWithColumnsTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mutateRow(self, seqid, iprot, oprot): + args = mutateRow_args() + args.read(iprot) + iprot.readMessageEnd() + result = mutateRow_result() + try: + self._handler.mutateRow(args.tableName, args.row, args.mutations, args.attributes) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("mutateRow", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mutateRowTs(self, seqid, iprot, oprot): + args = mutateRowTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = mutateRowTs_result() + try: + self._handler.mutateRowTs(args.tableName, args.row, args.mutations, args.timestamp, args.attributes) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("mutateRowTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mutateRows(self, seqid, iprot, oprot): + args = mutateRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = mutateRows_result() + try: + self._handler.mutateRows(args.tableName, args.rowBatches, args.attributes) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("mutateRows", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_mutateRowsTs(self, seqid, iprot, oprot): + args = mutateRowsTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = mutateRowsTs_result() + try: + self._handler.mutateRowsTs(args.tableName, args.rowBatches, args.timestamp, args.attributes) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("mutateRowsTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_atomicIncrement(self, seqid, iprot, oprot): + args = atomicIncrement_args() + args.read(iprot) + iprot.readMessageEnd() + result = atomicIncrement_result() + try: + result.success = self._handler.atomicIncrement(args.tableName, args.row, args.column, args.value) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("atomicIncrement", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteAll(self, seqid, iprot, oprot): + args = deleteAll_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteAll_result() + try: + self._handler.deleteAll(args.tableName, args.row, args.column, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("deleteAll", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteAllTs(self, seqid, iprot, oprot): + args = deleteAllTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteAllTs_result() + try: + self._handler.deleteAllTs(args.tableName, args.row, args.column, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("deleteAllTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteAllRow(self, seqid, iprot, oprot): + args = deleteAllRow_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteAllRow_result() + try: + self._handler.deleteAllRow(args.tableName, args.row, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("deleteAllRow", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_increment(self, seqid, iprot, oprot): + args = increment_args() + args.read(iprot) + iprot.readMessageEnd() + result = increment_result() + try: + self._handler.increment(args.increment) + except IOError, io: + result.io = io + oprot.writeMessageBegin("increment", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_incrementRows(self, seqid, iprot, oprot): + args = incrementRows_args() + args.read(iprot) + iprot.readMessageEnd() + result = incrementRows_result() + try: + self._handler.incrementRows(args.increments) + except IOError, io: + result.io = io + oprot.writeMessageBegin("incrementRows", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_deleteAllRowTs(self, seqid, iprot, oprot): + args = deleteAllRowTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = deleteAllRowTs_result() + try: + self._handler.deleteAllRowTs(args.tableName, args.row, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("deleteAllRowTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithScan(self, seqid, iprot, oprot): + args = scannerOpenWithScan_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithScan_result() + try: + result.success = self._handler.scannerOpenWithScan(args.tableName, args.scan, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpenWithScan", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpen(self, seqid, iprot, oprot): + args = scannerOpen_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpen_result() + try: + result.success = self._handler.scannerOpen(args.tableName, args.startRow, args.columns, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpen", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithStop(self, seqid, iprot, oprot): + args = scannerOpenWithStop_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithStop_result() + try: + result.success = self._handler.scannerOpenWithStop(args.tableName, args.startRow, args.stopRow, args.columns, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpenWithStop", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithPrefix(self, seqid, iprot, oprot): + args = scannerOpenWithPrefix_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithPrefix_result() + try: + result.success = self._handler.scannerOpenWithPrefix(args.tableName, args.startAndPrefix, args.columns, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpenWithPrefix", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenTs(self, seqid, iprot, oprot): + args = scannerOpenTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenTs_result() + try: + result.success = self._handler.scannerOpenTs(args.tableName, args.startRow, args.columns, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpenTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerOpenWithStopTs(self, seqid, iprot, oprot): + args = scannerOpenWithStopTs_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerOpenWithStopTs_result() + try: + result.success = self._handler.scannerOpenWithStopTs(args.tableName, args.startRow, args.stopRow, args.columns, args.timestamp, args.attributes) + except IOError, io: + result.io = io + oprot.writeMessageBegin("scannerOpenWithStopTs", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerGet(self, seqid, iprot, oprot): + args = scannerGet_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerGet_result() + try: + result.success = self._handler.scannerGet(args.id) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("scannerGet", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerGetList(self, seqid, iprot, oprot): + args = scannerGetList_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerGetList_result() + try: + result.success = self._handler.scannerGetList(args.id, args.nbRows) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("scannerGetList", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_scannerClose(self, seqid, iprot, oprot): + args = scannerClose_args() + args.read(iprot) + iprot.readMessageEnd() + result = scannerClose_result() + try: + self._handler.scannerClose(args.id) + except IOError, io: + result.io = io + except IllegalArgument, ia: + result.ia = ia + oprot.writeMessageBegin("scannerClose", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRowOrBefore(self, seqid, iprot, oprot): + args = getRowOrBefore_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRowOrBefore_result() + try: + result.success = self._handler.getRowOrBefore(args.tableName, args.row, args.family) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRowOrBefore", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + def process_getRegionInfo(self, seqid, iprot, oprot): + args = getRegionInfo_args() + args.read(iprot) + iprot.readMessageEnd() + result = getRegionInfo_result() + try: + result.success = self._handler.getRegionInfo(args.row) + except IOError, io: + result.io = io + oprot.writeMessageBegin("getRegionInfo", TMessageType.REPLY, seqid) + result.write(oprot) + oprot.writeMessageEnd() + oprot.trans.flush() + + +# HELPER FUNCTIONS AND STRUCTURES + +class enableTable_args: + """ + Attributes: + - tableName: name of the table + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('enableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class enableTable_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('enableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class disableTable_args: + """ + Attributes: + - tableName: name of the table + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('disableTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class disableTable_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('disableTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class isTableEnabled_args: + """ + Attributes: + - tableName: name of the table to check + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('isTableEnabled_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class isTableEnabled_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.BOOL, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.BOOL: + self.success = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('isTableEnabled_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.BOOL, 0) + oprot.writeBool(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact_args: + """ + Attributes: + - tableNameOrRegionName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableNameOrRegionName', None, None, ), # 1 + ) + + def __init__(self, tableNameOrRegionName=None,): + self.tableNameOrRegionName = tableNameOrRegionName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableNameOrRegionName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact_args') + if self.tableNameOrRegionName is not None: + oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) + oprot.writeString(self.tableNameOrRegionName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class compact_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('compact_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class majorCompact_args: + """ + Attributes: + - tableNameOrRegionName + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableNameOrRegionName', None, None, ), # 1 + ) + + def __init__(self, tableNameOrRegionName=None,): + self.tableNameOrRegionName = tableNameOrRegionName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableNameOrRegionName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('majorCompact_args') + if self.tableNameOrRegionName is not None: + oprot.writeFieldBegin('tableNameOrRegionName', TType.STRING, 1) + oprot.writeString(self.tableNameOrRegionName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class majorCompact_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('majorCompact_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getTableNames_args: + + thrift_spec = ( + ) + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getTableNames_args') + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getTableNames_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype26, _size23) = iprot.readListBegin() + for _i27 in xrange(_size23): + _elem28 = iprot.readString(); + self.success.append(_elem28) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getTableNames_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRING, len(self.success)) + for iter29 in self.success: + oprot.writeString(iter29) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getColumnDescriptors_args: + """ + Attributes: + - tableName: table name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getColumnDescriptors_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getColumnDescriptors_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(ColumnDescriptor, ColumnDescriptor.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.MAP: + self.success = {} + (_ktype31, _vtype32, _size30 ) = iprot.readMapBegin() + for _i34 in xrange(_size30): + _key35 = iprot.readString(); + _val36 = ColumnDescriptor() + _val36.read(iprot) + self.success[_key35] = _val36 + iprot.readMapEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getColumnDescriptors_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.MAP, 0) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success)) + for kiter37,viter38 in self.success.items(): + oprot.writeString(kiter37) + viter38.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getTableRegions_args: + """ + Attributes: + - tableName: table name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getTableRegions_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getTableRegions_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRegionInfo, TRegionInfo.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype42, _size39) = iprot.readListBegin() + for _i43 in xrange(_size39): + _elem44 = TRegionInfo() + _elem44.read(iprot) + self.success.append(_elem44) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getTableRegions_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter45 in self.success: + iter45.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class createTable_args: + """ + Attributes: + - tableName: name of table to create + - columnFamilies: list of column family descriptors + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'columnFamilies', (TType.STRUCT,(ColumnDescriptor, ColumnDescriptor.thrift_spec)), None, ), # 2 + ) + + def __init__(self, tableName=None, columnFamilies=None,): + self.tableName = tableName + self.columnFamilies = columnFamilies + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.columnFamilies = [] + (_etype49, _size46) = iprot.readListBegin() + for _i50 in xrange(_size46): + _elem51 = ColumnDescriptor() + _elem51.read(iprot) + self.columnFamilies.append(_elem51) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('createTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.columnFamilies is not None: + oprot.writeFieldBegin('columnFamilies', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.columnFamilies)) + for iter52 in self.columnFamilies: + iter52.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class createTable_result: + """ + Attributes: + - io + - ia + - exist + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + (3, TType.STRUCT, 'exist', (AlreadyExists, AlreadyExists.thrift_spec), None, ), # 3 + ) + + def __init__(self, io=None, ia=None, exist=None,): + self.io = io + self.ia = ia + self.exist = exist + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRUCT: + self.exist = AlreadyExists() + self.exist.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('createTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + if self.exist is not None: + oprot.writeFieldBegin('exist', TType.STRUCT, 3) + self.exist.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteTable_args: + """ + Attributes: + - tableName: name of table to delete + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + ) + + def __init__(self, tableName=None,): + self.tableName = tableName + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteTable_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteTable_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteTable_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_args: + """ + Attributes: + - tableName: name of table + - row: row key + - column: column name + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, column=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype54, _vtype55, _size53 ) = iprot.readMapBegin() + for _i57 in xrange(_size53): + _key58 = iprot.readString(); + _val59 = iprot.readString(); + self.attributes[_key58] = _val59 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter60,viter61 in self.attributes.items(): + oprot.writeString(kiter60) + oprot.writeString(viter61) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class get_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype65, _size62) = iprot.readListBegin() + for _i66 in xrange(_size62): + _elem67 = TCell() + _elem67.read(iprot) + self.success.append(_elem67) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('get_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter68 in self.success: + iter68.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getVer_args: + """ + Attributes: + - tableName: name of table + - row: row key + - column: column name + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.I32, 'numVersions', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, row=None, column=None, numVersions=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.numVersions = numVersions + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I32: + self.numVersions = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin() + for _i73 in xrange(_size69): + _key74 = iprot.readString(); + _val75 = iprot.readString(); + self.attributes[_key74] = _val75 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getVer_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.numVersions is not None: + oprot.writeFieldBegin('numVersions', TType.I32, 4) + oprot.writeI32(self.numVersions) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter76,viter77 in self.attributes.items(): + oprot.writeString(kiter76) + oprot.writeString(viter77) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getVer_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype81, _size78) = iprot.readListBegin() + for _i82 in xrange(_size78): + _elem83 = TCell() + _elem83.read(iprot) + self.success.append(_elem83) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getVer_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter84 in self.success: + iter84.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getVerTs_args: + """ + Attributes: + - tableName: name of table + - row: row key + - column: column name + - timestamp: timestamp + - numVersions: number of versions to retrieve + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.I32, 'numVersions', None, None, ), # 5 + (6, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 6 + ) + + def __init__(self, tableName=None, row=None, column=None, timestamp=None, numVersions=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.timestamp = timestamp + self.numVersions = numVersions + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.numVersions = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.attributes = {} + (_ktype86, _vtype87, _size85 ) = iprot.readMapBegin() + for _i89 in xrange(_size85): + _key90 = iprot.readString(); + _val91 = iprot.readString(); + self.attributes[_key90] = _val91 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getVerTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.numVersions is not None: + oprot.writeFieldBegin('numVersions', TType.I32, 5) + oprot.writeI32(self.numVersions) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter92,viter93 in self.attributes.items(): + oprot.writeString(kiter92) + oprot.writeString(viter93) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getVerTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype97, _size94) = iprot.readListBegin() + for _i98 in xrange(_size94): + _elem99 = TCell() + _elem99.read(iprot) + self.success.append(_elem99) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getVerTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter100 in self.success: + iter100.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRow_args: + """ + Attributes: + - tableName: name of table + - row: row key + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, tableName=None, row=None, attributes=None,): + self.tableName = tableName + self.row = row + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype102, _vtype103, _size101 ) = iprot.readMapBegin() + for _i105 in xrange(_size101): + _key106 = iprot.readString(); + _val107 = iprot.readString(); + self.attributes[_key106] = _val107 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter108,viter109 in self.attributes.items(): + oprot.writeString(kiter108) + oprot.writeString(viter109) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRow_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype113, _size110) = iprot.readListBegin() + for _i114 in xrange(_size110): + _elem115 = TRowResult() + _elem115.read(iprot) + self.success.append(_elem115) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRow_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter116 in self.success: + iter116.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowWithColumns_args: + """ + Attributes: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, columns=None, attributes=None,): + self.tableName = tableName + self.row = row + self.columns = columns + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype120, _size117) = iprot.readListBegin() + for _i121 in xrange(_size117): + _elem122 = iprot.readString(); + self.columns.append(_elem122) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin() + for _i127 in xrange(_size123): + _key128 = iprot.readString(); + _val129 = iprot.readString(); + self.attributes[_key128] = _val129 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowWithColumns_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter130 in self.columns: + oprot.writeString(iter130) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter131,viter132 in self.attributes.items(): + oprot.writeString(kiter131) + oprot.writeString(viter132) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowWithColumns_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype136, _size133) = iprot.readListBegin() + for _i137 in xrange(_size133): + _elem138 = TRowResult() + _elem138.read(iprot) + self.success.append(_elem138) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowWithColumns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter139 in self.success: + iter139.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowTs_args: + """ + Attributes: + - tableName: name of the table + - row: row key + - timestamp: timestamp + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype141, _vtype142, _size140 ) = iprot.readMapBegin() + for _i144 in xrange(_size140): + _key145 = iprot.readString(); + _val146 = iprot.readString(); + self.attributes[_key145] = _val146 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter147,viter148 in self.attributes.items(): + oprot.writeString(kiter147) + oprot.writeString(viter148) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype152, _size149) = iprot.readListBegin() + for _i153 in xrange(_size149): + _elem154 = TRowResult() + _elem154.read(iprot) + self.success.append(_elem154) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter155 in self.success: + iter155.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowWithColumnsTs_args: + """ + Attributes: + - tableName: name of table + - row: row key + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, row=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype159, _size156) = iprot.readListBegin() + for _i160 in xrange(_size156): + _elem161 = iprot.readString(); + self.columns.append(_elem161) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype163, _vtype164, _size162 ) = iprot.readMapBegin() + for _i166 in xrange(_size162): + _key167 = iprot.readString(); + _val168 = iprot.readString(); + self.attributes[_key167] = _val168 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowWithColumnsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter169 in self.columns: + oprot.writeString(iter169) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter170,viter171 in self.attributes.items(): + oprot.writeString(kiter170) + oprot.writeString(viter171) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowWithColumnsTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype175, _size172) = iprot.readListBegin() + for _i176 in xrange(_size172): + _elem177 = TRowResult() + _elem177.read(iprot) + self.success.append(_elem177) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowWithColumnsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter178 in self.success: + iter178.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRows_args: + """ + Attributes: + - tableName: name of table + - rows: row keys + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, tableName=None, rows=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype182, _size179) = iprot.readListBegin() + for _i183 in xrange(_size179): + _elem184 = iprot.readString(); + self.rows.append(_elem184) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype186, _vtype187, _size185 ) = iprot.readMapBegin() + for _i189 in xrange(_size185): + _key190 = iprot.readString(); + _val191 = iprot.readString(); + self.attributes[_key190] = _val191 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRows_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter192 in self.rows: + oprot.writeString(iter192) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter193,viter194 in self.attributes.items(): + oprot.writeString(kiter193) + oprot.writeString(viter194) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRows_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype198, _size195) = iprot.readListBegin() + for _i199 in xrange(_size195): + _elem200 = TRowResult() + _elem200.read(iprot) + self.success.append(_elem200) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRows_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter201 in self.success: + iter201.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsWithColumns_args: + """ + Attributes: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, rows=None, columns=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.columns = columns + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype205, _size202) = iprot.readListBegin() + for _i206 in xrange(_size202): + _elem207 = iprot.readString(); + self.rows.append(_elem207) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype211, _size208) = iprot.readListBegin() + for _i212 in xrange(_size208): + _elem213 = iprot.readString(); + self.columns.append(_elem213) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype215, _vtype216, _size214 ) = iprot.readMapBegin() + for _i218 in xrange(_size214): + _key219 = iprot.readString(); + _val220 = iprot.readString(); + self.attributes[_key219] = _val220 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsWithColumns_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter221 in self.rows: + oprot.writeString(iter221) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter222 in self.columns: + oprot.writeString(iter222) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter223,viter224 in self.attributes.items(): + oprot.writeString(kiter223) + oprot.writeString(viter224) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsWithColumns_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype228, _size225) = iprot.readListBegin() + for _i229 in xrange(_size225): + _elem230 = TRowResult() + _elem230.read(iprot) + self.success.append(_elem230) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsWithColumns_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter231 in self.success: + iter231.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsTs_args: + """ + Attributes: + - tableName: name of the table + - rows: row keys + - timestamp: timestamp + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, rows=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype235, _size232) = iprot.readListBegin() + for _i236 in xrange(_size232): + _elem237 = iprot.readString(); + self.rows.append(_elem237) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype239, _vtype240, _size238 ) = iprot.readMapBegin() + for _i242 in xrange(_size238): + _key243 = iprot.readString(); + _val244 = iprot.readString(); + self.attributes[_key243] = _val244 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter245 in self.rows: + oprot.writeString(iter245) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter246,viter247 in self.attributes.items(): + oprot.writeString(kiter246) + oprot.writeString(viter247) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype251, _size248) = iprot.readListBegin() + for _i252 in xrange(_size248): + _elem253 = TRowResult() + _elem253.read(iprot) + self.success.append(_elem253) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter254 in self.success: + iter254.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsWithColumnsTs_args: + """ + Attributes: + - tableName: name of table + - rows: row keys + - columns: List of columns to return, null for all columns + - timestamp + - attributes: Get attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rows', (TType.STRING,None), None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, rows=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rows = rows + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rows = [] + (_etype258, _size255) = iprot.readListBegin() + for _i259 in xrange(_size255): + _elem260 = iprot.readString(); + self.rows.append(_elem260) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype264, _size261) = iprot.readListBegin() + for _i265 in xrange(_size261): + _elem266 = iprot.readString(); + self.columns.append(_elem266) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype268, _vtype269, _size267 ) = iprot.readMapBegin() + for _i271 in xrange(_size267): + _key272 = iprot.readString(); + _val273 = iprot.readString(); + self.attributes[_key272] = _val273 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsWithColumnsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rows is not None: + oprot.writeFieldBegin('rows', TType.LIST, 2) + oprot.writeListBegin(TType.STRING, len(self.rows)) + for iter274 in self.rows: + oprot.writeString(iter274) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter275 in self.columns: + oprot.writeString(iter275) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter276,viter277 in self.attributes.items(): + oprot.writeString(kiter276) + oprot.writeString(viter277) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowsWithColumnsTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype281, _size278) = iprot.readListBegin() + for _i282 in xrange(_size278): + _elem283 = TRowResult() + _elem283.read(iprot) + self.success.append(_elem283) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowsWithColumnsTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter284 in self.success: + iter284.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRow_args: + """ + Attributes: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - attributes: Mutation attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, mutations=None, attributes=None,): + self.tableName = tableName + self.row = row + self.mutations = mutations + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.mutations = [] + (_etype288, _size285) = iprot.readListBegin() + for _i289 in xrange(_size285): + _elem290 = Mutation() + _elem290.read(iprot) + self.mutations.append(_elem290) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype292, _vtype293, _size291 ) = iprot.readMapBegin() + for _i295 in xrange(_size291): + _key296 = iprot.readString(); + _val297 = iprot.readString(); + self.attributes[_key296] = _val297 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter298 in self.mutations: + iter298.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter299,viter300 in self.attributes.items(): + oprot.writeString(kiter299) + oprot.writeString(viter300) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRow_result: + """ + Attributes: + - io + - ia + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRow_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRowTs_args: + """ + Attributes: + - tableName: name of table + - row: row key + - mutations: list of mutation commands + - timestamp: timestamp + - attributes: Mutation attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, row=None, mutations=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.mutations = mutations + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.mutations = [] + (_etype304, _size301) = iprot.readListBegin() + for _i305 in xrange(_size301): + _elem306 = Mutation() + _elem306.read(iprot) + self.mutations.append(_elem306) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype308, _vtype309, _size307 ) = iprot.readMapBegin() + for _i311 in xrange(_size307): + _key312 = iprot.readString(); + _val313 = iprot.readString(); + self.attributes[_key312] = _val313 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 3) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter314 in self.mutations: + iter314.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter315,viter316 in self.attributes.items(): + oprot.writeString(kiter315) + oprot.writeString(viter316) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRowTs_result: + """ + Attributes: + - io + - ia + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRowTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRows_args: + """ + Attributes: + - tableName: name of table + - rowBatches: list of row batches + - attributes: Mutation attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rowBatches', (TType.STRUCT,(BatchMutation, BatchMutation.thrift_spec)), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, tableName=None, rowBatches=None, attributes=None,): + self.tableName = tableName + self.rowBatches = rowBatches + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rowBatches = [] + (_etype320, _size317) = iprot.readListBegin() + for _i321 in xrange(_size317): + _elem322 = BatchMutation() + _elem322.read(iprot) + self.rowBatches.append(_elem322) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype324, _vtype325, _size323 ) = iprot.readMapBegin() + for _i327 in xrange(_size323): + _key328 = iprot.readString(); + _val329 = iprot.readString(); + self.attributes[_key328] = _val329 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRows_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rowBatches is not None: + oprot.writeFieldBegin('rowBatches', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) + for iter330 in self.rowBatches: + iter330.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter331,viter332 in self.attributes.items(): + oprot.writeString(kiter331) + oprot.writeString(viter332) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRows_result: + """ + Attributes: + - io + - ia + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRows_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRowsTs_args: + """ + Attributes: + - tableName: name of table + - rowBatches: list of row batches + - timestamp: timestamp + - attributes: Mutation attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.LIST, 'rowBatches', (TType.STRUCT,(BatchMutation, BatchMutation.thrift_spec)), None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, rowBatches=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.rowBatches = rowBatches + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.rowBatches = [] + (_etype336, _size333) = iprot.readListBegin() + for _i337 in xrange(_size333): + _elem338 = BatchMutation() + _elem338.read(iprot) + self.rowBatches.append(_elem338) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype340, _vtype341, _size339 ) = iprot.readMapBegin() + for _i343 in xrange(_size339): + _key344 = iprot.readString(); + _val345 = iprot.readString(); + self.attributes[_key344] = _val345 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRowsTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.rowBatches is not None: + oprot.writeFieldBegin('rowBatches', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.rowBatches)) + for iter346 in self.rowBatches: + iter346.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter347,viter348 in self.attributes.items(): + oprot.writeString(kiter347) + oprot.writeString(viter348) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class mutateRowsTs_result: + """ + Attributes: + - io + - ia + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('mutateRowsTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class atomicIncrement_args: + """ + Attributes: + - tableName: name of table + - row: row to increment + - column: name of column + - value: amount to increment by + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.I64, 'value', None, None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, column=None, value=None,): + self.tableName = tableName + self.row = row + self.column = column + self.value = value + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.value = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('atomicIncrement_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.I64, 4) + oprot.writeI64(self.value) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class atomicIncrement_result: + """ + Attributes: + - success + - io + - ia + """ + + thrift_spec = ( + (0, TType.I64, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I64: + self.success = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('atomicIncrement_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I64, 0) + oprot.writeI64(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAll_args: + """ + Attributes: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - attributes: Delete attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, column=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype350, _vtype351, _size349 ) = iprot.readMapBegin() + for _i353 in xrange(_size349): + _key354 = iprot.readString(); + _val355 = iprot.readString(); + self.attributes[_key354] = _val355 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAll_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter356,viter357 in self.attributes.items(): + oprot.writeString(kiter356) + oprot.writeString(viter357) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAll_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAll_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllTs_args: + """ + Attributes: + - tableName: name of table + - row: Row to update + - column: name of column whose value is to be deleted + - timestamp: timestamp + - attributes: Delete attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, row=None, column=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.column = column + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype359, _vtype360, _size358 ) = iprot.readMapBegin() + for _i362 in xrange(_size358): + _key363 = iprot.readString(); + _val364 = iprot.readString(); + self.attributes[_key363] = _val364 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter365,viter366 in self.attributes.items(): + oprot.writeString(kiter365) + oprot.writeString(viter366) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllTs_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllRow_args: + """ + Attributes: + - tableName: name of table + - row: key of the row to be completely deleted. + - attributes: Delete attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, tableName=None, row=None, attributes=None,): + self.tableName = tableName + self.row = row + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype368, _vtype369, _size367 ) = iprot.readMapBegin() + for _i371 in xrange(_size367): + _key372 = iprot.readString(); + _val373 = iprot.readString(); + self.attributes[_key372] = _val373 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllRow_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter374,viter375 in self.attributes.items(): + oprot.writeString(kiter374) + oprot.writeString(viter375) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllRow_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllRow_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class increment_args: + """ + Attributes: + - increment: The single increment to apply + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'increment', (TIncrement, TIncrement.thrift_spec), None, ), # 1 + ) + + def __init__(self, increment=None,): + self.increment = increment + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.increment = TIncrement() + self.increment.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('increment_args') + if self.increment is not None: + oprot.writeFieldBegin('increment', TType.STRUCT, 1) + self.increment.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class increment_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('increment_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class incrementRows_args: + """ + Attributes: + - increments: The list of increments + """ + + thrift_spec = ( + None, # 0 + (1, TType.LIST, 'increments', (TType.STRUCT,(TIncrement, TIncrement.thrift_spec)), None, ), # 1 + ) + + def __init__(self, increments=None,): + self.increments = increments + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.LIST: + self.increments = [] + (_etype379, _size376) = iprot.readListBegin() + for _i380 in xrange(_size376): + _elem381 = TIncrement() + _elem381.read(iprot) + self.increments.append(_elem381) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('incrementRows_args') + if self.increments is not None: + oprot.writeFieldBegin('increments', TType.LIST, 1) + oprot.writeListBegin(TType.STRUCT, len(self.increments)) + for iter382 in self.increments: + iter382.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class incrementRows_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('incrementRows_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllRowTs_args: + """ + Attributes: + - tableName: name of table + - row: key of the row to be completely deleted. + - timestamp: timestamp + - attributes: Delete attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, row=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.row = row + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype384, _vtype385, _size383 ) = iprot.readMapBegin() + for _i387 in xrange(_size383): + _key388 = iprot.readString(); + _val389 = iprot.readString(); + self.attributes[_key388] = _val389 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllRowTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter390,viter391 in self.attributes.items(): + oprot.writeString(kiter390) + oprot.writeString(viter391) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class deleteAllRowTs_result: + """ + Attributes: + - io + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, io=None,): + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('deleteAllRowTs_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithScan_args: + """ + Attributes: + - tableName: name of table + - scan: Scan instance + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRUCT, 'scan', (TScan, TScan.thrift_spec), None, ), # 2 + (3, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 3 + ) + + def __init__(self, tableName=None, scan=None, attributes=None,): + self.tableName = tableName + self.scan = scan + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.scan = TScan() + self.scan.read(iprot) + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.MAP: + self.attributes = {} + (_ktype393, _vtype394, _size392 ) = iprot.readMapBegin() + for _i396 in xrange(_size392): + _key397 = iprot.readString(); + _val398 = iprot.readString(); + self.attributes[_key397] = _val398 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithScan_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.scan is not None: + oprot.writeFieldBegin('scan', TType.STRUCT, 2) + self.scan.write(oprot) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 3) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter399,viter400 in self.attributes.items(): + oprot.writeString(kiter399) + oprot.writeString(viter400) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithScan_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithScan_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpen_args: + """ + Attributes: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'startRow', None, None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, startRow=None, columns=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.columns = columns + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype404, _size401) = iprot.readListBegin() + for _i405 in xrange(_size401): + _elem406 = iprot.readString(); + self.columns.append(_elem406) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype408, _vtype409, _size407 ) = iprot.readMapBegin() + for _i411 in xrange(_size407): + _key412 = iprot.readString(); + _val413 = iprot.readString(); + self.attributes[_key412] = _val413 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpen_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeString(self.startRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter414 in self.columns: + oprot.writeString(iter414) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter415,viter416 in self.attributes.items(): + oprot.writeString(kiter415) + oprot.writeString(viter416) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpen_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpen_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithStop_args: + """ + Attributes: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'startRow', None, None, ), # 2 + (3, TType.STRING, 'stopRow', None, None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.stopRow = stopRow + self.columns = columns + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.stopRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype420, _size417) = iprot.readListBegin() + for _i421 in xrange(_size417): + _elem422 = iprot.readString(); + self.columns.append(_elem422) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype424, _vtype425, _size423 ) = iprot.readMapBegin() + for _i427 in xrange(_size423): + _key428 = iprot.readString(); + _val429 = iprot.readString(); + self.attributes[_key428] = _val429 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithStop_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeString(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 3) + oprot.writeString(self.stopRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter430 in self.columns: + oprot.writeString(iter430) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter431,viter432 in self.attributes.items(): + oprot.writeString(kiter431) + oprot.writeString(viter432) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithStop_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithStop_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithPrefix_args: + """ + Attributes: + - tableName: name of table + - startAndPrefix: the prefix (and thus start row) of the keys you want + - columns: the columns you want returned + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'startAndPrefix', None, None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 4 + ) + + def __init__(self, tableName=None, startAndPrefix=None, columns=None, attributes=None,): + self.tableName = tableName + self.startAndPrefix = startAndPrefix + self.columns = columns + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startAndPrefix = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype436, _size433) = iprot.readListBegin() + for _i437 in xrange(_size433): + _elem438 = iprot.readString(); + self.columns.append(_elem438) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.MAP: + self.attributes = {} + (_ktype440, _vtype441, _size439 ) = iprot.readMapBegin() + for _i443 in xrange(_size439): + _key444 = iprot.readString(); + _val445 = iprot.readString(); + self.attributes[_key444] = _val445 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithPrefix_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.startAndPrefix is not None: + oprot.writeFieldBegin('startAndPrefix', TType.STRING, 2) + oprot.writeString(self.startAndPrefix) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter446 in self.columns: + oprot.writeString(iter446) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 4) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter447,viter448 in self.attributes.items(): + oprot.writeString(kiter447) + oprot.writeString(viter448) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithPrefix_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithPrefix_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenTs_args: + """ + Attributes: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'startRow', None, None, ), # 2 + (3, TType.LIST, 'columns', (TType.STRING,None), None, ), # 3 + (4, TType.I64, 'timestamp', None, None, ), # 4 + (5, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 5 + ) + + def __init__(self, tableName=None, startRow=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.LIST: + self.columns = [] + (_etype452, _size449) = iprot.readListBegin() + for _i453 in xrange(_size449): + _elem454 = iprot.readString(); + self.columns.append(_elem454) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.MAP: + self.attributes = {} + (_ktype456, _vtype457, _size455 ) = iprot.readMapBegin() + for _i459 in xrange(_size455): + _key460 = iprot.readString(); + _val461 = iprot.readString(); + self.attributes[_key460] = _val461 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeString(self.startRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 3) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter462 in self.columns: + oprot.writeString(iter462) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 4) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 5) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter463,viter464 in self.attributes.items(): + oprot.writeString(kiter463) + oprot.writeString(viter464) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithStopTs_args: + """ + Attributes: + - tableName: name of table + - startRow: Starting row in table to scan. + Send "" (empty string) to start at the first row. + - stopRow: row to stop scanning on. This row is *not* included in the + scanner's results + - columns: columns to scan. If column name is a column family, all + columns of the specified column family are returned. It's also possible + to pass a regex in the column qualifier. + - timestamp: timestamp + - attributes: Scan attributes + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'startRow', None, None, ), # 2 + (3, TType.STRING, 'stopRow', None, None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 + (5, TType.I64, 'timestamp', None, None, ), # 5 + (6, TType.MAP, 'attributes', (TType.STRING,None,TType.STRING,None), None, ), # 6 + ) + + def __init__(self, tableName=None, startRow=None, stopRow=None, columns=None, timestamp=None, attributes=None,): + self.tableName = tableName + self.startRow = startRow + self.stopRow = stopRow + self.columns = columns + self.timestamp = timestamp + self.attributes = attributes + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.startRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.stopRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype468, _size465) = iprot.readListBegin() + for _i469 in xrange(_size465): + _elem470 = iprot.readString(); + self.columns.append(_elem470) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.MAP: + self.attributes = {} + (_ktype472, _vtype473, _size471 ) = iprot.readMapBegin() + for _i475 in xrange(_size471): + _key476 = iprot.readString(); + _val477 = iprot.readString(); + self.attributes[_key476] = _val477 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithStopTs_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 2) + oprot.writeString(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 3) + oprot.writeString(self.stopRow) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter478 in self.columns: + oprot.writeString(iter478) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 5) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.attributes is not None: + oprot.writeFieldBegin('attributes', TType.MAP, 6) + oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.attributes)) + for kiter479,viter480 in self.attributes.items(): + oprot.writeString(kiter479) + oprot.writeString(viter480) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerOpenWithStopTs_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.I32, 'success', None, None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.I32: + self.success = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerOpenWithStopTs_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.I32, 0) + oprot.writeI32(self.success) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerGet_args: + """ + Attributes: + - id: id of a scanner returned by scannerOpen + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 + ) + + def __init__(self, id=None,): + self.id = id + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.id = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerGet_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerGet_result: + """ + Attributes: + - success + - io + - ia + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype484, _size481) = iprot.readListBegin() + for _i485 in xrange(_size481): + _elem486 = TRowResult() + _elem486.read(iprot) + self.success.append(_elem486) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerGet_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter487 in self.success: + iter487.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerGetList_args: + """ + Attributes: + - id: id of a scanner returned by scannerOpen + - nbRows: number of results to return + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 + (2, TType.I32, 'nbRows', None, None, ), # 2 + ) + + def __init__(self, id=None, nbRows=None,): + self.id = id + self.nbRows = nbRows + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.id = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.nbRows = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerGetList_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + if self.nbRows is not None: + oprot.writeFieldBegin('nbRows', TType.I32, 2) + oprot.writeI32(self.nbRows) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerGetList_result: + """ + Attributes: + - success + - io + - ia + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TRowResult, TRowResult.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, success=None, io=None, ia=None,): + self.success = success + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype491, _size488) = iprot.readListBegin() + for _i492 in xrange(_size488): + _elem493 = TRowResult() + _elem493.read(iprot) + self.success.append(_elem493) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerGetList_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter494 in self.success: + iter494.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerClose_args: + """ + Attributes: + - id: id of a scanner returned by scannerOpen + """ + + thrift_spec = ( + None, # 0 + (1, TType.I32, 'id', None, None, ), # 1 + ) + + def __init__(self, id=None,): + self.id = id + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.I32: + self.id = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerClose_args') + if self.id is not None: + oprot.writeFieldBegin('id', TType.I32, 1) + oprot.writeI32(self.id) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class scannerClose_result: + """ + Attributes: + - io + - ia + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + (2, TType.STRUCT, 'ia', (IllegalArgument, IllegalArgument.thrift_spec), None, ), # 2 + ) + + def __init__(self, io=None, ia=None,): + self.io = io + self.ia = ia + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRUCT: + self.ia = IllegalArgument() + self.ia.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('scannerClose_result') + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + if self.ia is not None: + oprot.writeFieldBegin('ia', TType.STRUCT, 2) + self.ia.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowOrBefore_args: + """ + Attributes: + - tableName: name of table + - row: row key + - family: column name + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'tableName', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'family', None, None, ), # 3 + ) + + def __init__(self, tableName=None, row=None, family=None,): + self.tableName = tableName + self.row = row + self.family = family + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.tableName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.family = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowOrBefore_args') + if self.tableName is not None: + oprot.writeFieldBegin('tableName', TType.STRING, 1) + oprot.writeString(self.tableName) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.family is not None: + oprot.writeFieldBegin('family', TType.STRING, 3) + oprot.writeString(self.family) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRowOrBefore_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.LIST, 'success', (TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.LIST: + self.success = [] + (_etype498, _size495) = iprot.readListBegin() + for _i499 in xrange(_size495): + _elem500 = TCell() + _elem500.read(iprot) + self.success.append(_elem500) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRowOrBefore_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.LIST, 0) + oprot.writeListBegin(TType.STRUCT, len(self.success)) + for iter501 in self.success: + iter501.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRegionInfo_args: + """ + Attributes: + - row: row key + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', None, None, ), # 1 + ) + + def __init__(self, row=None,): + self.row = row + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRegionInfo_args') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeString(self.row) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class getRegionInfo_result: + """ + Attributes: + - success + - io + """ + + thrift_spec = ( + (0, TType.STRUCT, 'success', (TRegionInfo, TRegionInfo.thrift_spec), None, ), # 0 + (1, TType.STRUCT, 'io', (IOError, IOError.thrift_spec), None, ), # 1 + ) + + def __init__(self, success=None, io=None,): + self.success = success + self.io = io + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 0: + if ftype == TType.STRUCT: + self.success = TRegionInfo() + self.success.read(iprot) + else: + iprot.skip(ftype) + elif fid == 1: + if ftype == TType.STRUCT: + self.io = IOError() + self.io.read(iprot) + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('getRegionInfo_result') + if self.success is not None: + oprot.writeFieldBegin('success', TType.STRUCT, 0) + self.success.write(oprot) + oprot.writeFieldEnd() + if self.io is not None: + oprot.writeFieldBegin('io', TType.STRUCT, 1) + self.io.write(oprot) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git hbase-examples/src/main/python/gen-py/hbase/__init__.py hbase-examples/src/main/python/gen-py/hbase/__init__.py new file mode 100644 index 0000000..31dc15c --- /dev/null +++ hbase-examples/src/main/python/gen-py/hbase/__init__.py @@ -0,0 +1 @@ +__all__ = ['ttypes', 'constants', 'Hbase'] diff --git hbase-examples/src/main/python/gen-py/hbase/constants.py hbase-examples/src/main/python/gen-py/hbase/constants.py new file mode 100644 index 0000000..73f07fe --- /dev/null +++ hbase-examples/src/main/python/gen-py/hbase/constants.py @@ -0,0 +1,11 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException +from ttypes import * + diff --git hbase-examples/src/main/python/gen-py/hbase/ttypes.py hbase-examples/src/main/python/gen-py/hbase/ttypes.py new file mode 100644 index 0000000..23466fb --- /dev/null +++ hbase-examples/src/main/python/gen-py/hbase/ttypes.py @@ -0,0 +1,1083 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# +# options string: py +# + +from thrift.Thrift import TType, TMessageType, TException + +from thrift.transport import TTransport +from thrift.protocol import TBinaryProtocol, TProtocol +try: + from thrift.protocol import fastbinary +except: + fastbinary = None + + + +class TCell: + """ + TCell - Used to transport a cell value (byte[]) and the timestamp it was + stored with together as a result for get and getRow methods. This promotes + the timestamp of a cell to a first-class value, making it easy to take + note of temporal data. Cell is used all the way from HStore up to HTable. + + Attributes: + - value + - timestamp + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'value', None, None, ), # 1 + (2, TType.I64, 'timestamp', None, None, ), # 2 + ) + + def __init__(self, value=None, timestamp=None,): + self.value = value + self.timestamp = timestamp + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.value = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TCell') + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 1) + oprot.writeString(self.value) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 2) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class ColumnDescriptor: + """ + An HColumnDescriptor contains information about a column family + such as the number of versions, compression settings, etc. It is + used as input when creating a table or adding a column. + + Attributes: + - name + - maxVersions + - compression + - inMemory + - bloomFilterType + - bloomFilterVectorSize + - bloomFilterNbHashes + - blockCacheEnabled + - timeToLive + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'name', None, None, ), # 1 + (2, TType.I32, 'maxVersions', None, 3, ), # 2 + (3, TType.STRING, 'compression', None, "NONE", ), # 3 + (4, TType.BOOL, 'inMemory', None, False, ), # 4 + (5, TType.STRING, 'bloomFilterType', None, "NONE", ), # 5 + (6, TType.I32, 'bloomFilterVectorSize', None, 0, ), # 6 + (7, TType.I32, 'bloomFilterNbHashes', None, 0, ), # 7 + (8, TType.BOOL, 'blockCacheEnabled', None, False, ), # 8 + (9, TType.I32, 'timeToLive', None, -1, ), # 9 + ) + + def __init__(self, name=None, maxVersions=thrift_spec[2][4], compression=thrift_spec[3][4], inMemory=thrift_spec[4][4], bloomFilterType=thrift_spec[5][4], bloomFilterVectorSize=thrift_spec[6][4], bloomFilterNbHashes=thrift_spec[7][4], blockCacheEnabled=thrift_spec[8][4], timeToLive=thrift_spec[9][4],): + self.name = name + self.maxVersions = maxVersions + self.compression = compression + self.inMemory = inMemory + self.bloomFilterType = bloomFilterType + self.bloomFilterVectorSize = bloomFilterVectorSize + self.bloomFilterNbHashes = bloomFilterNbHashes + self.blockCacheEnabled = blockCacheEnabled + self.timeToLive = timeToLive + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.I32: + self.maxVersions = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.compression = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.inMemory = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.STRING: + self.bloomFilterType = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.I32: + self.bloomFilterVectorSize = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.bloomFilterNbHashes = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 8: + if ftype == TType.BOOL: + self.blockCacheEnabled = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 9: + if ftype == TType.I32: + self.timeToLive = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('ColumnDescriptor') + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 1) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.maxVersions is not None: + oprot.writeFieldBegin('maxVersions', TType.I32, 2) + oprot.writeI32(self.maxVersions) + oprot.writeFieldEnd() + if self.compression is not None: + oprot.writeFieldBegin('compression', TType.STRING, 3) + oprot.writeString(self.compression) + oprot.writeFieldEnd() + if self.inMemory is not None: + oprot.writeFieldBegin('inMemory', TType.BOOL, 4) + oprot.writeBool(self.inMemory) + oprot.writeFieldEnd() + if self.bloomFilterType is not None: + oprot.writeFieldBegin('bloomFilterType', TType.STRING, 5) + oprot.writeString(self.bloomFilterType) + oprot.writeFieldEnd() + if self.bloomFilterVectorSize is not None: + oprot.writeFieldBegin('bloomFilterVectorSize', TType.I32, 6) + oprot.writeI32(self.bloomFilterVectorSize) + oprot.writeFieldEnd() + if self.bloomFilterNbHashes is not None: + oprot.writeFieldBegin('bloomFilterNbHashes', TType.I32, 7) + oprot.writeI32(self.bloomFilterNbHashes) + oprot.writeFieldEnd() + if self.blockCacheEnabled is not None: + oprot.writeFieldBegin('blockCacheEnabled', TType.BOOL, 8) + oprot.writeBool(self.blockCacheEnabled) + oprot.writeFieldEnd() + if self.timeToLive is not None: + oprot.writeFieldBegin('timeToLive', TType.I32, 9) + oprot.writeI32(self.timeToLive) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TRegionInfo: + """ + A TRegionInfo contains information about an HTable region. + + Attributes: + - startKey + - endKey + - id + - name + - version + - serverName + - port + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'startKey', None, None, ), # 1 + (2, TType.STRING, 'endKey', None, None, ), # 2 + (3, TType.I64, 'id', None, None, ), # 3 + (4, TType.STRING, 'name', None, None, ), # 4 + (5, TType.BYTE, 'version', None, None, ), # 5 + (6, TType.STRING, 'serverName', None, None, ), # 6 + (7, TType.I32, 'port', None, None, ), # 7 + ) + + def __init__(self, startKey=None, endKey=None, id=None, name=None, version=None, serverName=None, port=None,): + self.startKey = startKey + self.endKey = endKey + self.id = id + self.name = name + self.version = version + self.serverName = serverName + self.port = port + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.startKey = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.endKey = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.id = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.STRING: + self.name = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.BYTE: + self.version = iprot.readByte(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.serverName = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 7: + if ftype == TType.I32: + self.port = iprot.readI32(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TRegionInfo') + if self.startKey is not None: + oprot.writeFieldBegin('startKey', TType.STRING, 1) + oprot.writeString(self.startKey) + oprot.writeFieldEnd() + if self.endKey is not None: + oprot.writeFieldBegin('endKey', TType.STRING, 2) + oprot.writeString(self.endKey) + oprot.writeFieldEnd() + if self.id is not None: + oprot.writeFieldBegin('id', TType.I64, 3) + oprot.writeI64(self.id) + oprot.writeFieldEnd() + if self.name is not None: + oprot.writeFieldBegin('name', TType.STRING, 4) + oprot.writeString(self.name) + oprot.writeFieldEnd() + if self.version is not None: + oprot.writeFieldBegin('version', TType.BYTE, 5) + oprot.writeByte(self.version) + oprot.writeFieldEnd() + if self.serverName is not None: + oprot.writeFieldBegin('serverName', TType.STRING, 6) + oprot.writeString(self.serverName) + oprot.writeFieldEnd() + if self.port is not None: + oprot.writeFieldBegin('port', TType.I32, 7) + oprot.writeI32(self.port) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class Mutation: + """ + A Mutation object is used to either update or delete a column-value. + + Attributes: + - isDelete + - column + - value + - writeToWAL + """ + + thrift_spec = ( + None, # 0 + (1, TType.BOOL, 'isDelete', None, False, ), # 1 + (2, TType.STRING, 'column', None, None, ), # 2 + (3, TType.STRING, 'value', None, None, ), # 3 + (4, TType.BOOL, 'writeToWAL', None, True, ), # 4 + ) + + def __init__(self, isDelete=thrift_spec[1][4], column=None, value=None, writeToWAL=thrift_spec[4][4],): + self.isDelete = isDelete + self.column = column + self.value = value + self.writeToWAL = writeToWAL + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.BOOL: + self.isDelete = iprot.readBool(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.value = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.BOOL: + self.writeToWAL = iprot.readBool(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('Mutation') + if self.isDelete is not None: + oprot.writeFieldBegin('isDelete', TType.BOOL, 1) + oprot.writeBool(self.isDelete) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 2) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.value is not None: + oprot.writeFieldBegin('value', TType.STRING, 3) + oprot.writeString(self.value) + oprot.writeFieldEnd() + if self.writeToWAL is not None: + oprot.writeFieldBegin('writeToWAL', TType.BOOL, 4) + oprot.writeBool(self.writeToWAL) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class BatchMutation: + """ + A BatchMutation object is used to apply a number of Mutations to a single row. + + Attributes: + - row + - mutations + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', None, None, ), # 1 + (2, TType.LIST, 'mutations', (TType.STRUCT,(Mutation, Mutation.thrift_spec)), None, ), # 2 + ) + + def __init__(self, row=None, mutations=None,): + self.row = row + self.mutations = mutations + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.LIST: + self.mutations = [] + (_etype3, _size0) = iprot.readListBegin() + for _i4 in xrange(_size0): + _elem5 = Mutation() + _elem5.read(iprot) + self.mutations.append(_elem5) + iprot.readListEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('BatchMutation') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.mutations is not None: + oprot.writeFieldBegin('mutations', TType.LIST, 2) + oprot.writeListBegin(TType.STRUCT, len(self.mutations)) + for iter6 in self.mutations: + iter6.write(oprot) + oprot.writeListEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TIncrement: + """ + For increments that are not incrementColumnValue + equivalents. + + Attributes: + - table + - row + - column + - ammount + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'table', None, None, ), # 1 + (2, TType.STRING, 'row', None, None, ), # 2 + (3, TType.STRING, 'column', None, None, ), # 3 + (4, TType.I64, 'ammount', None, None, ), # 4 + ) + + def __init__(self, table=None, row=None, column=None, ammount=None,): + self.table = table + self.row = row + self.column = column + self.ammount = ammount + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.table = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.STRING: + self.column = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.I64: + self.ammount = iprot.readI64(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TIncrement') + if self.table is not None: + oprot.writeFieldBegin('table', TType.STRING, 1) + oprot.writeString(self.table) + oprot.writeFieldEnd() + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 2) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.column is not None: + oprot.writeFieldBegin('column', TType.STRING, 3) + oprot.writeString(self.column) + oprot.writeFieldEnd() + if self.ammount is not None: + oprot.writeFieldBegin('ammount', TType.I64, 4) + oprot.writeI64(self.ammount) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TRowResult: + """ + Holds row name and then a map of columns to cells. + + Attributes: + - row + - columns + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'row', None, None, ), # 1 + (2, TType.MAP, 'columns', (TType.STRING,None,TType.STRUCT,(TCell, TCell.thrift_spec)), None, ), # 2 + ) + + def __init__(self, row=None, columns=None,): + self.row = row + self.columns = columns + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.row = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.MAP: + self.columns = {} + (_ktype8, _vtype9, _size7 ) = iprot.readMapBegin() + for _i11 in xrange(_size7): + _key12 = iprot.readString(); + _val13 = TCell() + _val13.read(iprot) + self.columns[_key12] = _val13 + iprot.readMapEnd() + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TRowResult') + if self.row is not None: + oprot.writeFieldBegin('row', TType.STRING, 1) + oprot.writeString(self.row) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.MAP, 2) + oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.columns)) + for kiter14,viter15 in self.columns.items(): + oprot.writeString(kiter14) + viter15.write(oprot) + oprot.writeMapEnd() + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class TScan: + """ + A Scan object is used to specify scanner parameters when opening a scanner. + + Attributes: + - startRow + - stopRow + - timestamp + - columns + - caching + - filterString + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'startRow', None, None, ), # 1 + (2, TType.STRING, 'stopRow', None, None, ), # 2 + (3, TType.I64, 'timestamp', None, None, ), # 3 + (4, TType.LIST, 'columns', (TType.STRING,None), None, ), # 4 + (5, TType.I32, 'caching', None, None, ), # 5 + (6, TType.STRING, 'filterString', None, None, ), # 6 + ) + + def __init__(self, startRow=None, stopRow=None, timestamp=None, columns=None, caching=None, filterString=None,): + self.startRow = startRow + self.stopRow = stopRow + self.timestamp = timestamp + self.columns = columns + self.caching = caching + self.filterString = filterString + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.startRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 2: + if ftype == TType.STRING: + self.stopRow = iprot.readString(); + else: + iprot.skip(ftype) + elif fid == 3: + if ftype == TType.I64: + self.timestamp = iprot.readI64(); + else: + iprot.skip(ftype) + elif fid == 4: + if ftype == TType.LIST: + self.columns = [] + (_etype19, _size16) = iprot.readListBegin() + for _i20 in xrange(_size16): + _elem21 = iprot.readString(); + self.columns.append(_elem21) + iprot.readListEnd() + else: + iprot.skip(ftype) + elif fid == 5: + if ftype == TType.I32: + self.caching = iprot.readI32(); + else: + iprot.skip(ftype) + elif fid == 6: + if ftype == TType.STRING: + self.filterString = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('TScan') + if self.startRow is not None: + oprot.writeFieldBegin('startRow', TType.STRING, 1) + oprot.writeString(self.startRow) + oprot.writeFieldEnd() + if self.stopRow is not None: + oprot.writeFieldBegin('stopRow', TType.STRING, 2) + oprot.writeString(self.stopRow) + oprot.writeFieldEnd() + if self.timestamp is not None: + oprot.writeFieldBegin('timestamp', TType.I64, 3) + oprot.writeI64(self.timestamp) + oprot.writeFieldEnd() + if self.columns is not None: + oprot.writeFieldBegin('columns', TType.LIST, 4) + oprot.writeListBegin(TType.STRING, len(self.columns)) + for iter22 in self.columns: + oprot.writeString(iter22) + oprot.writeListEnd() + oprot.writeFieldEnd() + if self.caching is not None: + oprot.writeFieldBegin('caching', TType.I32, 5) + oprot.writeI32(self.caching) + oprot.writeFieldEnd() + if self.filterString is not None: + oprot.writeFieldBegin('filterString', TType.STRING, 6) + oprot.writeString(self.filterString) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class IOError(TException): + """ + An IOError exception signals that an error occurred communicating + to the Hbase master or an Hbase region server. Also used to return + more general Hbase error conditions. + + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('IOError') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class IllegalArgument(TException): + """ + An IllegalArgument exception indicates an illegal or invalid + argument was passed into a procedure. + + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('IllegalArgument') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) + +class AlreadyExists(TException): + """ + An AlreadyExists exceptions signals that a table with the specified + name already exists + + Attributes: + - message + """ + + thrift_spec = ( + None, # 0 + (1, TType.STRING, 'message', None, None, ), # 1 + ) + + def __init__(self, message=None,): + self.message = message + + def read(self, iprot): + if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None: + fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec)) + return + iprot.readStructBegin() + while True: + (fname, ftype, fid) = iprot.readFieldBegin() + if ftype == TType.STOP: + break + if fid == 1: + if ftype == TType.STRING: + self.message = iprot.readString(); + else: + iprot.skip(ftype) + else: + iprot.skip(ftype) + iprot.readFieldEnd() + iprot.readStructEnd() + + def write(self, oprot): + if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: + oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) + return + oprot.writeStructBegin('AlreadyExists') + if self.message is not None: + oprot.writeFieldBegin('message', TType.STRING, 1) + oprot.writeString(self.message) + oprot.writeFieldEnd() + oprot.writeFieldStop() + oprot.writeStructEnd() + + def validate(self): + return + + + def __str__(self): + return repr(self) + + def __repr__(self): + L = ['%s=%r' % (key, value) + for key, value in self.__dict__.iteritems()] + return '%s(%s)' % (self.__class__.__name__, ', '.join(L)) + + def __eq__(self, other): + return isinstance(other, self.__class__) and self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not (self == other) diff --git hbase-examples/src/main/ruby/DemoClient.rb hbase-examples/src/main/ruby/DemoClient.rb new file mode 100644 index 0000000..d30d89b --- /dev/null +++ hbase-examples/src/main/ruby/DemoClient.rb @@ -0,0 +1,253 @@ +#!/usr/bin/ruby + +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Instructions: +# Modify the import string below to point to {$THRIFT_HOME}/lib/rb/lib. + +# You will need to modify this import string: +# TODO: fix rb/php/py examples to actually work, similar to HBASE-3630. +$:.push('~/Thrift/thrift-20080411p1/lib/rb/lib') +$:.push('./gen-rb') + +require 'thrift' + +require 'Hbase' + +def printRow(rowresult) + print "row: #{rowresult.row}, cols: " + rowresult.columns.sort.each do |k,v| + print "#{k} => #{v.value}; " + end + puts "" +end + +host = "localhost" +port = 9090 + +if ARGV.length > 0 + host = ARGV[0] +end +if ARGV.length > 1 + port = ARGV[1] +end + +transport = Thrift::BufferedTransport.new(Thrift::Socket.new(host, port)) +protocol = Thrift::BinaryProtocol.new(transport) +client = Apache::Hadoop::Hbase::Thrift::Hbase::Client.new(protocol) + +transport.open() + +t = "demo_table" + +# +# Scan all tables, look for the demo table and delete it. +# +puts "scanning tables..." +client.getTableNames().sort.each do |name| + puts " found: #{name}" + if (name == t) + if (client.isTableEnabled(name)) + puts " disabling table: #{name}" + client.disableTable(name) + end + puts " deleting table: #{name}" + client.deleteTable(name) + end +end + +# +# Create the demo table with two column families, entry: and unused: +# +columns = [] +col = Apache::Hadoop::Hbase::Thrift::ColumnDescriptor.new +col.name = "entry:" +col.maxVersions = 10 +columns << col; +col = Apache::Hadoop::Hbase::Thrift::ColumnDescriptor.new +col.name = "unused:" +columns << col; + +puts "creating table: #{t}" +begin + client.createTable(t, columns) +rescue Apache::Hadoop::Hbase::Thrift::AlreadyExists => ae + puts "WARN: #{ae.message}" +end + +puts "column families in #{t}: " +client.getColumnDescriptors(t).sort.each do |key, col| + puts " column: #{col.name}, maxVer: #{col.maxVersions}" +end + +dummy_attributes = {} + +# +# Test UTF-8 handling +# +invalid = "foo-\xfc\xa1\xa1\xa1\xa1\xa1" +valid = "foo-\xE7\x94\x9F\xE3\x83\x93\xE3\x83\xBC\xE3\x83\xAB"; + +# non-utf8 is fine for data +mutations = [] +m = Apache::Hadoop::Hbase::Thrift::Mutation.new +m.column = "entry:foo" +m.value = invalid +mutations << m +client.mutateRow(t, "foo", mutations, dummy_attributes) + +# try empty strings +mutations = [] +m = Apache::Hadoop::Hbase::Thrift::Mutation.new +m.column = "entry:" +m.value = "" +mutations << m +client.mutateRow(t, "", mutations, dummy_attributes) + +# this row name is valid utf8 +mutations = [] +m = Apache::Hadoop::Hbase::Thrift::Mutation.new +m.column = "entry:foo" +m.value = valid +mutations << m +client.mutateRow(t, valid, mutations, dummy_attributes) + +# non-utf8 is not allowed in row names +begin + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:foo" + m.value = invalid + mutations << m + client.mutateRow(t, invalid, mutations, dummy_attributes) + raise "shouldn't get here!" +rescue Apache::Hadoop::Hbase::Thrift::IOError => e + puts "expected error: #{e.message}" +end + +# Run a scanner on the rows we just created +puts "Starting scanner..." +scanner = client.scannerOpen(t, "", ["entry:"], dummy_attributes) +begin + while (true) + printRow(client.scannerGet(scanner)) + end +rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf + client.scannerClose(scanner) + puts "Scanner finished" +end + +# +# Run some operations on a bunch of rows. +# +(0..100).to_a.reverse.each do |e| + # format row keys as "00000" to "00100" + row = format("%0.5d", e) + + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "unused:" + m.value = "DELETE_ME" + mutations << m + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)) + client.deleteAllRow(t, row, dummy_attributes) + + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:num" + m.value = "0" + mutations << m + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:foo" + m.value = "FOO" + mutations << m + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)) + + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:foo" + m.isDelete = 1 + mutations << m + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:num" + m.value = "-1" + mutations << m + client.mutateRow(t, row, mutations, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)); + + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:num" + m.value = e.to_s + mutations << m + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:sqr" + m.value = (e*e).to_s + mutations << m + client.mutateRow(t, row, mutations, dummy_attributes, dummy_attributes) + printRow(client.getRow(t, row, dummy_attributes)) + + mutations = [] + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:num" + m.value = "-999" + mutations << m + m = Apache::Hadoop::Hbase::Thrift::Mutation.new + m.column = "entry:sqr" + m.isDelete = 1 + mutations << m + client.mutateRowTs(t, row, mutations, 1, dummy_attributes) # shouldn't override latest + printRow(client.getRow(t, row, dummy_attributes, dummy_attributes)); + + versions = client.getVer(t, row, "entry:num", 10, dummy_attributes) + print "row: #{row}, values: " + versions.each do |v| + print "#{v.value}; " + end + puts "" + + begin + client.get(t, row, "entry:foo", dummy_attributes) + raise "shouldn't get here!" + rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf + # blank + end + + puts "" +end + +columns = [] +client.getColumnDescriptors(t).each do |col, desc| + puts "column with name: #{desc.name}" + columns << desc.name + ":" +end + +puts "Starting scanner..." +scanner = client.scannerOpenWithStop(t, "00020", "00040", columns, dummy_attributes) +begin + while (true) + printRow(client.scannerGet(scanner, dummy_attributes)) + end +rescue Apache::Hadoop::Hbase::Thrift::NotFound => nf + client.scannerClose(scanner) + puts "Scanner finished" +end + +transport.close() diff --git hbase-examples/src/main/ruby/gen-rb/hbase.rb hbase-examples/src/main/ruby/gen-rb/hbase.rb new file mode 100644 index 0000000..4943587 --- /dev/null +++ hbase-examples/src/main/ruby/gen-rb/hbase.rb @@ -0,0 +1,2969 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# 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 + 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, attributes) + send_get(tableName, row, column, attributes) + return recv_get() + end + + def send_get(tableName, row, column, attributes) + send_message('get', Get_args, :tableName => tableName, :row => row, :column => column, :attributes => attributes) + 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, attributes) + send_getVer(tableName, row, column, numVersions, attributes) + return recv_getVer() + end + + def send_getVer(tableName, row, column, numVersions, attributes) + send_message('getVer', GetVer_args, :tableName => tableName, :row => row, :column => column, :numVersions => numVersions, :attributes => attributes) + 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, attributes) + send_getVerTs(tableName, row, column, timestamp, numVersions, attributes) + return recv_getVerTs() + end + + def send_getVerTs(tableName, row, column, timestamp, numVersions, attributes) + send_message('getVerTs', GetVerTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp, :numVersions => numVersions, :attributes => attributes) + 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, attributes) + send_getRow(tableName, row, attributes) + return recv_getRow() + end + + def send_getRow(tableName, row, attributes) + send_message('getRow', GetRow_args, :tableName => tableName, :row => row, :attributes => attributes) + 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, attributes) + send_getRowWithColumns(tableName, row, columns, attributes) + return recv_getRowWithColumns() + end + + def send_getRowWithColumns(tableName, row, columns, attributes) + send_message('getRowWithColumns', GetRowWithColumns_args, :tableName => tableName, :row => row, :columns => columns, :attributes => attributes) + 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, attributes) + send_getRowTs(tableName, row, timestamp, attributes) + return recv_getRowTs() + end + + def send_getRowTs(tableName, row, timestamp, attributes) + send_message('getRowTs', GetRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes) + return recv_getRowWithColumnsTs() + end + + def send_getRowWithColumnsTs(tableName, row, columns, timestamp, attributes) + send_message('getRowWithColumnsTs', GetRowWithColumnsTs_args, :tableName => tableName, :row => row, :columns => columns, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_getRows(tableName, rows, attributes) + return recv_getRows() + end + + def send_getRows(tableName, rows, attributes) + send_message('getRows', GetRows_args, :tableName => tableName, :rows => rows, :attributes => attributes) + 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, attributes) + send_getRowsWithColumns(tableName, rows, columns, attributes) + return recv_getRowsWithColumns() + end + + def send_getRowsWithColumns(tableName, rows, columns, attributes) + send_message('getRowsWithColumns', GetRowsWithColumns_args, :tableName => tableName, :rows => rows, :columns => columns, :attributes => attributes) + 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, attributes) + send_getRowsTs(tableName, rows, timestamp, attributes) + return recv_getRowsTs() + end + + def send_getRowsTs(tableName, rows, timestamp, attributes) + send_message('getRowsTs', GetRowsTs_args, :tableName => tableName, :rows => rows, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes) + return recv_getRowsWithColumnsTs() + end + + def send_getRowsWithColumnsTs(tableName, rows, columns, timestamp, attributes) + send_message('getRowsWithColumnsTs', GetRowsWithColumnsTs_args, :tableName => tableName, :rows => rows, :columns => columns, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_mutateRow(tableName, row, mutations, attributes) + recv_mutateRow() + end + + def send_mutateRow(tableName, row, mutations, attributes) + send_message('mutateRow', MutateRow_args, :tableName => tableName, :row => row, :mutations => mutations, :attributes => attributes) + 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, attributes) + send_mutateRowTs(tableName, row, mutations, timestamp, attributes) + recv_mutateRowTs() + end + + def send_mutateRowTs(tableName, row, mutations, timestamp, attributes) + send_message('mutateRowTs', MutateRowTs_args, :tableName => tableName, :row => row, :mutations => mutations, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_mutateRows(tableName, rowBatches, attributes) + recv_mutateRows() + end + + def send_mutateRows(tableName, rowBatches, attributes) + send_message('mutateRows', MutateRows_args, :tableName => tableName, :rowBatches => rowBatches, :attributes => attributes) + 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, attributes) + send_mutateRowsTs(tableName, rowBatches, timestamp, attributes) + recv_mutateRowsTs() + end + + def send_mutateRowsTs(tableName, rowBatches, timestamp, attributes) + send_message('mutateRowsTs', MutateRowsTs_args, :tableName => tableName, :rowBatches => rowBatches, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_deleteAll(tableName, row, column, attributes) + recv_deleteAll() + end + + def send_deleteAll(tableName, row, column, attributes) + send_message('deleteAll', DeleteAll_args, :tableName => tableName, :row => row, :column => column, :attributes => attributes) + end + + def recv_deleteAll() + result = receive_message(DeleteAll_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllTs(tableName, row, column, timestamp, attributes) + send_deleteAllTs(tableName, row, column, timestamp, attributes) + recv_deleteAllTs() + end + + def send_deleteAllTs(tableName, row, column, timestamp, attributes) + send_message('deleteAllTs', DeleteAllTs_args, :tableName => tableName, :row => row, :column => column, :timestamp => timestamp, :attributes => attributes) + end + + def recv_deleteAllTs() + result = receive_message(DeleteAllTs_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllRow(tableName, row, attributes) + send_deleteAllRow(tableName, row, attributes) + recv_deleteAllRow() + end + + def send_deleteAllRow(tableName, row, attributes) + send_message('deleteAllRow', DeleteAllRow_args, :tableName => tableName, :row => row, :attributes => attributes) + end + + def recv_deleteAllRow() + result = receive_message(DeleteAllRow_result) + raise result.io unless result.io.nil? + return + end + + def increment(increment) + send_increment(increment) + recv_increment() + end + + def send_increment(increment) + send_message('increment', Increment_args, :increment => increment) + end + + def recv_increment() + result = receive_message(Increment_result) + raise result.io unless result.io.nil? + return + end + + def incrementRows(increments) + send_incrementRows(increments) + recv_incrementRows() + end + + def send_incrementRows(increments) + send_message('incrementRows', IncrementRows_args, :increments => increments) + end + + def recv_incrementRows() + result = receive_message(IncrementRows_result) + raise result.io unless result.io.nil? + return + end + + def deleteAllRowTs(tableName, row, timestamp, attributes) + send_deleteAllRowTs(tableName, row, timestamp, attributes) + recv_deleteAllRowTs() + end + + def send_deleteAllRowTs(tableName, row, timestamp, attributes) + send_message('deleteAllRowTs', DeleteAllRowTs_args, :tableName => tableName, :row => row, :timestamp => timestamp, :attributes => attributes) + end + + def recv_deleteAllRowTs() + result = receive_message(DeleteAllRowTs_result) + raise result.io unless result.io.nil? + return + end + + def scannerOpenWithScan(tableName, scan, attributes) + send_scannerOpenWithScan(tableName, scan, attributes) + return recv_scannerOpenWithScan() + end + + def send_scannerOpenWithScan(tableName, scan, attributes) + send_message('scannerOpenWithScan', ScannerOpenWithScan_args, :tableName => tableName, :scan => scan, :attributes => attributes) + 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, attributes) + send_scannerOpen(tableName, startRow, columns, attributes) + return recv_scannerOpen() + end + + def send_scannerOpen(tableName, startRow, columns, attributes) + send_message('scannerOpen', ScannerOpen_args, :tableName => tableName, :startRow => startRow, :columns => columns, :attributes => attributes) + 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, attributes) + send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes) + return recv_scannerOpenWithStop() + end + + def send_scannerOpenWithStop(tableName, startRow, stopRow, columns, attributes) + send_message('scannerOpenWithStop', ScannerOpenWithStop_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns, :attributes => attributes) + 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, attributes) + send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes) + return recv_scannerOpenWithPrefix() + end + + def send_scannerOpenWithPrefix(tableName, startAndPrefix, columns, attributes) + send_message('scannerOpenWithPrefix', ScannerOpenWithPrefix_args, :tableName => tableName, :startAndPrefix => startAndPrefix, :columns => columns, :attributes => attributes) + 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, attributes) + send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes) + return recv_scannerOpenTs() + end + + def send_scannerOpenTs(tableName, startRow, columns, timestamp, attributes) + send_message('scannerOpenTs', ScannerOpenTs_args, :tableName => tableName, :startRow => startRow, :columns => columns, :timestamp => timestamp, :attributes => attributes) + 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, attributes) + send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes) + return recv_scannerOpenWithStopTs() + end + + def send_scannerOpenWithStopTs(tableName, startRow, stopRow, columns, timestamp, attributes) + send_message('scannerOpenWithStopTs', ScannerOpenWithStopTs_args, :tableName => tableName, :startRow => startRow, :stopRow => stopRow, :columns => columns, :timestamp => timestamp, :attributes => attributes) + 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 + + def getRowOrBefore(tableName, row, family) + send_getRowOrBefore(tableName, row, family) + return recv_getRowOrBefore() + end + + def send_getRowOrBefore(tableName, row, family) + send_message('getRowOrBefore', GetRowOrBefore_args, :tableName => tableName, :row => row, :family => family) + end + + def recv_getRowOrBefore() + result = receive_message(GetRowOrBefore_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRowOrBefore failed: unknown result') + end + + def getRegionInfo(row) + send_getRegionInfo(row) + return recv_getRegionInfo() + end + + def send_getRegionInfo(row) + send_message('getRegionInfo', GetRegionInfo_args, :row => row) + end + + def recv_getRegionInfo() + result = receive_message(GetRegionInfo_result) + return result.success unless result.success.nil? + raise result.io unless result.io.nil? + raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getRegionInfo failed: unknown result') + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + rescue Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'deleteAllRow', seqid) + end + + def process_increment(seqid, iprot, oprot) + args = read_args(iprot, Increment_args) + result = Increment_result.new() + begin + @handler.increment(args.increment) + rescue Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'increment', seqid) + end + + def process_incrementRows(seqid, iprot, oprot) + args = read_args(iprot, IncrementRows_args) + result = IncrementRows_result.new() + begin + @handler.incrementRows(args.increments) + rescue Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'incrementRows', 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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, args.attributes) + 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 + + def process_getRowOrBefore(seqid, iprot, oprot) + args = read_args(iprot, GetRowOrBefore_args) + result = GetRowOrBefore_result.new() + begin + result.success = @handler.getRowOrBefore(args.tableName, args.row, args.family) + rescue Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRowOrBefore', seqid) + end + + def process_getRegionInfo(seqid, iprot, oprot) + args = read_args(iprot, GetRegionInfo_args) + result = GetRegionInfo_result.new() + begin + result.success = @handler.getRegionInfo(args.row) + rescue Apache::Hadoop::Hbase::Thrift::IOError => io + result.io = io + end + write_result(result, oprot, 'getRegionInfo', 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 + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Compact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAMEORREGIONNAME = 1 + + FIELDS = { + TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class MajorCompact_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAMEORREGIONNAME = 1 + + FIELDS = { + TABLENAMEORREGIONNAME => {:type => ::Thrift::Types::STRING, :name => 'tableNameOrRegionName', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetTableNames_args + include ::Thrift::Struct, ::Thrift::Struct_Union + + FIELDS = { + + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetColumnDescriptors_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + + FIELDS = { + # table name + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetTableRegions_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + + FIELDS = { + # table name + TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tableName', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Get_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + COLUMN = 3 + ATTRIBUTES = 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}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :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 + ATTRIBUTES = 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}, + # number of versions to retrieve + NUMVERSIONS => {:type => ::Thrift::Types::I32, :name => 'numVersions'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + 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 + ATTRIBUTES = 6 + + 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'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 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}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :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 + ATTRIBUTES = 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}}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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 validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + TIMESTAMP = 3 + ATTRIBUTES = 4 + + 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'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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} + } + + 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 + ATTRIBUTES = 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}, + # 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'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + + 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 + ATTRIBUTES = 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}}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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} + } + + 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 + ATTRIBUTES = 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}}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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 GetRowsTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROWS = 2 + TIMESTAMP = 3 + ATTRIBUTES = 4 + + 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'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 5 + + 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'}, + # Get attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 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}}, + # Mutation attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 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}, + # 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'}, + # Mutation attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + + 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 + ATTRIBUTES = 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}}, + # Mutation attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 4 + + 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'}, + # Mutation attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 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 + ATTRIBUTES = 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}, + # Delete attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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 + ATTRIBUTES = 5 + + 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'}, + # Delete attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + 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 + ATTRIBUTES = 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}, + # Delete attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + + 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 Increment_args + include ::Thrift::Struct, ::Thrift::Struct_Union + INCREMENT = 1 + + FIELDS = { + # The single increment to apply + INCREMENT => {:type => ::Thrift::Types::STRUCT, :name => 'increment', :class => Apache::Hadoop::Hbase::Thrift::TIncrement} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class Increment_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 IncrementRows_args + include ::Thrift::Struct, ::Thrift::Struct_Union + INCREMENTS = 1 + + FIELDS = { + # The list of increments + INCREMENTS => {:type => ::Thrift::Types::LIST, :name => 'increments', :element => {:type => ::Thrift::Types::STRUCT, :class => Apache::Hadoop::Hbase::Thrift::TIncrement}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class IncrementRows_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 DeleteAllRowTs_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + TIMESTAMP = 3 + ATTRIBUTES = 4 + + 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'}, + # Delete attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 ScannerOpenWithScan_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + SCAN = 2 + ATTRIBUTES = 3 + + 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}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::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} + } + + 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 + ATTRIBUTES = 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}}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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 + ATTRIBUTES = 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}}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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 + ATTRIBUTES = 4 + + 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}}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {: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 + ATTRIBUTES = 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}, + # 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'}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + ATTRIBUTES = 6 + + 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'}, + # Scan attributes + ATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'attributes', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING, :binary => true}} + } + + 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 + + ::Thrift::Struct.generate_accessors self + end + + class ScannerGet_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 ScannerGetList_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ID = 1 + NBROWS = 2 + + 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'} + } + + def struct_fields; FIELDS; end + + def validate + 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 + + class GetRowOrBefore_args + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLENAME = 1 + ROW = 2 + FAMILY = 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 + FAMILY => {:type => ::Thrift::Types::STRING, :name => 'family', :binary => true} + } + + def struct_fields; FIELDS; end + + def validate + end + + ::Thrift::Struct.generate_accessors self + end + + class GetRowOrBefore_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 GetRegionInfo_args + include ::Thrift::Struct, ::Thrift::Struct_Union + ROW = 1 + + FIELDS = { + # 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 GetRegionInfo_result + include ::Thrift::Struct, ::Thrift::Struct_Union + SUCCESS = 0 + IO = 1 + + FIELDS = { + SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :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 validate + end + + ::Thrift::Struct.generate_accessors self + end + + end + + end + end + end + end diff --git hbase-examples/src/main/ruby/gen-rb/hbase_constants.rb hbase-examples/src/main/ruby/gen-rb/hbase_constants.rb new file mode 100644 index 0000000..e5bfd02 --- /dev/null +++ hbase-examples/src/main/ruby/gen-rb/hbase_constants.rb @@ -0,0 +1,16 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + +require 'hbase_types' + + module Apache + module Hadoop + module Hbase + module Thrift + end + end + end +end diff --git hbase-examples/src/main/ruby/gen-rb/hbase_types.rb hbase-examples/src/main/ruby/gen-rb/hbase_types.rb new file mode 100644 index 0000000..a1325ea --- /dev/null +++ hbase-examples/src/main/ruby/gen-rb/hbase_types.rb @@ -0,0 +1,283 @@ +# +# Autogenerated by Thrift Compiler (0.8.0) +# +# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING +# + + +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 + SERVERNAME = 6 + PORT = 7 + + 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'}, + SERVERNAME => {:type => ::Thrift::Types::STRING, :name => 'serverName', :binary => true}, + PORT => {:type => ::Thrift::Types::I32, :name => 'port'} + } + + 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 + WRITETOWAL = 4 + + 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}, + WRITETOWAL => {:type => ::Thrift::Types::BOOL, :name => 'writeToWAL', :default => 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 + + # For increments that are not incrementColumnValue + # equivalents. + class TIncrement + include ::Thrift::Struct, ::Thrift::Struct_Union + TABLE = 1 + ROW = 2 + COLUMN = 3 + AMMOUNT = 4 + + FIELDS = { + TABLE => {:type => ::Thrift::Types::STRING, :name => 'table', :binary => true}, + ROW => {:type => ::Thrift::Types::STRING, :name => 'row', :binary => true}, + COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true}, + AMMOUNT => {:type => ::Thrift::Types::I64, :name => 'ammount'} + } + + 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 + + # 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 diff --git hbase-examples/src/main/ruby/index-builder-setup.rb hbase-examples/src/main/ruby/index-builder-setup.rb new file mode 100644 index 0000000..cda7fdd --- /dev/null +++ hbase-examples/src/main/ruby/index-builder-setup.rb @@ -0,0 +1,31 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Set up sample data for IndexBuilder example +create "people", "attributes" +create "people-email", "INDEX" +create "people-phone", "INDEX" +create "people-name", "INDEX" + +[["1", "jenny", "jenny@example.com", "867-5309"], + ["2", "alice", "alice@example.com", "555-1234"], + ["3", "kevin", "kevinpet@example.com", "555-1212"]].each do |fields| + (id, name, email, phone) = *fields + put "people", id, "attributes:name", name + put "people", id, "attributes:email", email + put "people", id, "attributes:phone", phone +end + diff --git pom.xml pom.xml index 5a497d4..1e06c31 100644 --- pom.xml +++ pom.xml @@ -55,6 +55,7 @@ hbase-hadoop-compat hbase-common hbase-it + hbase-examples scm:svn:http://svn.apache.org/repos/asf/hbase/trunk @@ -941,6 +942,11 @@ test-jar test + + hbase-examples + org.apache.hbase + ${project.version} + io.netty diff --git src/assembly/components.xml src/assembly/components.xml index d1f7f7e..d545706 100644 --- src/assembly/components.xml +++ src/assembly/components.xml @@ -104,5 +104,16 @@ 0644 + + + hbase-examples/src/main + + **/java + **/java/**/* + + examples + 0644 + 0755 + \ No newline at end of file diff --git src/assembly/hadoop-one-compat.xml src/assembly/hadoop-one-compat.xml index b604239..1bec1aa 100644 --- src/assembly/hadoop-one-compat.xml +++ src/assembly/hadoop-one-compat.xml @@ -42,6 +42,7 @@ org.apache.hbase:hbase-hadoop-compat org.apache.hbase:hbase-server org.apache.hbase:hbase-hadoop1-compat + org.apache.hbase:hbase-examples diff --git src/assembly/hadoop-two-compat.xml src/assembly/hadoop-two-compat.xml index b328383..544d419 100644 --- src/assembly/hadoop-two-compat.xml +++ src/assembly/hadoop-two-compat.xml @@ -43,6 +43,7 @@ org.apache.hbase:hbase-hadoop-compat org.apache.hbase:hbase-server org.apache.hbase:hbase-hadoop1-compat + org.apache.hbase:hbase-examples