HBASE-3629 Update our thrift to 0.6

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1096938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2011-04-26 22:40:25 +00:00
parent 95a45d1341
commit e6a521407d
13 changed files with 5665 additions and 4414 deletions

View File

@ -8,6 +8,7 @@ Release 0.91.0 - Unreleased
ClusterStatus serialization)
HBASE-3762 HTableFactory.releaseHTableInterface() should throw IOException
instead of wrapping in RuntimeException (Ted Yu via garyh)
HBASE-3629 Update our thrift to 0.6 (Moaz Reyad)
BUG FIXES
HBASE-3280 YouAreDeadException being swallowed in HRS getMaster

View File

@ -544,7 +544,7 @@
<protobuf.version>2.3.0</protobuf.version>
<slf4j.version>1.5.8</slf4j.version><!-- newer version available -->
<stax-api.version>1.0.1</stax-api.version>
<thrift.version>0.5.0</thrift.version><!-- newer version available -->
<thrift.version>0.6.1</thrift.version>
<zookeeper.version>3.3.3</zookeeper.version>
<package.prefix>/usr</package.prefix>
@ -554,7 +554,6 @@
<package.release>1</package.release>
<!-- also must update this when we bump version -->
<package.version>0.91.0</package.version>
<final.name>${artifactId}-${version}</final.name>
<!-- For flaky tests exclusion -->
<test.exclude></test.exclude>
@ -670,7 +669,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>${thrift.version}</version>
<exclusions>
@ -909,7 +908,7 @@
<phase>package</phase>
<configuration>
<target>
<property name="artifactId" value="${artifactId}" />
<property name="artifactId" value="${project.artifactId}" />
<ant antfile="${basedir}/src/packages/build.xml">
<target name="package-deb"/>
<target name="package-conf-pseudo-deb"/>

View File

