diff --git a/.gitignore b/.gitignore index a4c23af..d0c97d1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,10 @@ datanucleus.log .arc TempStatsStore/ target/ +ql/TempStatsStore +hcatalog/hcatalog-pig-adapter/target +hcatalog/server-extensions/target +hcatalog/core/target +hcatalog/webhcat/java-client/target +hcatalog/storage-handlers/hbase/target +hcatalog/webhcat/svr/target diff --git a/build-common.xml b/build-common.xml index 4f72cda..f6df81c 100644 --- a/build-common.xml +++ b/build-common.xml @@ -122,6 +122,9 @@ + + + @@ -143,6 +146,7 @@ + - + + + - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataInputInputStream.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataInputInputStream.java new file mode 100644 index 0000000..f6ba769 --- /dev/null +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataInputInputStream.java @@ -0,0 +1,47 @@ +/** + * 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.hive.hbase; +import java.io.DataInput; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; + +public class DataInputInputStream extends InputStream { + + private final DataInput dataInput; + public DataInputInputStream(DataInput dataInput) { + this.dataInput = dataInput; + } + @Override + public int read() throws IOException { + try { + return dataInput.readUnsignedByte(); + } catch (EOFException e) { + // contract on EOF differs between DataInput and InputStream + return -1; + } + } + + public static InputStream from(DataInput dataInput) { + if(dataInput instanceof InputStream) { + return (InputStream)dataInput; + } + return new DataInputInputStream(dataInput); + } +} diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataOutputOutputStream.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataOutputOutputStream.java new file mode 100644 index 0000000..988f02b --- /dev/null +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/DataOutputOutputStream.java @@ -0,0 +1,42 @@ +/** + * 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.hive.hbase; +import java.io.DataOutput; +import java.io.IOException; +import java.io.OutputStream; + +public class DataOutputOutputStream extends OutputStream { + + private final DataOutput dataOutput; + public DataOutputOutputStream(DataOutput dataOutput) { + this.dataOutput = dataOutput; + } + @Override + public void write(int b) throws IOException { + dataOutput.write(b); + } + + + public static OutputStream from(DataOutput dataOutput) { + if(dataOutput instanceof OutputStream) { + return (OutputStream)dataOutput; + } + return new DataOutputOutputStream(dataOutput); + } +} diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDe.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDe.java index 4900a41..8e4505d 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDe.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseSerDe.java @@ -28,7 +28,6 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.Put; -import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hive.serde.serdeConstants; import org.apache.hadoop.hive.serde2.AbstractSerDe; @@ -539,11 +538,11 @@ private void initHBaseSerDeParameters( @Override public Object deserialize(Writable result) throws SerDeException { - if (!(result instanceof Result)) { - throw new SerDeException(getClass().getName() + ": expects Result!"); + if (!(result instanceof ResultWritable)) { + throw new SerDeException(getClass().getName() + ": expects ResultWritable!"); } - cachedHBaseRow.init((Result) result, columnsMapping); + cachedHBaseRow.init(((ResultWritable) result).getResult(), columnsMapping); return cachedHBaseRow; } @@ -555,7 +554,7 @@ public ObjectInspector getObjectInspector() throws SerDeException { @Override public Class getSerializedClass() { - return Put.class; + return PutWritable.class; } @Override @@ -605,7 +604,7 @@ public Writable serialize(Object obj, ObjectInspector objInspector) throw new SerDeException(e); } - return put; + return new PutWritable(put); } private byte [] serializeField( diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java index 641f193..44fb54b 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java @@ -32,7 +32,6 @@ import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.mapred.TableOutputFormat; @@ -209,11 +208,7 @@ public void preCreateTable(Table tbl) throws MetaException { // ensure the table is online new HTable(hbaseConf, tableDesc.getName()); - } catch (MasterNotRunningException mnre) { - throw new MetaException(StringUtils.stringifyException(mnre)); - } catch (IOException ie) { - throw new MetaException(StringUtils.stringifyException(ie)); - } catch (SerDeException se) { + } catch (Exception se) { throw new MetaException(StringUtils.stringifyException(se)); } } diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java index 7bd485c..80315b0 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableInputFormat.java @@ -35,7 +35,6 @@ import org.apache.hadoop.hbase.mapreduce.TableInputFormatBase; import org.apache.hadoop.hbase.mapreduce.TableSplit; import org.apache.hadoop.hbase.util.Bytes; -import org.apache.hadoop.hbase.util.Writables; import org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping; import org.apache.hadoop.hive.ql.exec.ExprNodeConstantEvaluator; import org.apache.hadoop.hive.ql.exec.Utilities; @@ -77,12 +76,12 @@ * such as column pruning and filter pushdown. */ public class HiveHBaseTableInputFormat extends TableInputFormatBase - implements InputFormat { + implements InputFormat { static final Log LOG = LogFactory.getLog(HiveHBaseTableInputFormat.class); @Override - public RecordReader getRecordReader( + public RecordReader getRecordReader( InputSplit split, JobConf jobConf, final Reporter reporter) throws IOException { @@ -179,7 +178,7 @@ final org.apache.hadoop.mapreduce.RecordReader recordReader = createRecordReader(tableSplit, tac); - return new RecordReader() { + return new RecordReader() { @Override public void close() throws IOException { @@ -192,8 +191,8 @@ public ImmutableBytesWritable createKey() { } @Override - public Result createValue() { - return new Result(); + public ResultWritable createValue() { + return new ResultWritable(new Result()); } @Override @@ -215,7 +214,7 @@ public float getProgress() throws IOException { } @Override - public boolean next(ImmutableBytesWritable rowKey, Result value) throws IOException { + public boolean next(ImmutableBytesWritable rowKey, ResultWritable value) throws IOException { boolean next = false; @@ -224,7 +223,7 @@ public boolean next(ImmutableBytesWritable rowKey, Result value) throws IOExcept if (next) { rowKey.set(recordReader.getCurrentValue().getRow()); - Writables.copyWritable(recordReader.getCurrentValue(), value); + value.setResult(recordReader.getCurrentValue()); } } catch (InterruptedException e) { throw new IOException(e); diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableOutputFormat.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableOutputFormat.java index e1a5bdb..e5ac9d3 100644 --- a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableOutputFormat.java +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHBaseTableOutputFormat.java @@ -24,6 +24,7 @@ import org.apache.commons.logging.LogFactory; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.hbase.client.Durability; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; @@ -31,6 +32,7 @@ import org.apache.hadoop.hbase.mapreduce.TableOutputCommitter; import org.apache.hadoop.hbase.mapreduce.TableOutputFormat; import org.apache.hadoop.hive.conf.HiveConf; +import org.apache.hadoop.hive.hbase.PutWritable; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.OutputFormat; @@ -48,7 +50,7 @@ */ public class HiveHBaseTableOutputFormat extends TableOutputFormat implements - OutputFormat { + OutputFormat { static final Log LOG = LogFactory.getLog(HiveHBaseTableOutputFormat.class); public static final String HBASE_WAL_ENABLED = "hive.hbase.wal.enabled"; @@ -86,7 +88,7 @@ public void checkOutputSpecs(FileSystem fs, JobConf jc) throws IOException { @Override public - org.apache.hadoop.mapred.RecordWriter + org.apache.hadoop.mapred.RecordWriter getRecordWriter( FileSystem fileSystem, JobConf jobConf, @@ -99,21 +101,23 @@ public void checkOutputSpecs(FileSystem fs, JobConf jc) throws IOException { jobConf, HiveConf.ConfVars.HIVE_HBASE_WAL_ENABLED); final HTable table = new HTable(HBaseConfiguration.create(jobConf), hbaseTableName); table.setAutoFlush(false); - return new MyRecordWriter(table); + return new MyRecordWriter(table,walEnabled); } @Override - public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, + public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException { return new TableOutputCommitter(); -} + } - static private class MyRecordWriter implements org.apache.hadoop.mapred.RecordWriter { + static private class MyRecordWriter implements org.apache.hadoop.mapred.RecordWriter { private final HTable m_table; + private final boolean m_walEnabled; - public MyRecordWriter(HTable table) { + public MyRecordWriter(HTable table, boolean walEnabled) { m_table = table; + m_walEnabled = walEnabled; } public void close(Reporter reporter) @@ -122,8 +126,21 @@ public void close(Reporter reporter) } public void write(ImmutableBytesWritable key, - Put value) throws IOException { - m_table.put(new Put(value)); + Object value) throws IOException { + Put put; + if (value instanceof Put){ + put = (Put)value; + } else if (value instanceof PutWritable) { + put = new Put(((PutWritable)value).getPut()); + } else { + throw new IllegalArgumentException("Illegal Argument " + (value == null ? "null" : value.getClass().getName())); + } + if(m_walEnabled) { + put.setDurability(Durability.SYNC_WAL); + } else { + put.setDurability(Durability.SKIP_WAL); + } + m_table.put(put); } } } diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/PutWritable.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/PutWritable.java new file mode 100644 index 0000000..2fec96e --- /dev/null +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/PutWritable.java @@ -0,0 +1,73 @@ +/** + * 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.hive.hbase; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.CellScanner; +import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.KeyValue; +import org.apache.hadoop.hbase.KeyValueUtil; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; +import org.apache.hadoop.hbase.protobuf.generated.ClientProtos.MutationProto.MutationType; +import org.apache.hadoop.io.Writable; + +public class PutWritable implements Writable { + + private Put put; + + public PutWritable() { + + } + public PutWritable(Put put) { + this.put = put; + } + public Put getPut() { + return put; + } + @Override + public void readFields(final DataInput in) + throws IOException { + ClientProtos.MutationProto putProto = ClientProtos.MutationProto.parseDelimitedFrom(DataInputInputStream.from(in)); + int size = in.readInt(); + if(size < 0) { + throw new IOException("Invalid size " + size); + } + Cell[] kvs = new Cell[size]; + for (int i = 0; i < kvs.length; i++) { + kvs[i] = KeyValue.create(in); + } + put = ProtobufUtil.toPut(putProto, CellUtil.createCellScanner(kvs)); + } + @Override + public void write(final DataOutput out) + throws IOException { + ProtobufUtil.toMutationNoData(MutationType.PUT, put).writeDelimitedTo(DataOutputOutputStream.from(out)); + out.writeInt(put.size()); + CellScanner scanner = put.cellScanner(); + while(scanner.advance()) { + KeyValue kv = KeyValueUtil.ensureKeyValue(scanner.current()); + KeyValue.write(kv, out); + } + } +} diff --git a/hbase-handler/src/java/org/apache/hadoop/hive/hbase/ResultWritable.java b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/ResultWritable.java new file mode 100644 index 0000000..b35aea9 --- /dev/null +++ b/hbase-handler/src/java/org/apache/hadoop/hive/hbase/ResultWritable.java @@ -0,0 +1,73 @@ +/** + * 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.hive.hbase; +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + +import org.apache.hadoop.hbase.Cell; +import org.apache.hadoop.hbase.CellUtil; +import org.apache.hadoop.hbase.KeyValue; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.protobuf.ProtobufUtil; +import org.apache.hadoop.hbase.protobuf.generated.ClientProtos; +import org.apache.hadoop.io.Writable; + +public class ResultWritable implements Writable { + + private Result result; + + public ResultWritable() { + + } + public ResultWritable(Result result) { + this.result = result; + } + + public Result getResult() { + return result; + } + public void setResult(Result result) { + this.result = result; + } + @Override + public void readFields(final DataInput in) + throws IOException { + ClientProtos.Result protosResult = ClientProtos.Result.parseDelimitedFrom(DataInputInputStream.from(in)); + int size = in.readInt(); + if(size < 0) { + throw new IOException("Invalid size " + size); + } + Cell[] kvs = new Cell[size]; + for (int i = 0; i < kvs.length; i++) { + kvs[i] = KeyValue.create(in); + } + result = ProtobufUtil.toResult(protosResult, CellUtil.createCellScanner(kvs)); + } + @Override + public void write(final DataOutput out) + throws IOException { + ProtobufUtil.toResultNoData(result).writeDelimitedTo(DataOutputOutputStream.from(out)); + out.writeInt(result.size()); + for(KeyValue kv : result.list()) { + KeyValue.write(kv, out); + } + } + +} diff --git a/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java index e0918b0..acc40b2 100644 --- a/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java +++ b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/HBaseTestSetup.java @@ -29,7 +29,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; -import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.HTableDescriptor; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HConnectionManager; @@ -98,7 +98,7 @@ private void setUpFixtures(HiveConf conf) throws Exception { hbaseCluster = new MiniHBaseCluster(hbaseConf, NUM_REGIONSERVERS); conf.set("hbase.master", hbaseCluster.getMaster().getServerName().getHostAndPort()); // opening the META table ensures that cluster is running - new HTable(hbaseConf, HConstants.META_TABLE_NAME); + new HTable(hbaseConf, TableName.META_TABLE_NAME.getNameAsString()); createHBaseTable(hbaseConf); } @@ -153,7 +153,7 @@ private static int findFreePort() throws IOException { @Override protected void tearDown() throws Exception { if (hbaseCluster != null) { - HConnectionManager.deleteAllConnections(true); + HConnectionManager.deleteAllConnections(); hbaseCluster.shutdown(); hbaseCluster = null; } diff --git a/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java index d25c731..6b95be5 100644 --- a/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java +++ b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestHBaseSerDe.java @@ -217,7 +217,7 @@ private void deserializeAndSerialize( assertEquals(9, fieldRefs.size()); // Deserialize - Object row = serDe.deserialize(r); + Object row = serDe.deserialize(new ResultWritable(r)); for (int i = 0; i < fieldRefs.size(); i++) { Object fieldData = oi.getStructFieldData(row, fieldRefs.get(i)); if (fieldData != null) { @@ -226,9 +226,9 @@ private void deserializeAndSerialize( assertEquals("Field " + i, expectedFieldsData[i], fieldData); } // Serialize - assertEquals(Put.class, serDe.getSerializedClass()); - Put serializedPut = (Put) serDe.serialize(row, oi); - assertEquals("Serialized data", p.toString(), serializedPut.toString()); + assertEquals(PutWritable.class, serDe.getSerializedClass()); + PutWritable serializedPut = (PutWritable) serDe.serialize(row, oi); + assertEquals("Serialized data", p.toString(),String.valueOf(serializedPut.getPut())); } // No specifications default to UTF8 String storage for backwards compatibility @@ -513,8 +513,8 @@ private void deserializeAndSerializeHiveMapHBaseColumnFamily( // Deserialize for (int i = 0; i < r.length; i++) { - Object row = hbaseSerDe.deserialize(r[i]); - Put serializedPut = (Put) hbaseSerDe.serialize(row, soi); + Object row = hbaseSerDe.deserialize(new ResultWritable(r[i])); + Put serializedPut = ((PutWritable) hbaseSerDe.serialize(row, soi)).getPut(); byte [] rowKey = serializedPut.getRow(); for (int k = 0; k < rowKey.length; k++) { @@ -669,7 +669,7 @@ private void deserializeAndSerializeHiveMapHBaseColumnFamilyII( assertEquals(9, fieldRefs.size()); // Deserialize - Object row = hbaseSerDe.deserialize(r); + Object row = hbaseSerDe.deserialize(new ResultWritable(r)); for (int j = 0; j < fieldRefs.size(); j++) { Object fieldData = soi.getStructFieldData(row, fieldRefs.get(j)); @@ -687,7 +687,7 @@ private void deserializeAndSerializeHiveMapHBaseColumnFamilyII( } // Serialize - Put serializedPut = (Put) hbaseSerDe.serialize(row, soi); + Put serializedPut = ((PutWritable) hbaseSerDe.serialize(row, soi)).getPut(); assertEquals("Serialized data: ", p.toString(), serializedPut.toString()); } @@ -775,7 +775,7 @@ private void deserializeAndSerializeHivePrefixColumnFamily(HBaseSerDe serDe, Res List fieldRefs = soi.getAllStructFieldRefs(); - Object row = serDe.deserialize(r); + Object row = serDe.deserialize(new ResultWritable(r)); int j = 0; @@ -803,7 +803,7 @@ private void deserializeAndSerializeHivePrefixColumnFamily(HBaseSerDe serDe, Res SerDeUtils.getJSONString(row, soi); // Now serialize - Put put = (Put) serDe.serialize(row, soi); + Put put = ((PutWritable) serDe.serialize(row, soi)).getPut(); if (p != null) { assertEquals("Serialized put:", p.toString(), put.toString()); diff --git a/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestPutResultWritable.java b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestPutResultWritable.java new file mode 100644 index 0000000..561b0a8 --- /dev/null +++ b/hbase-handler/src/test/org/apache/hadoop/hive/hbase/TestPutResultWritable.java @@ -0,0 +1,81 @@ +/** + * 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.hive.hbase; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + +import org.apache.hadoop.hbase.KeyValue; +import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hbase.client.Result; +import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.io.Writable; +import org.junit.Assert; +import org.junit.Test; + +public class TestPutResultWritable { + + @Test + public void testResult() throws Exception { + // Initialize a result + KeyValue[] kvs = new KeyValue[] { + new KeyValue(Bytes.toBytes("test-row"), Bytes.toBytes("cfa"), + Bytes.toBytes("col1"), Bytes.toBytes("cfacol1")), + new KeyValue(Bytes.toBytes("test-row"), Bytes.toBytes("cfa"), + Bytes.toBytes("col2"), Bytes.toBytes("cfacol2")) + }; + Result expected = new Result(kvs); + ResultWritable actual = copy(new ResultWritable(expected), new ResultWritable()); + Assert.assertArrayEquals(expected.raw(), actual.getResult().raw()); + + } + + @Test + public void testPut() throws Exception { + byte[] row = Bytes.toBytes("test-row"); + // Initialize a result + KeyValue[] kvs = new KeyValue[] { + new KeyValue(row, Bytes.toBytes("cfa"), + Bytes.toBytes("col1"), Bytes.toBytes("cfacol1")), + new KeyValue(row, Bytes.toBytes("cfa"), + Bytes.toBytes("col2"), Bytes.toBytes("cfacol2")) + }; + Put expected = new Put(row); + for (int i = 0; i < kvs.length; i++) { + expected.add(kvs[i]); + } + PutWritable actual = copy(new PutWritable(expected), new PutWritable()); + Assert.assertArrayEquals(expected.getRow(), actual.getPut().getRow()); + Assert.assertEquals(expected.getFamilyMap(), actual.getPut().getFamilyMap()); + } + + private T copy(T oldWritable, T newWritable) throws IOException { + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + DataOutputStream out = new DataOutputStream(baos); + oldWritable.write(out); + ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); + DataInputStream in = new DataInputStream(bais); + newWritable.readFields(in); + return newWritable; + } + +} diff --git a/hcatalog/build-support/ant/build-common.xml b/hcatalog/build-support/ant/build-common.xml index 1f2d376..1fe9e4a 100644 --- a/hcatalog/build-support/ant/build-common.xml +++ b/hcatalog/build-support/ant/build-common.xml @@ -24,11 +24,12 @@ - - + + - - + + + diff --git a/hcatalog/build-support/ant/checkstyle.xml b/hcatalog/build-support/ant/checkstyle.xml index 5ed9516..26c4cf4 100644 --- a/hcatalog/build-support/ant/checkstyle.xml +++ b/hcatalog/build-support/ant/checkstyle.xml @@ -62,6 +62,8 @@ + + diff --git a/hcatalog/build-support/ant/deploy.xml b/hcatalog/build-support/ant/deploy.xml index 1e44178..ab166c8 100644 --- a/hcatalog/build-support/ant/deploy.xml +++ b/hcatalog/build-support/ant/deploy.xml @@ -84,7 +84,7 @@ - + diff --git a/hcatalog/build.properties b/hcatalog/build.properties index cecd9d4..e577ac5 100644 --- a/hcatalog/build.properties +++ b/hcatalog/build.properties @@ -88,5 +88,4 @@ mvn.deploy.repo.id=apache.snapshots.https mvn.deploy.repo.url=https://repository.apache.org/content/repositories/snapshots maven-ant-tasks.version=2.1.3 mvn.local.repo=${user.home}/.m2/repository -mvn.hadoop.profile=hadoop20 diff --git a/hcatalog/build.xml b/hcatalog/build.xml index af20f1a..cd3aa93 100644 --- a/hcatalog/build.xml +++ b/hcatalog/build.xml @@ -32,6 +32,10 @@ description="where all hive build artifacts are placed to make binary tar ball"/> + + + + + - + - + - + - + - + - + diff --git a/hcatalog/pom.xml b/hcatalog/pom.xml index 1a831c1..3f9866c 100644 --- a/hcatalog/pom.xml +++ b/hcatalog/pom.xml @@ -28,7 +28,8 @@ 11.0.2 1.0.3 2.1.0-beta - 0.94.5 + 0.96.0-hadoop1 + 0.96.0-hadoop2 ${project.version} ${project.version} 1.9.2 @@ -68,6 +69,12 @@ org.apache.hadoop + hadoop-core + ${hadoop20.version} + compile + + + org.apache.hadoop hadoop-tools ${hadoop20.version} compile @@ -215,6 +222,14 @@ false + + apache.snapshot.repo + https://repository.apache.org/content/groups/snapshots/ + Apache Snapshots + + true + + diff --git a/hcatalog/storage-handlers/hbase/pom.xml b/hcatalog/storage-handlers/hbase/pom.xml index ea770a3..2feacec 100644 --- a/hcatalog/storage-handlers/hbase/pom.xml +++ b/hcatalog/storage-handlers/hbase/pom.xml @@ -65,12 +65,6 @@ ${zookeeper.version} compile - - org.apache.hbase - hbase - ${hbase.version} - compile - @@ -86,19 +80,6 @@ test - org.apache.hbase - hbase - ${hbase.version} - tests - test - - - com.google.guava - guava - - - - org.apache.zookeeper zookeeper ${zookeeper.version} @@ -112,4 +93,139 @@ test + + + + + hadoop20 + + + org.apache.hbase + hbase-client + ${hbase.hadoop1.version} + compile + + + + org.apache.hbase + hbase-server + ${hbase.hadoop1.version} + compile + + + org.apache.hbase + hbase-common + ${hbase.hadoop1.version} + compile + + + + org.apache.hbase + hbase-server + ${hbase.hadoop1.version} + tests + test + + + org.apache.hbase + hbase-common + ${hbase.hadoop1.version} + tests + test + + + org.apache.hbase + hbase-hadoop-compat + ${hbase.hadoop1.version} + test + + + org.apache.hbase + hbase-hadoop-compat + ${hbase.hadoop1.version} + tests + test + + + org.apache.hbase + hbase-hadoop1-compat + ${hbase.hadoop1.version} + test + + + org.apache.hbase + hbase-hadoop1-compat + ${hbase.hadoop1.version} + tests + test + + + + + hadoop23 + + + org.apache.hbase + hbase-client + ${hbase.hadoop2.version} + compile + + + + org.apache.hbase + hbase-server + ${hbase.hadoop2.version} + compile + + + org.apache.hbase + hbase-common + ${hbase.hadoop2.version} + compile + + + + org.apache.hbase + hbase-server + ${hbase.hadoop2.version} + tests + test + + + org.apache.hbase + hbase-common + ${hbase.hadoop2.version} + tests + test + + + org.apache.hbase + hbase-hadoop-compat + ${hbase.hadoop2.version} + test + + + org.apache.hbase + hbase-hadoop-compat + ${hbase.hadoop2.version} + tests + test + + + org.apache.hbase + hbase-hadoop2-compat + ${hbase.hadoop2.version} + test + + + org.apache.hbase + hbase-hadoop2-compat + ${hbase.hadoop2.version} + tests + test + + + + + diff --git a/hcatalog/storage-handlers/hbase/src/gen-java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointProtos.java b/hcatalog/storage-handlers/hbase/src/gen-java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointProtos.java new file mode 100644 index 0000000..679a827 --- /dev/null +++ b/hcatalog/storage-handlers/hbase/src/gen-java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointProtos.java @@ -0,0 +1,12727 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hcatalog/storage-handlers/hbase/src/protobuf/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.proto + +package org.apache.hcatalog.hbase.snapshot; + +public final class RevisionManagerEndpointProtos { + private RevisionManagerEndpointProtos() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + public interface CreateTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // repeated string column_families = 2; + /** + * repeated string column_families = 2; + */ + java.util.List + getColumnFamiliesList(); + /** + * repeated string column_families = 2; + */ + int getColumnFamiliesCount(); + /** + * repeated string column_families = 2; + */ + java.lang.String getColumnFamilies(int index); + /** + * repeated string column_families = 2; + */ + com.google.protobuf.ByteString + getColumnFamiliesBytes(int index); + } + /** + * Protobuf type {@code CreateTableRequest} + */ + public static final class CreateTableRequest extends + com.google.protobuf.GeneratedMessage + implements CreateTableRequestOrBuilder { + // Use CreateTableRequest.newBuilder() to construct. + private CreateTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CreateTableRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CreateTableRequest defaultInstance; + public static CreateTableRequest getDefaultInstance() { + return defaultInstance; + } + + public CreateTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateTableRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + columnFamilies_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList(columnFamilies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CreateTableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTableRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // repeated string column_families = 2; + public static final int COLUMN_FAMILIES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList columnFamilies_; + /** + * repeated string column_families = 2; + */ + public java.util.List + getColumnFamiliesList() { + return columnFamilies_; + } + /** + * repeated string column_families = 2; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 2; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 2; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + + private void initFields() { + tableName_ = ""; + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + for (int i = 0; i < columnFamilies_.size(); i++) { + output.writeBytes(2, columnFamilies_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + { + int dataSize = 0; + for (int i = 0; i < columnFamilies_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnFamilies_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnFamiliesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && getColumnFamiliesList() + .equals(other.getColumnFamiliesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (getColumnFamiliesCount() > 0) { + hash = (37 * hash) + COLUMN_FAMILIES_FIELD_NUMBER; + hash = (53 * hash) + getColumnFamiliesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CreateTableRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((bitField0_ & 0x00000002) == 0x00000002)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnFamilies_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.columnFamilies_ = columnFamilies_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (!other.columnFamilies_.isEmpty()) { + if (columnFamilies_.isEmpty()) { + columnFamilies_ = other.columnFamilies_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureColumnFamiliesIsMutable(); + columnFamilies_.addAll(other.columnFamilies_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // repeated string column_families = 2; + private com.google.protobuf.LazyStringList columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnFamiliesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(columnFamilies_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated string column_families = 2; + */ + public java.util.List + getColumnFamiliesList() { + return java.util.Collections.unmodifiableList(columnFamilies_); + } + /** + * repeated string column_families = 2; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 2; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 2; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + /** + * repeated string column_families = 2; + */ + public Builder setColumnFamilies( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string column_families = 2; + */ + public Builder addColumnFamilies( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + /** + * repeated string column_families = 2; + */ + public Builder addAllColumnFamilies( + java.lang.Iterable values) { + ensureColumnFamiliesIsMutable(); + super.addAll(values, columnFamilies_); + onChanged(); + return this; + } + /** + * repeated string column_families = 2; + */ + public Builder clearColumnFamilies() { + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated string column_families = 2; + */ + public Builder addColumnFamiliesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:CreateTableRequest) + } + + static { + defaultInstance = new CreateTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CreateTableRequest) + } + + public interface CreateTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code CreateTableResponse} + */ + public static final class CreateTableResponse extends + com.google.protobuf.GeneratedMessage + implements CreateTableResponseOrBuilder { + // Use CreateTableResponse.newBuilder() to construct. + private CreateTableResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CreateTableResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CreateTableResponse defaultInstance; + public static CreateTableResponse getDefaultInstance() { + return defaultInstance; + } + + public CreateTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateTableResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CreateTableResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTableResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CreateTableResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateTableResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:CreateTableResponse) + } + + static { + defaultInstance = new CreateTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CreateTableResponse) + } + + public interface DropTableRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + } + /** + * Protobuf type {@code DropTableRequest} + */ + public static final class DropTableRequest extends + com.google.protobuf.GeneratedMessage + implements DropTableRequestOrBuilder { + // Use DropTableRequest.newBuilder() to construct. + private DropTableRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DropTableRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DropTableRequest defaultInstance; + public static DropTableRequest getDefaultInstance() { + return defaultInstance; + } + + public DropTableRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DropTableRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DropTableRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DropTableRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code DropTableRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:DropTableRequest) + } + + static { + defaultInstance = new DropTableRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:DropTableRequest) + } + + public interface DropTableResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code DropTableResponse} + */ + public static final class DropTableResponse extends + com.google.protobuf.GeneratedMessage + implements DropTableResponseOrBuilder { + // Use DropTableResponse.newBuilder() to construct. + private DropTableResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private DropTableResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final DropTableResponse defaultInstance; + public static DropTableResponse getDefaultInstance() { + return defaultInstance; + } + + public DropTableResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DropTableResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public DropTableResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DropTableResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code DropTableResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_DropTableResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:DropTableResponse) + } + + static { + defaultInstance = new DropTableResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:DropTableResponse) + } + + public interface BeginWriteTransactionRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // optional int64 keep_alive = 2; + /** + * optional int64 keep_alive = 2; + */ + boolean hasKeepAlive(); + /** + * optional int64 keep_alive = 2; + */ + long getKeepAlive(); + + // repeated string column_families = 3; + /** + * repeated string column_families = 3; + */ + java.util.List + getColumnFamiliesList(); + /** + * repeated string column_families = 3; + */ + int getColumnFamiliesCount(); + /** + * repeated string column_families = 3; + */ + java.lang.String getColumnFamilies(int index); + /** + * repeated string column_families = 3; + */ + com.google.protobuf.ByteString + getColumnFamiliesBytes(int index); + } + /** + * Protobuf type {@code BeginWriteTransactionRequest} + */ + public static final class BeginWriteTransactionRequest extends + com.google.protobuf.GeneratedMessage + implements BeginWriteTransactionRequestOrBuilder { + // Use BeginWriteTransactionRequest.newBuilder() to construct. + private BeginWriteTransactionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private BeginWriteTransactionRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final BeginWriteTransactionRequest defaultInstance; + public static BeginWriteTransactionRequest getDefaultInstance() { + return defaultInstance; + } + + public BeginWriteTransactionRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BeginWriteTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + keepAlive_ = input.readInt64(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + columnFamilies_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList(columnFamilies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public BeginWriteTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BeginWriteTransactionRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 keep_alive = 2; + public static final int KEEP_ALIVE_FIELD_NUMBER = 2; + private long keepAlive_; + /** + * optional int64 keep_alive = 2; + */ + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 keep_alive = 2; + */ + public long getKeepAlive() { + return keepAlive_; + } + + // repeated string column_families = 3; + public static final int COLUMN_FAMILIES_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList columnFamilies_; + /** + * repeated string column_families = 3; + */ + public java.util.List + getColumnFamiliesList() { + return columnFamilies_; + } + /** + * repeated string column_families = 3; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 3; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 3; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + + private void initFields() { + tableName_ = ""; + keepAlive_ = 0L; + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, keepAlive_); + } + for (int i = 0; i < columnFamilies_.size(); i++) { + output.writeBytes(3, columnFamilies_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, keepAlive_); + } + { + int dataSize = 0; + for (int i = 0; i < columnFamilies_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnFamilies_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnFamiliesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && (hasKeepAlive() == other.hasKeepAlive()); + if (hasKeepAlive()) { + result = result && (getKeepAlive() + == other.getKeepAlive()); + } + result = result && getColumnFamiliesList() + .equals(other.getColumnFamiliesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (hasKeepAlive()) { + hash = (37 * hash) + KEEP_ALIVE_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getKeepAlive()); + } + if (getColumnFamiliesCount() > 0) { + hash = (37 * hash) + COLUMN_FAMILIES_FIELD_NUMBER; + hash = (53 * hash) + getColumnFamiliesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code BeginWriteTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + keepAlive_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.keepAlive_ = keepAlive_; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnFamilies_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.columnFamilies_ = columnFamilies_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasKeepAlive()) { + setKeepAlive(other.getKeepAlive()); + } + if (!other.columnFamilies_.isEmpty()) { + if (columnFamilies_.isEmpty()) { + columnFamilies_ = other.columnFamilies_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureColumnFamiliesIsMutable(); + columnFamilies_.addAll(other.columnFamilies_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // optional int64 keep_alive = 2; + private long keepAlive_ ; + /** + * optional int64 keep_alive = 2; + */ + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 keep_alive = 2; + */ + public long getKeepAlive() { + return keepAlive_; + } + /** + * optional int64 keep_alive = 2; + */ + public Builder setKeepAlive(long value) { + bitField0_ |= 0x00000002; + keepAlive_ = value; + onChanged(); + return this; + } + /** + * optional int64 keep_alive = 2; + */ + public Builder clearKeepAlive() { + bitField0_ = (bitField0_ & ~0x00000002); + keepAlive_ = 0L; + onChanged(); + return this; + } + + // repeated string column_families = 3; + private com.google.protobuf.LazyStringList columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnFamiliesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(columnFamilies_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated string column_families = 3; + */ + public java.util.List + getColumnFamiliesList() { + return java.util.Collections.unmodifiableList(columnFamilies_); + } + /** + * repeated string column_families = 3; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 3; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 3; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + /** + * repeated string column_families = 3; + */ + public Builder setColumnFamilies( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string column_families = 3; + */ + public Builder addColumnFamilies( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + /** + * repeated string column_families = 3; + */ + public Builder addAllColumnFamilies( + java.lang.Iterable values) { + ensureColumnFamiliesIsMutable(); + super.addAll(values, columnFamilies_); + onChanged(); + return this; + } + /** + * repeated string column_families = 3; + */ + public Builder clearColumnFamilies() { + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated string column_families = 3; + */ + public Builder addColumnFamiliesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BeginWriteTransactionRequest) + } + + static { + defaultInstance = new BeginWriteTransactionRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BeginWriteTransactionRequest) + } + + public interface BeginWriteTransactionResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .Transaction transaction = 1; + /** + * required .Transaction transaction = 1; + */ + boolean hasTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code BeginWriteTransactionResponse} + */ + public static final class BeginWriteTransactionResponse extends + com.google.protobuf.GeneratedMessage + implements BeginWriteTransactionResponseOrBuilder { + // Use BeginWriteTransactionResponse.newBuilder() to construct. + private BeginWriteTransactionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private BeginWriteTransactionResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final BeginWriteTransactionResponse defaultInstance; + public static BeginWriteTransactionResponse getDefaultInstance() { + return defaultInstance; + } + + public BeginWriteTransactionResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private BeginWriteTransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public BeginWriteTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new BeginWriteTransactionResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .Transaction transaction = 1; + public static final int TRANSACTION_FIELD_NUMBER = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + return transaction_; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + return transaction_; + } + + private void initFields() { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTransaction()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTransaction().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, transaction_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse) obj; + + boolean result = true; + result = result && (hasTransaction() == other.hasTransaction()); + if (hasTransaction()) { + result = result && getTransaction() + .equals(other.getTransaction()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code BeginWriteTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTransactionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_BeginWriteTransactionResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransaction()) { + + return false; + } + if (!getTransaction().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .Transaction transaction = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> transactionBuilder_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder mergeTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + transaction_ != org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance()) { + transaction_ = + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + onChanged(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder getTransactionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_; + } + } + /** + * required .Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder>( + transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:BeginWriteTransactionResponse) + } + + static { + defaultInstance = new BeginWriteTransactionResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:BeginWriteTransactionResponse) + } + + public interface CommitWriteTransactionRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .Transaction transaction = 1; + /** + * required .Transaction transaction = 1; + */ + boolean hasTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code CommitWriteTransactionRequest} + */ + public static final class CommitWriteTransactionRequest extends + com.google.protobuf.GeneratedMessage + implements CommitWriteTransactionRequestOrBuilder { + // Use CommitWriteTransactionRequest.newBuilder() to construct. + private CommitWriteTransactionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CommitWriteTransactionRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CommitWriteTransactionRequest defaultInstance; + public static CommitWriteTransactionRequest getDefaultInstance() { + return defaultInstance; + } + + public CommitWriteTransactionRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CommitWriteTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CommitWriteTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommitWriteTransactionRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .Transaction transaction = 1; + public static final int TRANSACTION_FIELD_NUMBER = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + return transaction_; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + return transaction_; + } + + private void initFields() { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTransaction()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTransaction().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, transaction_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest) obj; + + boolean result = true; + result = result && (hasTransaction() == other.hasTransaction()); + if (hasTransaction()) { + result = result && getTransaction() + .equals(other.getTransaction()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CommitWriteTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTransactionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransaction()) { + + return false; + } + if (!getTransaction().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .Transaction transaction = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> transactionBuilder_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder mergeTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + transaction_ != org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance()) { + transaction_ = + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + onChanged(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder getTransactionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_; + } + } + /** + * required .Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder>( + transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:CommitWriteTransactionRequest) + } + + static { + defaultInstance = new CommitWriteTransactionRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CommitWriteTransactionRequest) + } + + public interface CommitWriteTransactionResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code CommitWriteTransactionResponse} + */ + public static final class CommitWriteTransactionResponse extends + com.google.protobuf.GeneratedMessage + implements CommitWriteTransactionResponseOrBuilder { + // Use CommitWriteTransactionResponse.newBuilder() to construct. + private CommitWriteTransactionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CommitWriteTransactionResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CommitWriteTransactionResponse defaultInstance; + public static CommitWriteTransactionResponse getDefaultInstance() { + return defaultInstance; + } + + public CommitWriteTransactionResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CommitWriteTransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CommitWriteTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommitWriteTransactionResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CommitWriteTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CommitWriteTransactionResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:CommitWriteTransactionResponse) + } + + static { + defaultInstance = new CommitWriteTransactionResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CommitWriteTransactionResponse) + } + + public interface AbortWriteTransactionRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .Transaction transaction = 1; + /** + * required .Transaction transaction = 1; + */ + boolean hasTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code AbortWriteTransactionRequest} + */ + public static final class AbortWriteTransactionRequest extends + com.google.protobuf.GeneratedMessage + implements AbortWriteTransactionRequestOrBuilder { + // Use AbortWriteTransactionRequest.newBuilder() to construct. + private AbortWriteTransactionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AbortWriteTransactionRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AbortWriteTransactionRequest defaultInstance; + public static AbortWriteTransactionRequest getDefaultInstance() { + return defaultInstance; + } + + public AbortWriteTransactionRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbortWriteTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AbortWriteTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortWriteTransactionRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .Transaction transaction = 1; + public static final int TRANSACTION_FIELD_NUMBER = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + return transaction_; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + return transaction_; + } + + private void initFields() { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTransaction()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTransaction().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, transaction_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest) obj; + + boolean result = true; + result = result && (hasTransaction() == other.hasTransaction()); + if (hasTransaction()) { + result = result && getTransaction() + .equals(other.getTransaction()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code AbortWriteTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTransactionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransaction()) { + + return false; + } + if (!getTransaction().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .Transaction transaction = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> transactionBuilder_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder mergeTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + transaction_ != org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance()) { + transaction_ = + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + onChanged(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder getTransactionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_; + } + } + /** + * required .Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder>( + transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:AbortWriteTransactionRequest) + } + + static { + defaultInstance = new AbortWriteTransactionRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:AbortWriteTransactionRequest) + } + + public interface AbortWriteTransactionResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code AbortWriteTransactionResponse} + */ + public static final class AbortWriteTransactionResponse extends + com.google.protobuf.GeneratedMessage + implements AbortWriteTransactionResponseOrBuilder { + // Use AbortWriteTransactionResponse.newBuilder() to construct. + private AbortWriteTransactionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private AbortWriteTransactionResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final AbortWriteTransactionResponse defaultInstance; + public static AbortWriteTransactionResponse getDefaultInstance() { + return defaultInstance; + } + + public AbortWriteTransactionResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AbortWriteTransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public AbortWriteTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AbortWriteTransactionResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code AbortWriteTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_AbortWriteTransactionResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:AbortWriteTransactionResponse) + } + + static { + defaultInstance = new AbortWriteTransactionResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:AbortWriteTransactionResponse) + } + + public interface GetAbortedWriteTransactionsRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // required string column_family = 2; + /** + * required string column_family = 2; + */ + boolean hasColumnFamily(); + /** + * required string column_family = 2; + */ + java.lang.String getColumnFamily(); + /** + * required string column_family = 2; + */ + com.google.protobuf.ByteString + getColumnFamilyBytes(); + } + /** + * Protobuf type {@code GetAbortedWriteTransactionsRequest} + */ + public static final class GetAbortedWriteTransactionsRequest extends + com.google.protobuf.GeneratedMessage + implements GetAbortedWriteTransactionsRequestOrBuilder { + // Use GetAbortedWriteTransactionsRequest.newBuilder() to construct. + private GetAbortedWriteTransactionsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetAbortedWriteTransactionsRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetAbortedWriteTransactionsRequest defaultInstance; + public static GetAbortedWriteTransactionsRequest getDefaultInstance() { + return defaultInstance; + } + + public GetAbortedWriteTransactionsRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAbortedWriteTransactionsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 18: { + bitField0_ |= 0x00000002; + columnFamily_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetAbortedWriteTransactionsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAbortedWriteTransactionsRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required string column_family = 2; + public static final int COLUMN_FAMILY_FIELD_NUMBER = 2; + private java.lang.Object columnFamily_; + /** + * required string column_family = 2; + */ + public boolean hasColumnFamily() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string column_family = 2; + */ + public java.lang.String getColumnFamily() { + java.lang.Object ref = columnFamily_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + columnFamily_ = s; + } + return s; + } + } + /** + * required string column_family = 2; + */ + public com.google.protobuf.ByteString + getColumnFamilyBytes() { + java.lang.Object ref = columnFamily_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + columnFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private void initFields() { + tableName_ = ""; + columnFamily_ = ""; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasColumnFamily()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, getColumnFamilyBytes()); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getColumnFamilyBytes()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && (hasColumnFamily() == other.hasColumnFamily()); + if (hasColumnFamily()) { + result = result && getColumnFamily() + .equals(other.getColumnFamily()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (hasColumnFamily()) { + hash = (37 * hash) + COLUMN_FAMILY_FIELD_NUMBER; + hash = (53 * hash) + getColumnFamily().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GetAbortedWriteTransactionsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + columnFamily_ = ""; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.columnFamily_ = columnFamily_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasColumnFamily()) { + bitField0_ |= 0x00000002; + columnFamily_ = other.columnFamily_; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasColumnFamily()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // required string column_family = 2; + private java.lang.Object columnFamily_ = ""; + /** + * required string column_family = 2; + */ + public boolean hasColumnFamily() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required string column_family = 2; + */ + public java.lang.String getColumnFamily() { + java.lang.Object ref = columnFamily_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + columnFamily_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string column_family = 2; + */ + public com.google.protobuf.ByteString + getColumnFamilyBytes() { + java.lang.Object ref = columnFamily_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + columnFamily_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string column_family = 2; + */ + public Builder setColumnFamily( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + columnFamily_ = value; + onChanged(); + return this; + } + /** + * required string column_family = 2; + */ + public Builder clearColumnFamily() { + bitField0_ = (bitField0_ & ~0x00000002); + columnFamily_ = getDefaultInstance().getColumnFamily(); + onChanged(); + return this; + } + /** + * required string column_family = 2; + */ + public Builder setColumnFamilyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + columnFamily_ = value; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:GetAbortedWriteTransactionsRequest) + } + + static { + defaultInstance = new GetAbortedWriteTransactionsRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GetAbortedWriteTransactionsRequest) + } + + public interface GetAbortedWriteTransactionsResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // repeated .FamilyRevision family_revisions = 1; + /** + * repeated .FamilyRevision family_revisions = 1; + */ + java.util.List + getFamilyRevisionsList(); + /** + * repeated .FamilyRevision family_revisions = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision getFamilyRevisions(int index); + /** + * repeated .FamilyRevision family_revisions = 1; + */ + int getFamilyRevisionsCount(); + /** + * repeated .FamilyRevision family_revisions = 1; + */ + java.util.List + getFamilyRevisionsOrBuilderList(); + /** + * repeated .FamilyRevision family_revisions = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder getFamilyRevisionsOrBuilder( + int index); + } + /** + * Protobuf type {@code GetAbortedWriteTransactionsResponse} + */ + public static final class GetAbortedWriteTransactionsResponse extends + com.google.protobuf.GeneratedMessage + implements GetAbortedWriteTransactionsResponseOrBuilder { + // Use GetAbortedWriteTransactionsResponse.newBuilder() to construct. + private GetAbortedWriteTransactionsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private GetAbortedWriteTransactionsResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final GetAbortedWriteTransactionsResponse defaultInstance; + public static GetAbortedWriteTransactionsResponse getDefaultInstance() { + return defaultInstance; + } + + public GetAbortedWriteTransactionsResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetAbortedWriteTransactionsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + familyRevisions_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + familyRevisions_.add(input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + familyRevisions_ = java.util.Collections.unmodifiableList(familyRevisions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public GetAbortedWriteTransactionsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAbortedWriteTransactionsResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + // repeated .FamilyRevision family_revisions = 1; + public static final int FAMILY_REVISIONS_FIELD_NUMBER = 1; + private java.util.List familyRevisions_; + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public java.util.List getFamilyRevisionsList() { + return familyRevisions_; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public java.util.List + getFamilyRevisionsOrBuilderList() { + return familyRevisions_; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public int getFamilyRevisionsCount() { + return familyRevisions_.size(); + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision getFamilyRevisions(int index) { + return familyRevisions_.get(index); + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder getFamilyRevisionsOrBuilder( + int index) { + return familyRevisions_.get(index); + } + + private void initFields() { + familyRevisions_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + for (int i = 0; i < getFamilyRevisionsCount(); i++) { + if (!getFamilyRevisions(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < familyRevisions_.size(); i++) { + output.writeMessage(1, familyRevisions_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < familyRevisions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, familyRevisions_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse) obj; + + boolean result = true; + result = result && getFamilyRevisionsList() + .equals(other.getFamilyRevisionsList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (getFamilyRevisionsCount() > 0) { + hash = (37 * hash) + FAMILY_REVISIONS_FIELD_NUMBER; + hash = (53 * hash) + getFamilyRevisionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GetAbortedWriteTransactionsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getFamilyRevisionsFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (familyRevisionsBuilder_ == null) { + familyRevisions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + familyRevisionsBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_GetAbortedWriteTransactionsResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse(this); + int from_bitField0_ = bitField0_; + if (familyRevisionsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + familyRevisions_ = java.util.Collections.unmodifiableList(familyRevisions_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.familyRevisions_ = familyRevisions_; + } else { + result.familyRevisions_ = familyRevisionsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance()) return this; + if (familyRevisionsBuilder_ == null) { + if (!other.familyRevisions_.isEmpty()) { + if (familyRevisions_.isEmpty()) { + familyRevisions_ = other.familyRevisions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFamilyRevisionsIsMutable(); + familyRevisions_.addAll(other.familyRevisions_); + } + onChanged(); + } + } else { + if (!other.familyRevisions_.isEmpty()) { + if (familyRevisionsBuilder_.isEmpty()) { + familyRevisionsBuilder_.dispose(); + familyRevisionsBuilder_ = null; + familyRevisions_ = other.familyRevisions_; + bitField0_ = (bitField0_ & ~0x00000001); + familyRevisionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getFamilyRevisionsFieldBuilder() : null; + } else { + familyRevisionsBuilder_.addAllMessages(other.familyRevisions_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + for (int i = 0; i < getFamilyRevisionsCount(); i++) { + if (!getFamilyRevisions(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // repeated .FamilyRevision family_revisions = 1; + private java.util.List familyRevisions_ = + java.util.Collections.emptyList(); + private void ensureFamilyRevisionsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + familyRevisions_ = new java.util.ArrayList(familyRevisions_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder> familyRevisionsBuilder_; + + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public java.util.List getFamilyRevisionsList() { + if (familyRevisionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(familyRevisions_); + } else { + return familyRevisionsBuilder_.getMessageList(); + } + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public int getFamilyRevisionsCount() { + if (familyRevisionsBuilder_ == null) { + return familyRevisions_.size(); + } else { + return familyRevisionsBuilder_.getCount(); + } + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision getFamilyRevisions(int index) { + if (familyRevisionsBuilder_ == null) { + return familyRevisions_.get(index); + } else { + return familyRevisionsBuilder_.getMessage(index); + } + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder setFamilyRevisions( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision value) { + if (familyRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFamilyRevisionsIsMutable(); + familyRevisions_.set(index, value); + onChanged(); + } else { + familyRevisionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder setFamilyRevisions( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder builderForValue) { + if (familyRevisionsBuilder_ == null) { + ensureFamilyRevisionsIsMutable(); + familyRevisions_.set(index, builderForValue.build()); + onChanged(); + } else { + familyRevisionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder addFamilyRevisions(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision value) { + if (familyRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFamilyRevisionsIsMutable(); + familyRevisions_.add(value); + onChanged(); + } else { + familyRevisionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder addFamilyRevisions( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision value) { + if (familyRevisionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFamilyRevisionsIsMutable(); + familyRevisions_.add(index, value); + onChanged(); + } else { + familyRevisionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder addFamilyRevisions( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder builderForValue) { + if (familyRevisionsBuilder_ == null) { + ensureFamilyRevisionsIsMutable(); + familyRevisions_.add(builderForValue.build()); + onChanged(); + } else { + familyRevisionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder addFamilyRevisions( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder builderForValue) { + if (familyRevisionsBuilder_ == null) { + ensureFamilyRevisionsIsMutable(); + familyRevisions_.add(index, builderForValue.build()); + onChanged(); + } else { + familyRevisionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder addAllFamilyRevisions( + java.lang.Iterable values) { + if (familyRevisionsBuilder_ == null) { + ensureFamilyRevisionsIsMutable(); + super.addAll(values, familyRevisions_); + onChanged(); + } else { + familyRevisionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder clearFamilyRevisions() { + if (familyRevisionsBuilder_ == null) { + familyRevisions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + familyRevisionsBuilder_.clear(); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public Builder removeFamilyRevisions(int index) { + if (familyRevisionsBuilder_ == null) { + ensureFamilyRevisionsIsMutable(); + familyRevisions_.remove(index); + onChanged(); + } else { + familyRevisionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder getFamilyRevisionsBuilder( + int index) { + return getFamilyRevisionsFieldBuilder().getBuilder(index); + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder getFamilyRevisionsOrBuilder( + int index) { + if (familyRevisionsBuilder_ == null) { + return familyRevisions_.get(index); } else { + return familyRevisionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public java.util.List + getFamilyRevisionsOrBuilderList() { + if (familyRevisionsBuilder_ != null) { + return familyRevisionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(familyRevisions_); + } + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder addFamilyRevisionsBuilder() { + return getFamilyRevisionsFieldBuilder().addBuilder( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.getDefaultInstance()); + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder addFamilyRevisionsBuilder( + int index) { + return getFamilyRevisionsFieldBuilder().addBuilder( + index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.getDefaultInstance()); + } + /** + * repeated .FamilyRevision family_revisions = 1; + */ + public java.util.List + getFamilyRevisionsBuilderList() { + return getFamilyRevisionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder> + getFamilyRevisionsFieldBuilder() { + if (familyRevisionsBuilder_ == null) { + familyRevisionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder>( + familyRevisions_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + familyRevisions_ = null; + } + return familyRevisionsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:GetAbortedWriteTransactionsResponse) + } + + static { + defaultInstance = new GetAbortedWriteTransactionsResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:GetAbortedWriteTransactionsResponse) + } + + public interface CreateSnapshotRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // optional int64 revision = 2; + /** + * optional int64 revision = 2; + */ + boolean hasRevision(); + /** + * optional int64 revision = 2; + */ + long getRevision(); + } + /** + * Protobuf type {@code CreateSnapshotRequest} + */ + public static final class CreateSnapshotRequest extends + com.google.protobuf.GeneratedMessage + implements CreateSnapshotRequestOrBuilder { + // Use CreateSnapshotRequest.newBuilder() to construct. + private CreateSnapshotRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CreateSnapshotRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CreateSnapshotRequest defaultInstance; + public static CreateSnapshotRequest getDefaultInstance() { + return defaultInstance; + } + + public CreateSnapshotRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateSnapshotRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + revision_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CreateSnapshotRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateSnapshotRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional int64 revision = 2; + public static final int REVISION_FIELD_NUMBER = 2; + private long revision_; + /** + * optional int64 revision = 2; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 revision = 2; + */ + public long getRevision() { + return revision_; + } + + private void initFields() { + tableName_ = ""; + revision_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, revision_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, revision_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && (hasRevision() == other.hasRevision()); + if (hasRevision()) { + result = result && (getRevision() + == other.getRevision()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (hasRevision()) { + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getRevision()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CreateSnapshotRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.revision_ = revision_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasRevision()) { + setRevision(other.getRevision()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // optional int64 revision = 2; + private long revision_ ; + /** + * optional int64 revision = 2; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int64 revision = 2; + */ + public long getRevision() { + return revision_; + } + /** + * optional int64 revision = 2; + */ + public Builder setRevision(long value) { + bitField0_ |= 0x00000002; + revision_ = value; + onChanged(); + return this; + } + /** + * optional int64 revision = 2; + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000002); + revision_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:CreateSnapshotRequest) + } + + static { + defaultInstance = new CreateSnapshotRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CreateSnapshotRequest) + } + + public interface CreateSnapshotResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .TableSnapshot table_snapshot = 1; + /** + * required .TableSnapshot table_snapshot = 1; + */ + boolean hasTableSnapshot(); + /** + * required .TableSnapshot table_snapshot = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot getTableSnapshot(); + /** + * required .TableSnapshot table_snapshot = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder getTableSnapshotOrBuilder(); + } + /** + * Protobuf type {@code CreateSnapshotResponse} + */ + public static final class CreateSnapshotResponse extends + com.google.protobuf.GeneratedMessage + implements CreateSnapshotResponseOrBuilder { + // Use CreateSnapshotResponse.newBuilder() to construct. + private CreateSnapshotResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private CreateSnapshotResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final CreateSnapshotResponse defaultInstance; + public static CreateSnapshotResponse getDefaultInstance() { + return defaultInstance; + } + + public CreateSnapshotResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateSnapshotResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = tableSnapshot_.toBuilder(); + } + tableSnapshot_ = input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(tableSnapshot_); + tableSnapshot_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public CreateSnapshotResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateSnapshotResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .TableSnapshot table_snapshot = 1; + public static final int TABLE_SNAPSHOT_FIELD_NUMBER = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot tableSnapshot_; + /** + * required .TableSnapshot table_snapshot = 1; + */ + public boolean hasTableSnapshot() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot getTableSnapshot() { + return tableSnapshot_; + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder getTableSnapshotOrBuilder() { + return tableSnapshot_; + } + + private void initFields() { + tableSnapshot_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableSnapshot()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTableSnapshot().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, tableSnapshot_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tableSnapshot_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse) obj; + + boolean result = true; + result = result && (hasTableSnapshot() == other.hasTableSnapshot()); + if (hasTableSnapshot()) { + result = result && getTableSnapshot() + .equals(other.getTableSnapshot()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableSnapshot()) { + hash = (37 * hash) + TABLE_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getTableSnapshot().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code CreateSnapshotResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTableSnapshotFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (tableSnapshotBuilder_ == null) { + tableSnapshot_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance(); + } else { + tableSnapshotBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_CreateSnapshotResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (tableSnapshotBuilder_ == null) { + result.tableSnapshot_ = tableSnapshot_; + } else { + result.tableSnapshot_ = tableSnapshotBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance()) return this; + if (other.hasTableSnapshot()) { + mergeTableSnapshot(other.getTableSnapshot()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableSnapshot()) { + + return false; + } + if (!getTableSnapshot().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .TableSnapshot table_snapshot = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot tableSnapshot_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder> tableSnapshotBuilder_; + /** + * required .TableSnapshot table_snapshot = 1; + */ + public boolean hasTableSnapshot() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot getTableSnapshot() { + if (tableSnapshotBuilder_ == null) { + return tableSnapshot_; + } else { + return tableSnapshotBuilder_.getMessage(); + } + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public Builder setTableSnapshot(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot value) { + if (tableSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tableSnapshot_ = value; + onChanged(); + } else { + tableSnapshotBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public Builder setTableSnapshot( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder builderForValue) { + if (tableSnapshotBuilder_ == null) { + tableSnapshot_ = builderForValue.build(); + onChanged(); + } else { + tableSnapshotBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public Builder mergeTableSnapshot(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot value) { + if (tableSnapshotBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + tableSnapshot_ != org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance()) { + tableSnapshot_ = + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.newBuilder(tableSnapshot_).mergeFrom(value).buildPartial(); + } else { + tableSnapshot_ = value; + } + onChanged(); + } else { + tableSnapshotBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public Builder clearTableSnapshot() { + if (tableSnapshotBuilder_ == null) { + tableSnapshot_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance(); + onChanged(); + } else { + tableSnapshotBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder getTableSnapshotBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTableSnapshotFieldBuilder().getBuilder(); + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder getTableSnapshotOrBuilder() { + if (tableSnapshotBuilder_ != null) { + return tableSnapshotBuilder_.getMessageOrBuilder(); + } else { + return tableSnapshot_; + } + } + /** + * required .TableSnapshot table_snapshot = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder> + getTableSnapshotFieldBuilder() { + if (tableSnapshotBuilder_ == null) { + tableSnapshotBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder>( + tableSnapshot_, + getParentForChildren(), + isClean()); + tableSnapshot_ = null; + } + return tableSnapshotBuilder_; + } + + // @@protoc_insertion_point(builder_scope:CreateSnapshotResponse) + } + + static { + defaultInstance = new CreateSnapshotResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:CreateSnapshotResponse) + } + + public interface KeepAliveTransactionRequestOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required .Transaction transaction = 1; + /** + * required .Transaction transaction = 1; + */ + boolean hasTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction(); + /** + * required .Transaction transaction = 1; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder(); + } + /** + * Protobuf type {@code KeepAliveTransactionRequest} + */ + public static final class KeepAliveTransactionRequest extends + com.google.protobuf.GeneratedMessage + implements KeepAliveTransactionRequestOrBuilder { + // Use KeepAliveTransactionRequest.newBuilder() to construct. + private KeepAliveTransactionRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private KeepAliveTransactionRequest(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final KeepAliveTransactionRequest defaultInstance; + public static KeepAliveTransactionRequest getDefaultInstance() { + return defaultInstance; + } + + public KeepAliveTransactionRequest getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KeepAliveTransactionRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = transaction_.toBuilder(); + } + transaction_ = input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transaction_); + transaction_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public KeepAliveTransactionRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeepAliveTransactionRequest(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required .Transaction transaction = 1; + public static final int TRANSACTION_FIELD_NUMBER = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + return transaction_; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + return transaction_; + } + + private void initFields() { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTransaction()) { + memoizedIsInitialized = 0; + return false; + } + if (!getTransaction().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, transaction_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, transaction_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest) obj; + + boolean result = true; + result = result && (hasTransaction() == other.hasTransaction()); + if (hasTransaction()) { + result = result && getTransaction() + .equals(other.getTransaction()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTransaction()) { + hash = (37 * hash) + TRANSACTION_FIELD_NUMBER; + hash = (53 * hash) + getTransaction().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code KeepAliveTransactionRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getTransactionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionRequest_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (transactionBuilder_ == null) { + result.transaction_ = transaction_; + } else { + result.transaction_ = transactionBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.getDefaultInstance()) return this; + if (other.hasTransaction()) { + mergeTransaction(other.getTransaction()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTransaction()) { + + return false; + } + if (!getTransaction().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required .Transaction transaction = 1; + private org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> transactionBuilder_; + /** + * required .Transaction transaction = 1; + */ + public boolean hasTransaction() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getTransaction() { + if (transactionBuilder_ == null) { + return transaction_; + } else { + return transactionBuilder_.getMessage(); + } + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transaction_ = value; + onChanged(); + } else { + transactionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder setTransaction( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder builderForValue) { + if (transactionBuilder_ == null) { + transaction_ = builderForValue.build(); + onChanged(); + } else { + transactionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder mergeTransaction(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction value) { + if (transactionBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + transaction_ != org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance()) { + transaction_ = + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.newBuilder(transaction_).mergeFrom(value).buildPartial(); + } else { + transaction_ = value; + } + onChanged(); + } else { + transactionBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .Transaction transaction = 1; + */ + public Builder clearTransaction() { + if (transactionBuilder_ == null) { + transaction_ = org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + onChanged(); + } else { + transactionBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder getTransactionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getTransactionFieldBuilder().getBuilder(); + } + /** + * required .Transaction transaction = 1; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder getTransactionOrBuilder() { + if (transactionBuilder_ != null) { + return transactionBuilder_.getMessageOrBuilder(); + } else { + return transaction_; + } + } + /** + * required .Transaction transaction = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder> + getTransactionFieldBuilder() { + if (transactionBuilder_ == null) { + transactionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder>( + transaction_, + getParentForChildren(), + isClean()); + transaction_ = null; + } + return transactionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:KeepAliveTransactionRequest) + } + + static { + defaultInstance = new KeepAliveTransactionRequest(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:KeepAliveTransactionRequest) + } + + public interface KeepAliveTransactionResponseOrBuilder + extends com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code KeepAliveTransactionResponse} + */ + public static final class KeepAliveTransactionResponse extends + com.google.protobuf.GeneratedMessage + implements KeepAliveTransactionResponseOrBuilder { + // Use KeepAliveTransactionResponse.newBuilder() to construct. + private KeepAliveTransactionResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private KeepAliveTransactionResponse(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final KeepAliveTransactionResponse defaultInstance; + public static KeepAliveTransactionResponse getDefaultInstance() { + return defaultInstance; + } + + public KeepAliveTransactionResponse getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private KeepAliveTransactionResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public KeepAliveTransactionResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new KeepAliveTransactionResponse(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private void initFields() { + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse) obj; + + boolean result = true; + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code KeepAliveTransactionResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_KeepAliveTransactionResponse_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance()) return this; + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:KeepAliveTransactionResponse) + } + + static { + defaultInstance = new KeepAliveTransactionResponse(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:KeepAliveTransactionResponse) + } + + public interface FamilyRevisionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required int64 revision = 1; + /** + * required int64 revision = 1; + */ + boolean hasRevision(); + /** + * required int64 revision = 1; + */ + long getRevision(); + + // required int64 timestamp = 2; + /** + * required int64 timestamp = 2; + */ + boolean hasTimestamp(); + /** + * required int64 timestamp = 2; + */ + long getTimestamp(); + } + /** + * Protobuf type {@code FamilyRevision} + */ + public static final class FamilyRevision extends + com.google.protobuf.GeneratedMessage + implements FamilyRevisionOrBuilder { + // Use FamilyRevision.newBuilder() to construct. + private FamilyRevision(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private FamilyRevision(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final FamilyRevision defaultInstance; + public static FamilyRevision getDefaultInstance() { + return defaultInstance; + } + + public FamilyRevision getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private FamilyRevision( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + revision_ = input.readInt64(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + timestamp_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_FamilyRevision_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_FamilyRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public FamilyRevision parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FamilyRevision(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required int64 revision = 1; + public static final int REVISION_FIELD_NUMBER = 1; + private long revision_; + /** + * required int64 revision = 1; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int64 revision = 1; + */ + public long getRevision() { + return revision_; + } + + // required int64 timestamp = 2; + public static final int TIMESTAMP_FIELD_NUMBER = 2; + private long timestamp_; + /** + * required int64 timestamp = 2; + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 timestamp = 2; + */ + public long getTimestamp() { + return timestamp_; + } + + private void initFields() { + revision_ = 0L; + timestamp_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasRevision()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimestamp()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt64(1, revision_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, timestamp_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, revision_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, timestamp_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision) obj; + + boolean result = true; + result = result && (hasRevision() == other.hasRevision()); + if (hasRevision()) { + result = result && (getRevision() + == other.getRevision()); + } + result = result && (hasTimestamp() == other.hasTimestamp()); + if (hasTimestamp()) { + result = result && (getTimestamp() + == other.getTimestamp()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasRevision()) { + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getRevision()); + } + if (hasTimestamp()) { + hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getTimestamp()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code FamilyRevision} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevisionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_FamilyRevision_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_FamilyRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + revision_ = 0L; + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_FamilyRevision_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.revision_ = revision_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.timestamp_ = timestamp_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision.getDefaultInstance()) return this; + if (other.hasRevision()) { + setRevision(other.getRevision()); + } + if (other.hasTimestamp()) { + setTimestamp(other.getTimestamp()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasRevision()) { + + return false; + } + if (!hasTimestamp()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.FamilyRevision) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required int64 revision = 1; + private long revision_ ; + /** + * required int64 revision = 1; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required int64 revision = 1; + */ + public long getRevision() { + return revision_; + } + /** + * required int64 revision = 1; + */ + public Builder setRevision(long value) { + bitField0_ |= 0x00000001; + revision_ = value; + onChanged(); + return this; + } + /** + * required int64 revision = 1; + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000001); + revision_ = 0L; + onChanged(); + return this; + } + + // required int64 timestamp = 2; + private long timestamp_ ; + /** + * required int64 timestamp = 2; + */ + public boolean hasTimestamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 timestamp = 2; + */ + public long getTimestamp() { + return timestamp_; + } + /** + * required int64 timestamp = 2; + */ + public Builder setTimestamp(long value) { + bitField0_ |= 0x00000002; + timestamp_ = value; + onChanged(); + return this; + } + /** + * required int64 timestamp = 2; + */ + public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:FamilyRevision) + } + + static { + defaultInstance = new FamilyRevision(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:FamilyRevision) + } + + public interface TransactionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // required int64 time_stamp = 2; + /** + * required int64 time_stamp = 2; + */ + boolean hasTimeStamp(); + /** + * required int64 time_stamp = 2; + */ + long getTimeStamp(); + + // required int64 keep_alive = 3; + /** + * required int64 keep_alive = 3; + */ + boolean hasKeepAlive(); + /** + * required int64 keep_alive = 3; + */ + long getKeepAlive(); + + // required int64 revision = 4; + /** + * required int64 revision = 4; + */ + boolean hasRevision(); + /** + * required int64 revision = 4; + */ + long getRevision(); + + // repeated string column_families = 5; + /** + * repeated string column_families = 5; + */ + java.util.List + getColumnFamiliesList(); + /** + * repeated string column_families = 5; + */ + int getColumnFamiliesCount(); + /** + * repeated string column_families = 5; + */ + java.lang.String getColumnFamilies(int index); + /** + * repeated string column_families = 5; + */ + com.google.protobuf.ByteString + getColumnFamiliesBytes(int index); + } + /** + * Protobuf type {@code Transaction} + */ + public static final class Transaction extends + com.google.protobuf.GeneratedMessage + implements TransactionOrBuilder { + // Use Transaction.newBuilder() to construct. + private Transaction(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private Transaction(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final Transaction defaultInstance; + public static Transaction getDefaultInstance() { + return defaultInstance; + } + + public Transaction getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Transaction( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + timeStamp_ = input.readInt64(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + keepAlive_ = input.readInt64(); + break; + } + case 32: { + bitField0_ |= 0x00000008; + revision_ = input.readInt64(); + break; + } + case 42: { + if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000010; + } + columnFamilies_.add(input.readBytes()); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList(columnFamilies_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_Transaction_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_Transaction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Transaction parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Transaction(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int64 time_stamp = 2; + public static final int TIME_STAMP_FIELD_NUMBER = 2; + private long timeStamp_; + /** + * required int64 time_stamp = 2; + */ + public boolean hasTimeStamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 time_stamp = 2; + */ + public long getTimeStamp() { + return timeStamp_; + } + + // required int64 keep_alive = 3; + public static final int KEEP_ALIVE_FIELD_NUMBER = 3; + private long keepAlive_; + /** + * required int64 keep_alive = 3; + */ + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int64 keep_alive = 3; + */ + public long getKeepAlive() { + return keepAlive_; + } + + // required int64 revision = 4; + public static final int REVISION_FIELD_NUMBER = 4; + private long revision_; + /** + * required int64 revision = 4; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int64 revision = 4; + */ + public long getRevision() { + return revision_; + } + + // repeated string column_families = 5; + public static final int COLUMN_FAMILIES_FIELD_NUMBER = 5; + private com.google.protobuf.LazyStringList columnFamilies_; + /** + * repeated string column_families = 5; + */ + public java.util.List + getColumnFamiliesList() { + return columnFamilies_; + } + /** + * repeated string column_families = 5; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 5; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 5; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + + private void initFields() { + tableName_ = ""; + timeStamp_ = 0L; + keepAlive_ = 0L; + revision_ = 0L; + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeStamp()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasKeepAlive()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasRevision()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, timeStamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt64(3, keepAlive_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt64(4, revision_); + } + for (int i = 0; i < columnFamilies_.size(); i++) { + output.writeBytes(5, columnFamilies_.getByteString(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, timeStamp_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, keepAlive_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(4, revision_); + } + { + int dataSize = 0; + for (int i = 0; i < columnFamilies_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(columnFamilies_.getByteString(i)); + } + size += dataSize; + size += 1 * getColumnFamiliesList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && (hasTimeStamp() == other.hasTimeStamp()); + if (hasTimeStamp()) { + result = result && (getTimeStamp() + == other.getTimeStamp()); + } + result = result && (hasKeepAlive() == other.hasKeepAlive()); + if (hasKeepAlive()) { + result = result && (getKeepAlive() + == other.getKeepAlive()); + } + result = result && (hasRevision() == other.hasRevision()); + if (hasRevision()) { + result = result && (getRevision() + == other.getRevision()); + } + result = result && getColumnFamiliesList() + .equals(other.getColumnFamiliesList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (hasTimeStamp()) { + hash = (37 * hash) + TIME_STAMP_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getTimeStamp()); + } + if (hasKeepAlive()) { + hash = (37 * hash) + KEEP_ALIVE_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getKeepAlive()); + } + if (hasRevision()) { + hash = (37 * hash) + REVISION_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getRevision()); + } + if (getColumnFamiliesCount() > 0) { + hash = (37 * hash) + COLUMN_FAMILIES_FIELD_NUMBER; + hash = (53 * hash) + getColumnFamiliesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Transaction} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TransactionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_Transaction_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_Transaction_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + timeStamp_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + keepAlive_ = 0L; + bitField0_ = (bitField0_ & ~0x00000004); + revision_ = 0L; + bitField0_ = (bitField0_ & ~0x00000008); + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_Transaction_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.timeStamp_ = timeStamp_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.keepAlive_ = keepAlive_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.revision_ = revision_; + if (((bitField0_ & 0x00000010) == 0x00000010)) { + columnFamilies_ = new com.google.protobuf.UnmodifiableLazyStringList( + columnFamilies_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.columnFamilies_ = columnFamilies_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasTimeStamp()) { + setTimeStamp(other.getTimeStamp()); + } + if (other.hasKeepAlive()) { + setKeepAlive(other.getKeepAlive()); + } + if (other.hasRevision()) { + setRevision(other.getRevision()); + } + if (!other.columnFamilies_.isEmpty()) { + if (columnFamilies_.isEmpty()) { + columnFamilies_ = other.columnFamilies_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureColumnFamiliesIsMutable(); + columnFamilies_.addAll(other.columnFamilies_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasTimeStamp()) { + + return false; + } + if (!hasKeepAlive()) { + + return false; + } + if (!hasRevision()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.Transaction) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // required int64 time_stamp = 2; + private long timeStamp_ ; + /** + * required int64 time_stamp = 2; + */ + public boolean hasTimeStamp() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 time_stamp = 2; + */ + public long getTimeStamp() { + return timeStamp_; + } + /** + * required int64 time_stamp = 2; + */ + public Builder setTimeStamp(long value) { + bitField0_ |= 0x00000002; + timeStamp_ = value; + onChanged(); + return this; + } + /** + * required int64 time_stamp = 2; + */ + public Builder clearTimeStamp() { + bitField0_ = (bitField0_ & ~0x00000002); + timeStamp_ = 0L; + onChanged(); + return this; + } + + // required int64 keep_alive = 3; + private long keepAlive_ ; + /** + * required int64 keep_alive = 3; + */ + public boolean hasKeepAlive() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int64 keep_alive = 3; + */ + public long getKeepAlive() { + return keepAlive_; + } + /** + * required int64 keep_alive = 3; + */ + public Builder setKeepAlive(long value) { + bitField0_ |= 0x00000004; + keepAlive_ = value; + onChanged(); + return this; + } + /** + * required int64 keep_alive = 3; + */ + public Builder clearKeepAlive() { + bitField0_ = (bitField0_ & ~0x00000004); + keepAlive_ = 0L; + onChanged(); + return this; + } + + // required int64 revision = 4; + private long revision_ ; + /** + * required int64 revision = 4; + */ + public boolean hasRevision() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int64 revision = 4; + */ + public long getRevision() { + return revision_; + } + /** + * required int64 revision = 4; + */ + public Builder setRevision(long value) { + bitField0_ |= 0x00000008; + revision_ = value; + onChanged(); + return this; + } + /** + * required int64 revision = 4; + */ + public Builder clearRevision() { + bitField0_ = (bitField0_ & ~0x00000008); + revision_ = 0L; + onChanged(); + return this; + } + + // repeated string column_families = 5; + private com.google.protobuf.LazyStringList columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureColumnFamiliesIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + columnFamilies_ = new com.google.protobuf.LazyStringArrayList(columnFamilies_); + bitField0_ |= 0x00000010; + } + } + /** + * repeated string column_families = 5; + */ + public java.util.List + getColumnFamiliesList() { + return java.util.Collections.unmodifiableList(columnFamilies_); + } + /** + * repeated string column_families = 5; + */ + public int getColumnFamiliesCount() { + return columnFamilies_.size(); + } + /** + * repeated string column_families = 5; + */ + public java.lang.String getColumnFamilies(int index) { + return columnFamilies_.get(index); + } + /** + * repeated string column_families = 5; + */ + public com.google.protobuf.ByteString + getColumnFamiliesBytes(int index) { + return columnFamilies_.getByteString(index); + } + /** + * repeated string column_families = 5; + */ + public Builder setColumnFamilies( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string column_families = 5; + */ + public Builder addColumnFamilies( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + /** + * repeated string column_families = 5; + */ + public Builder addAllColumnFamilies( + java.lang.Iterable values) { + ensureColumnFamiliesIsMutable(); + super.addAll(values, columnFamilies_); + onChanged(); + return this; + } + /** + * repeated string column_families = 5; + */ + public Builder clearColumnFamilies() { + columnFamilies_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + * repeated string column_families = 5; + */ + public Builder addColumnFamiliesBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamiliesIsMutable(); + columnFamilies_.add(value); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Transaction) + } + + static { + defaultInstance = new Transaction(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:Transaction) + } + + public interface TableSnapshotOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string table_name = 1; + /** + * required string table_name = 1; + */ + boolean hasTableName(); + /** + * required string table_name = 1; + */ + java.lang.String getTableName(); + /** + * required string table_name = 1; + */ + com.google.protobuf.ByteString + getTableNameBytes(); + + // required int64 latest_revision = 2; + /** + * required int64 latest_revision = 2; + */ + boolean hasLatestRevision(); + /** + * required int64 latest_revision = 2; + */ + long getLatestRevision(); + + // repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + java.util.List + getColumnFamilyRevisionList(); + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision getColumnFamilyRevision(int index); + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + int getColumnFamilyRevisionCount(); + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + java.util.List + getColumnFamilyRevisionOrBuilderList(); + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder getColumnFamilyRevisionOrBuilder( + int index); + } + /** + * Protobuf type {@code TableSnapshot} + */ + public static final class TableSnapshot extends + com.google.protobuf.GeneratedMessage + implements TableSnapshotOrBuilder { + // Use TableSnapshot.newBuilder() to construct. + private TableSnapshot(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private TableSnapshot(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final TableSnapshot defaultInstance; + public static TableSnapshot getDefaultInstance() { + return defaultInstance; + } + + public TableSnapshot getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TableSnapshot( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + tableName_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + latestRevision_ = input.readInt64(); + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilyRevision_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + columnFamilyRevision_.add(input.readMessage(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.PARSER, extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilyRevision_ = java.util.Collections.unmodifiableList(columnFamilyRevision_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public TableSnapshot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TableSnapshot(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public interface ColumnFamilyRevisionOrBuilder + extends com.google.protobuf.MessageOrBuilder { + + // required string key = 1; + /** + * required string key = 1; + */ + boolean hasKey(); + /** + * required string key = 1; + */ + java.lang.String getKey(); + /** + * required string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + // required int64 value = 2; + /** + * required int64 value = 2; + */ + boolean hasValue(); + /** + * required int64 value = 2; + */ + long getValue(); + } + /** + * Protobuf type {@code TableSnapshot.ColumnFamilyRevision} + */ + public static final class ColumnFamilyRevision extends + com.google.protobuf.GeneratedMessage + implements ColumnFamilyRevisionOrBuilder { + // Use ColumnFamilyRevision.newBuilder() to construct. + private ColumnFamilyRevision(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + this.unknownFields = builder.getUnknownFields(); + } + private ColumnFamilyRevision(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } + + private static final ColumnFamilyRevision defaultInstance; + public static ColumnFamilyRevision getDefaultInstance() { + return defaultInstance; + } + + public ColumnFamilyRevision getDefaultInstanceForType() { + return defaultInstance; + } + + private final com.google.protobuf.UnknownFieldSet unknownFields; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColumnFamilyRevision( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + initFields(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + bitField0_ |= 0x00000001; + key_ = input.readBytes(); + break; + } + case 16: { + bitField0_ |= 0x00000002; + value_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_ColumnFamilyRevision_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_ColumnFamilyRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder.class); + } + + public static com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ColumnFamilyRevision parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColumnFamilyRevision(input, extensionRegistry); + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + // required string key = 1; + public static final int KEY_FIELD_NUMBER = 1; + private java.lang.Object key_; + /** + * required string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + key_ = s; + } + return s; + } + } + /** + * required string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int64 value = 2; + public static final int VALUE_FIELD_NUMBER = 2; + private long value_; + /** + * required int64 value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 value = 2; + */ + public long getValue() { + return value_; + } + + private void initFields() { + key_ = ""; + value_ = 0L; + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasKey()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasValue()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, value_); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getKeyBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, value_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision) obj; + + boolean result = true; + result = result && (hasKey() == other.hasKey()); + if (hasKey()) { + result = result && getKey() + .equals(other.getKey()); + } + result = result && (hasValue() == other.hasValue()); + if (hasValue()) { + result = result && (getValue() + == other.getValue()); + } + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasKey()) { + hash = (37 * hash) + KEY_FIELD_NUMBER; + hash = (53 * hash) + getKey().hashCode(); + } + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getValue()); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TableSnapshot.ColumnFamilyRevision} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_ColumnFamilyRevision_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_ColumnFamilyRevision_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + key_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + value_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_ColumnFamilyRevision_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.key_ = key_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.value_ = value_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.getDefaultInstance()) return this; + if (other.hasKey()) { + bitField0_ |= 0x00000001; + key_ = other.key_; + onChanged(); + } + if (other.hasValue()) { + setValue(other.getValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasKey()) { + + return false; + } + if (!hasValue()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string key = 1; + private java.lang.Object key_ = ""; + /** + * required string key = 1; + */ + public boolean hasKey() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string key = 1; + */ + public java.lang.String getKey() { + java.lang.Object ref = key_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + key_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string key = 1; + */ + public com.google.protobuf.ByteString + getKeyBytes() { + java.lang.Object ref = key_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + key_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + /** + * required string key = 1; + */ + public Builder clearKey() { + bitField0_ = (bitField0_ & ~0x00000001); + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * required string key = 1; + */ + public Builder setKeyBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + key_ = value; + onChanged(); + return this; + } + + // required int64 value = 2; + private long value_ ; + /** + * required int64 value = 2; + */ + public boolean hasValue() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 value = 2; + */ + public long getValue() { + return value_; + } + /** + * required int64 value = 2; + */ + public Builder setValue(long value) { + bitField0_ |= 0x00000002; + value_ = value; + onChanged(); + return this; + } + /** + * required int64 value = 2; + */ + public Builder clearValue() { + bitField0_ = (bitField0_ & ~0x00000002); + value_ = 0L; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:TableSnapshot.ColumnFamilyRevision) + } + + static { + defaultInstance = new ColumnFamilyRevision(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:TableSnapshot.ColumnFamilyRevision) + } + + private int bitField0_; + // required string table_name = 1; + public static final int TABLE_NAME_FIELD_NUMBER = 1; + private java.lang.Object tableName_; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + tableName_ = s; + } + return s; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // required int64 latest_revision = 2; + public static final int LATEST_REVISION_FIELD_NUMBER = 2; + private long latestRevision_; + /** + * required int64 latest_revision = 2; + */ + public boolean hasLatestRevision() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 latest_revision = 2; + */ + public long getLatestRevision() { + return latestRevision_; + } + + // repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + public static final int COLUMN_FAMILY_REVISION_FIELD_NUMBER = 3; + private java.util.List columnFamilyRevision_; + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public java.util.List getColumnFamilyRevisionList() { + return columnFamilyRevision_; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public java.util.List + getColumnFamilyRevisionOrBuilderList() { + return columnFamilyRevision_; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public int getColumnFamilyRevisionCount() { + return columnFamilyRevision_.size(); + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision getColumnFamilyRevision(int index) { + return columnFamilyRevision_.get(index); + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder getColumnFamilyRevisionOrBuilder( + int index) { + return columnFamilyRevision_.get(index); + } + + private void initFields() { + tableName_ = ""; + latestRevision_ = 0L; + columnFamilyRevision_ = java.util.Collections.emptyList(); + } + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized != -1) return isInitialized == 1; + + if (!hasTableName()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasLatestRevision()) { + memoizedIsInitialized = 0; + return false; + } + for (int i = 0; i < getColumnFamilyRevisionCount(); i++) { + if (!getColumnFamilyRevision(i).isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + getSerializedSize(); + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt64(2, latestRevision_); + } + for (int i = 0; i < columnFamilyRevision_.size(); i++) { + output.writeMessage(3, columnFamilyRevision_.get(i)); + } + getUnknownFields().writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getTableNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, latestRevision_); + } + for (int i = 0; i < columnFamilyRevision_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, columnFamilyRevision_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + protected java.lang.Object writeReplace() + throws java.io.ObjectStreamException { + return super.writeReplace(); + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot)) { + return super.equals(obj); + } + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot other = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot) obj; + + boolean result = true; + result = result && (hasTableName() == other.hasTableName()); + if (hasTableName()) { + result = result && getTableName() + .equals(other.getTableName()); + } + result = result && (hasLatestRevision() == other.hasLatestRevision()); + if (hasLatestRevision()) { + result = result && (getLatestRevision() + == other.getLatestRevision()); + } + result = result && getColumnFamilyRevisionList() + .equals(other.getColumnFamilyRevisionList()); + result = result && + getUnknownFields().equals(other.getUnknownFields()); + return result; + } + + private int memoizedHashCode = 0; + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptorForType().hashCode(); + if (hasTableName()) { + hash = (37 * hash) + TABLE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getTableName().hashCode(); + } + if (hasLatestRevision()) { + hash = (37 * hash) + LATEST_REVISION_FIELD_NUMBER; + hash = (53 * hash) + hashLong(getLatestRevision()); + } + if (getColumnFamilyRevisionCount() > 0) { + hash = (37 * hash) + COLUMN_FAMILY_REVISION_FIELD_NUMBER; + hash = (53 * hash) + getColumnFamilyRevisionList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public static Builder newBuilder() { return Builder.create(); } + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot prototype) { + return newBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { return newBuilder(this); } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code TableSnapshot} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder + implements org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.class, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.Builder.class); + } + + // Construct using org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getColumnFamilyRevisionFieldBuilder(); + } + } + private static Builder create() { + return new Builder(); + } + + public Builder clear() { + super.clear(); + tableName_ = ""; + bitField0_ = (bitField0_ & ~0x00000001); + latestRevision_ = 0L; + bitField0_ = (bitField0_ & ~0x00000002); + if (columnFamilyRevisionBuilder_ == null) { + columnFamilyRevision_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + columnFamilyRevisionBuilder_.clear(); + } + return this; + } + + public Builder clone() { + return create().mergeFrom(buildPartial()); + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.internal_static_TableSnapshot_descriptor; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot getDefaultInstanceForType() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance(); + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot build() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot buildPartial() { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot result = new org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.tableName_ = tableName_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.latestRevision_ = latestRevision_; + if (columnFamilyRevisionBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilyRevision_ = java.util.Collections.unmodifiableList(columnFamilyRevision_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.columnFamilyRevision_ = columnFamilyRevision_; + } else { + result.columnFamilyRevision_ = columnFamilyRevisionBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot) { + return mergeFrom((org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot other) { + if (other == org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.getDefaultInstance()) return this; + if (other.hasTableName()) { + bitField0_ |= 0x00000001; + tableName_ = other.tableName_; + onChanged(); + } + if (other.hasLatestRevision()) { + setLatestRevision(other.getLatestRevision()); + } + if (columnFamilyRevisionBuilder_ == null) { + if (!other.columnFamilyRevision_.isEmpty()) { + if (columnFamilyRevision_.isEmpty()) { + columnFamilyRevision_ = other.columnFamilyRevision_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.addAll(other.columnFamilyRevision_); + } + onChanged(); + } + } else { + if (!other.columnFamilyRevision_.isEmpty()) { + if (columnFamilyRevisionBuilder_.isEmpty()) { + columnFamilyRevisionBuilder_.dispose(); + columnFamilyRevisionBuilder_ = null; + columnFamilyRevision_ = other.columnFamilyRevision_; + bitField0_ = (bitField0_ & ~0x00000004); + columnFamilyRevisionBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getColumnFamilyRevisionFieldBuilder() : null; + } else { + columnFamilyRevisionBuilder_.addAllMessages(other.columnFamilyRevision_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + return this; + } + + public final boolean isInitialized() { + if (!hasTableName()) { + + return false; + } + if (!hasLatestRevision()) { + + return false; + } + for (int i = 0; i < getColumnFamilyRevisionCount(); i++) { + if (!getColumnFamilyRevision(i).isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + // required string table_name = 1; + private java.lang.Object tableName_ = ""; + /** + * required string table_name = 1; + */ + public boolean hasTableName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required string table_name = 1; + */ + public java.lang.String getTableName() { + java.lang.Object ref = tableName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + tableName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * required string table_name = 1; + */ + public com.google.protobuf.ByteString + getTableNameBytes() { + java.lang.Object ref = tableName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tableName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * required string table_name = 1; + */ + public Builder setTableName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder clearTableName() { + bitField0_ = (bitField0_ & ~0x00000001); + tableName_ = getDefaultInstance().getTableName(); + onChanged(); + return this; + } + /** + * required string table_name = 1; + */ + public Builder setTableNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + tableName_ = value; + onChanged(); + return this; + } + + // required int64 latest_revision = 2; + private long latestRevision_ ; + /** + * required int64 latest_revision = 2; + */ + public boolean hasLatestRevision() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int64 latest_revision = 2; + */ + public long getLatestRevision() { + return latestRevision_; + } + /** + * required int64 latest_revision = 2; + */ + public Builder setLatestRevision(long value) { + bitField0_ |= 0x00000002; + latestRevision_ = value; + onChanged(); + return this; + } + /** + * required int64 latest_revision = 2; + */ + public Builder clearLatestRevision() { + bitField0_ = (bitField0_ & ~0x00000002); + latestRevision_ = 0L; + onChanged(); + return this; + } + + // repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + private java.util.List columnFamilyRevision_ = + java.util.Collections.emptyList(); + private void ensureColumnFamilyRevisionIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + columnFamilyRevision_ = new java.util.ArrayList(columnFamilyRevision_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder> columnFamilyRevisionBuilder_; + + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public java.util.List getColumnFamilyRevisionList() { + if (columnFamilyRevisionBuilder_ == null) { + return java.util.Collections.unmodifiableList(columnFamilyRevision_); + } else { + return columnFamilyRevisionBuilder_.getMessageList(); + } + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public int getColumnFamilyRevisionCount() { + if (columnFamilyRevisionBuilder_ == null) { + return columnFamilyRevision_.size(); + } else { + return columnFamilyRevisionBuilder_.getCount(); + } + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision getColumnFamilyRevision(int index) { + if (columnFamilyRevisionBuilder_ == null) { + return columnFamilyRevision_.get(index); + } else { + return columnFamilyRevisionBuilder_.getMessage(index); + } + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder setColumnFamilyRevision( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision value) { + if (columnFamilyRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.set(index, value); + onChanged(); + } else { + columnFamilyRevisionBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder setColumnFamilyRevision( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder builderForValue) { + if (columnFamilyRevisionBuilder_ == null) { + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.set(index, builderForValue.build()); + onChanged(); + } else { + columnFamilyRevisionBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder addColumnFamilyRevision(org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision value) { + if (columnFamilyRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.add(value); + onChanged(); + } else { + columnFamilyRevisionBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder addColumnFamilyRevision( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision value) { + if (columnFamilyRevisionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.add(index, value); + onChanged(); + } else { + columnFamilyRevisionBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder addColumnFamilyRevision( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder builderForValue) { + if (columnFamilyRevisionBuilder_ == null) { + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.add(builderForValue.build()); + onChanged(); + } else { + columnFamilyRevisionBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder addColumnFamilyRevision( + int index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder builderForValue) { + if (columnFamilyRevisionBuilder_ == null) { + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.add(index, builderForValue.build()); + onChanged(); + } else { + columnFamilyRevisionBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder addAllColumnFamilyRevision( + java.lang.Iterable values) { + if (columnFamilyRevisionBuilder_ == null) { + ensureColumnFamilyRevisionIsMutable(); + super.addAll(values, columnFamilyRevision_); + onChanged(); + } else { + columnFamilyRevisionBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder clearColumnFamilyRevision() { + if (columnFamilyRevisionBuilder_ == null) { + columnFamilyRevision_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + columnFamilyRevisionBuilder_.clear(); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public Builder removeColumnFamilyRevision(int index) { + if (columnFamilyRevisionBuilder_ == null) { + ensureColumnFamilyRevisionIsMutable(); + columnFamilyRevision_.remove(index); + onChanged(); + } else { + columnFamilyRevisionBuilder_.remove(index); + } + return this; + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder getColumnFamilyRevisionBuilder( + int index) { + return getColumnFamilyRevisionFieldBuilder().getBuilder(index); + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder getColumnFamilyRevisionOrBuilder( + int index) { + if (columnFamilyRevisionBuilder_ == null) { + return columnFamilyRevision_.get(index); } else { + return columnFamilyRevisionBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public java.util.List + getColumnFamilyRevisionOrBuilderList() { + if (columnFamilyRevisionBuilder_ != null) { + return columnFamilyRevisionBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(columnFamilyRevision_); + } + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder addColumnFamilyRevisionBuilder() { + return getColumnFamilyRevisionFieldBuilder().addBuilder( + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.getDefaultInstance()); + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder addColumnFamilyRevisionBuilder( + int index) { + return getColumnFamilyRevisionFieldBuilder().addBuilder( + index, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.getDefaultInstance()); + } + /** + * repeated .TableSnapshot.ColumnFamilyRevision column_family_revision = 3; + */ + public java.util.List + getColumnFamilyRevisionBuilderList() { + return getColumnFamilyRevisionFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder> + getColumnFamilyRevisionFieldBuilder() { + if (columnFamilyRevisionBuilder_ == null) { + columnFamilyRevisionBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision.Builder, org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevisionOrBuilder>( + columnFamilyRevision_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + columnFamilyRevision_ = null; + } + return columnFamilyRevisionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:TableSnapshot) + } + + static { + defaultInstance = new TableSnapshot(true); + defaultInstance.initFields(); + } + + // @@protoc_insertion_point(class_scope:TableSnapshot) + } + + /** + * Protobuf service {@code RevisionManagerEndpointService} + */ + public static abstract class RevisionManagerEndpointService + implements com.google.protobuf.Service { + protected RevisionManagerEndpointService() {} + + public interface Interface { + /** + * rpc createTable(.CreateTableRequest) returns (.CreateTableResponse); + */ + public abstract void createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc dropTable(.DropTableRequest) returns (.DropTableResponse); + */ + public abstract void dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc beginWriteTransaction(.BeginWriteTransactionRequest) returns (.BeginWriteTransactionResponse); + */ + public abstract void beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc commitWriteTransaction(.CommitWriteTransactionRequest) returns (.CommitWriteTransactionResponse); + */ + public abstract void commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc abortWriteTransaction(.AbortWriteTransactionRequest) returns (.AbortWriteTransactionResponse); + */ + public abstract void abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getAbortedWriteTransactions(.GetAbortedWriteTransactionsRequest) returns (.GetAbortedWriteTransactionsResponse); + */ + public abstract void getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc createSnapshot(.CreateSnapshotRequest) returns (.CreateSnapshotResponse); + */ + public abstract void createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc keepAliveTransaction(.KeepAliveTransactionRequest) returns (.KeepAliveTransactionResponse); + */ + public abstract void keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request, + com.google.protobuf.RpcCallback done); + + } + + public static com.google.protobuf.Service newReflectiveService( + final Interface impl) { + return new RevisionManagerEndpointService() { + @java.lang.Override + public void createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request, + com.google.protobuf.RpcCallback done) { + impl.createTable(controller, request, done); + } + + @java.lang.Override + public void dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request, + com.google.protobuf.RpcCallback done) { + impl.dropTable(controller, request, done); + } + + @java.lang.Override + public void beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + impl.beginWriteTransaction(controller, request, done); + } + + @java.lang.Override + public void commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + impl.commitWriteTransaction(controller, request, done); + } + + @java.lang.Override + public void abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + impl.abortWriteTransaction(controller, request, done); + } + + @java.lang.Override + public void getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request, + com.google.protobuf.RpcCallback done) { + impl.getAbortedWriteTransactions(controller, request, done); + } + + @java.lang.Override + public void createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request, + com.google.protobuf.RpcCallback done) { + impl.createSnapshot(controller, request, done); + } + + @java.lang.Override + public void keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request, + com.google.protobuf.RpcCallback done) { + impl.keepAliveTransaction(controller, request, done); + } + + }; + } + + public static com.google.protobuf.BlockingService + newReflectiveBlockingService(final BlockingInterface impl) { + return new com.google.protobuf.BlockingService() { + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final com.google.protobuf.Message callBlockingMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request) + throws com.google.protobuf.ServiceException { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callBlockingMethod() given method descriptor for " + + "wrong service type."); + } + switch(method.getIndex()) { + case 0: + return impl.createTable(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest)request); + case 1: + return impl.dropTable(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest)request); + case 2: + return impl.beginWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest)request); + case 3: + return impl.commitWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest)request); + case 4: + return impl.abortWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest)request); + case 5: + return impl.getAbortedWriteTransactions(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest)request); + case 6: + return impl.createSnapshot(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest)request); + case 7: + return impl.keepAliveTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest)request); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.getDefaultInstance(); + case 1: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.getDefaultInstance(); + case 2: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.getDefaultInstance(); + case 3: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.getDefaultInstance(); + case 4: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.getDefaultInstance(); + case 5: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.getDefaultInstance(); + case 6: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.getDefaultInstance(); + case 7: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance(); + case 1: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance(); + case 2: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance(); + case 3: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance(); + case 4: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance(); + case 5: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance(); + case 6: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance(); + case 7: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + }; + } + + /** + * rpc createTable(.CreateTableRequest) returns (.CreateTableResponse); + */ + public abstract void createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc dropTable(.DropTableRequest) returns (.DropTableResponse); + */ + public abstract void dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc beginWriteTransaction(.BeginWriteTransactionRequest) returns (.BeginWriteTransactionResponse); + */ + public abstract void beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc commitWriteTransaction(.CommitWriteTransactionRequest) returns (.CommitWriteTransactionResponse); + */ + public abstract void commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc abortWriteTransaction(.AbortWriteTransactionRequest) returns (.AbortWriteTransactionResponse); + */ + public abstract void abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc getAbortedWriteTransactions(.GetAbortedWriteTransactionsRequest) returns (.GetAbortedWriteTransactionsResponse); + */ + public abstract void getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc createSnapshot(.CreateSnapshotRequest) returns (.CreateSnapshotResponse); + */ + public abstract void createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request, + com.google.protobuf.RpcCallback done); + + /** + * rpc keepAliveTransaction(.KeepAliveTransactionRequest) returns (.KeepAliveTransactionResponse); + */ + public abstract void keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request, + com.google.protobuf.RpcCallback done); + + public static final + com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptor() { + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.getDescriptor().getServices().get(0); + } + public final com.google.protobuf.Descriptors.ServiceDescriptor + getDescriptorForType() { + return getDescriptor(); + } + + public final void callMethod( + com.google.protobuf.Descriptors.MethodDescriptor method, + com.google.protobuf.RpcController controller, + com.google.protobuf.Message request, + com.google.protobuf.RpcCallback< + com.google.protobuf.Message> done) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.callMethod() given method descriptor for wrong " + + "service type."); + } + switch(method.getIndex()) { + case 0: + this.createTable(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 1: + this.dropTable(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 2: + this.beginWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 3: + this.commitWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 4: + this.abortWriteTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 5: + this.getAbortedWriteTransactions(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 6: + this.createSnapshot(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + case 7: + this.keepAliveTransaction(controller, (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest)request, + com.google.protobuf.RpcUtil.specializeCallback( + done)); + return; + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getRequestPrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getRequestPrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest.getDefaultInstance(); + case 1: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest.getDefaultInstance(); + case 2: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest.getDefaultInstance(); + case 3: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest.getDefaultInstance(); + case 4: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest.getDefaultInstance(); + case 5: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest.getDefaultInstance(); + case 6: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest.getDefaultInstance(); + case 7: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public final com.google.protobuf.Message + getResponsePrototype( + com.google.protobuf.Descriptors.MethodDescriptor method) { + if (method.getService() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "Service.getResponsePrototype() given method " + + "descriptor for wrong service type."); + } + switch(method.getIndex()) { + case 0: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance(); + case 1: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance(); + case 2: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance(); + case 3: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance(); + case 4: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance(); + case 5: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance(); + case 6: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance(); + case 7: + return org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance(); + default: + throw new java.lang.AssertionError("Can't get here."); + } + } + + public static Stub newStub( + com.google.protobuf.RpcChannel channel) { + return new Stub(channel); + } + + public static final class Stub extends org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.RevisionManagerEndpointService implements Interface { + private Stub(com.google.protobuf.RpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.RpcChannel channel; + + public com.google.protobuf.RpcChannel getChannel() { + return channel; + } + + public void createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance())); + } + + public void dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance())); + } + + public void beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(2), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance())); + } + + public void commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(3), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance())); + } + + public void abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(4), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance())); + } + + public void getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(5), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance())); + } + + public void createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(6), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance())); + } + + public void keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request, + com.google.protobuf.RpcCallback done) { + channel.callMethod( + getDescriptor().getMethods().get(7), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance(), + com.google.protobuf.RpcUtil.generalizeCallback( + done, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.class, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance())); + } + } + + public static BlockingInterface newBlockingStub( + com.google.protobuf.BlockingRpcChannel channel) { + return new BlockingStub(channel); + } + + public interface BlockingInterface { + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request) + throws com.google.protobuf.ServiceException; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request) + throws com.google.protobuf.ServiceException; + } + + private static final class BlockingStub implements BlockingInterface { + private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) { + this.channel = channel; + } + + private final com.google.protobuf.BlockingRpcChannel channel; + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse createTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(0), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse dropTable( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(1), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse beginWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(2), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse commitWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(3), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse abortWriteTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(4), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse getAbortedWriteTransactions( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(5), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse createSnapshot( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(6), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse.getDefaultInstance()); + } + + + public org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse keepAliveTransaction( + com.google.protobuf.RpcController controller, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest request) + throws com.google.protobuf.ServiceException { + return (org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse) channel.callBlockingMethod( + getDescriptor().getMethods().get(7), + controller, + request, + org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse.getDefaultInstance()); + } + + } + + // @@protoc_insertion_point(class_scope:RevisionManagerEndpointService) + } + + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CreateTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CreateTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CreateTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CreateTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_DropTableRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_DropTableRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_DropTableResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_DropTableResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BeginWriteTransactionRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BeginWriteTransactionRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_BeginWriteTransactionResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BeginWriteTransactionResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CommitWriteTransactionRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CommitWriteTransactionRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CommitWriteTransactionResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CommitWriteTransactionResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_AbortWriteTransactionRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_AbortWriteTransactionRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_AbortWriteTransactionResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_AbortWriteTransactionResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_GetAbortedWriteTransactionsRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GetAbortedWriteTransactionsRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_GetAbortedWriteTransactionsResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GetAbortedWriteTransactionsResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CreateSnapshotRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CreateSnapshotRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_CreateSnapshotResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_CreateSnapshotResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_KeepAliveTransactionRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_KeepAliveTransactionRequest_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_KeepAliveTransactionResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_KeepAliveTransactionResponse_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_FamilyRevision_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_FamilyRevision_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_Transaction_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Transaction_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_TableSnapshot_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_TableSnapshot_fieldAccessorTable; + private static com.google.protobuf.Descriptors.Descriptor + internal_static_TableSnapshot_ColumnFamilyRevision_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_TableSnapshot_ColumnFamilyRevision_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\nmhcatalog/storage-handlers/hbase/src/pr" + + "otobuf/org/apache/hcatalog/hbase/snapsho" + + "t/RevisionManagerEndpoint.proto\"A\n\022Creat" + + "eTableRequest\022\022\n\ntable_name\030\001 \002(\t\022\027\n\017col" + + "umn_families\030\002 \003(\t\"\025\n\023CreateTableRespons" + + "e\"&\n\020DropTableRequest\022\022\n\ntable_name\030\001 \002(" + + "\t\"\023\n\021DropTableResponse\"_\n\034BeginWriteTran" + + "sactionRequest\022\022\n\ntable_name\030\001 \002(\t\022\022\n\nke" + + "ep_alive\030\002 \001(\003\022\027\n\017column_families\030\003 \003(\t\"" + + "B\n\035BeginWriteTransactionResponse\022!\n\013tran", + "saction\030\001 \002(\0132\014.Transaction\"B\n\035CommitWri" + + "teTransactionRequest\022!\n\013transaction\030\001 \002(" + + "\0132\014.Transaction\" \n\036CommitWriteTransactio" + + "nResponse\"A\n\034AbortWriteTransactionReques" + + "t\022!\n\013transaction\030\001 \002(\0132\014.Transaction\"\037\n\035" + + "AbortWriteTransactionResponse\"O\n\"GetAbor" + + "tedWriteTransactionsRequest\022\022\n\ntable_nam" + + "e\030\001 \002(\t\022\025\n\rcolumn_family\030\002 \002(\t\"P\n#GetAbo" + + "rtedWriteTransactionsResponse\022)\n\020family_" + + "revisions\030\001 \003(\0132\017.FamilyRevision\"=\n\025Crea", + "teSnapshotRequest\022\022\n\ntable_name\030\001 \002(\t\022\020\n" + + "\010revision\030\002 \001(\003\"@\n\026CreateSnapshotRespons" + + "e\022&\n\016table_snapshot\030\001 \002(\0132\016.TableSnapsho" + + "t\"@\n\033KeepAliveTransactionRequest\022!\n\013tran" + + "saction\030\001 \002(\0132\014.Transaction\"\036\n\034KeepAlive" + + "TransactionResponse\"5\n\016FamilyRevision\022\020\n" + + "\010revision\030\001 \002(\003\022\021\n\ttimestamp\030\002 \002(\003\"t\n\013Tr" + + "ansaction\022\022\n\ntable_name\030\001 \002(\t\022\022\n\ntime_st" + + "amp\030\002 \002(\003\022\022\n\nkeep_alive\030\003 \002(\003\022\020\n\010revisio" + + "n\030\004 \002(\003\022\027\n\017column_families\030\005 \003(\t\"\265\001\n\rTab", + "leSnapshot\022\022\n\ntable_name\030\001 \002(\t\022\027\n\017latest" + + "_revision\030\002 \002(\003\022C\n\026column_family_revisio" + + "n\030\003 \003(\0132#.TableSnapshot.ColumnFamilyRevi" + + "sion\0322\n\024ColumnFamilyRevision\022\013\n\003key\030\001 \002(" + + "\t\022\r\n\005value\030\002 \002(\0032\233\005\n\036RevisionManagerEndp" + + "ointService\0228\n\013createTable\022\023.CreateTable" + + "Request\032\024.CreateTableResponse\0222\n\tdropTab" + + "le\022\021.DropTableRequest\032\022.DropTableRespons" + + "e\022V\n\025beginWriteTransaction\022\035.BeginWriteT" + + "ransactionRequest\032\036.BeginWriteTransactio", + "nResponse\022Y\n\026commitWriteTransaction\022\036.Co" + + "mmitWriteTransactionRequest\032\037.CommitWrit" + + "eTransactionResponse\022V\n\025abortWriteTransa" + + "ction\022\035.AbortWriteTransactionRequest\032\036.A" + + "bortWriteTransactionResponse\022h\n\033getAbort" + + "edWriteTransactions\022#.GetAbortedWriteTra" + + "nsactionsRequest\032$.GetAbortedWriteTransa" + + "ctionsResponse\022A\n\016createSnapshot\022\026.Creat" + + "eSnapshotRequest\032\027.CreateSnapshotRespons" + + "e\022S\n\024keepAliveTransaction\022\034.KeepAliveTra", + "nsactionRequest\032\035.KeepAliveTransactionRe" + + "sponseBI\n\"org.apache.hcatalog.hbase.snap" + + "shotB\035RevisionManagerEndpointProtos\210\001\001\240\001" + + "\001" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + internal_static_CreateTableRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_CreateTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CreateTableRequest_descriptor, + new java.lang.String[] { "TableName", "ColumnFamilies", }); + internal_static_CreateTableResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_CreateTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CreateTableResponse_descriptor, + new java.lang.String[] { }); + internal_static_DropTableRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_DropTableRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_DropTableRequest_descriptor, + new java.lang.String[] { "TableName", }); + internal_static_DropTableResponse_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_DropTableResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_DropTableResponse_descriptor, + new java.lang.String[] { }); + internal_static_BeginWriteTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_BeginWriteTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BeginWriteTransactionRequest_descriptor, + new java.lang.String[] { "TableName", "KeepAlive", "ColumnFamilies", }); + internal_static_BeginWriteTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_BeginWriteTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BeginWriteTransactionResponse_descriptor, + new java.lang.String[] { "Transaction", }); + internal_static_CommitWriteTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_CommitWriteTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CommitWriteTransactionRequest_descriptor, + new java.lang.String[] { "Transaction", }); + internal_static_CommitWriteTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_CommitWriteTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CommitWriteTransactionResponse_descriptor, + new java.lang.String[] { }); + internal_static_AbortWriteTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_AbortWriteTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_AbortWriteTransactionRequest_descriptor, + new java.lang.String[] { "Transaction", }); + internal_static_AbortWriteTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_AbortWriteTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_AbortWriteTransactionResponse_descriptor, + new java.lang.String[] { }); + internal_static_GetAbortedWriteTransactionsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_GetAbortedWriteTransactionsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GetAbortedWriteTransactionsRequest_descriptor, + new java.lang.String[] { "TableName", "ColumnFamily", }); + internal_static_GetAbortedWriteTransactionsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_GetAbortedWriteTransactionsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GetAbortedWriteTransactionsResponse_descriptor, + new java.lang.String[] { "FamilyRevisions", }); + internal_static_CreateSnapshotRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_CreateSnapshotRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CreateSnapshotRequest_descriptor, + new java.lang.String[] { "TableName", "Revision", }); + internal_static_CreateSnapshotResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_CreateSnapshotResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_CreateSnapshotResponse_descriptor, + new java.lang.String[] { "TableSnapshot", }); + internal_static_KeepAliveTransactionRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_KeepAliveTransactionRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_KeepAliveTransactionRequest_descriptor, + new java.lang.String[] { "Transaction", }); + internal_static_KeepAliveTransactionResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_KeepAliveTransactionResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_KeepAliveTransactionResponse_descriptor, + new java.lang.String[] { }); + internal_static_FamilyRevision_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_FamilyRevision_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_FamilyRevision_descriptor, + new java.lang.String[] { "Revision", "Timestamp", }); + internal_static_Transaction_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_Transaction_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Transaction_descriptor, + new java.lang.String[] { "TableName", "TimeStamp", "KeepAlive", "Revision", "ColumnFamilies", }); + internal_static_TableSnapshot_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_TableSnapshot_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_TableSnapshot_descriptor, + new java.lang.String[] { "TableName", "LatestRevision", "ColumnFamilyRevision", }); + internal_static_TableSnapshot_ColumnFamilyRevision_descriptor = + internal_static_TableSnapshot_descriptor.getNestedTypes().get(0); + internal_static_TableSnapshot_ColumnFamilyRevision_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_TableSnapshot_ColumnFamilyRevision_descriptor, + new java.lang.String[] { "Key", "Value", }); + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputFormat.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputFormat.java index 94ba9b5..5bf7b6f 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBaseOutputFormat.java @@ -25,6 +25,7 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.client.Put; +import org.apache.hadoop.hive.hbase.PutWritable; import org.apache.hadoop.hive.ql.io.FSRecordWriter; import org.apache.hadoop.hive.ql.io.HiveOutputFormat; import org.apache.hadoop.io.Writable; @@ -37,9 +38,12 @@ import org.apache.hcatalog.common.HCatUtil; import org.apache.hcatalog.mapreduce.OutputJobInfo; -public class HBaseBaseOutputFormat implements OutputFormat, Put>, - HiveOutputFormat, Put> { - +/** + * Children of this output format can be passed either Put's (typical) or + * PutWritable. PutWritables will come from Hive's HBase SerDe. + */ +public class HBaseBaseOutputFormat implements OutputFormat, Object>, + HiveOutputFormat, Object> { @Override public FSRecordWriter getHiveRecordWriter( JobConf jc, Path finalOutPath, @@ -51,22 +55,34 @@ public FSRecordWriter getHiveRecordWriter( @Override public void checkOutputSpecs(FileSystem ignored, JobConf job) throws IOException { - OutputFormat, Put> outputFormat = getOutputFormat(job); + OutputFormat, Object> outputFormat = getOutputFormat(job); outputFormat.checkOutputSpecs(ignored, job); } @Override - public RecordWriter, Put> getRecordWriter(FileSystem ignored, + public RecordWriter, Object> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException { - OutputFormat, Put> outputFormat = getOutputFormat(job); + HBaseHCatStorageHandler.setHBaseSerializers(job); + OutputFormat, Object> outputFormat = getOutputFormat(job); return outputFormat.getRecordWriter(ignored, job, name, progress); } - private OutputFormat, Put> getOutputFormat(JobConf job) + protected static Put toPut(Object o) { + if(o != null) { + if(o instanceof Put) { + return (Put)o; + } else if(o instanceof PutWritable) { + return ((PutWritable)o).getPut(); + } + } + throw new IllegalArgumentException("Illegal Argument " + (o == null ? "null" : o.getClass().getName())); + } + + private OutputFormat, Object> getOutputFormat(JobConf job) throws IOException { String outputInfo = job.get(HCatConstants.HCAT_KEY_OUTPUT_INFO); OutputJobInfo outputJobInfo = (OutputJobInfo) HCatUtil.deserialize(outputInfo); - OutputFormat, Put> outputFormat = null; + OutputFormat, Object> outputFormat = null; if (HBaseHCatStorageHandler.isBulkMode(outputJobInfo)) { outputFormat = new HBaseBulkOutputFormat(); } else { diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBulkOutputFormat.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBulkOutputFormat.java index b54dc1f..72eb0cc 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBulkOutputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseBulkOutputFormat.java @@ -25,6 +25,7 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; @@ -53,10 +54,10 @@ private final static ImmutableBytesWritable EMPTY_LIST = new ImmutableBytesWritable( new byte[0]); - private SequenceFileOutputFormat, Put> baseOutputFormat; + private SequenceFileOutputFormat, Object> baseOutputFormat; public HBaseBulkOutputFormat() { - baseOutputFormat = new SequenceFileOutputFormat, Put>(); + baseOutputFormat = new SequenceFileOutputFormat, Object>(); } @Override @@ -68,9 +69,10 @@ public void checkOutputSpecs(FileSystem ignored, JobConf job) } @Override - public RecordWriter, Put> getRecordWriter( + public RecordWriter, Object> getRecordWriter( FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException { + HBaseHCatStorageHandler.setHBaseSerializers(job); job.setOutputKeyClass(ImmutableBytesWritable.class); job.setOutputValueClass(Put.class); long version = HBaseRevisionManagerUtil.getOutputRevision(job); @@ -93,26 +95,28 @@ private void addJTDelegationToken(JobConf job) throws IOException { } private static class HBaseBulkRecordWriter implements - RecordWriter, Put> { + RecordWriter, Object> { - private RecordWriter, Put> baseWriter; + private RecordWriter, Object> baseWriter; private final Long outputVersion; public HBaseBulkRecordWriter( - RecordWriter, Put> baseWriter, + RecordWriter, Object> baseWriter, Long outputVersion) { this.baseWriter = baseWriter; this.outputVersion = outputVersion; } @Override - public void write(WritableComparable key, Put value) + public void write(WritableComparable key, Object value) throws IOException { - Put put = value; + Put original = toPut(value); + Put put = original; if (outputVersion != null) { - put = new Put(value.getRow(), outputVersion.longValue()); - for (List row : value.getFamilyMap().values()) { - for (KeyValue el : row) { + put = new Put(original.getRow(), outputVersion.longValue()); + for (List row : original.getFamilyMap().values()) { + for (Cell cell : row) { + KeyValue el = (KeyValue)cell; put.add(el.getFamily(), el.getQualifier(), el.getValue()); } } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseDirectOutputFormat.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseDirectOutputFormat.java index 2b31af3..f437b20 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseDirectOutputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseDirectOutputFormat.java @@ -23,6 +23,7 @@ import java.util.List; import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.mapred.TableOutputFormat; @@ -53,9 +54,10 @@ public HBaseDirectOutputFormat() { } @Override - public RecordWriter, Put> getRecordWriter(FileSystem ignored, + public RecordWriter, Object> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException { + HBaseHCatStorageHandler.setHBaseSerializers(job); long version = HBaseRevisionManagerUtil.getOutputRevision(job); return new HBaseDirectRecordWriter(outputFormat.getRecordWriter(ignored, job, name, progress), version); @@ -69,26 +71,28 @@ public void checkOutputSpecs(FileSystem ignored, JobConf job) } private static class HBaseDirectRecordWriter implements - RecordWriter, Put> { + RecordWriter, Object> { - private RecordWriter, Put> baseWriter; + private RecordWriter, Object> baseWriter; private final Long outputVersion; public HBaseDirectRecordWriter( - RecordWriter, Put> baseWriter, + RecordWriter, Object> baseWriter, Long outputVersion) { this.baseWriter = baseWriter; this.outputVersion = outputVersion; } @Override - public void write(WritableComparable key, Put value) + public void write(WritableComparable key, Object value) throws IOException { - Put put = value; + Put original = toPut(value); + Put put = original; if (outputVersion != null) { - put = new Put(value.getRow(), outputVersion.longValue()); - for (List row : value.getFamilyMap().values()) { - for (KeyValue el : row) { + put = new Put(original.getRow(), outputVersion.longValue()); + for (List row : original.getFamilyMap().values()) { + for (Cell cell : row) { + KeyValue el = (KeyValue)cell; put.add(el.getFamily(), el.getQualifier(), el.getValue()); } } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseHCatStorageHandler.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseHCatStorageHandler.java index 67ab2bc..d7b1c04 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseHCatStorageHandler.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseHCatStorageHandler.java @@ -33,11 +33,12 @@ import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.MasterNotRunningException; -import org.apache.hadoop.hbase.ZooKeeperConnectionException; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.mapred.TableOutputFormat; +import org.apache.hadoop.hbase.mapreduce.KeyValueSerialization; +import org.apache.hadoop.hbase.mapreduce.MutationSerialization; +import org.apache.hadoop.hbase.mapreduce.ResultSerialization; import org.apache.hadoop.hbase.mapreduce.TableInputFormat; import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; import org.apache.hadoop.hbase.util.Bytes; @@ -50,6 +51,7 @@ import org.apache.hadoop.hive.ql.plan.TableDesc; import org.apache.hadoop.hive.ql.security.authorization.HiveAuthorizationProvider; import org.apache.hadoop.hive.serde2.SerDe; +import org.apache.hadoop.io.serializer.WritableSerialization; import org.apache.hadoop.mapred.InputFormat; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.OutputFormat; @@ -87,6 +89,7 @@ public final static String DEFAULT_PREFIX = "default."; private final static String PROPERTY_INT_OUTPUT_LOCATION = "hcat.hbase.mapreduce.intermediateOutputLocation"; + private final static String IO_SERIALIZATIONS = "io.serializations"; private Configuration hbaseConf; private Configuration jobConf; @@ -135,7 +138,7 @@ public void configureInputJobProperties(TableDesc tableDesc, Map //TODO: Remove when HCAT-308 is fixed addOutputDependencyJars(jobConf); jobProperties.put("tmpjars", jobConf.get("tmpjars")); - + setHBaseSerializers(jobProperties); } catch (IOException e) { throw new IllegalStateException("Error while configuring job properties", e); } @@ -191,7 +194,7 @@ public void configureOutputJobProperties(TableDesc tableDesc, Map(uniqueColumnFamilies)); - } catch (MasterNotRunningException mnre) { - throw new MetaException(StringUtils.stringifyException(mnre)); - } catch (IOException ie) { - throw new MetaException(StringUtils.stringifyException(ie)); - } catch (IllegalArgumentException iae) { - throw new MetaException(StringUtils.stringifyException(iae)); + } catch (Exception e) { + throw new MetaException(StringUtils.stringifyException(e)); } } @@ -406,10 +405,8 @@ private HBaseAdmin getHBaseAdmin() throws MetaException { admin = new HBaseAdmin(this.getConf()); } return admin; - } catch (MasterNotRunningException mnre) { - throw new MetaException(StringUtils.stringifyException(mnre)); - } catch (ZooKeeperConnectionException zkce) { - throw new MetaException(StringUtils.stringifyException(zkce)); + } catch (Exception e) { + throw new MetaException(StringUtils.stringifyException(e)); } } @@ -544,8 +541,10 @@ private void addOutputDependencyJars(Configuration conf) throws IOException { TableMapReduceUtil.addDependencyJars(conf, //ZK ZooKeeper.class, - //HBase + //HBase Client HTable.class, + //HBase MapReduce + MutationSerialization.class, //Hive HiveException.class, //HCatalog jar @@ -634,4 +633,20 @@ private String getScanColumns(HCatTableInfo tableInfo, String outputColSchema) t return builder.toString(); } + static void setHBaseSerializers(Configuration configuration) { + configuration.setStrings(IO_SERIALIZATIONS, configuration.get(IO_SERIALIZATIONS), + MutationSerialization.class.getName(), ResultSerialization.class.getName(), + KeyValueSerialization.class.getName()); + } + static void setHBaseSerializers(Map configuration) { + String value = ""; + if(configuration.containsKey(IO_SERIALIZATIONS)) { + value = configuration.get(IO_SERIALIZATIONS) + ","; + } else { + value = new Configuration().get(IO_SERIALIZATIONS, WritableSerialization.class.getName()) + ","; + } + value += MutationSerialization.class.getName() + "," + ResultSerialization.class.getName() + + "," + KeyValueSerialization.class.getName(); + configuration.put(IO_SERIALIZATIONS, value); + } } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputFormat.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputFormat.java index 7f8444c..eb72825 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HBaseInputFormat.java @@ -23,11 +23,11 @@ import java.util.List; import org.apache.hadoop.hbase.client.HTable; -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.mapred.TableSplit; import org.apache.hadoop.hbase.mapreduce.TableInputFormat; +import org.apache.hadoop.hive.hbase.ResultWritable; import org.apache.hive.hcatalog.mapreduce.HCatMapRedUtil; import org.apache.hadoop.mapred.InputFormat; import org.apache.hadoop.mapred.InputSplit; @@ -41,7 +41,7 @@ /** * This class HBaseInputFormat is a wrapper class of TableInputFormat in HBase. */ -class HBaseInputFormat implements InputFormat { +class HBaseInputFormat implements InputFormat { private final TableInputFormat inputFormat; @@ -66,7 +66,7 @@ public HBaseInputFormat() { * org.apache.hadoop.mapreduce.TaskAttemptContext) */ @Override - public RecordReader getRecordReader( + public RecordReader getRecordReader( InputSplit split, JobConf job, Reporter reporter) throws IOException { String jobString = job.get(HCatConstants.HCAT_KEY_JOB_INFO); diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HbaseSnapshotRecordReader.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HbaseSnapshotRecordReader.java index 49d05cc..23a7425 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HbaseSnapshotRecordReader.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/HbaseSnapshotRecordReader.java @@ -35,8 +35,7 @@ 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.DataInputBuffer; -import org.apache.hadoop.io.DataOutputBuffer; +import org.apache.hadoop.hive.hbase.ResultWritable; import org.apache.hadoop.mapred.RecordReader; import org.apache.hcatalog.common.HCatUtil; import org.apache.hcatalog.hbase.snapshot.FamilyRevision; @@ -50,7 +49,7 @@ * The Class HbaseSnapshotRecordReader implements logic for filtering records * based on snapshot. */ -class HbaseSnapshotRecordReader implements RecordReader { +class HbaseSnapshotRecordReader implements RecordReader { static final Logger LOG = LoggerFactory.getLogger(HbaseSnapshotRecordReader.class); private final InputJobInfo inpJobInfo; @@ -62,8 +61,6 @@ private TableSnapshot snapshot; private Iterator resultItr; private Set allAbortedTransactions; - private DataOutputBuffer valueOut = new DataOutputBuffer(); - private DataInputBuffer valueIn = new DataInputBuffer(); HbaseSnapshotRecordReader(InputJobInfo inputJobInfo, Configuration conf) throws IOException { this.inpJobInfo = inputJobInfo; @@ -152,8 +149,8 @@ public ImmutableBytesWritable createKey() { } @Override - public Result createValue() { - return new Result(); + public ResultWritable createValue() { + return new ResultWritable(); } @Override @@ -170,7 +167,7 @@ public float getProgress() throws IOException { } @Override - public boolean next(ImmutableBytesWritable key, Result value) throws IOException { + public boolean next(ImmutableBytesWritable key, ResultWritable value) throws IOException { if (this.resultItr == null) { LOG.warn("The HBase result iterator is found null. It is possible" + " that the record reader has already been closed."); @@ -182,10 +179,7 @@ public boolean next(ImmutableBytesWritable key, Result value) throws IOException // Update key and value. Currently no way to avoid serialization/de-serialization // as no setters are available. key.set(hbaseRow.getRow()); - valueOut.reset(); - hbaseRow.write(valueOut); - valueIn.reset(valueOut.getData(), valueOut.getLength()); - value.readFields(valueIn); + value.setResult(hbaseRow); return true; } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/ImportSequenceFile.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/ImportSequenceFile.java index b9761b9..990875a 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/ImportSequenceFile.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/ImportSequenceFile.java @@ -19,23 +19,22 @@ package org.apache.hcatalog.hbase; -import org.apache.hadoop.filecache.DistributedCache; -import org.apache.hadoop.fs.FileSystem; -import org.apache.hadoop.fs.permission.FsPermission; -import org.apache.hadoop.hbase.mapreduce.HFileOutputFormat; -import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles; -import org.apache.hadoop.hbase.mapreduce.PutSortReducer; -import org.apache.hadoop.hbase.mapreduce.hadoopbackport.TotalOrderPartitioner; - import java.io.IOException; import java.net.URI; +import java.net.URISyntaxException; import java.util.Map; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.filecache.DistributedCache; +import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; +import org.apache.hadoop.hbase.mapreduce.HFileOutputFormat; +import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles; +import org.apache.hadoop.hbase.mapreduce.PutSortReducer; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.JobContext; import org.apache.hadoop.mapreduce.JobStatus; @@ -47,11 +46,10 @@ import org.apache.hadoop.mapreduce.lib.input.SequenceFileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import org.apache.hive.hcatalog.mapreduce.HCatMapRedUtil; +import org.apache.hadoop.mapreduce.lib.partition.TotalOrderPartitioner; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.apache.hadoop.hbase.mapreduce.hadoopbackport.TotalOrderPartitioner.DEFAULT_PATH; - /** * MapReduce job which reads a series of Puts stored in a sequence file @@ -71,12 +69,8 @@ @Override public void map(ImmutableBytesWritable rowKey, Put value, Context context) - throws IOException { - try { - context.write(new ImmutableBytesWritable(value.getRow()), value); - } catch (InterruptedException e) { - e.printStackTrace(); - } + throws IOException, InterruptedException { + context.write(new ImmutableBytesWritable(value.getRow()), value); } } @@ -158,6 +152,7 @@ private void cleanupScratch(JobContext context) throws IOException { private static Job createSubmittableJob(Configuration conf, String tableName, Path inputDir, Path scratchDir, boolean localMode) throws IOException { + HBaseHCatStorageHandler.setHBaseSerializers(conf); Job job = new Job(conf, NAME + "_" + tableName); job.setJarByClass(SequenceFileImporter.class); FileInputFormat.setInputPaths(job, inputDir); @@ -170,18 +165,35 @@ private static Job createSubmittableJob(Configuration conf, String tableName, Pa job.setMapOutputKeyClass(ImmutableBytesWritable.class); job.setMapOutputValueClass(Put.class); HFileOutputFormat.configureIncrementalLoad(job, table); + URI partitionURI; + try { + partitionURI = new URI(TotalOrderPartitioner.getPartitionFile(job.getConfiguration()) + + "#" + TotalOrderPartitioner.DEFAULT_PATH); + } catch (URISyntaxException e) { + throw new IOException(e); + } + DistributedCache.addCacheFile(partitionURI, job.getConfiguration()); + DistributedCache.createSymlink(job.getConfiguration()); //override OutputFormatClass with our own so we can include cleanup in the committer job.setOutputFormatClass(ImporterOutputFormat.class); //local mode doesn't support symbolic links so we have to manually set the actual path if (localMode) { String partitionFile = null; - for (URI uri : DistributedCache.getCacheFiles(job.getConfiguration())) { - if (DEFAULT_PATH.equals(uri.getFragment())) { + URI[] uris = DistributedCache.getCacheFiles(job.getConfiguration()); + if(uris == null) { + throw new IllegalStateException("No cache file existed in job configuration"); + } + for (URI uri : uris) { + if (TotalOrderPartitioner.DEFAULT_PATH.equals(uri.getFragment())) { partitionFile = uri.toString(); break; } } + if(partitionFile == null) { + throw new IllegalStateException("Unable to find " + + TotalOrderPartitioner.DEFAULT_PATH + " in cache"); + } partitionFile = partitionFile.substring(0, partitionFile.lastIndexOf("#")); job.getConfiguration().set(TotalOrderPartitioner.PARTITIONER_PATH, partitionFile.toString()); } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RPCConverter.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RPCConverter.java new file mode 100644 index 0000000..c5c4633 --- /dev/null +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RPCConverter.java @@ -0,0 +1,72 @@ +/** + * 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.hcatalog.hbase.snapshot; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RPCConverter { + + List convertFamilyRevisions(List revisions) { + List result = new ArrayList(); + for(RevisionManagerEndpointProtos.FamilyRevision revision : revisions) { + result.add(new FamilyRevision(revision.getRevision(), revision.getTimestamp())); + } + return result; + } + RevisionManagerEndpointProtos.TableSnapshot convertTableSnapshot(TableSnapshot tableSnapshot) { + RevisionManagerEndpointProtos.TableSnapshot.Builder builder = + RevisionManagerEndpointProtos.TableSnapshot.newBuilder() + .setTableName(tableSnapshot.getTableName()) + .setLatestRevision(tableSnapshot.getLatestRevision()); + Map cfRevisionMap = tableSnapshot.getColumnFamilyRevisionMap(); + for(Map.Entry entry : cfRevisionMap.entrySet()) { + builder.addColumnFamilyRevision(RevisionManagerEndpointProtos.TableSnapshot. + ColumnFamilyRevision.newBuilder() + .setKey(entry.getKey()) + .setValue(entry.getValue()).build()); + } + return builder.build(); + } + + TableSnapshot convertTableSnapshot(RevisionManagerEndpointProtos.TableSnapshot tableSnapshot) { + Map columnFamilyRevisions = new HashMap(); + for(RevisionManagerEndpointProtos.TableSnapshot.ColumnFamilyRevision rev : tableSnapshot.getColumnFamilyRevisionList()) { + columnFamilyRevisions.put(rev.getKey(), rev.getValue()); + } + return new TableSnapshot(tableSnapshot.getTableName(), columnFamilyRevisions, tableSnapshot.getLatestRevision()); + } + + RevisionManagerEndpointProtos.Transaction convertTransaction(Transaction transaction) { + return RevisionManagerEndpointProtos.Transaction.newBuilder() + .setTableName(transaction.getTableName()) + .addAllColumnFamilies(transaction.getColumnFamilies()) + .setRevision(transaction.getRevisionNumber()) + .setTimeStamp(transaction.getTimeStamp()) + .setKeepAlive(transaction.getKeepAliveValue()) + .build(); + } + Transaction convertTransaction(RevisionManagerEndpointProtos.Transaction transaction) { + Transaction result = new Transaction(transaction.getTableName(), transaction.getColumnFamiliesList(), transaction.getRevision(), transaction.getTimeStamp()); + result.setKeepAlive(transaction.getKeepAlive()); + return result; + } +} diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManager.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManager.java index b0d412c..e14e151 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManager.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManager.java @@ -93,7 +93,7 @@ public Transaction beginWriteTransaction(String table, List families) */ @Deprecated public Transaction beginWriteTransaction(String table, - List families, long keepAlive) throws IOException; + List families, Long keepAlive) throws IOException; /** * Commit the write transaction. @@ -146,7 +146,7 @@ public void abortWriteTransaction(Transaction transaction) * @throws IOException */ @Deprecated - public TableSnapshot createSnapshot(String tableName, long revision) + public TableSnapshot createSnapshot(String tableName, Long revision) throws IOException; /** diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.java index 3b571ea..f350bfd 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.java @@ -19,14 +19,36 @@ package org.apache.hcatalog.hbase.snapshot; import java.io.IOException; -import java.util.List; import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.hbase.Coprocessor; import org.apache.hadoop.hbase.CoprocessorEnvironment; -import org.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor; +import org.apache.hadoop.hbase.coprocessor.CoprocessorService; +import org.apache.hadoop.hbase.protobuf.ResponseConverter; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.RevisionManagerEndpointService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import com.google.protobuf.RpcCallback; +import com.google.protobuf.RpcController; +import com.google.protobuf.Service; + /** * Implementation of RevisionManager as HBase RPC endpoint. This class will control the lifecycle of * and delegate to the actual RevisionManager implementation and make it available as a service @@ -34,21 +56,21 @@ * In the case of {@link ZKBasedRevisionManager} now only the region servers need write access to * manage revision data. */ -public class RevisionManagerEndpoint extends BaseEndpointCoprocessor implements RevisionManagerProtocol { +public class RevisionManagerEndpoint extends RevisionManagerEndpointService implements Coprocessor, CoprocessorService { private static final Logger LOGGER = LoggerFactory.getLogger(RevisionManagerEndpoint.class.getName()); + private final RPCConverter rpcConverter = new RPCConverter(); private RevisionManager rmImpl = null; @Override public void start(CoprocessorEnvironment env) { - super.start(env); try { Configuration conf = RevisionManagerConfiguration.create(env.getConfiguration()); String className = conf.get(RMConstants.REVISION_MGR_ENDPOINT_IMPL_CLASS, ZKBasedRevisionManager.class.getName()); - LOGGER.debug("Using Revision Manager implementation: {}", className); + LOGGER.info("Using Revision Manager implementation: {}", className); rmImpl = RevisionManagerFactory.getOpenedRevisionManager(className, conf); } catch (IOException e) { LOGGER.error("Failed to initialize revision manager", e); @@ -57,85 +79,140 @@ public void start(CoprocessorEnvironment env) { @Override public void stop(CoprocessorEnvironment env) { - if (rmImpl != null) { - try { + try { + if (rmImpl != null) { rmImpl.close(); - } catch (IOException e) { - LOGGER.warn("Error closing revision manager.", e); } + } catch (IOException e) { + LOGGER.warn("Error closing revision manager.", e); } - super.stop(env); - } - - @Override - public void initialize(Configuration conf) { - // do nothing, HBase controls life cycle - } - - @Override - public void open() throws IOException { - // do nothing, HBase controls life cycle } @Override - public void close() throws IOException { - // do nothing, HBase controls life cycle + public Service getService() { + return this; } @Override - public void createTable(String table, List columnFamilies) throws IOException { - rmImpl.createTable(table, columnFamilies); - } - - @Override - public void dropTable(String table) throws IOException { - rmImpl.dropTable(table); - } - - @Override - public Transaction beginWriteTransaction(String table, List families) - throws IOException { - return rmImpl.beginWriteTransaction(table, families); + public void createTable(RpcController controller, + CreateTableRequest request, RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.createTable(request.getTableName(), request.getColumnFamiliesList()); + done.run(CreateTableResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public Transaction beginWriteTransaction(String table, - List families, long keepAlive) throws IOException { - return rmImpl.beginWriteTransaction(table, families, keepAlive); + public void dropTable(RpcController controller, DropTableRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.dropTable(request.getTableName()); + done.run(DropTableResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public void commitWriteTransaction(Transaction transaction) - throws IOException { - rmImpl.commitWriteTransaction(transaction); + public void beginWriteTransaction(RpcController controller, + BeginWriteTransactionRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + Transaction transaction; + if(request.hasKeepAlive()) { + transaction = rmImpl.beginWriteTransaction(request.getTableName(), request.getColumnFamiliesList(), + request.getKeepAlive()); + } else { + transaction = rmImpl.beginWriteTransaction(request.getTableName(), request.getColumnFamiliesList()); + } + done.run(BeginWriteTransactionResponse.newBuilder() + .setTransaction(rpcConverter.convertTransaction(transaction)).build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public void abortWriteTransaction(Transaction transaction) - throws IOException { - rmImpl.abortWriteTransaction(transaction); + public void commitWriteTransaction(RpcController controller, + CommitWriteTransactionRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.commitWriteTransaction(rpcConverter.convertTransaction(request.getTransaction())); + done.run(CommitWriteTransactionResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public TableSnapshot createSnapshot(String tableName) throws IOException { - return rmImpl.createSnapshot(tableName); + public void abortWriteTransaction(RpcController controller, + AbortWriteTransactionRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.abortWriteTransaction(rpcConverter.convertTransaction(request.getTransaction())); + done.run(AbortWriteTransactionResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public TableSnapshot createSnapshot(String tableName, long revision) - throws IOException { - return rmImpl.createSnapshot(tableName, revision); + public void getAbortedWriteTransactions(RpcController controller, + GetAbortedWriteTransactionsRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.getAbortedWriteTransactions(request.getTableName(), request.getColumnFamily()); + done.run(GetAbortedWriteTransactionsResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public void keepAlive(Transaction transaction) throws IOException { - rmImpl.keepAlive(transaction); + public void createSnapshot(RpcController controller, + CreateSnapshotRequest request, RpcCallback done) { + if(rmImpl != null) { + try { + TableSnapshot snapshot; + if(request.hasRevision()) { + snapshot = rmImpl.createSnapshot(request.getTableName(), request.getRevision()); + } else { + snapshot = rmImpl.createSnapshot(request.getTableName()); + } + done.run(CreateSnapshotResponse.newBuilder() + .setTableSnapshot(rpcConverter.convertTableSnapshot(snapshot)).build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } @Override - public List getAbortedWriteTransactions(String table, - String columnFamily) throws IOException { - return rmImpl.getAbortedWriteTransactions(table, columnFamily); + public void keepAliveTransaction(RpcController controller, + KeepAliveTransactionRequest request, + RpcCallback done) { + if(rmImpl != null) { + try { + rmImpl.keepAlive(rpcConverter.convertTransaction(request.getTransaction())); + done.run(KeepAliveTransactionResponse.newBuilder().build()); + } catch(IOException e) { + ResponseConverter.setControllerException(controller, e); + } + } } } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointClient.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointClient.java index a25da22..707bcc2 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointClient.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpointClient.java @@ -21,12 +21,33 @@ import java.io.IOException; import java.util.List; +import java.util.Map; import org.apache.hadoop.conf.Configurable; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.HTable; -import org.apache.hadoop.hbase.util.Bytes; +import org.apache.hadoop.hbase.client.coprocessor.Batch; +import org.apache.hadoop.hbase.ipc.BlockingRpcCallback; +import org.apache.hadoop.hbase.ipc.ServerRpcController; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.AbortWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.BeginWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CommitWriteTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateSnapshotResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.CreateTableResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.DropTableResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.GetAbortedWriteTransactionsResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionRequest; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.KeepAliveTransactionResponse; +import org.apache.hcatalog.hbase.snapshot.RevisionManagerEndpointProtos.RevisionManagerEndpointService; /** * This class is nothing but a delegate for the enclosed proxy, @@ -34,17 +55,18 @@ */ public class RevisionManagerEndpointClient implements RevisionManager, Configurable { - private Configuration conf = null; - private RevisionManager rmProxy; + private final RPCConverter rpcConverter = new RPCConverter(); + private Configuration conf; + private HTable htable; @Override public Configuration getConf() { - return this.conf; + return conf; } @Override - public void setConf(Configuration arg0) { - this.conf = arg0; + public void setConf(Configuration conf) { + this.conf = conf; } @Override @@ -56,70 +78,207 @@ public void initialize(Configuration conf) { public void open() throws IOException { // clone to adjust RPC settings unique to proxy Configuration clonedConf = new Configuration(conf); - // conf.set("hbase.ipc.client.connect.max.retries", "0"); - // conf.setInt(HConstants.HBASE_CLIENT_RPC_MAXATTEMPTS, 1); clonedConf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1); // do not retry RPC - HTable table = new HTable(clonedConf, HConstants.ROOT_TABLE_NAME); - rmProxy = table.coprocessorProxy(RevisionManagerProtocol.class, - Bytes.toBytes("anyRow")); - rmProxy.open(); + htable = new HTable(clonedConf, TableName.META_TABLE_NAME.getNameAsString()); } @Override public void close() throws IOException { - rmProxy.close(); + htable.close(); } @Override - public void createTable(String table, List columnFamilies) throws IOException { - rmProxy.createTable(table, columnFamilies); + public void createTable(final String table, final List columnFamilies) throws IOException { + call(new Batch.Call() { + @Override + public Void call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + CreateTableRequest request = CreateTableRequest.newBuilder() + .setTableName(table).addAllColumnFamilies(columnFamilies).build(); + service.createTable(controller, request, done); + blockOnResponse(done, controller); + return null; + } + }); } @Override - public void dropTable(String table) throws IOException { - rmProxy.dropTable(table); + public void dropTable(final String table) throws IOException { + call(new Batch.Call() { + @Override + public Void call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + DropTableRequest request = DropTableRequest.newBuilder() + .setTableName(table).build(); + service.dropTable(null, request, done); + blockOnResponse(done, controller); + return null; + } + }); } @Override - public Transaction beginWriteTransaction(String table, List families) throws IOException { - return rmProxy.beginWriteTransaction(table, families); + public Transaction beginWriteTransaction(final String table, final List families) throws IOException { + return beginWriteTransaction(table, families, null); } @Override - public Transaction beginWriteTransaction(String table, List families, long keepAlive) + public Transaction beginWriteTransaction(final String table, final List families, final Long keepAlive) throws IOException { - return rmProxy.beginWriteTransaction(table, families, keepAlive); + return call(new Batch.Call() { + @Override + public Transaction call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + BeginWriteTransactionRequest.Builder builder = BeginWriteTransactionRequest.newBuilder() + .setTableName(table) + .addAllColumnFamilies(families); + if(keepAlive != null) { + builder.setKeepAlive(keepAlive); + } + service.beginWriteTransaction(controller, builder.build(), done); + return rpcConverter.convertTransaction(blockOnResponse(done, controller).getTransaction()); + } + }); } @Override - public void commitWriteTransaction(Transaction transaction) throws IOException { - rmProxy.commitWriteTransaction(transaction); + public void commitWriteTransaction(final Transaction transaction) throws IOException { + call(new Batch.Call() { + @Override + public Void call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + CommitWriteTransactionRequest request = CommitWriteTransactionRequest.newBuilder() + .setTransaction(rpcConverter.convertTransaction(transaction)).build(); + service.commitWriteTransaction(controller, request, done); + blockOnResponse(done, controller); + return null; + } + }); } @Override - public void abortWriteTransaction(Transaction transaction) throws IOException { - rmProxy.abortWriteTransaction(transaction); + public void abortWriteTransaction(final Transaction transaction) throws IOException { + call(new Batch.Call() { + @Override + public Void call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + AbortWriteTransactionRequest request = AbortWriteTransactionRequest.newBuilder() + .setTransaction(rpcConverter.convertTransaction(transaction)).build(); + service.abortWriteTransaction(controller, request, done); + blockOnResponse(done, controller); + return null; + } + }); } @Override - public List getAbortedWriteTransactions(String table, String columnFamily) + public List getAbortedWriteTransactions(final String table, final String columnFamily) throws IOException { - return rmProxy.getAbortedWriteTransactions(table, columnFamily); + return call(new Batch.Call>() { + @Override + public List call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + GetAbortedWriteTransactionsRequest request = GetAbortedWriteTransactionsRequest.newBuilder() + .setTableName(table) + .setColumnFamily(columnFamily) + .build(); + service.getAbortedWriteTransactions(controller, request, done); + return rpcConverter.convertFamilyRevisions(blockOnResponse(done, controller).getFamilyRevisionsList()); + } + }); } @Override public TableSnapshot createSnapshot(String tableName) throws IOException { - return rmProxy.createSnapshot(tableName); + return createSnapshot(tableName, null); } @Override - public TableSnapshot createSnapshot(String tableName, long revision) throws IOException { - return rmProxy.createSnapshot(tableName, revision); + public TableSnapshot createSnapshot(final String tableName, final Long revision) throws IOException { + return call(new Batch.Call() { + @Override + public TableSnapshot call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + CreateSnapshotRequest.Builder builder = CreateSnapshotRequest.newBuilder() + .setTableName(tableName); + if(revision != null) { + builder.setRevision(revision); + } + service.createSnapshot(controller, builder.build(), done); + return rpcConverter.convertTableSnapshot(blockOnResponse(done, controller).getTableSnapshot()); + } + }); } @Override - public void keepAlive(Transaction transaction) throws IOException { - rmProxy.keepAlive(transaction); + public void keepAlive(final Transaction transaction) throws IOException { + call(new Batch.Call() { + @Override + public Void call(RevisionManagerEndpointService service) + throws IOException { + ServerRpcController controller = new ServerRpcController(); + BlockingRpcCallback done = + new BlockingRpcCallback(); + KeepAliveTransactionRequest request = KeepAliveTransactionRequest.newBuilder() + .setTransaction(rpcConverter.convertTransaction(transaction)).build(); + service.keepAliveTransaction(controller, request, done); + blockOnResponse(done, controller); + return null; + } + }); + } + private R blockOnResponse(BlockingRpcCallback done, ServerRpcController controller) + throws IOException { + R response = done.get(); + if(controller.failedOnException()) { + throw controller.getFailedOn(); + } + if(controller.failed()) { + String error = controller.errorText(); + if(error == null) { + error = "Server indicated failure but error text was empty"; + } + throw new RuntimeException(error); + } + return response; + } + private R call(Batch.Call callable) throws IOException { + try { + Map result = htable.coprocessorService(RevisionManagerEndpointService.class, null, null, callable); + if(result.isEmpty()) { + return null; + } + return result.values().iterator().next(); + } catch(IOException e) { + throw (IOException)e; + } catch(RuntimeException e) { + throw (RuntimeException)e; + } catch(Error e) { + throw (Error)e; + } catch(Throwable throwable) { + throw new RuntimeException(throwable); + } } } diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerProtocol.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerProtocol.java deleted file mode 100644 index a46ce39..0000000 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/RevisionManagerProtocol.java +++ /dev/null @@ -1,30 +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.hcatalog.hbase.snapshot; - -import org.apache.hadoop.hbase.ipc.CoprocessorProtocol; - -/** - * Interface marker to implement RevisionManager as Coprocessor. - * (needs to extend CoprocessorProtocol) - */ -public interface RevisionManagerProtocol extends RevisionManager, - CoprocessorProtocol { - -} diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/TableSnapshot.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/TableSnapshot.java index beb6513..be66f16 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/TableSnapshot.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/TableSnapshot.java @@ -59,7 +59,14 @@ public String getTableName() { * @return List A list of column families associated with the snapshot. */ public List getColumnFamilies(){ - return new ArrayList(this.cfRevisionMap.keySet()); + return new ArrayList(this.cfRevisionMap.keySet()); + } + + /** + * For wire serialization only + */ + Map getColumnFamilyRevisionMap() { + return cfRevisionMap; } /** diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/Transaction.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/Transaction.java index 09a5f89..f93a8ad 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/Transaction.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/Transaction.java @@ -64,6 +64,13 @@ public String getTableName() { } /** + * For wire serialization only + */ + long getTimeStamp() { + return timeStamp; + } + + /** * @return The expire timestamp associated with a transaction. */ long getTransactionExpireTimeStamp() { diff --git a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/ZKBasedRevisionManager.java b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/ZKBasedRevisionManager.java index 89f2868..e4b925f 100644 --- a/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/ZKBasedRevisionManager.java +++ b/hcatalog/storage-handlers/hbase/src/java/org/apache/hcatalog/hbase/snapshot/ZKBasedRevisionManager.java @@ -119,7 +119,7 @@ public void dropTable(String table) throws IOException { * @see org.apache.hcatalog.hbase.snapshot.RevisionManager#beginWriteTransaction(java.lang.String, java.util.List, long) */ public Transaction beginWriteTransaction(String table, - List families, long keepAlive) throws IOException { + List families, Long keepAlive) throws IOException { checkInputParams(table, families); zkUtil.setUpZnodesForTable(table, families); @@ -175,7 +175,7 @@ public Transaction beginWriteTransaction(String table, */ public Transaction beginWriteTransaction(String table, List families) throws IOException { - return beginWriteTransaction(table, families, -1); + return beginWriteTransaction(table, families, -1L); } /** @@ -352,7 +352,7 @@ public TableSnapshot createSnapshot(String tableName) throws IOException { /* @throws IOException * @see org.apache.hcatalog.hbase.snapshot.RevsionManager#createSnapshot(java.lang.String, long) */ - public TableSnapshot createSnapshot(String tableName, long revision) throws IOException { + public TableSnapshot createSnapshot(String tableName, Long revision) throws IOException { long currentID = zkUtil.currentID(tableName); if (revision > currentID) { diff --git a/hcatalog/storage-handlers/hbase/src/protobuf/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.proto b/hcatalog/storage-handlers/hbase/src/protobuf/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.proto new file mode 100644 index 0000000..c6bd2f7 --- /dev/null +++ b/hcatalog/storage-handlers/hbase/src/protobuf/org/apache/hcatalog/hbase/snapshot/RevisionManagerEndpoint.proto @@ -0,0 +1,104 @@ +/** + * 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. + */ +option java_package = "org.apache.hcatalog.hbase.snapshot"; +option java_outer_classname = "RevisionManagerEndpointProtos"; +option java_generic_services = true; +option java_generate_equals_and_hash = true; + +message CreateTableRequest { + required string table_name = 1; + repeated string column_families = 2; +} +message CreateTableResponse {} + +message DropTableRequest { + required string table_name = 1; +} +message DropTableResponse {} + +message BeginWriteTransactionRequest { + required string table_name = 1; + optional int64 keep_alive = 2; + repeated string column_families = 3; +} +message BeginWriteTransactionResponse { + required Transaction transaction = 1; +} + +message CommitWriteTransactionRequest { + required Transaction transaction = 1; +} +message CommitWriteTransactionResponse {} + +message AbortWriteTransactionRequest { + required Transaction transaction = 1; +} +message AbortWriteTransactionResponse {} + +message GetAbortedWriteTransactionsRequest { + required string table_name = 1; + required string column_family = 2; +} +message GetAbortedWriteTransactionsResponse { + repeated FamilyRevision family_revisions = 1; +} + +message CreateSnapshotRequest { + required string table_name = 1; + optional int64 revision = 2; +} +message CreateSnapshotResponse { + required TableSnapshot table_snapshot = 1; +} + +message KeepAliveTransactionRequest { + required Transaction transaction = 1; +} +message KeepAliveTransactionResponse{} + +message FamilyRevision { + required int64 revision = 1; + required int64 timestamp = 2; +} +message Transaction { + required string table_name = 1; + required int64 time_stamp = 2; + required int64 keep_alive = 3; + required int64 revision = 4; + repeated string column_families = 5; +} +message TableSnapshot { + required string table_name = 1; + required int64 latest_revision = 2; + message ColumnFamilyRevision { + required string key = 1; + required int64 value = 2; + } + repeated ColumnFamilyRevision column_family_revision = 3; +} + +service RevisionManagerEndpointService { + rpc createTable(CreateTableRequest) returns(CreateTableResponse); + rpc dropTable(DropTableRequest) returns(DropTableResponse); + rpc beginWriteTransaction(BeginWriteTransactionRequest) returns(BeginWriteTransactionResponse); + rpc commitWriteTransaction(CommitWriteTransactionRequest) returns(CommitWriteTransactionResponse); + rpc abortWriteTransaction(AbortWriteTransactionRequest) returns(AbortWriteTransactionResponse); + rpc getAbortedWriteTransactions(GetAbortedWriteTransactionsRequest) returns(GetAbortedWriteTransactionsResponse); + rpc createSnapshot(CreateSnapshotRequest) returns(CreateSnapshotResponse); + rpc keepAliveTransaction(KeepAliveTransactionRequest) returns (KeepAliveTransactionResponse); +} diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java index 4f8f357..f3bf756 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/ManyMiniCluster.java @@ -24,6 +24,7 @@ import org.apache.hadoop.fs.FileUtil; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.MiniHBaseCluster; import org.apache.hadoop.hbase.client.HConnectionManager; import org.apache.hadoop.hbase.client.HTable; @@ -121,7 +122,7 @@ protected synchronized void start() { protected synchronized void stop() { if (hbaseCluster != null) { - HConnectionManager.deleteAllConnections(true); + HConnectionManager.deleteAllConnections(); try { hbaseCluster.shutdown(); } catch (Exception e) { @@ -266,7 +267,7 @@ private void setupHBaseCluster() { hbaseCluster = new MiniHBaseCluster(hbaseConf, numRegionServers); hbaseConf.set("hbase.master", hbaseCluster.getMaster().getServerName().getHostAndPort()); //opening the META table ensures that cluster is running - new HTable(hbaseConf, HConstants.META_TABLE_NAME); + new HTable(hbaseConf, TableName.META_TABLE_NAME.getNameAsString()); } catch (Exception e) { throw new IllegalStateException("Failed to setup HBase Cluster", e); } diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java index 32e8dd7..712b67b 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseBulkOutputFormat.java @@ -19,6 +19,15 @@ package org.apache.hcatalog.hbase; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FSDataOutputStream; import org.apache.hadoop.fs.FileSystem; @@ -70,15 +79,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - /** * Tests components of HBaseHCatStorageHandler using ManyMiniCluster. * Including ImprtSequenceFile and HBaseBulkOutputFormat @@ -252,6 +252,7 @@ public void hbaseBulkOutputFormatTest() throws IOException, ClassNotFoundExcepti } index++; } + table.close(); //test if load count is the same assertEquals(data.length, index); //test if scratch directory was erased @@ -291,6 +292,7 @@ public void importSequenceFileTest() throws IOException, ClassNotFoundException, //create job + HBaseHCatStorageHandler.setHBaseSerializers(conf); Job job = new Job(conf, testName); job.setWorkingDirectory(new Path(methodTestDir, "mr_work")); job.setJarByClass(this.getClass()); @@ -329,6 +331,7 @@ public void importSequenceFileTest() throws IOException, ClassNotFoundException, } index++; } + table.close(); //test if load count is the same assertEquals(data.length, index); //test if scratch directory was erased @@ -426,6 +429,7 @@ public void bulkModeHCatOutputFormatTest() throws Exception { } index++; } + table.close(); //test if load count is the same assertEquals(data.length, index); } @@ -508,6 +512,7 @@ public void bulkModeHCatOutputFormatTestWithDefaultDB() throws Exception { } index++; } + table.close(); //test if load count is the same assertEquals(data.length, index); } @@ -602,6 +607,7 @@ public void bulkModeAbortTest() throws Exception { job.setOutputKeyClass(BytesWritable.class); job.setOutputValueClass(Text.class); job.setNumReduceTasks(0); + table.close(); assertTrue(job.waitForCompletion(true)); } diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java index 7ae762a..f26e681 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHBaseDirectOutputFormat.java @@ -183,6 +183,7 @@ public void directOutputFormatTest() throws IOException, ClassNotFoundException, } index++; } + table.close(); assertEquals(data.length, index); } @@ -350,6 +351,7 @@ public void directModeAbortTest() throws Exception { } count++; } + table.close(); assertEquals(data.length - 1, count); // verify that the inputformat returns empty results. diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java index b257fa9..7c82116 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/TestHCatHBaseInputFormat.java @@ -45,6 +45,7 @@ import org.apache.hadoop.hive.cli.CliSessionState; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.hbase.ResultWritable; import org.apache.hadoop.hive.metastore.MetaStoreUtils; import org.apache.hadoop.hive.ql.processors.CommandProcessorResponse; import org.apache.hadoop.hive.ql.session.SessionState; @@ -540,7 +541,7 @@ public void map(ImmutableBytesWritable key, HCatRecord value, } static class MapReadProjectionHTable - implements org.apache.hadoop.mapred.Mapper, Text> { + implements org.apache.hadoop.mapred.Mapper, Text> { static boolean error = false; static int count = 0; @@ -554,9 +555,17 @@ public void close() throws IOException { } @Override - public void map(ImmutableBytesWritable key, Result result, + public void map(ImmutableBytesWritable key, Object resultObj, OutputCollector, Text> output, Reporter reporter) throws IOException { + Result result; + if (resultObj instanceof Result){ + result = (Result) resultObj; + } else if (resultObj instanceof ResultWritable) { + result = ((ResultWritable)resultObj).getResult(); + } else { + throw new IllegalArgumentException("Illegal Argument " + (resultObj == null ? "null" : resultObj.getClass().getName())); + } System.out.println("Result " + result.toString()); List list = result.list(); boolean correctValues = (list.size() == 1) diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java index cafdcd1..f8bfc60 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManager.java @@ -204,7 +204,7 @@ public void testKeepAliveTransaction() throws InterruptedException, IOException String tableName = newTableName("testTable"); List columnFamilies = Arrays.asList("cf1", "cf2"); Transaction txn = manager.beginWriteTransaction(tableName, - columnFamilies, 40); + columnFamilies, 40L); Thread.sleep(100); try { manager.commitWriteTransaction(txn); diff --git a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java index 3208fa6..980f840 100644 --- a/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java +++ b/hcatalog/storage-handlers/hbase/src/test/org/apache/hcatalog/hbase/snapshot/TestRevisionManagerEndpoint.java @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -132,13 +133,13 @@ public void dropTable(String table) throws IOException { @Override public Transaction beginWriteTransaction(String table, List families) throws IOException { - return recordCall(null, table, families); + return recordCall(new Transaction(table, families, 0L, 0L), table, families); } @Override public Transaction beginWriteTransaction(String table, - List families, long keepAlive) throws IOException { - return recordCall(null, table, families, keepAlive); + List families, Long keepAlive) throws IOException { + return recordCall(new Transaction(table, families, 0L, 0L), table, families, keepAlive); } @Override @@ -154,17 +155,17 @@ public void abortWriteTransaction(Transaction transaction) @Override public List getAbortedWriteTransactions(String table, String columnFamily) throws IOException { - return null; + return Collections.singletonList(new FamilyRevision(0L, 0L)); } @Override public TableSnapshot createSnapshot(String tableName) throws IOException { - return null; + return createSnapshot(tableName, 0L); } @Override - public TableSnapshot createSnapshot(String tableName, long revision) + public TableSnapshot createSnapshot(String tableName, Long revision) throws IOException { TableSnapshot ret = new TableSnapshot(tableName, new HashMap(), revision); return recordCall(ret, tableName, revision); @@ -198,7 +199,7 @@ public void testRevisionManagerProtocol() throws Throwable { Assert.assertEquals(call.methodName, call, mockImpl.lastCall); call = new MockRM.Invocation("createSnapshot", null, "t3", 1L); - call.ret = rm.createSnapshot("t3", 1); + call.ret = rm.createSnapshot("t3", 1L); Assert.assertEquals(call.methodName, call, mockImpl.lastCall); } diff --git a/ivy/libraries.properties b/ivy/libraries.properties index 20dee5a..83659b5 100644 --- a/ivy/libraries.properties +++ b/ivy/libraries.properties @@ -43,9 +43,9 @@ commons-pool.version=1.5.4 derby.version=10.4.2.0 guava.version=11.0.2 groovy.version=2.1.6 -hbase.version=0.94.6.1 -httpclient.version=4.1.3 -httpcore.version=4.1.3 +hbase.version=0.96.0 +httpclient.version=4.2.5 +httpcore.version=4.2.4 jackson.version=1.8.8 javaewah.version=0.3.2 jdo-api.version=3.0.1 diff --git a/ql/ivy.xml b/ql/ivy.xml index 8f50392..afe0aaa 100644 --- a/ql/ivy.xml +++ b/ql/ivy.xml @@ -36,11 +36,41 @@ conf="test->default" transitive="false"/> - + + + + + + - - + + + + + + + + + + + + + + + + + + + +