You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2011/04/27 00:40:26 UTC
svn commit: r1096938 [1/3] - in /hbase/trunk: ./
src/main/java/org/apache/hadoop/hbase/thrift/
src/main/java/org/apache/hadoop/hbase/thrift/generated/
Author: stack
Date: Tue Apr 26 22:40:25 2011
New Revision: 1096938
URL: http://svn.apache.org/viewvc?rev=1096938&view=rev
Log:
HBASE-3629 Update our thrift to 0.6
Modified:
hbase/trunk/CHANGES.txt
hbase/trunk/pom.xml
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/Hbase.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/IOError.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/IllegalArgument.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/Mutation.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/TCell.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRegionInfo.java
hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/TRowResult.java
Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Apr 26 22:40:25 2011
@@ -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
Modified: hbase/trunk/pom.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/pom.xml?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/pom.xml (original)
+++ hbase/trunk/pom.xml Tue Apr 26 22:40:25 2011
@@ -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"/>
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/ThriftServer.java Tue Apr 26 22:40:25 2011
@@ -944,12 +944,22 @@ public class ThriftServer {
TNonblockingServerTransport serverTransport = new TNonblockingServerSocket(listenPort);
TFramedTransport.Factory transportFactory = new TFramedTransport.Factory();
- if (cmd.hasOption("nonblocking")) {
+ 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();
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/AlreadyExists.java Tue Apr 26 22:40:25 2011
@@ -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 Excep
// 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 Excep
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 Excep
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 Excep
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 Excep
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);
+ } else {
+ 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 Excep
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 Excep
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);
+ }
+ }
+
}
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/BatchMutation.java Tue Apr 26 22:40:25 2011
@@ -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 TB
// 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 TB
}
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 TB
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 TB
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 TB
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 TB
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 TB
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 TB
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);
+ } else {
+ 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)
{
@@ -389,12 +371,12 @@ public class BatchMutation implements TB
}
iprot.readListEnd();
}
- } else {
- TProtocolUtil.skip(iprot, field.type);
+ } else {
+ 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 TB
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 TB
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 TB
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);
+ }
+ }
+
}
Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java?rev=1096938&r1=1096937&r2=1096938&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/thrift/generated/ColumnDescriptor.java Tue Apr 26 22:40:25 2011
@@ -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
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
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
}
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
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
__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
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
__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
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
__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
__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
__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
__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
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
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
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
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
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
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
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
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
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
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
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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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);
+ } else {
+ 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
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
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);
+ }
+ }
+
}