You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2012/11/08 10:44:29 UTC
svn commit: r1406984 [8/29] - in /hive/trunk:
contrib/src/java/org/apache/hadoop/hive/contrib/genericudf/example/
contrib/src/java/org/apache/hadoop/hive/contrib/serde2/
contrib/src/java/org/apache/hadoop/hive/contrib/util/typedbytes/
contrib/src/test/...
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/LongColumnStatsData.java Thu Nov 8 09:44:19 2012
@@ -1,11 +1,21 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -29,6 +39,12 @@ public class LongColumnStatsData impleme
private static final org.apache.thrift.protocol.TField NUM_NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("numNulls", org.apache.thrift.protocol.TType.I64, (short)3);
private static final org.apache.thrift.protocol.TField NUM_DVS_FIELD_DESC = new org.apache.thrift.protocol.TField("numDVs", org.apache.thrift.protocol.TType.I64, (short)4);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new LongColumnStatsDataStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new LongColumnStatsDataTupleSchemeFactory());
+ }
+
private long lowValue; // required
private long highValue; // required
private long numNulls; // required
@@ -106,8 +122,7 @@ public class LongColumnStatsData impleme
private static final int __HIGHVALUE_ISSET_ID = 1;
private static final int __NUMNULLS_ISSET_ID = 2;
private static final int __NUMDVS_ISSET_ID = 3;
- private BitSet __isset_bit_vector = new BitSet(4);
-
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -147,8 +162,7 @@ public class LongColumnStatsData impleme
* Performs a deep copy on <i>other</i>.
*/
public LongColumnStatsData(LongColumnStatsData other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
this.lowValue = other.lowValue;
this.highValue = other.highValue;
this.numNulls = other.numNulls;
@@ -181,16 +195,16 @@ public class LongColumnStatsData impleme
}
public void unsetLowValue() {
- __isset_bit_vector.clear(__LOWVALUE_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOWVALUE_ISSET_ID);
}
/** Returns true if field lowValue is set (has been assigned a value) and false otherwise */
public boolean isSetLowValue() {
- return __isset_bit_vector.get(__LOWVALUE_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __LOWVALUE_ISSET_ID);
}
public void setLowValueIsSet(boolean value) {
- __isset_bit_vector.set(__LOWVALUE_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOWVALUE_ISSET_ID, value);
}
public long getHighValue() {
@@ -203,16 +217,16 @@ public class LongColumnStatsData impleme
}
public void unsetHighValue() {
- __isset_bit_vector.clear(__HIGHVALUE_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HIGHVALUE_ISSET_ID);
}
/** Returns true if field highValue is set (has been assigned a value) and false otherwise */
public boolean isSetHighValue() {
- return __isset_bit_vector.get(__HIGHVALUE_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __HIGHVALUE_ISSET_ID);
}
public void setHighValueIsSet(boolean value) {
- __isset_bit_vector.set(__HIGHVALUE_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HIGHVALUE_ISSET_ID, value);
}
public long getNumNulls() {
@@ -225,16 +239,16 @@ public class LongColumnStatsData impleme
}
public void unsetNumNulls() {
- __isset_bit_vector.clear(__NUMNULLS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMNULLS_ISSET_ID);
}
/** Returns true if field numNulls is set (has been assigned a value) and false otherwise */
public boolean isSetNumNulls() {
- return __isset_bit_vector.get(__NUMNULLS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __NUMNULLS_ISSET_ID);
}
public void setNumNullsIsSet(boolean value) {
- __isset_bit_vector.set(__NUMNULLS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMNULLS_ISSET_ID, value);
}
public long getNumDVs() {
@@ -247,16 +261,16 @@ public class LongColumnStatsData impleme
}
public void unsetNumDVs() {
- __isset_bit_vector.clear(__NUMDVS_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMDVS_ISSET_ID);
}
/** Returns true if field numDVs is set (has been assigned a value) and false otherwise */
public boolean isSetNumDVs() {
- return __isset_bit_vector.get(__NUMDVS_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __NUMDVS_ISSET_ID);
}
public void setNumDVsIsSet(boolean value) {
- __isset_bit_vector.set(__NUMDVS_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMDVS_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -468,74 +482,11 @@ public class LongColumnStatsData impleme
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // LOW_VALUE
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.lowValue = iprot.readI64();
- setLowValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // HIGH_VALUE
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.highValue = iprot.readI64();
- setHighValueIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // NUM_NULLS
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.numNulls = iprot.readI64();
- setNumNullsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // NUM_DVS
- if (field.type == org.apache.thrift.protocol.TType.I64) {
- this.numDVs = iprot.readI64();
- setNumDVsIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC);
- oprot.writeI64(this.lowValue);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC);
- oprot.writeI64(this.highValue);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC);
- oprot.writeI64(this.numNulls);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(NUM_DVS_FIELD_DESC);
- oprot.writeI64(this.numDVs);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -580,6 +531,7 @@ public class LongColumnStatsData impleme
throw new org.apache.thrift.protocol.TProtocolException("Required field 'numDVs' is unset! Struct:" + toString());
}
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -593,12 +545,124 @@ public class LongColumnStatsData impleme
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);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
+ private static class LongColumnStatsDataStandardSchemeFactory implements SchemeFactory {
+ public LongColumnStatsDataStandardScheme getScheme() {
+ return new LongColumnStatsDataStandardScheme();
+ }
+ }
+
+ private static class LongColumnStatsDataStandardScheme extends StandardScheme<LongColumnStatsData> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, LongColumnStatsData struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // LOW_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.lowValue = iprot.readI64();
+ struct.setLowValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // HIGH_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.highValue = iprot.readI64();
+ struct.setHighValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // NUM_NULLS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.numNulls = iprot.readI64();
+ struct.setNumNullsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // NUM_DVS
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.numDVs = iprot.readI64();
+ struct.setNumDVsIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, LongColumnStatsData struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(LOW_VALUE_FIELD_DESC);
+ oprot.writeI64(struct.lowValue);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(HIGH_VALUE_FIELD_DESC);
+ oprot.writeI64(struct.highValue);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(NUM_NULLS_FIELD_DESC);
+ oprot.writeI64(struct.numNulls);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(NUM_DVS_FIELD_DESC);
+ oprot.writeI64(struct.numDVs);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class LongColumnStatsDataTupleSchemeFactory implements SchemeFactory {
+ public LongColumnStatsDataTupleScheme getScheme() {
+ return new LongColumnStatsDataTupleScheme();
+ }
+ }
+
+ private static class LongColumnStatsDataTupleScheme extends TupleScheme<LongColumnStatsData> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI64(struct.lowValue);
+ oprot.writeI64(struct.highValue);
+ oprot.writeI64(struct.numNulls);
+ oprot.writeI64(struct.numDVs);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, LongColumnStatsData struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.lowValue = iprot.readI64();
+ struct.setLowValueIsSet(true);
+ struct.highValue = iprot.readI64();
+ struct.setHighValueIsSet(true);
+ struct.numNulls = iprot.readI64();
+ struct.setNumNullsIsSet(true);
+ struct.numDVs = iprot.readI64();
+ struct.setNumDVsIsSet(true);
+ }
+ }
+
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java Thu Nov 8 09:44:19 2012
@@ -1,11 +1,21 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -21,11 +31,17 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class MetaException extends Exception implements org.apache.thrift.TBase<MetaException, MetaException._Fields>, java.io.Serializable, Cloneable {
+public class MetaException extends TException implements org.apache.thrift.TBase<MetaException, MetaException._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MetaException");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new MetaExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new MetaExceptionTupleSchemeFactory());
+ }
+
private String message; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class MetaException extends Excep
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -246,42 +261,11 @@ public class MetaException extends Excep
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // MESSAGE
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.message = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(this.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -302,6 +286,7 @@ public class MetaException extends Excep
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -320,5 +305,87 @@ public class MetaException extends Excep
}
}
+ private static class MetaExceptionStandardSchemeFactory implements SchemeFactory {
+ public MetaExceptionStandardScheme getScheme() {
+ return new MetaExceptionStandardScheme();
+ }
+ }
+
+ private static class MetaExceptionStandardScheme extends StandardScheme<MetaException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, MetaException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, MetaException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class MetaExceptionTupleSchemeFactory implements SchemeFactory {
+ public MetaExceptionTupleScheme getScheme() {
+ return new MetaExceptionTupleScheme();
+ }
+ }
+
+ private static class MetaExceptionTupleScheme extends TupleScheme<MetaException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, MetaException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java Thu Nov 8 09:44:19 2012
@@ -1,11 +1,21 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -21,11 +31,17 @@ import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class NoSuchObjectException extends Exception implements org.apache.thrift.TBase<NoSuchObjectException, NoSuchObjectException._Fields>, java.io.Serializable, Cloneable {
+public class NoSuchObjectException extends TException implements org.apache.thrift.TBase<NoSuchObjectException, NoSuchObjectException._Fields>, java.io.Serializable, Cloneable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NoSuchObjectException");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new NoSuchObjectExceptionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new NoSuchObjectExceptionTupleSchemeFactory());
+ }
+
private String message; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -87,7 +103,6 @@ public class NoSuchObjectException exten
}
// isset id assignments
-
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -246,42 +261,11 @@ public class NoSuchObjectException exten
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // MESSAGE
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.message = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.message != null) {
- oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
- oprot.writeString(this.message);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -302,6 +286,7 @@ public class NoSuchObjectException exten
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -320,5 +305,87 @@ public class NoSuchObjectException exten
}
}
+ private static class NoSuchObjectExceptionStandardSchemeFactory implements SchemeFactory {
+ public NoSuchObjectExceptionStandardScheme getScheme() {
+ return new NoSuchObjectExceptionStandardScheme();
+ }
+ }
+
+ private static class NoSuchObjectExceptionStandardScheme extends StandardScheme<NoSuchObjectException> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, NoSuchObjectException struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // MESSAGE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, NoSuchObjectException struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(struct.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class NoSuchObjectExceptionTupleSchemeFactory implements SchemeFactory {
+ public NoSuchObjectExceptionTupleScheme getScheme() {
+ return new NoSuchObjectExceptionTupleScheme();
+ }
+ }
+
+ private static class NoSuchObjectExceptionTupleScheme extends TupleScheme<NoSuchObjectException> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetMessage()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetMessage()) {
+ oprot.writeString(struct.message);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, NoSuchObjectException struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.message = iprot.readString();
+ struct.setMessageIsSet(true);
+ }
+ }
+ }
+
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java Thu Nov 8 09:44:19 2012
@@ -1,11 +1,21 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -27,6 +37,12 @@ public class Order implements org.apache
private static final org.apache.thrift.protocol.TField COL_FIELD_DESC = new org.apache.thrift.protocol.TField("col", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField ORDER_FIELD_DESC = new org.apache.thrift.protocol.TField("order", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new OrderStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new OrderTupleSchemeFactory());
+ }
+
private String col; // required
private int order; // required
@@ -93,8 +109,7 @@ public class Order implements org.apache
// isset id assignments
private static final int __ORDER_ISSET_ID = 0;
- private BitSet __isset_bit_vector = new BitSet(1);
-
+ private byte __isset_bitfield = 0;
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -123,8 +138,7 @@ public class Order implements org.apache
* Performs a deep copy on <i>other</i>.
*/
public Order(Order other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetCol()) {
this.col = other.col;
}
@@ -175,16 +189,16 @@ public class Order implements org.apache
}
public void unsetOrder() {
- __isset_bit_vector.clear(__ORDER_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ORDER_ISSET_ID);
}
/** Returns true if field order is set (has been assigned a value) and false otherwise */
public boolean isSetOrder() {
- return __isset_bit_vector.get(__ORDER_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __ORDER_ISSET_ID);
}
public void setOrderIsSet(boolean value) {
- __isset_bit_vector.set(__ORDER_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ORDER_ISSET_ID, value);
}
public void setFieldValue(_Fields field, Object value) {
@@ -322,53 +336,11 @@ public class Order implements org.apache
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // COL
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.col = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // ORDER
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.order = iprot.readI32();
- setOrderIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.col != null) {
- oprot.writeFieldBegin(COL_FIELD_DESC);
- oprot.writeString(this.col);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(ORDER_FIELD_DESC);
- oprot.writeI32(this.order);
- oprot.writeFieldEnd();
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -393,6 +365,7 @@ public class Order implements org.apache
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -406,12 +379,115 @@ public class Order implements org.apache
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);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
+ private static class OrderStandardSchemeFactory implements SchemeFactory {
+ public OrderStandardScheme getScheme() {
+ return new OrderStandardScheme();
+ }
+ }
+
+ private static class OrderStandardScheme extends StandardScheme<Order> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Order struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // COL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.col = iprot.readString();
+ struct.setColIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // ORDER
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.order = iprot.readI32();
+ struct.setOrderIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Order struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.col != null) {
+ oprot.writeFieldBegin(COL_FIELD_DESC);
+ oprot.writeString(struct.col);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(ORDER_FIELD_DESC);
+ oprot.writeI32(struct.order);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class OrderTupleSchemeFactory implements SchemeFactory {
+ public OrderTupleScheme getScheme() {
+ return new OrderTupleScheme();
+ }
+ }
+
+ private static class OrderTupleScheme extends TupleScheme<Order> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetCol()) {
+ optionals.set(0);
+ }
+ if (struct.isSetOrder()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetCol()) {
+ oprot.writeString(struct.col);
+ }
+ if (struct.isSetOrder()) {
+ oprot.writeI32(struct.order);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Order struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.col = iprot.readString();
+ struct.setColIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.order = iprot.readI32();
+ struct.setOrderIsSet(true);
+ }
+ }
+ }
+
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java Thu Nov 8 09:44:19 2012
@@ -1,11 +1,21 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;
import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
@@ -33,6 +43,12 @@ public class Partition implements org.ap
private static final org.apache.thrift.protocol.TField PARAMETERS_FIELD_DESC = new org.apache.thrift.protocol.TField("parameters", org.apache.thrift.protocol.TType.MAP, (short)7);
private static final org.apache.thrift.protocol.TField PRIVILEGES_FIELD_DESC = new org.apache.thrift.protocol.TField("privileges", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new PartitionStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new PartitionTupleSchemeFactory());
+ }
+
private List<String> values; // required
private String dbName; // required
private String tableName; // required
@@ -40,7 +56,7 @@ public class Partition implements org.ap
private int lastAccessTime; // required
private StorageDescriptor sd; // required
private Map<String,String> parameters; // required
- private PrincipalPrivilegeSet privileges; // required
+ private PrincipalPrivilegeSet privileges; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -124,8 +140,8 @@ public class Partition implements org.ap
// isset id assignments
private static final int __CREATETIME_ISSET_ID = 0;
private static final int __LASTACCESSTIME_ISSET_ID = 1;
- private BitSet __isset_bit_vector = new BitSet(2);
-
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.PRIVILEGES};
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -180,8 +196,7 @@ public class Partition implements org.ap
* Performs a deep copy on <i>other</i>.
*/
public Partition(Partition other) {
- __isset_bit_vector.clear();
- __isset_bit_vector.or(other.__isset_bit_vector);
+ __isset_bitfield = other.__isset_bitfield;
if (other.isSetValues()) {
List<String> __this__values = new ArrayList<String>();
for (String other_element : other.values) {
@@ -332,16 +347,16 @@ public class Partition implements org.ap
}
public void unsetCreateTime() {
- __isset_bit_vector.clear(__CREATETIME_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
/** Returns true if field createTime is set (has been assigned a value) and false otherwise */
public boolean isSetCreateTime() {
- return __isset_bit_vector.get(__CREATETIME_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bit_vector.set(__CREATETIME_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
public int getLastAccessTime() {
@@ -354,16 +369,16 @@ public class Partition implements org.ap
}
public void unsetLastAccessTime() {
- __isset_bit_vector.clear(__LASTACCESSTIME_ISSET_ID);
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID);
}
/** Returns true if field lastAccessTime is set (has been assigned a value) and false otherwise */
public boolean isSetLastAccessTime() {
- return __isset_bit_vector.get(__LASTACCESSTIME_ISSET_ID);
+ return EncodingUtils.testBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID);
}
public void setLastAccessTimeIsSet(boolean value) {
- __isset_bit_vector.set(__LASTACCESSTIME_ISSET_ID, value);
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTACCESSTIME_ISSET_ID, value);
}
public StorageDescriptor getSd() {
@@ -803,165 +818,11 @@ public class Partition implements org.ap
}
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 == org.apache.thrift.protocol.TType.STOP) {
- break;
- }
- switch (field.id) {
- case 1: // VALUES
- if (field.type == org.apache.thrift.protocol.TType.LIST) {
- {
- org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
- this.values = new ArrayList<String>(_list96.size);
- for (int _i97 = 0; _i97 < _list96.size; ++_i97)
- {
- String _elem98; // required
- _elem98 = iprot.readString();
- this.values.add(_elem98);
- }
- iprot.readListEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2: // DB_NAME
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.dbName = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3: // TABLE_NAME
- if (field.type == org.apache.thrift.protocol.TType.STRING) {
- this.tableName = iprot.readString();
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4: // CREATE_TIME
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.createTime = iprot.readI32();
- setCreateTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5: // LAST_ACCESS_TIME
- if (field.type == org.apache.thrift.protocol.TType.I32) {
- this.lastAccessTime = iprot.readI32();
- setLastAccessTimeIsSet(true);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 6: // SD
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.sd = new StorageDescriptor();
- this.sd.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 7: // PARAMETERS
- if (field.type == org.apache.thrift.protocol.TType.MAP) {
- {
- org.apache.thrift.protocol.TMap _map99 = iprot.readMapBegin();
- this.parameters = new HashMap<String,String>(2*_map99.size);
- for (int _i100 = 0; _i100 < _map99.size; ++_i100)
- {
- String _key101; // required
- String _val102; // required
- _key101 = iprot.readString();
- _val102 = iprot.readString();
- this.parameters.put(_key101, _val102);
- }
- iprot.readMapEnd();
- }
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 8: // PRIVILEGES
- if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
- this.privileges = new PrincipalPrivilegeSet();
- this.privileges.read(iprot);
- } else {
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
- }
- iprot.readFieldEnd();
- }
- iprot.readStructEnd();
- validate();
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- validate();
-
- oprot.writeStructBegin(STRUCT_DESC);
- if (this.values != null) {
- oprot.writeFieldBegin(VALUES_FIELD_DESC);
- {
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.values.size()));
- for (String _iter103 : this.values)
- {
- oprot.writeString(_iter103);
- }
- oprot.writeListEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.dbName != null) {
- oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
- oprot.writeString(this.dbName);
- oprot.writeFieldEnd();
- }
- if (this.tableName != null) {
- oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
- oprot.writeString(this.tableName);
- oprot.writeFieldEnd();
- }
- oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
- oprot.writeI32(this.createTime);
- oprot.writeFieldEnd();
- oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC);
- oprot.writeI32(this.lastAccessTime);
- oprot.writeFieldEnd();
- if (this.sd != null) {
- oprot.writeFieldBegin(SD_FIELD_DESC);
- this.sd.write(oprot);
- oprot.writeFieldEnd();
- }
- if (this.parameters != null) {
- oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
- {
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, this.parameters.size()));
- for (Map.Entry<String, String> _iter104 : this.parameters.entrySet())
- {
- oprot.writeString(_iter104.getKey());
- oprot.writeString(_iter104.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- if (this.privileges != null) {
- if (isSetPrivileges()) {
- oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
- this.privileges.write(oprot);
- oprot.writeFieldEnd();
- }
- }
- oprot.writeFieldStop();
- oprot.writeStructEnd();
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@Override
@@ -1032,6 +893,13 @@ public class Partition implements org.ap
public void validate() throws org.apache.thrift.TException {
// check for required fields
+ // check for sub-struct validity
+ if (sd != null) {
+ sd.validate();
+ }
+ if (privileges != null) {
+ privileges.validate();
+ }
}
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -1045,12 +913,327 @@ public class Partition implements org.ap
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);
+ __isset_bitfield = 0;
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
throw new java.io.IOException(te);
}
}
+ private static class PartitionStandardSchemeFactory implements SchemeFactory {
+ public PartitionStandardScheme getScheme() {
+ return new PartitionStandardScheme();
+ }
+ }
+
+ private static class PartitionStandardScheme extends StandardScheme<Partition> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Partition struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // VALUES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list192 = iprot.readListBegin();
+ struct.values = new ArrayList<String>(_list192.size);
+ for (int _i193 = 0; _i193 < _list192.size; ++_i193)
+ {
+ String _elem194; // required
+ _elem194 = iprot.readString();
+ struct.values.add(_elem194);
+ }
+ iprot.readListEnd();
+ }
+ struct.setValuesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // DB_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // TABLE_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.tableName = iprot.readString();
+ struct.setTableNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CREATE_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.createTime = iprot.readI32();
+ struct.setCreateTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // LAST_ACCESS_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.lastAccessTime = iprot.readI32();
+ struct.setLastAccessTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // SD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sd = new StorageDescriptor();
+ struct.sd.read(iprot);
+ struct.setSdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // PARAMETERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map195 = iprot.readMapBegin();
+ struct.parameters = new HashMap<String,String>(2*_map195.size);
+ for (int _i196 = 0; _i196 < _map195.size; ++_i196)
+ {
+ String _key197; // required
+ String _val198; // required
+ _key197 = iprot.readString();
+ _val198 = iprot.readString();
+ struct.parameters.put(_key197, _val198);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setParametersIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // PRIVILEGES
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.privileges = new PrincipalPrivilegeSet();
+ struct.privileges.read(iprot);
+ struct.setPrivilegesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Partition struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.values != null) {
+ oprot.writeFieldBegin(VALUES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.values.size()));
+ for (String _iter199 : struct.values)
+ {
+ oprot.writeString(_iter199);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(struct.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (struct.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(struct.tableName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(CREATE_TIME_FIELD_DESC);
+ oprot.writeI32(struct.createTime);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(LAST_ACCESS_TIME_FIELD_DESC);
+ oprot.writeI32(struct.lastAccessTime);
+ oprot.writeFieldEnd();
+ if (struct.sd != null) {
+ oprot.writeFieldBegin(SD_FIELD_DESC);
+ struct.sd.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.parameters != null) {
+ oprot.writeFieldBegin(PARAMETERS_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.parameters.size()));
+ for (Map.Entry<String, String> _iter200 : struct.parameters.entrySet())
+ {
+ oprot.writeString(_iter200.getKey());
+ oprot.writeString(_iter200.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.privileges != null) {
+ if (struct.isSetPrivileges()) {
+ oprot.writeFieldBegin(PRIVILEGES_FIELD_DESC);
+ struct.privileges.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class PartitionTupleSchemeFactory implements SchemeFactory {
+ public PartitionTupleScheme getScheme() {
+ return new PartitionTupleScheme();
+ }
+ }
+
+ private static class PartitionTupleScheme extends TupleScheme<Partition> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetValues()) {
+ optionals.set(0);
+ }
+ if (struct.isSetDbName()) {
+ optionals.set(1);
+ }
+ if (struct.isSetTableName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetCreateTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetLastAccessTime()) {
+ optionals.set(4);
+ }
+ if (struct.isSetSd()) {
+ optionals.set(5);
+ }
+ if (struct.isSetParameters()) {
+ optionals.set(6);
+ }
+ if (struct.isSetPrivileges()) {
+ optionals.set(7);
+ }
+ oprot.writeBitSet(optionals, 8);
+ if (struct.isSetValues()) {
+ {
+ oprot.writeI32(struct.values.size());
+ for (String _iter201 : struct.values)
+ {
+ oprot.writeString(_iter201);
+ }
+ }
+ }
+ if (struct.isSetDbName()) {
+ oprot.writeString(struct.dbName);
+ }
+ if (struct.isSetTableName()) {
+ oprot.writeString(struct.tableName);
+ }
+ if (struct.isSetCreateTime()) {
+ oprot.writeI32(struct.createTime);
+ }
+ if (struct.isSetLastAccessTime()) {
+ oprot.writeI32(struct.lastAccessTime);
+ }
+ if (struct.isSetSd()) {
+ struct.sd.write(oprot);
+ }
+ if (struct.isSetParameters()) {
+ {
+ oprot.writeI32(struct.parameters.size());
+ for (Map.Entry<String, String> _iter202 : struct.parameters.entrySet())
+ {
+ oprot.writeString(_iter202.getKey());
+ oprot.writeString(_iter202.getValue());
+ }
+ }
+ }
+ if (struct.isSetPrivileges()) {
+ struct.privileges.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Partition struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(8);
+ if (incoming.get(0)) {
+ {
+ org.apache.thrift.protocol.TList _list203 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.values = new ArrayList<String>(_list203.size);
+ for (int _i204 = 0; _i204 < _list203.size; ++_i204)
+ {
+ String _elem205; // required
+ _elem205 = iprot.readString();
+ struct.values.add(_elem205);
+ }
+ }
+ struct.setValuesIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.dbName = iprot.readString();
+ struct.setDbNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.tableName = iprot.readString();
+ struct.setTableNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.createTime = iprot.readI32();
+ struct.setCreateTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.lastAccessTime = iprot.readI32();
+ struct.setLastAccessTimeIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.sd = new StorageDescriptor();
+ struct.sd.read(iprot);
+ struct.setSdIsSet(true);
+ }
+ if (incoming.get(6)) {
+ {
+ org.apache.thrift.protocol.TMap _map206 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.parameters = new HashMap<String,String>(2*_map206.size);
+ for (int _i207 = 0; _i207 < _map206.size; ++_i207)
+ {
+ String _key208; // required
+ String _val209; // required
+ _key208 = iprot.readString();
+ _val209 = iprot.readString();
+ struct.parameters.put(_key208, _val209);
+ }
+ }
+ struct.setParametersIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.privileges = new PrincipalPrivilegeSet();
+ struct.privileges.read(iprot);
+ struct.setPrivilegesIsSet(true);
+ }
+ }
+ }
+
}
Modified: hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java
URL: http://svn.apache.org/viewvc/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java?rev=1406984&r1=1406983&r2=1406984&view=diff
==============================================================================
--- hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java (original)
+++ hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/PartitionEventType.java Thu Nov 8 09:44:19 2012
@@ -1,7 +1,8 @@
/**
- * Autogenerated by Thrift Compiler (0.7.0)
+ * Autogenerated by Thrift Compiler (0.9.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
*/
package org.apache.hadoop.hive.metastore.api;