@ -945,11 +945,21 @@ public class ThriftServer {
TFramedTransport.Factory transportFactory = new TFramedTransport.Factory();
if (cmd.hasOption("nonblocking")) {
TNonblockingServer.Args serverArgs = new TNonblockingServer.Args(serverTransport);
serverArgs.processor(processor);
serverArgs.transportFactory(transportFactory);
serverArgs.protocolFactory(protocolFactory);
LOG.info("starting HBase Nonblocking Thrift server on " + Integer.toString(listenPort));
server = new TNonblockingServer(processor, serverTransport, transportFactory, protocolFactory);
server = new TNonblockingServer(serverArgs);
} else {
THsHaServer.Args serverArgs = new THsHaServer.Args(serverTransport);
serverArgs.processor(processor);
serverArgs.transportFactory(transportFactory);
serverArgs.protocolFactory(protocolFactory);
LOG.info("starting HBase HsHA Thrift server on " + Integer.toString(listenPort));
server = new THsHaServer(processor, serverTransport, transportFactory, protocolFactory);
server = new THsHaServer(serverArgs);
}
} else {
// Get IP address to bind to
@ -975,8 +985,13 @@ public class ThriftServer {
transportFactory = new TTransportFactory();
}
TThreadPoolServer.Args serverArgs = new TThreadPoolServer.Args(serverTransport);
serverArgs.processor(processor);
serverArgs.protocolFactory(protocolFactory);
serverArgs.transportFactory(transportFactory);
LOG.info("starting HBase ThreadPool Thrift server on " + listenAddress + ":" + Integer.toString(listenPort));
server = new TThreadPoolServer(processor, serverTransport, transportFactory, protocolFactory);
server = new TThreadPoolServer(serverArgs);
}
server.serve();

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,25 +20,19 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* An AlreadyExists exceptions signals that a table with the specified
* name already exists
*/
public class AlreadyExists extends Exception implements TBase<AlreadyExists, AlreadyExists._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("AlreadyExists");
public class AlreadyExists extends Exception implements org.apache.thrift.TBase<AlreadyExists, AlreadyExists._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AlreadyExists");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
public String message;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@ -109,13 +91,13 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(AlreadyExists.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AlreadyExists.class, metaDataMap);
}
public AlreadyExists() {
@ -159,7 +141,7 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
this.message = null;
}
/** Returns true if field message is set (has been asigned a value) and false otherwise */
/** Returns true if field message is set (has been assigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -192,7 +174,7 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -248,7 +230,7 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
return lastComparison;
}
if (isSetMessage()) {
lastComparison = TBaseHelper.compareTo(this.message, typedOther.message);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
@ -260,25 +242,25 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // MESSAGE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -288,7 +270,7 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -317,9 +299,25 @@ public class AlreadyExists extends Exception implements TBase<AlreadyExists, Alr
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,26 +20,20 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* A BatchMutation object is used to apply a number of Mutations to a single row.
*/
public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("BatchMutation");
public class BatchMutation implements org.apache.thrift.TBase<BatchMutation, BatchMutation._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BatchMutation");
private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1);
private static final TField MUTATIONS_FIELD_DESC = new TField("mutations", TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MUTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("mutations", org.apache.thrift.protocol.TType.LIST, (short)2);
public ByteBuffer row;
public List<Mutation> mutations;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ROW((short)1, "row"),
MUTATIONS((short)2, "mutations");
@ -113,16 +95,16 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.MUTATIONS, new FieldMetaData("mutations", TFieldRequirementType.DEFAULT,
new ListMetaData(TType.LIST,
new StructMetaData(TType.STRUCT, Mutation.class))));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MUTATIONS, new org.apache.thrift.meta_data.FieldMetaData("mutations", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Mutation.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BatchMutation.class, metaDataMap);
}
public BatchMutation() {
@ -164,16 +146,16 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
}
public byte[] getRow() {
setRow(TBaseHelper.rightSize(row));
return row.array();
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer BufferForRow() {
public ByteBuffer bufferForRow() {
return row;
}
public BatchMutation setRow(byte[] row) {
setRow(ByteBuffer.wrap(row));
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
@ -186,7 +168,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
this.row = null;
}
/** Returns true if field row is set (has been asigned a value) and false otherwise */
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
@ -225,7 +207,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
this.mutations = null;
}
/** Returns true if field mutations is set (has been asigned a value) and false otherwise */
/** Returns true if field mutations is set (has been assigned a value) and false otherwise */
public boolean isSetMutations() {
return this.mutations != null;
}
@ -269,7 +251,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -336,7 +318,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
return lastComparison;
}
if (isSetRow()) {
lastComparison = TBaseHelper.compareTo(this.row, typedOther.row);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
@ -346,7 +328,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
return lastComparison;
}
if (isSetMutations()) {
lastComparison = TBaseHelper.compareTo(this.mutations, typedOther.mutations);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.mutations, typedOther.mutations);
if (lastComparison != 0) {
return lastComparison;
}
@ -358,27 +340,27 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // ROW
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MUTATIONS
if (field.type == TType.LIST) {
if (field.type == org.apache.thrift.protocol.TType.LIST) {
{
TList _list0 = iprot.readListBegin();
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
this.mutations = new ArrayList<Mutation>(_list0.size);
for (int _i1 = 0; _i1 < _list0.size; ++_i1)
{
@ -390,11 +372,11 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
iprot.readListEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -404,7 +386,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -416,7 +398,7 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
if (this.mutations != null) {
oprot.writeFieldBegin(MUTATIONS_FIELD_DESC);
{
oprot.writeListBegin(new TList(TType.STRUCT, this.mutations.size()));
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.mutations.size()));
for (Mutation _iter3 : this.mutations)
{
_iter3.write(oprot);
@ -453,9 +435,25 @@ public class BatchMutation implements TBase<BatchMutation, BatchMutation._Fields
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,29 +20,23 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* An HColumnDescriptor contains information about a column family
* such as the number of versions, compression settings, etc. It is
* used as input when creating a table or adding a column.
*/
public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescriptor._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("ColumnDescriptor");
public class ColumnDescriptor implements org.apache.thrift.TBase<ColumnDescriptor, ColumnDescriptor._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ColumnDescriptor");
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
private static final TField MAX_VERSIONS_FIELD_DESC = new TField("maxVersions", TType.I32, (short)2);
private static final TField COMPRESSION_FIELD_DESC = new TField("compression", TType.STRING, (short)3);
private static final TField IN_MEMORY_FIELD_DESC = new TField("inMemory", TType.BOOL, (short)4);
private static final TField BLOOM_FILTER_TYPE_FIELD_DESC = new TField("bloomFilterType", TType.STRING, (short)5);
private static final TField BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC = new TField("bloomFilterVectorSize", TType.I32, (short)6);
private static final TField BLOOM_FILTER_NB_HASHES_FIELD_DESC = new TField("bloomFilterNbHashes", TType.I32, (short)7);
private static final TField BLOCK_CACHE_ENABLED_FIELD_DESC = new TField("blockCacheEnabled", TType.BOOL, (short)8);
private static final TField TIME_TO_LIVE_FIELD_DESC = new TField("timeToLive", TType.I32, (short)9);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MAX_VERSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("maxVersions", org.apache.thrift.protocol.TType.I32, (short)2);
private static final org.apache.thrift.protocol.TField COMPRESSION_FIELD_DESC = new org.apache.thrift.protocol.TField("compression", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField IN_MEMORY_FIELD_DESC = new org.apache.thrift.protocol.TField("inMemory", org.apache.thrift.protocol.TType.BOOL, (short)4);
private static final org.apache.thrift.protocol.TField BLOOM_FILTER_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterType", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField BLOOM_FILTER_VECTOR_SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterVectorSize", org.apache.thrift.protocol.TType.I32, (short)6);
private static final org.apache.thrift.protocol.TField BLOOM_FILTER_NB_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("bloomFilterNbHashes", org.apache.thrift.protocol.TType.I32, (short)7);
private static final org.apache.thrift.protocol.TField BLOCK_CACHE_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("blockCacheEnabled", org.apache.thrift.protocol.TType.BOOL, (short)8);
private static final org.apache.thrift.protocol.TField TIME_TO_LIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("timeToLive", org.apache.thrift.protocol.TType.I32, (short)9);
public ByteBuffer name;
public int maxVersions;
@ -67,7 +49,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
public int timeToLive;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
NAME((short)1, "name"),
MAX_VERSIONS((short)2, "maxVersions"),
COMPRESSION((short)3, "compression"),
@ -157,29 +139,29 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
private static final int __TIMETOLIVE_ISSET_ID = 5;
private BitSet __isset_bit_vector = new BitSet(6);
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.MAX_VERSIONS, new FieldMetaData("maxVersions", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.COMPRESSION, new FieldMetaData("compression", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.IN_MEMORY, new FieldMetaData("inMemory", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
tmpMap.put(_Fields.BLOOM_FILTER_TYPE, new FieldMetaData("bloomFilterType", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
tmpMap.put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new FieldMetaData("bloomFilterVectorSize", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.BLOOM_FILTER_NB_HASHES, new FieldMetaData("bloomFilterNbHashes", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new FieldMetaData("blockCacheEnabled", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
tmpMap.put(_Fields.TIME_TO_LIVE, new FieldMetaData("timeToLive", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I32)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.MAX_VERSIONS, new org.apache.thrift.meta_data.FieldMetaData("maxVersions", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.COMPRESSION, new org.apache.thrift.meta_data.FieldMetaData("compression", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IN_MEMORY, new org.apache.thrift.meta_data.FieldMetaData("inMemory", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.BLOOM_FILTER_TYPE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterType", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.BLOOM_FILTER_VECTOR_SIZE, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterVectorSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.BLOOM_FILTER_NB_HASHES, new org.apache.thrift.meta_data.FieldMetaData("bloomFilterNbHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.BLOCK_CACHE_ENABLED, new org.apache.thrift.meta_data.FieldMetaData("blockCacheEnabled", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.TIME_TO_LIVE, new org.apache.thrift.meta_data.FieldMetaData("timeToLive", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ColumnDescriptor.class, metaDataMap);
}
public ColumnDescriptor() {
@ -279,16 +261,16 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
}
public byte[] getName() {
setName(TBaseHelper.rightSize(name));
return name.array();
setName(org.apache.thrift.TBaseHelper.rightSize(name));
return name == null ? null : name.array();
}
public ByteBuffer BufferForName() {
public ByteBuffer bufferForName() {
return name;
}
public ColumnDescriptor setName(byte[] name) {
setName(ByteBuffer.wrap(name));
setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name));
return this;
}
@ -301,7 +283,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
this.name = null;
}
/** Returns true if field name is set (has been asigned a value) and false otherwise */
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
@ -326,7 +308,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__MAXVERSIONS_ISSET_ID);
}
/** Returns true if field maxVersions is set (has been asigned a value) and false otherwise */
/** Returns true if field maxVersions is set (has been assigned a value) and false otherwise */
public boolean isSetMaxVersions() {
return __isset_bit_vector.get(__MAXVERSIONS_ISSET_ID);
}
@ -348,7 +330,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
this.compression = null;
}
/** Returns true if field compression is set (has been asigned a value) and false otherwise */
/** Returns true if field compression is set (has been assigned a value) and false otherwise */
public boolean isSetCompression() {
return this.compression != null;
}
@ -373,7 +355,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__INMEMORY_ISSET_ID);
}
/** Returns true if field inMemory is set (has been asigned a value) and false otherwise */
/** Returns true if field inMemory is set (has been assigned a value) and false otherwise */
public boolean isSetInMemory() {
return __isset_bit_vector.get(__INMEMORY_ISSET_ID);
}
@ -395,7 +377,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
this.bloomFilterType = null;
}
/** Returns true if field bloomFilterType is set (has been asigned a value) and false otherwise */
/** Returns true if field bloomFilterType is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterType() {
return this.bloomFilterType != null;
}
@ -420,7 +402,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__BLOOMFILTERVECTORSIZE_ISSET_ID);
}
/** Returns true if field bloomFilterVectorSize is set (has been asigned a value) and false otherwise */
/** Returns true if field bloomFilterVectorSize is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterVectorSize() {
return __isset_bit_vector.get(__BLOOMFILTERVECTORSIZE_ISSET_ID);
}
@ -443,7 +425,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__BLOOMFILTERNBHASHES_ISSET_ID);
}
/** Returns true if field bloomFilterNbHashes is set (has been asigned a value) and false otherwise */
/** Returns true if field bloomFilterNbHashes is set (has been assigned a value) and false otherwise */
public boolean isSetBloomFilterNbHashes() {
return __isset_bit_vector.get(__BLOOMFILTERNBHASHES_ISSET_ID);
}
@ -466,7 +448,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__BLOCKCACHEENABLED_ISSET_ID);
}
/** Returns true if field blockCacheEnabled is set (has been asigned a value) and false otherwise */
/** Returns true if field blockCacheEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetBlockCacheEnabled() {
return __isset_bit_vector.get(__BLOCKCACHEENABLED_ISSET_ID);
}
@ -489,7 +471,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
__isset_bit_vector.clear(__TIMETOLIVE_ISSET_ID);
}
/** Returns true if field timeToLive is set (has been asigned a value) and false otherwise */
/** Returns true if field timeToLive is set (has been assigned a value) and false otherwise */
public boolean isSetTimeToLive() {
return __isset_bit_vector.get(__TIMETOLIVE_ISSET_ID);
}
@ -608,7 +590,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -752,7 +734,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetName()) {
lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -762,7 +744,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetMaxVersions()) {
lastComparison = TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxVersions, typedOther.maxVersions);
if (lastComparison != 0) {
return lastComparison;
}
@ -772,7 +754,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetCompression()) {
lastComparison = TBaseHelper.compareTo(this.compression, typedOther.compression);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.compression, typedOther.compression);
if (lastComparison != 0) {
return lastComparison;
}
@ -782,7 +764,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetInMemory()) {
lastComparison = TBaseHelper.compareTo(this.inMemory, typedOther.inMemory);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inMemory, typedOther.inMemory);
if (lastComparison != 0) {
return lastComparison;
}
@ -792,7 +774,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetBloomFilterType()) {
lastComparison = TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterType, typedOther.bloomFilterType);
if (lastComparison != 0) {
return lastComparison;
}
@ -802,7 +784,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetBloomFilterVectorSize()) {
lastComparison = TBaseHelper.compareTo(this.bloomFilterVectorSize, typedOther.bloomFilterVectorSize);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterVectorSize, typedOther.bloomFilterVectorSize);
if (lastComparison != 0) {
return lastComparison;
}
@ -812,7 +794,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetBloomFilterNbHashes()) {
lastComparison = TBaseHelper.compareTo(this.bloomFilterNbHashes, typedOther.bloomFilterNbHashes);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bloomFilterNbHashes, typedOther.bloomFilterNbHashes);
if (lastComparison != 0) {
return lastComparison;
}
@ -822,7 +804,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetBlockCacheEnabled()) {
lastComparison = TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.blockCacheEnabled, typedOther.blockCacheEnabled);
if (lastComparison != 0) {
return lastComparison;
}
@ -832,7 +814,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return lastComparison;
}
if (isSetTimeToLive()) {
lastComparison = TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timeToLive, typedOther.timeToLive);
if (lastComparison != 0) {
return lastComparison;
}
@ -844,87 +826,87 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // NAME
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // MAX_VERSIONS
if (field.type == TType.I32) {
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.maxVersions = iprot.readI32();
setMaxVersionsIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // COMPRESSION
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.compression = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // IN_MEMORY
if (field.type == TType.BOOL) {
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.inMemory = iprot.readBool();
setInMemoryIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // BLOOM_FILTER_TYPE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.bloomFilterType = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 6: // BLOOM_FILTER_VECTOR_SIZE
if (field.type == TType.I32) {
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.bloomFilterVectorSize = iprot.readI32();
setBloomFilterVectorSizeIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 7: // BLOOM_FILTER_NB_HASHES
if (field.type == TType.I32) {
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.bloomFilterNbHashes = iprot.readI32();
setBloomFilterNbHashesIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 8: // BLOCK_CACHE_ENABLED
if (field.type == TType.BOOL) {
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.blockCacheEnabled = iprot.readBool();
setBlockCacheEnabledIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 9: // TIME_TO_LIVE
if (field.type == TType.I32) {
if (field.type == org.apache.thrift.protocol.TType.I32) {
this.timeToLive = iprot.readI32();
setTimeToLiveIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -934,7 +916,7 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -1031,9 +1013,27 @@ public class ColumnDescriptor implements TBase<ColumnDescriptor, ColumnDescripto
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,26 +20,20 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* An IOError exception signals that an error occurred communicating
* to the Hbase master or an Hbase region server. Also used to return
* more general Hbase error conditions.
*/
public class IOError extends Exception implements TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("IOError");
public class IOError extends Exception implements org.apache.thrift.TBase<IOError, IOError._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IOError");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
public String message;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@ -110,13 +92,13 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(IOError.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IOError.class, metaDataMap);
}
public IOError() {
@ -160,7 +142,7 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
this.message = null;
}
/** Returns true if field message is set (has been asigned a value) and false otherwise */
/** Returns true if field message is set (has been assigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -193,7 +175,7 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -249,7 +231,7 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
return lastComparison;
}
if (isSetMessage()) {
lastComparison = TBaseHelper.compareTo(this.message, typedOther.message);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
@ -261,25 +243,25 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // MESSAGE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -289,7 +271,7 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -318,9 +300,25 @@ public class IOError extends Exception implements TBase<IOError, IOError._Fields
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,25 +20,19 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* An IllegalArgument exception indicates an illegal or invalid
* argument was passed into a procedure.
*/
public class IllegalArgument extends Exception implements TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("IllegalArgument");
public class IllegalArgument extends Exception implements org.apache.thrift.TBase<IllegalArgument, IllegalArgument._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("IllegalArgument");
private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
public String message;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
MESSAGE((short)1, "message");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@ -109,13 +91,13 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(IllegalArgument.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(IllegalArgument.class, metaDataMap);
}
public IllegalArgument() {
@ -159,7 +141,7 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
this.message = null;
}
/** Returns true if field message is set (has been asigned a value) and false otherwise */
/** Returns true if field message is set (has been assigned a value) and false otherwise */
public boolean isSetMessage() {
return this.message != null;
}
@ -192,7 +174,7 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -248,7 +230,7 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
return lastComparison;
}
if (isSetMessage()) {
lastComparison = TBaseHelper.compareTo(this.message, typedOther.message);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.message, typedOther.message);
if (lastComparison != 0) {
return lastComparison;
}
@ -260,25 +242,25 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // MESSAGE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.message = iprot.readString();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -288,7 +270,7 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -317,9 +299,25 @@ public class IllegalArgument extends Exception implements TBase<IllegalArgument,
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,28 +20,22 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* A Mutation object is used to either update or delete a column-value.
*/
public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("Mutation");
public class Mutation implements org.apache.thrift.TBase<Mutation, Mutation._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Mutation");
private static final TField IS_DELETE_FIELD_DESC = new TField("isDelete", TType.BOOL, (short)1);
private static final TField COLUMN_FIELD_DESC = new TField("column", TType.STRING, (short)2);
private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField IS_DELETE_FIELD_DESC = new org.apache.thrift.protocol.TField("isDelete", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)3);
public boolean isDelete;
public ByteBuffer column;
public ByteBuffer value;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IS_DELETE((short)1, "isDelete"),
COLUMN((short)2, "column"),
VALUE((short)3, "value");
@ -120,17 +102,17 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
private static final int __ISDELETE_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IS_DELETE, new FieldMetaData("isDelete", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BOOL)));
tmpMap.put(_Fields.COLUMN, new FieldMetaData("column", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.IS_DELETE, new org.apache.thrift.meta_data.FieldMetaData("isDelete", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Mutation.class, metaDataMap);
}
public Mutation() {
@ -191,7 +173,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
__isset_bit_vector.clear(__ISDELETE_ISSET_ID);
}
/** Returns true if field isDelete is set (has been asigned a value) and false otherwise */
/** Returns true if field isDelete is set (has been assigned a value) and false otherwise */
public boolean isSetIsDelete() {
return __isset_bit_vector.get(__ISDELETE_ISSET_ID);
}
@ -201,16 +183,16 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
}
public byte[] getColumn() {
setColumn(TBaseHelper.rightSize(column));
return column.array();
setColumn(org.apache.thrift.TBaseHelper.rightSize(column));
return column == null ? null : column.array();
}
public ByteBuffer BufferForColumn() {
public ByteBuffer bufferForColumn() {
return column;
}
public Mutation setColumn(byte[] column) {
setColumn(ByteBuffer.wrap(column));
setColumn(column == null ? (ByteBuffer)null : ByteBuffer.wrap(column));
return this;
}
@ -223,7 +205,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
this.column = null;
}
/** Returns true if field column is set (has been asigned a value) and false otherwise */
/** Returns true if field column is set (has been assigned a value) and false otherwise */
public boolean isSetColumn() {
return this.column != null;
}
@ -235,16 +217,16 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
}
public byte[] getValue() {
setValue(TBaseHelper.rightSize(value));
return value.array();
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public ByteBuffer BufferForValue() {
public ByteBuffer bufferForValue() {
return value;
}
public Mutation setValue(byte[] value) {
setValue(ByteBuffer.wrap(value));
setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
return this;
}
@ -257,7 +239,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
this.value = null;
}
/** Returns true if field value is set (has been asigned a value) and false otherwise */
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
@ -312,7 +294,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -390,7 +372,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
return lastComparison;
}
if (isSetIsDelete()) {
lastComparison = TBaseHelper.compareTo(this.isDelete, typedOther.isDelete);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDelete, typedOther.isDelete);
if (lastComparison != 0) {
return lastComparison;
}
@ -400,7 +382,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
return lastComparison;
}
if (isSetColumn()) {
lastComparison = TBaseHelper.compareTo(this.column, typedOther.column);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column, typedOther.column);
if (lastComparison != 0) {
return lastComparison;
}
@ -410,7 +392,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
return lastComparison;
}
if (isSetValue()) {
lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}
@ -422,40 +404,40 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // IS_DELETE
if (field.type == TType.BOOL) {
if (field.type == org.apache.thrift.protocol.TType.BOOL) {
this.isDelete = iprot.readBool();
setIsDeleteIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // COLUMN
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.column = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // VALUE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -465,7 +447,7 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -514,9 +496,27 @@ public class Mutation implements TBase<Mutation, Mutation._Fields>, java.io.Seri
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,29 +20,23 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* TCell - Used to transport a cell value (byte[]) and the timestamp it was
* stored with together as a result for get and getRow methods. This promotes
* the timestamp of a cell to a first-class value, making it easy to take
* note of temporal data. Cell is used all the way from HStore up to HTable.
*/
public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TCell");
public class TCell implements org.apache.thrift.TBase<TCell, TCell._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCell");
private static final TField VALUE_FIELD_DESC = new TField("value", TType.STRING, (short)1);
private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.I64, (short)2);
public ByteBuffer value;
public long timestamp;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
VALUE((short)1, "value"),
TIMESTAMP((short)2, "timestamp");
@ -118,15 +100,15 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
private static final int __TIMESTAMP_ISSET_ID = 0;
private BitSet __isset_bit_vector = new BitSet(1);
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.VALUE, new FieldMetaData("value", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Bytes")));
tmpMap.put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Bytes")));
tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(TCell.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TCell.class, metaDataMap);
}
public TCell() {
@ -166,16 +148,16 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
}
public byte[] getValue() {
setValue(TBaseHelper.rightSize(value));
return value.array();
setValue(org.apache.thrift.TBaseHelper.rightSize(value));
return value == null ? null : value.array();
}
public ByteBuffer BufferForValue() {
public ByteBuffer bufferForValue() {
return value;
}
public TCell setValue(byte[] value) {
setValue(ByteBuffer.wrap(value));
setValue(value == null ? (ByteBuffer)null : ByteBuffer.wrap(value));
return this;
}
@ -188,7 +170,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
this.value = null;
}
/** Returns true if field value is set (has been asigned a value) and false otherwise */
/** Returns true if field value is set (has been assigned a value) and false otherwise */
public boolean isSetValue() {
return this.value != null;
}
@ -213,7 +195,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
__isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
}
/** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
/** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
public boolean isSetTimestamp() {
return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
}
@ -255,7 +237,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -322,7 +304,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
return lastComparison;
}
if (isSetValue()) {
lastComparison = TBaseHelper.compareTo(this.value, typedOther.value);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
if (lastComparison != 0) {
return lastComparison;
}
@ -332,7 +314,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
return lastComparison;
}
if (isSetTimestamp()) {
lastComparison = TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
if (lastComparison != 0) {
return lastComparison;
}
@ -344,33 +326,33 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // VALUE
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.value = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // TIMESTAMP
if (field.type == TType.I64) {
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.timestamp = iprot.readI64();
setTimestampIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -380,7 +362,7 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -416,9 +398,27 @@ public class TCell implements TBase<TCell, TCell._Fields>, java.io.Serializable,
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,23 +20,17 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* A TRegionInfo contains information about an HTable region.
*/
public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TRegionInfo");
public class TRegionInfo implements org.apache.thrift.TBase<TRegionInfo, TRegionInfo._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRegionInfo");
private static final TField START_KEY_FIELD_DESC = new TField("startKey", TType.STRING, (short)1);
private static final TField END_KEY_FIELD_DESC = new TField("endKey", TType.STRING, (short)2);
private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)3);
private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)4);
private static final TField VERSION_FIELD_DESC = new TField("version", TType.BYTE, (short)5);
private static final org.apache.thrift.protocol.TField START_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("startKey", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField END_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("endKey", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short)5);
public ByteBuffer startKey;
public ByteBuffer endKey;
@ -57,7 +39,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
public byte version;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
START_KEY((short)1, "startKey"),
END_KEY((short)2, "endKey"),
ID((short)3, "id"),
@ -131,21 +113,21 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
private static final int __VERSION_ISSET_ID = 1;
private BitSet __isset_bit_vector = new BitSet(2);
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_KEY, new FieldMetaData("startKey", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.END_KEY, new FieldMetaData("endKey", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.I64)));
tmpMap.put(_Fields.NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.VERSION, new FieldMetaData("version", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.BYTE)));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.START_KEY, new org.apache.thrift.meta_data.FieldMetaData("startKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.END_KEY, new org.apache.thrift.meta_data.FieldMetaData("endKey", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRegionInfo.class, metaDataMap);
}
public TRegionInfo() {
@ -203,16 +185,16 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
}
public byte[] getStartKey() {
setStartKey(TBaseHelper.rightSize(startKey));
return startKey.array();
setStartKey(org.apache.thrift.TBaseHelper.rightSize(startKey));
return startKey == null ? null : startKey.array();
}
public ByteBuffer BufferForStartKey() {
public ByteBuffer bufferForStartKey() {
return startKey;
}
public TRegionInfo setStartKey(byte[] startKey) {
setStartKey(ByteBuffer.wrap(startKey));
setStartKey(startKey == null ? (ByteBuffer)null : ByteBuffer.wrap(startKey));
return this;
}
@ -225,7 +207,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
this.startKey = null;
}
/** Returns true if field startKey is set (has been asigned a value) and false otherwise */
/** Returns true if field startKey is set (has been assigned a value) and false otherwise */
public boolean isSetStartKey() {
return this.startKey != null;
}
@ -237,16 +219,16 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
}
public byte[] getEndKey() {
setEndKey(TBaseHelper.rightSize(endKey));
return endKey.array();
setEndKey(org.apache.thrift.TBaseHelper.rightSize(endKey));
return endKey == null ? null : endKey.array();
}
public ByteBuffer BufferForEndKey() {
public ByteBuffer bufferForEndKey() {
return endKey;
}
public TRegionInfo setEndKey(byte[] endKey) {
setEndKey(ByteBuffer.wrap(endKey));
setEndKey(endKey == null ? (ByteBuffer)null : ByteBuffer.wrap(endKey));
return this;
}
@ -259,7 +241,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
this.endKey = null;
}
/** Returns true if field endKey is set (has been asigned a value) and false otherwise */
/** Returns true if field endKey is set (has been assigned a value) and false otherwise */
public boolean isSetEndKey() {
return this.endKey != null;
}
@ -284,7 +266,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
__isset_bit_vector.clear(__ID_ISSET_ID);
}
/** Returns true if field id is set (has been asigned a value) and false otherwise */
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
return __isset_bit_vector.get(__ID_ISSET_ID);
}
@ -294,16 +276,16 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
}
public byte[] getName() {
setName(TBaseHelper.rightSize(name));
return name.array();
setName(org.apache.thrift.TBaseHelper.rightSize(name));
return name == null ? null : name.array();
}
public ByteBuffer BufferForName() {
public ByteBuffer bufferForName() {
return name;
}
public TRegionInfo setName(byte[] name) {
setName(ByteBuffer.wrap(name));
setName(name == null ? (ByteBuffer)null : ByteBuffer.wrap(name));
return this;
}
@ -316,7 +298,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
this.name = null;
}
/** Returns true if field name is set (has been asigned a value) and false otherwise */
/** Returns true if field name is set (has been assigned a value) and false otherwise */
public boolean isSetName() {
return this.name != null;
}
@ -341,7 +323,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
__isset_bit_vector.clear(__VERSION_ISSET_ID);
}
/** Returns true if field version is set (has been asigned a value) and false otherwise */
/** Returns true if field version is set (has been assigned a value) and false otherwise */
public boolean isSetVersion() {
return __isset_bit_vector.get(__VERSION_ISSET_ID);
}
@ -416,7 +398,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -516,7 +498,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return lastComparison;
}
if (isSetStartKey()) {
lastComparison = TBaseHelper.compareTo(this.startKey, typedOther.startKey);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startKey, typedOther.startKey);
if (lastComparison != 0) {
return lastComparison;
}
@ -526,7 +508,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return lastComparison;
}
if (isSetEndKey()) {
lastComparison = TBaseHelper.compareTo(this.endKey, typedOther.endKey);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endKey, typedOther.endKey);
if (lastComparison != 0) {
return lastComparison;
}
@ -536,7 +518,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return lastComparison;
}
if (isSetId()) {
lastComparison = TBaseHelper.compareTo(this.id, typedOther.id);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
if (lastComparison != 0) {
return lastComparison;
}
@ -546,7 +528,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return lastComparison;
}
if (isSetName()) {
lastComparison = TBaseHelper.compareTo(this.name, typedOther.name);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, typedOther.name);
if (lastComparison != 0) {
return lastComparison;
}
@ -556,7 +538,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return lastComparison;
}
if (isSetVersion()) {
lastComparison = TBaseHelper.compareTo(this.version, typedOther.version);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, typedOther.version);
if (lastComparison != 0) {
return lastComparison;
}
@ -568,55 +550,55 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // START_KEY
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.startKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // END_KEY
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.endKey = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 3: // ID
if (field.type == TType.I64) {
if (field.type == org.apache.thrift.protocol.TType.I64) {
this.id = iprot.readI64();
setIdIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 4: // NAME
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.name = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 5: // VERSION
if (field.type == TType.BYTE) {
if (field.type == org.apache.thrift.protocol.TType.BYTE) {
this.version = iprot.readByte();
setVersionIsSet(true);
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -626,7 +608,7 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -695,9 +677,27 @@ public class TRegionInfo implements TBase<TRegionInfo, TRegionInfo._Fields>, jav
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bit_vector = new BitSet(1);
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}

View File

@ -1,19 +1,7 @@
/**
* 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
* Autogenerated by Thrift
*
* 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.
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*/
package org.apache.hadoop.hbase.thrift.generated;
@ -32,26 +20,20 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.thrift.*;
import org.apache.thrift.async.*;
import org.apache.thrift.meta_data.*;
import org.apache.thrift.transport.*;
import org.apache.thrift.protocol.*;
/**
* Holds row name and then a map of columns to cells.
*/
public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.io.Serializable, Cloneable {
private static final TStruct STRUCT_DESC = new TStruct("TRowResult");
public class TRowResult implements org.apache.thrift.TBase<TRowResult, TRowResult._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowResult");
private static final TField ROW_FIELD_DESC = new TField("row", TType.STRING, (short)1);
private static final TField COLUMNS_FIELD_DESC = new TField("columns", TType.MAP, (short)2);
private static final org.apache.thrift.protocol.TField ROW_FIELD_DESC = new org.apache.thrift.protocol.TField("row", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.MAP, (short)2);
public ByteBuffer row;
public Map<ByteBuffer,TCell> columns;
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements TFieldIdEnum {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
ROW((short)1, "row"),
COLUMNS((short)2, "columns");
@ -113,17 +95,17 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
// isset id assignments
public static final Map<_Fields, FieldMetaData> metaDataMap;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROW, new FieldMetaData("row", TFieldRequirementType.DEFAULT,
new FieldValueMetaData(TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new FieldMetaData("columns", TFieldRequirementType.DEFAULT,
new MapMetaData(TType.MAP,
new FieldValueMetaData(TType.STRING , "Text"),
new StructMetaData(TType.STRUCT, TCell.class))));
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.ROW, new org.apache.thrift.meta_data.FieldMetaData("row", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text")));
tmpMap.put(_Fields.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Text"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TCell.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TRowResult.class, metaDataMap);
}
public TRowResult() {
@ -173,16 +155,16 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
}
public byte[] getRow() {
setRow(TBaseHelper.rightSize(row));
return row.array();
setRow(org.apache.thrift.TBaseHelper.rightSize(row));
return row == null ? null : row.array();
}
public ByteBuffer BufferForRow() {
public ByteBuffer bufferForRow() {
return row;
}
public TRowResult setRow(byte[] row) {
setRow(ByteBuffer.wrap(row));
setRow(row == null ? (ByteBuffer)null : ByteBuffer.wrap(row));
return this;
}
@ -195,7 +177,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
this.row = null;
}
/** Returns true if field row is set (has been asigned a value) and false otherwise */
/** Returns true if field row is set (has been assigned a value) and false otherwise */
public boolean isSetRow() {
return this.row != null;
}
@ -230,7 +212,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
this.columns = null;
}
/** Returns true if field columns is set (has been asigned a value) and false otherwise */
/** Returns true if field columns is set (has been assigned a value) and false otherwise */
public boolean isSetColumns() {
return this.columns != null;
}
@ -274,7 +256,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
throw new IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
throw new IllegalArgumentException();
@ -341,7 +323,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
return lastComparison;
}
if (isSetRow()) {
lastComparison = TBaseHelper.compareTo(this.row, typedOther.row);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.row, typedOther.row);
if (lastComparison != 0) {
return lastComparison;
}
@ -351,7 +333,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
return lastComparison;
}
if (isSetColumns()) {
lastComparison = TBaseHelper.compareTo(this.columns, typedOther.columns);
lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns);
if (lastComparison != 0) {
return lastComparison;
}
@ -363,27 +345,27 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
return _Fields.findByThriftId(fieldId);
}
public void read(TProtocol iprot) throws TException {
TField field;
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField field;
iprot.readStructBegin();
while (true)
{
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
if (field.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (field.id) {
case 1: // ROW
if (field.type == TType.STRING) {
if (field.type == org.apache.thrift.protocol.TType.STRING) {
this.row = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
case 2: // COLUMNS
if (field.type == TType.MAP) {
if (field.type == org.apache.thrift.protocol.TType.MAP) {
{
TMap _map4 = iprot.readMapBegin();
org.apache.thrift.protocol.TMap _map4 = iprot.readMapBegin();
this.columns = new HashMap<ByteBuffer,TCell>(2*_map4.size);
for (int _i5 = 0; _i5 < _map4.size; ++_i5)
{
@ -397,11 +379,11 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
iprot.readMapEnd();
}
} else {
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
}
iprot.readFieldEnd();
}
@ -411,7 +393,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
validate();
}
public void write(TProtocol oprot) throws TException {
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
validate();
oprot.writeStructBegin(STRUCT_DESC);
@ -423,7 +405,7 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
if (this.columns != null) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
oprot.writeMapBegin(new TMap(TType.STRING, TType.STRUCT, this.columns.size()));
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, this.columns.size()));
for (Map.Entry<ByteBuffer, TCell> _iter8 : this.columns.entrySet())
{
oprot.writeBinary(_iter8.getKey());
@ -461,9 +443,25 @@ public class TRowResult implements TBase<TRowResult, TRowResult._Fields>, java.i
return sb.toString();
}
public void validate() throws TException {
public void validate() throws org.apache.thrift.TException {
// check for required fields
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
}