Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC3448B1F for ; Mon, 5 Sep 2011 09:09:36 +0000 (UTC) Received: (qmail 1059 invoked by uid 500); 5 Sep 2011 09:09:36 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 847 invoked by uid 500); 5 Sep 2011 09:09:33 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 98629 invoked by uid 99); 5 Sep 2011 09:09:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2011 09:09:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Sep 2011 09:09:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 492AE2388BFF for ; Mon, 5 Sep 2011 09:08:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1165216 [15/19] - in /hive/branches/branch-0.8: ./ cli/ eclipse-templates/ ivy/ jdbc/ lib/ metastore/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ metastore/src/gen/thrift/ge... Date: Mon, 05 Sep 2011 09:08:20 -0000 To: commits@hive.apache.org From: amareshwari@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110905090827.492AE2388BFF@eris.apache.org> Modified: hive/branches/branch-0.8/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java (original) +++ hive/branches/branch-0.8/ql/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/ql/plan/api/Task.java Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -20,35 +20,29 @@ 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.*; - -public class Task implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("Task"); - - private static final TField TASK_ID_FIELD_DESC = new TField("taskId", TType.STRING, (short)1); - private static final TField TASK_TYPE_FIELD_DESC = new TField("taskType", TType.I32, (short)2); - private static final TField TASK_ATTRIBUTES_FIELD_DESC = new TField("taskAttributes", TType.MAP, (short)3); - private static final TField TASK_COUNTERS_FIELD_DESC = new TField("taskCounters", TType.MAP, (short)4); - private static final TField OPERATOR_GRAPH_FIELD_DESC = new TField("operatorGraph", TType.STRUCT, (short)5); - private static final TField OPERATOR_LIST_FIELD_DESC = new TField("operatorList", TType.LIST, (short)6); - private static final TField DONE_FIELD_DESC = new TField("done", TType.BOOL, (short)7); - private static final TField STARTED_FIELD_DESC = new TField("started", TType.BOOL, (short)8); - - private String taskId; - private TaskType taskType; - private Map taskAttributes; - private Map taskCounters; - private Graph operatorGraph; - private List operatorList; - private boolean done; - private boolean started; +public class Task implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Task"); + + private static final org.apache.thrift.protocol.TField TASK_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("taskId", org.apache.thrift.protocol.TType.STRING, (short)1); + private static final org.apache.thrift.protocol.TField TASK_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("taskType", org.apache.thrift.protocol.TType.I32, (short)2); + private static final org.apache.thrift.protocol.TField TASK_ATTRIBUTES_FIELD_DESC = new org.apache.thrift.protocol.TField("taskAttributes", org.apache.thrift.protocol.TType.MAP, (short)3); + private static final org.apache.thrift.protocol.TField TASK_COUNTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("taskCounters", org.apache.thrift.protocol.TType.MAP, (short)4); + private static final org.apache.thrift.protocol.TField OPERATOR_GRAPH_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorGraph", org.apache.thrift.protocol.TType.STRUCT, (short)5); + private static final org.apache.thrift.protocol.TField OPERATOR_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("operatorList", org.apache.thrift.protocol.TType.LIST, (short)6); + private static final org.apache.thrift.protocol.TField DONE_FIELD_DESC = new org.apache.thrift.protocol.TField("done", org.apache.thrift.protocol.TType.BOOL, (short)7); + private static final org.apache.thrift.protocol.TField STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("started", org.apache.thrift.protocol.TType.BOOL, (short)8); + + private String taskId; // required + private TaskType taskType; // required + private Map taskAttributes; // required + private Map taskCounters; // required + private Graph operatorGraph; // required + private List operatorList; // required + private boolean done; // required + private boolean started; // required /** 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 { TASK_ID((short)1, "taskId"), /** * @@ -135,32 +129,32 @@ public class Task implements TBase 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.TASK_ID, new FieldMetaData("taskId", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.TASK_TYPE, new FieldMetaData("taskType", TFieldRequirementType.DEFAULT, - new EnumMetaData(TType.ENUM, TaskType.class))); - tmpMap.put(_Fields.TASK_ATTRIBUTES, new FieldMetaData("taskAttributes", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.TASK_COUNTERS, new FieldMetaData("taskCounters", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - new FieldValueMetaData(TType.I64)))); - tmpMap.put(_Fields.OPERATOR_GRAPH, new FieldMetaData("operatorGraph", TFieldRequirementType.OPTIONAL, - new StructMetaData(TType.STRUCT, Graph.class))); - tmpMap.put(_Fields.OPERATOR_LIST, new FieldMetaData("operatorList", TFieldRequirementType.OPTIONAL, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, Operator.class)))); - tmpMap.put(_Fields.DONE, new FieldMetaData("done", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); - tmpMap.put(_Fields.STARTED, new FieldMetaData("started", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.BOOL))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.TASK_ID, new org.apache.thrift.meta_data.FieldMetaData("taskId", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.TASK_TYPE, new org.apache.thrift.meta_data.FieldMetaData("taskType", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TaskType.class))); + tmpMap.put(_Fields.TASK_ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("taskAttributes", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.TASK_COUNTERS, new org.apache.thrift.meta_data.FieldMetaData("taskCounters", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))); + tmpMap.put(_Fields.OPERATOR_GRAPH, new org.apache.thrift.meta_data.FieldMetaData("operatorGraph", org.apache.thrift.TFieldRequirementType.OPTIONAL, + new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Graph.class))); + tmpMap.put(_Fields.OPERATOR_LIST, new org.apache.thrift.meta_data.FieldMetaData("operatorList", org.apache.thrift.TFieldRequirementType.OPTIONAL, + 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, Operator.class)))); + tmpMap.put(_Fields.DONE, new org.apache.thrift.meta_data.FieldMetaData("done", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.STARTED, new org.apache.thrift.meta_data.FieldMetaData("started", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Task.class, metaDataMap); } public Task() { @@ -271,7 +265,7 @@ public class Task implements TBase(2*_map22.size); for (int _i23 = 0; _i23 < _map22.size; ++_i23) { - String _key24; - String _val25; + String _key24; // required + String _val25; // required _key24 = iprot.readString(); _val25 = iprot.readString(); this.taskAttributes.put(_key24, _val25); @@ -840,18 +834,18 @@ public class Task implements TBase(2*_map26.size); for (int _i27 = 0; _i27 < _map26.size; ++_i27) { - String _key28; - long _val29; + String _key28; // required + long _val29; // required _key28 = iprot.readString(); _val29 = iprot.readI64(); this.taskCounters.put(_key28, _val29); @@ -859,25 +853,25 @@ public class Task implements TBase(_list30.size); for (int _i31 = 0; _i31 < _list30.size; ++_i31) { - Operator _elem32; + Operator _elem32; // required _elem32 = new Operator(); _elem32.read(iprot); this.operatorList.add(_elem32); @@ -885,27 +879,27 @@ public class Task implements TBase _iter33 : this.taskAttributes.entrySet()) { oprot.writeString(_iter33.getKey()); @@ -943,7 +937,7 @@ public class Task implements TBase _iter34 : this.taskCounters.entrySet()) { oprot.writeString(_iter34.getKey()); @@ -964,7 +958,7 @@ public class Task implements TBase + + Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.cpp URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.cpp?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.cpp (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.cpp Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.h URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.h?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.h (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_constants.h Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.cpp URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.cpp?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.cpp (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.cpp Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.h URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.h?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.h (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-cpp/serde_types.h Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/Constants.java Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/InnerStruct.java Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -20,21 +20,15 @@ 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.*; +public class InnerStruct implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InnerStruct"); -public class InnerStruct implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("InnerStruct"); + private static final org.apache.thrift.protocol.TField FIELD0_FIELD_DESC = new org.apache.thrift.protocol.TField("field0", org.apache.thrift.protocol.TType.I32, (short)1); - private static final TField FIELD0_FIELD_DESC = new TField("field0", TType.I32, (short)1); - - private int field0; + private int field0; // required /** 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 { FIELD0((short)1, "field0"); private static final Map byName = new HashMap(); @@ -95,13 +89,13 @@ public class InnerStruct implements TBas private static final int __FIELD0_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FIELD0, new FieldMetaData("field0", 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.FIELD0, new org.apache.thrift.meta_data.FieldMetaData("field0", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InnerStruct.class, metaDataMap); } public InnerStruct() { @@ -147,7 +141,7 @@ public class InnerStruct implements TBas __isset_bit_vector.clear(__FIELD0_ISSET_ID); } - /** Returns true if field field0 is set (has been asigned a value) and false otherwise */ + /** Returns true if field field0 is set (has been assigned a value) and false otherwise */ public boolean isSetField0() { return __isset_bit_vector.get(__FIELD0_ISSET_ID); } @@ -172,13 +166,13 @@ public class InnerStruct implements TBas public Object getFieldValue(_Fields field) { switch (field) { case FIELD0: - return new Integer(getField0()); + return Integer.valueOf(getField0()); } 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(); @@ -234,7 +228,7 @@ public class InnerStruct implements TBas return lastComparison; } if (isSetField0()) { - lastComparison = TBaseHelper.compareTo(this.field0, typedOther.field0); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field0, typedOther.field0); if (lastComparison != 0) { return lastComparison; } @@ -246,26 +240,26 @@ public class InnerStruct implements TBas 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: // FIELD0 - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.field0 = iprot.readI32(); setField0IsSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -273,7 +267,7 @@ public class InnerStruct implements TBas 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); @@ -296,9 +290,27 @@ public class InnerStruct implements TBas 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); + } + } + } Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -20,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.*; - -public class ThriftTestObj implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("ThriftTestObj"); - - private static final TField FIELD1_FIELD_DESC = new TField("field1", TType.I32, (short)1); - private static final TField FIELD2_FIELD_DESC = new TField("field2", TType.STRING, (short)2); - private static final TField FIELD3_FIELD_DESC = new TField("field3", TType.LIST, (short)3); - - private int field1; - private String field2; - private List field3; +public class ThriftTestObj implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ThriftTestObj"); + + private static final org.apache.thrift.protocol.TField FIELD1_FIELD_DESC = new org.apache.thrift.protocol.TField("field1", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField FIELD2_FIELD_DESC = new org.apache.thrift.protocol.TField("field2", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField FIELD3_FIELD_DESC = new org.apache.thrift.protocol.TField("field3", org.apache.thrift.protocol.TType.LIST, (short)3); + + private int field1; // required + private String field2; // required + private List field3; // required /** 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 { FIELD1((short)1, "field1"), FIELD2((short)2, "field2"), FIELD3((short)3, "field3"); @@ -105,18 +99,18 @@ public class ThriftTestObj implements TB private static final int __FIELD1_ISSET_ID = 0; private BitSet __isset_bit_vector = new BitSet(1); - public static final Map<_Fields, FieldMetaData> metaDataMap; + public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { - Map<_Fields, FieldMetaData> tmpMap = new EnumMap<_Fields, FieldMetaData>(_Fields.class); - tmpMap.put(_Fields.FIELD1, new FieldMetaData("field1", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.FIELD2, new FieldMetaData("field2", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.FIELD3, new FieldMetaData("field3", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, InnerStruct.class)))); + Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); + tmpMap.put(_Fields.FIELD1, new org.apache.thrift.meta_data.FieldMetaData("field1", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.FIELD2, new org.apache.thrift.meta_data.FieldMetaData("field2", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.FIELD3, new org.apache.thrift.meta_data.FieldMetaData("field3", 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, InnerStruct.class)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ThriftTestObj.class, metaDataMap); } public ThriftTestObj() { @@ -178,7 +172,7 @@ public class ThriftTestObj implements TB __isset_bit_vector.clear(__FIELD1_ISSET_ID); } - /** Returns true if field field1 is set (has been asigned a value) and false otherwise */ + /** Returns true if field field1 is set (has been assigned a value) and false otherwise */ public boolean isSetField1() { return __isset_bit_vector.get(__FIELD1_ISSET_ID); } @@ -199,7 +193,7 @@ public class ThriftTestObj implements TB this.field2 = null; } - /** Returns true if field field2 is set (has been asigned a value) and false otherwise */ + /** Returns true if field field2 is set (has been assigned a value) and false otherwise */ public boolean isSetField2() { return this.field2 != null; } @@ -237,7 +231,7 @@ public class ThriftTestObj implements TB this.field3 = null; } - /** Returns true if field field3 is set (has been asigned a value) and false otherwise */ + /** Returns true if field field3 is set (has been assigned a value) and false otherwise */ public boolean isSetField3() { return this.field3 != null; } @@ -280,7 +274,7 @@ public class ThriftTestObj implements TB public Object getFieldValue(_Fields field) { switch (field) { case FIELD1: - return new Integer(getField1()); + return Integer.valueOf(getField1()); case FIELD2: return getField2(); @@ -292,7 +286,7 @@ public class ThriftTestObj 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(); @@ -370,7 +364,7 @@ public class ThriftTestObj implements TB return lastComparison; } if (isSetField1()) { - lastComparison = TBaseHelper.compareTo(this.field1, typedOther.field1); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field1, typedOther.field1); if (lastComparison != 0) { return lastComparison; } @@ -380,7 +374,7 @@ public class ThriftTestObj implements TB return lastComparison; } if (isSetField2()) { - lastComparison = TBaseHelper.compareTo(this.field2, typedOther.field2); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field2, typedOther.field2); if (lastComparison != 0) { return lastComparison; } @@ -390,7 +384,7 @@ public class ThriftTestObj implements TB return lastComparison; } if (isSetField3()) { - lastComparison = TBaseHelper.compareTo(this.field3, typedOther.field3); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.field3, typedOther.field3); if (lastComparison != 0) { return lastComparison; } @@ -402,39 +396,39 @@ public class ThriftTestObj 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: // FIELD1 - if (field.type == TType.I32) { + if (field.type == org.apache.thrift.protocol.TType.I32) { this.field1 = iprot.readI32(); setField1IsSet(true); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 2: // FIELD2 - if (field.type == TType.STRING) { + if (field.type == org.apache.thrift.protocol.TType.STRING) { this.field2 = iprot.readString(); } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 3: // FIELD3 - 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.field3 = new ArrayList(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - InnerStruct _elem2; + InnerStruct _elem2; // required _elem2 = new InnerStruct(); _elem2.read(iprot); this.field3.add(_elem2); @@ -442,11 +436,11 @@ public class ThriftTestObj implements TB iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; default: - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } iprot.readFieldEnd(); } @@ -454,7 +448,7 @@ public class ThriftTestObj 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); @@ -469,7 +463,7 @@ public class ThriftTestObj implements TB if (this.field3 != null) { oprot.writeFieldBegin(FIELD3_FIELD_DESC); { - oprot.writeListBegin(new TList(TType.STRUCT, this.field3.size())); + oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.field3.size())); for (InnerStruct _iter3 : this.field3) { _iter3.write(oprot); @@ -510,9 +504,27 @@ public class ThriftTestObj 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 { + // 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); + } + } + } Modified: hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java URL: http://svn.apache.org/viewvc/hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java?rev=1165216&r1=1165215&r2=1165216&view=diff ============================================================================== --- hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java (original) +++ hive/branches/branch-0.8/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java Mon Sep 5 09:08:16 2011 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift + * Autogenerated by Thrift Compiler (0.7.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING */ @@ -20,31 +20,25 @@ 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.*; - -public class Complex implements TBase, java.io.Serializable, Cloneable { - private static final TStruct STRUCT_DESC = new TStruct("Complex"); - - private static final TField AINT_FIELD_DESC = new TField("aint", TType.I32, (short)1); - private static final TField A_STRING_FIELD_DESC = new TField("aString", TType.STRING, (short)2); - private static final TField LINT_FIELD_DESC = new TField("lint", TType.LIST, (short)3); - private static final TField L_STRING_FIELD_DESC = new TField("lString", TType.LIST, (short)4); - private static final TField LINT_STRING_FIELD_DESC = new TField("lintString", TType.LIST, (short)5); - private static final TField M_STRING_STRING_FIELD_DESC = new TField("mStringString", TType.MAP, (short)6); - - private int aint; - private String aString; - private List lint; - private List lString; - private List lintString; - private Map mStringString; +public class Complex implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { + private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Complex"); + + private static final org.apache.thrift.protocol.TField AINT_FIELD_DESC = new org.apache.thrift.protocol.TField("aint", org.apache.thrift.protocol.TType.I32, (short)1); + private static final org.apache.thrift.protocol.TField A_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("aString", org.apache.thrift.protocol.TType.STRING, (short)2); + private static final org.apache.thrift.protocol.TField LINT_FIELD_DESC = new org.apache.thrift.protocol.TField("lint", org.apache.thrift.protocol.TType.LIST, (short)3); + private static final org.apache.thrift.protocol.TField L_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("lString", org.apache.thrift.protocol.TType.LIST, (short)4); + private static final org.apache.thrift.protocol.TField LINT_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("lintString", org.apache.thrift.protocol.TType.LIST, (short)5); + private static final org.apache.thrift.protocol.TField M_STRING_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("mStringString", org.apache.thrift.protocol.TType.MAP, (short)6); + + private int aint; // required + private String aString; // required + private List lint; // required + private List lString; // required + private List lintString; // required + private Map mStringString; // required /** 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 { AINT((short)1, "aint"), A_STRING((short)2, "aString"), LINT((short)3, "lint"), @@ -120,28 +114,28 @@ public class Complex implements TBase 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.AINT, new FieldMetaData("aint", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.I32))); - tmpMap.put(_Fields.A_STRING, new FieldMetaData("aString", TFieldRequirementType.DEFAULT, - new FieldValueMetaData(TType.STRING))); - tmpMap.put(_Fields.LINT, new FieldMetaData("lint", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.I32)))); - tmpMap.put(_Fields.L_STRING, new FieldMetaData("lString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new FieldValueMetaData(TType.STRING)))); - tmpMap.put(_Fields.LINT_STRING, new FieldMetaData("lintString", TFieldRequirementType.DEFAULT, - new ListMetaData(TType.LIST, - new StructMetaData(TType.STRUCT, IntString.class)))); - tmpMap.put(_Fields.M_STRING_STRING, new FieldMetaData("mStringString", TFieldRequirementType.DEFAULT, - new MapMetaData(TType.MAP, - new FieldValueMetaData(TType.STRING), - 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.AINT, new org.apache.thrift.meta_data.FieldMetaData("aint", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))); + tmpMap.put(_Fields.A_STRING, new org.apache.thrift.meta_data.FieldMetaData("aString", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))); + tmpMap.put(_Fields.LINT, new org.apache.thrift.meta_data.FieldMetaData("lint", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)))); + tmpMap.put(_Fields.L_STRING, new org.apache.thrift.meta_data.FieldMetaData("lString", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); + tmpMap.put(_Fields.LINT_STRING, new org.apache.thrift.meta_data.FieldMetaData("lintString", 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, IntString.class)))); + tmpMap.put(_Fields.M_STRING_STRING, new org.apache.thrift.meta_data.FieldMetaData("mStringString", org.apache.thrift.TFieldRequirementType.DEFAULT, + new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), + new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)))); metaDataMap = Collections.unmodifiableMap(tmpMap); - FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); + org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Complex.class, metaDataMap); } public Complex() { @@ -241,7 +235,7 @@ public class Complex implements TBase(_list0.size); for (int _i1 = 0; _i1 < _list0.size; ++_i1) { - int _elem2; + int _elem2; // required _elem2 = iprot.readI32(); this.lint.add(_elem2); } iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 4: // L_STRING - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list3 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list3 = iprot.readListBegin(); this.lString = new ArrayList(_list3.size); for (int _i4 = 0; _i4 < _list3.size; ++_i4) { - String _elem5; + String _elem5; // required _elem5 = iprot.readString(); this.lString.add(_elem5); } iprot.readListEnd(); } } else { - TProtocolUtil.skip(iprot, field.type); + org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); } break; case 5: // LINT_STRING - if (field.type == TType.LIST) { + if (field.type == org.apache.thrift.protocol.TType.LIST) { { - TList _list6 = iprot.readListBegin(); + org.apache.thrift.protocol.TList _list6 = iprot.readListBegin(); this.lintString = new ArrayList(_list6.size); for (int _i7 = 0; _i7 < _list6.size; ++_i7) { - IntString _elem8; + IntString _elem8; // required _elem8 = new IntString(); _elem8.read(iprot); this.lintString.add(_elem8); @@ -745,18 +739,18 @@ public class Complex implements TBase(2*_map9.size); for (int _i10 = 0; _i10 < _map9.size; ++_i10) { - String _key11; - String _val12; + String _key11; // required + String _val12; // required _key11 = iprot.readString(); _val12 = iprot.readString(); this.mStringString.put(_key11, _val12); @@ -764,11 +758,11 @@ public class Complex implements TBase _iter16 : this.mStringString.entrySet()) { oprot.writeString(_iter16.getKey()); @@ -893,9 +887,27 @@ public class Complex implements TBase