You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2009/07/14 02:01:08 UTC
svn commit: r793758 [1/11] - in /hadoop/hive/trunk: ./
jdbc/src/java/org/apache/hadoop/hive/jdbc/ lib/ metastore/ metastore/if/
metastore/include/
metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/
metastore/src/gen-php/ metastore/src/gen...
Author: namit
Date: Tue Jul 14 00:01:05 2009
New Revision: 793758
URL: http://svn.apache.org/viewvc?rev=793758&view=rev
Log:
HIVE-438. Make Hive work with apache thrift
(Raghu Murthy via namit)
Removed:
hadoop/hive/trunk/metastore/include/
Modified:
hadoop/hive/trunk/CHANGES.txt
hadoop/hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
hadoop/hive/trunk/lib/libfb303.jar
hadoop/hive/trunk/lib/libthrift.jar
hadoop/hive/trunk/metastore/build.xml
hadoop/hive/trunk/metastore/if/hive_metastore.thrift
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidOperationException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/MetaException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/NoSuchObjectException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Order.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Partition.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Schema.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/SerDeInfo.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/StorageDescriptor.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Table.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Type.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownDBException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/UnknownTableException.java
hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Version.java
hadoop/hive/trunk/metastore/src/gen-php/ThriftHiveMetastore.php
hadoop/hive/trunk/metastore/src/gen-php/hive_metastore_constants.php
hadoop/hive/trunk/metastore/src/gen-php/hive_metastore_types.php
hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ThriftHiveMetastore.py
hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/constants.py
hadoop/hive/trunk/metastore/src/gen-py/hive_metastore/ttypes.py
hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
hadoop/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/GroupByOperator.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/HiveMetaStoreChecker.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java
hadoop/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/plan/PlanUtils.java
hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/QTestUtil.java
hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/io/TestFlatFileInputFormat.java
hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHive.java
hadoop/hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreChecker.java
hadoop/hive/trunk/ql/src/test/queries/clientnegative/invalid_create_tbl1.q
hadoop/hive/trunk/ql/src/test/results/clientnegative/invalid_create_tbl1.q.out
hadoop/hive/trunk/ql/src/test/results/clientpositive/join35.q.out
hadoop/hive/trunk/ql/src/test/results/clientpositive/sample8.q.out
hadoop/hive/trunk/ql/src/test/results/compiler/plan/case_sensitivity.q.xml
hadoop/hive/trunk/ql/src/test/results/compiler/plan/input5.q.xml
hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_testxpath.q.xml
hadoop/hive/trunk/ql/src/test/results/compiler/plan/input_testxpath2.q.xml
hadoop/hive/trunk/ql/src/test/results/compiler/plan/join2.q.xml
hadoop/hive/trunk/serde/build.xml
hadoop/hive/trunk/serde/if/serde.thrift
hadoop/hive/trunk/serde/if/test/testthrift.thrift
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde/Constants.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde/test/Constants.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde/test/InnerStruct.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde/test/ThriftTestObj.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Complex.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/Constants.java
hadoop/hive/trunk/serde/src/gen-java/org/apache/hadoop/hive/serde2/thrift/test/IntString.java
hadoop/hive/trunk/serde/src/gen-php/serde_constants.php
hadoop/hive/trunk/serde/src/gen-py/org_apache_hadoop_hive_serde/constants.py
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/TReflectionUtils.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/ThriftByteStreamTypedSerDe.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/ThriftDeserializer.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeField.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldList.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunction.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStruct.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStructBase.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBase.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBool.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeByte.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDouble.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeMap.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeSet.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeString.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypedef.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei16.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei32.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei64.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammarTokenManager.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorFactory.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ObjectInspectorUtils.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/objectinspector/ReflectionStructObjectInspector.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/ConfigurableTProtocol.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/SkippableTProtocol.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/TBinarySortableProtocol.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/TCTLSeparatedProtocol.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/WriteNullsProtocol.java
hadoop/hive/trunk/serde/src/java/org/apache/hadoop/hive/serde2/thrift/WriteTextProtocol.java
hadoop/hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/TestTCTLSeparatedProtocol.java
hadoop/hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java
hadoop/hive/trunk/serde/src/test/org/apache/hadoop/hive/serde2/thrift_test/CreateSequenceFile.java
hadoop/hive/trunk/service/build.xml
hadoop/hive/trunk/service/if/hive_service.thrift
hadoop/hive/trunk/service/include/thrift/fb303/if/fb303.thrift
hadoop/hive/trunk/service/src/gen-javabean/org/apache/hadoop/hive/service/Constants.java
hadoop/hive/trunk/service/src/gen-javabean/org/apache/hadoop/hive/service/HiveServerException.java
hadoop/hive/trunk/service/src/gen-javabean/org/apache/hadoop/hive/service/ThriftHive.java
hadoop/hive/trunk/service/src/gen-php/ThriftHive.php
hadoop/hive/trunk/service/src/gen-php/hive_service_types.php
hadoop/hive/trunk/service/src/gen-py/hive_service/ThriftHive.py
hadoop/hive/trunk/service/src/gen-py/hive_service/ttypes.py
hadoop/hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveClient.java
hadoop/hive/trunk/service/src/java/org/apache/hadoop/hive/service/HiveServer.java
hadoop/hive/trunk/service/src/test/org/apache/hadoop/hive/service/TestHiveServer.java
Modified: hadoop/hive/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/CHANGES.txt?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/CHANGES.txt (original)
+++ hadoop/hive/trunk/CHANGES.txt Tue Jul 14 00:01:05 2009
@@ -68,6 +68,9 @@
HIVE-622. add UDF reverse
(Emil Ibrishimov via namit)
+ HIVE-438. Make Hive work with apache thrift
+ (Raghu Murthy via namit)
+
IMPROVEMENTS
HIVE-389. Option to build without ivy (jssarma)
Modified: hadoop/hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java (original)
+++ hadoop/hive/trunk/jdbc/src/java/org/apache/hadoop/hive/jdbc/HiveConnection.java Tue Jul 14 00:01:05 2009
@@ -24,10 +24,10 @@
import org.apache.hadoop.hive.service.HiveClient;
import org.apache.hadoop.hive.service.HiveServer;
import org.apache.hadoop.hive.service.HiveInterface;
-import com.facebook.thrift.protocol.TProtocol;
-import com.facebook.thrift.protocol.TBinaryProtocol;
-import com.facebook.thrift.transport.TSocket;
-import com.facebook.thrift.transport.TTransport;
+import org.apache.thrift.protocol.TProtocol;
+import org.apache.thrift.protocol.TBinaryProtocol;
+import org.apache.thrift.transport.TSocket;
+import org.apache.thrift.transport.TTransport;
import org.apache.hadoop.hive.conf.HiveConf;
import java.net.URI;
Modified: hadoop/hive/trunk/lib/libfb303.jar
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/lib/libfb303.jar?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
Binary files - no diff available.
Modified: hadoop/hive/trunk/lib/libthrift.jar
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/lib/libthrift.jar?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
Binary files - no diff available.
Modified: hadoop/hive/trunk/metastore/build.xml
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/build.xml?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/build.xml (original)
+++ hadoop/hive/trunk/metastore/build.xml Tue Jul 14 00:01:05 2009
@@ -25,7 +25,7 @@
<target name="thriftif">
<echo>Executing thrift (which needs to be in your path) to build java metastore APIs.... </echo>
<exec executable="thrift" failonerror="true" dir=".">
- <arg line="--gen java:beans -php --gen py -I ${basedir}/include/ -o ${src.dir} if/hive_metastore.thrift " />
+ <arg line="--gen java:beans --gen php --gen py -I ${basedir}/../service/include/ -o ${src.dir} if/hive_metastore.thrift " />
</exec>
</target>
Modified: hadoop/hive/trunk/metastore/if/hive_metastore.thrift
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/if/hive_metastore.thrift?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/if/hive_metastore.thrift (original)
+++ hadoop/hive/trunk/metastore/if/hive_metastore.thrift Tue Jul 14 00:01:05 2009
@@ -6,7 +6,7 @@
include "thrift/fb303/if/fb303.thrift"
namespace java org.apache.hadoop.hive.metastore.api
-php_namespace metastore
+namespace php metastore
struct Version {
1: string version,
@@ -101,35 +101,35 @@
exception MetaException {
- string message
+ 1: string message
}
exception UnknownTableException {
- string message
+ 1: string message
}
exception UnknownDBException {
- string message
+ 1: string message
}
exception AlreadyExistsException {
- string message
+ 1: string message
}
exception InvalidObjectException {
- string message
+ 1: string message
}
exception NoSuchObjectException {
- string message
+ 1: string message
}
exception IndexAlreadyExistsException {
- string message
+ 1: string message
}
exception InvalidOperationException {
- string message
+ 1: string message
}
/**
@@ -150,7 +150,7 @@
map<string, Type> get_type_all(1:string name)
throws(1:MetaException o2)
- list<FieldSchema> get_fields(string db_name, string table_name) throws (MetaException o1, UnknownTableException o2, UnknownDBException o3),
+ list<FieldSchema> get_fields(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3),
// create a Hive table. Following fields must be set
// tableName
@@ -165,8 +165,8 @@
// delete data (including partitions) if deleteData is set to true
void drop_table(1:string dbname, 2:string name, 3:bool deleteData)
throws(1:NoSuchObjectException o1, 2:MetaException o3)
- list<string> get_tables(string db_name, string pattern)
- throws (MetaException o1)
+ list<string> get_tables(1: string db_name, 2: string pattern)
+ throws (1: MetaException o1)
Table get_table(1:string dbname, 2:string tbl_name)
throws (1:MetaException o1, 2:NoSuchObjectException o2)
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/AlreadyExistsException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
-
-public class AlreadyExistsException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public AlreadyExistsException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class AlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("AlreadyExistsException");
+ private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+ private String message;
+ public static final int MESSAGE = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(AlreadyExistsException.class, metaDataMap);
+ }
+
+ public AlreadyExistsException() {
+ }
+
+ public AlreadyExistsException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public AlreadyExistsException(AlreadyExistsException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
-public AlreadyExistsException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+ @Override
+ public AlreadyExistsException clone() {
+ return new AlreadyExistsException(this);
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ // Returns true if field message is set (has been asigned a value) and false otherwise
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
-public String getMessage() {
-return this.message;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return getMessage();
-public void unsetMessage() {
-this.__isset.message = false;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(Object that) {
-if (that == null)
- return false;
-if (that instanceof AlreadyExistsException)
- return this.equals((AlreadyExistsException)that);
-return false;
-}
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return isSetMessage();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(AlreadyExistsException that) {
-if (that == null)
- return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
- return false;
-if (!this.message.equals(that.message))
- return false;
-}
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof AlreadyExistsException)
+ return this.equals((AlreadyExistsException)that);
+ return false;
+ }
+
+ public boolean equals(AlreadyExistsException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
-return true;
-}
+ return true;
+ }
-public int hashCode() {
-return 0;
-}
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case MESSAGE:
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) {
- break;
-}
-switch (field.id)
-{
- case -1:
- if (field.type == TType.STRING) {
- this.message = iprot.readString();
- this.__isset.message = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, field.type);
- break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
+ validate();
+ }
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("AlreadyExistsException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+ public void write(TProtocol oprot) throws TException {
+ validate();
-public String toString() {
-StringBuilder sb = new StringBuilder("AlreadyExistsException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("AlreadyExistsException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
}
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Constants.java Tue Jul 14 00:01:05 2009
@@ -11,7 +11,8 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
public class Constants {
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Database.java Tue Jul 14 00:01:05 2009
@@ -11,167 +11,270 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
-
-public class Database implements TBase, java.io.Serializable {
-private String name;
-private String description;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean name = false;
-public boolean description = false;
-}
-
-public Database() {
-}
-
-public Database(
-String name,
-String description)
-{
-this();
-this.name = name;
-this.__isset.name = true;
-this.description = description;
-this.__isset.description = true;
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Database implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("Database");
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+ private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
+
+ private String name;
+ public static final int NAME = 1;
+ private String description;
+ public static final int DESCRIPTION = 2;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(Database.class, metaDataMap);
+ }
+
+ public Database() {
+ }
+
+ public Database(
+ String name,
+ String description)
+ {
+ this();
+ this.name = name;
+ this.description = description;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Database(Database other) {
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
+ }
-public String getName() {
-return this.name;
-}
+ @Override
+ public Database clone() {
+ return new Database(this);
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public void unsetName() {
+ this.name = null;
+ }
+
+ // Returns true if field name is set (has been asigned a value) and false otherwise
+ public boolean isSetName() {
+ return this.name != null;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public void unsetDescription() {
+ this.description = null;
+ }
+
+ // Returns true if field description is set (has been asigned a value) and false otherwise
+ public boolean isSetDescription() {
+ return this.description != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((String)value);
+ }
+ break;
-public void setName(String name) {
-this.name = name;
-this.__isset.name = true;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public void unsetName() {
-this.__isset.name = false;
-}
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case NAME:
+ return getName();
-public String getDescription() {
-return this.description;
-}
-
-public void setDescription(String description) {
-this.description = description;
-this.__isset.description = true;
-}
+ case DESCRIPTION:
+ return getDescription();
-public void unsetDescription() {
-this.__isset.description = false;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(Object that) {
-if (that == null)
- return false;
-if (that instanceof Database)
- return this.equals((Database)that);
-return false;
-}
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case NAME:
+ return isSetName();
+ case DESCRIPTION:
+ return isSetDescription();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(Database that) {
-if (that == null)
- return false;
-
-boolean this_present_name = true && (this.name != null);
-boolean that_present_name = true && (that.name != null);
-if (this_present_name || that_present_name) {
-if (!(this_present_name && that_present_name))
- return false;
-if (!this.name.equals(that.name))
- return false;
-}
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Database)
+ return this.equals((Database)that);
+ return false;
+ }
+
+ public boolean equals(Database that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
+ if (this_present_name || that_present_name) {
+ if (!(this_present_name && that_present_name))
+ return false;
+ if (!this.name.equals(that.name))
+ return false;
+ }
-boolean this_present_description = true && (this.description != null);
-boolean that_present_description = true && (that.description != null);
-if (this_present_description || that_present_description) {
-if (!(this_present_description && that_present_description))
- return false;
-if (!this.description.equals(that.description))
- return false;
-}
+ boolean this_present_description = true && this.isSetDescription();
+ boolean that_present_description = true && that.isSetDescription();
+ if (this_present_description || that_present_description) {
+ if (!(this_present_description && that_present_description))
+ return false;
+ if (!this.description.equals(that.description))
+ return false;
+ }
-return true;
-}
+ return true;
+ }
-public int hashCode() {
-return 0;
-}
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case NAME:
+ if (field.type == TType.STRING) {
+ this.name = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case DESCRIPTION:
+ if (field.type == TType.STRING) {
+ this.description = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) {
- break;
-}
-switch (field.id)
-{
- case 1:
- if (field.type == TType.STRING) {
- this.name = iprot.readString();
- this.__isset.name = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2:
- if (field.type == TType.STRING) {
- this.description = iprot.readString();
- this.__isset.description = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, field.type);
- break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
+ validate();
+ }
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("Database");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.name != null) {
-field.name = "name";
-field.type = TType.STRING;
-field.id = 1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.name);
-oprot.writeFieldEnd();
-}
-if (this.description != null) {
-field.name = "description";
-field.type = TType.STRING;
-field.id = 2;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.description);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+ public void write(TProtocol oprot) throws TException {
+ validate();
-public String toString() {
-StringBuilder sb = new StringBuilder("Database(");
-sb.append("name:");
-sb.append(this.name);
-sb.append(",description:");
-sb.append(this.description);
-sb.append(")");
-return sb.toString();
-}
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.name != null) {
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
+ oprot.writeString(this.name);
+ oprot.writeFieldEnd();
+ }
+ if (this.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(this.description);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Database(");
+ boolean first = true;
+
+ sb.append("name:");
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("description:");
+ if (this.description == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.description);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
}
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/FieldSchema.java Tue Jul 14 00:01:05 2009
@@ -11,21 +11,41 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class FieldSchema implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("FieldSchema");
+ private static final TField NAME_FIELD_DESC = new TField("name", TType.STRING, (short)1);
+ private static final TField TYPE_FIELD_DESC = new TField("type", TType.STRING, (short)2);
+ private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)3);
-public class FieldSchema implements TBase, java.io.Serializable {
private String name;
+ public static final int NAME = 1;
private String type;
+ public static final int TYPE = 2;
private String comment;
+ public static final int COMMENT = 3;
- public final Isset __isset = new Isset();
- public static final class Isset implements java.io.Serializable {
- public boolean name = false;
- public boolean type = false;
- public boolean comment = false;
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(NAME, new FieldMetaData("name", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(FieldSchema.class, metaDataMap);
}
public FieldSchema() {
@@ -38,11 +58,28 @@
{
this();
this.name = name;
- this.__isset.name = true;
this.type = type;
- this.__isset.type = true;
this.comment = comment;
- this.__isset.comment = true;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public FieldSchema(FieldSchema other) {
+ if (other.isSetName()) {
+ this.name = other.name;
+ }
+ if (other.isSetType()) {
+ this.type = other.type;
+ }
+ if (other.isSetComment()) {
+ this.comment = other.comment;
+ }
+ }
+
+ @Override
+ public FieldSchema clone() {
+ return new FieldSchema(this);
}
public String getName() {
@@ -51,11 +88,15 @@
public void setName(String name) {
this.name = name;
- this.__isset.name = true;
}
public void unsetName() {
- this.__isset.name = false;
+ this.name = null;
+ }
+
+ // Returns true if field name is set (has been asigned a value) and false otherwise
+ public boolean isSetName() {
+ return this.name != null;
}
public String getType() {
@@ -64,11 +105,15 @@
public void setType(String type) {
this.type = type;
- this.__isset.type = true;
}
public void unsetType() {
- this.__isset.type = false;
+ this.type = null;
+ }
+
+ // Returns true if field type is set (has been asigned a value) and false otherwise
+ public boolean isSetType() {
+ return this.type != null;
}
public String getComment() {
@@ -77,13 +122,79 @@
public void setComment(String comment) {
this.comment = comment;
- this.__isset.comment = true;
}
public void unsetComment() {
- this.__isset.comment = false;
+ this.comment = null;
+ }
+
+ // Returns true if field comment is set (has been asigned a value) and false otherwise
+ public boolean isSetComment() {
+ return this.comment != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((String)value);
+ }
+ break;
+
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((String)value);
+ }
+ break;
+
+ case COMMENT:
+ if (value == null) {
+ unsetComment();
+ } else {
+ setComment((String)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
}
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case NAME:
+ return getName();
+
+ case TYPE:
+ return getType();
+
+ case COMMENT:
+ return getComment();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case NAME:
+ return isSetName();
+ case TYPE:
+ return isSetType();
+ case COMMENT:
+ return isSetComment();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
public boolean equals(Object that) {
if (that == null)
return false;
@@ -96,8 +207,8 @@
if (that == null)
return false;
- boolean this_present_name = true && (this.name != null);
- boolean that_present_name = true && (that.name != null);
+ boolean this_present_name = true && this.isSetName();
+ boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
if (!(this_present_name && that_present_name))
return false;
@@ -105,8 +216,8 @@
return false;
}
- boolean this_present_type = true && (this.type != null);
- boolean that_present_type = true && (that.type != null);
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
if (!(this_present_type && that_present_type))
return false;
@@ -114,8 +225,8 @@
return false;
}
- boolean this_present_comment = true && (this.comment != null);
- boolean that_present_comment = true && (that.comment != null);
+ boolean this_present_comment = true && this.isSetComment();
+ boolean that_present_comment = true && that.isSetComment();
if (this_present_comment || that_present_comment) {
if (!(this_present_comment && that_present_comment))
return false;
@@ -126,6 +237,7 @@
return true;
}
+ @Override
public int hashCode() {
return 0;
}
@@ -141,26 +253,23 @@
}
switch (field.id)
{
- case 1:
+ case NAME:
if (field.type == TType.STRING) {
this.name = iprot.readString();
- this.__isset.name = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case 2:
+ case TYPE:
if (field.type == TType.STRING) {
this.type = iprot.readString();
- this.__isset.type = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
- case 3:
+ case COMMENT:
if (field.type == TType.STRING) {
this.comment = iprot.readString();
- this.__isset.comment = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
@@ -172,33 +281,26 @@
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ validate();
}
public void write(TProtocol oprot) throws TException {
- TStruct struct = new TStruct("FieldSchema");
- oprot.writeStructBegin(struct);
- TField field = new TField();
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
if (this.name != null) {
- field.name = "name";
- field.type = TType.STRING;
- field.id = 1;
- oprot.writeFieldBegin(field);
+ oprot.writeFieldBegin(NAME_FIELD_DESC);
oprot.writeString(this.name);
oprot.writeFieldEnd();
}
if (this.type != null) {
- field.name = "type";
- field.type = TType.STRING;
- field.id = 2;
- oprot.writeFieldBegin(field);
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
oprot.writeString(this.type);
oprot.writeFieldEnd();
}
if (this.comment != null) {
- field.name = "comment";
- field.type = TType.STRING;
- field.id = 3;
- oprot.writeFieldBegin(field);
+ oprot.writeFieldBegin(COMMENT_FIELD_DESC);
oprot.writeString(this.comment);
oprot.writeFieldEnd();
}
@@ -206,17 +308,42 @@
oprot.writeStructEnd();
}
+ @Override
public String toString() {
StringBuilder sb = new StringBuilder("FieldSchema(");
+ boolean first = true;
+
sb.append("name:");
- sb.append(this.name);
- sb.append(",type:");
- sb.append(this.type);
- sb.append(",comment:");
- sb.append(this.comment);
+ if (this.name == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.name);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("type:");
+ if (this.type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.type);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("comment:");
+ if (this.comment == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.comment);
+ }
+ first = false;
sb.append(")");
return sb.toString();
}
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
+
}
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/Index.java Tue Jul 14 00:01:05 2009
@@ -11,333 +11,510 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class Index implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("Index");
+ private static final TField INDEX_NAME_FIELD_DESC = new TField("indexName", TType.STRING, (short)1);
+ private static final TField INDEX_TYPE_FIELD_DESC = new TField("indexType", TType.I32, (short)2);
+ private static final TField TABLE_NAME_FIELD_DESC = new TField("tableName", TType.STRING, (short)3);
+ private static final TField DB_NAME_FIELD_DESC = new TField("dbName", TType.STRING, (short)4);
+ private static final TField COL_NAMES_FIELD_DESC = new TField("colNames", TType.LIST, (short)5);
+
+ private String indexName;
+ public static final int INDEXNAME = 1;
+ private int indexType;
+ public static final int INDEXTYPE = 2;
+ private String tableName;
+ public static final int TABLENAME = 3;
+ private String dbName;
+ public static final int DBNAME = 4;
+ private List<String> colNames;
+ public static final int COLNAMES = 5;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ public boolean indexType = false;
+ }
-public class Index implements TBase, java.io.Serializable {
-private String indexName;
-private int indexType;
-private String tableName;
-private String dbName;
-private List<String> colNames;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean indexName = false;
-public boolean indexType = false;
-public boolean tableName = false;
-public boolean dbName = false;
-public boolean colNames = false;
-}
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(INDEXNAME, new FieldMetaData("indexName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(INDEXTYPE, new FieldMetaData("indexType", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.I32)));
+ put(TABLENAME, new FieldMetaData("tableName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(DBNAME, new FieldMetaData("dbName", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ put(COLNAMES, new FieldMetaData("colNames", TFieldRequirementType.DEFAULT,
+ new ListMetaData(TType.LIST,
+ new FieldValueMetaData(TType.STRING))));
+ }});
-public Index() {
-}
+ static {
+ FieldMetaData.addStructMetaDataMap(Index.class, metaDataMap);
+ }
-public Index(
-String indexName,
-int indexType,
-String tableName,
-String dbName,
-List<String> colNames)
-{
-this();
-this.indexName = indexName;
-this.__isset.indexName = true;
-this.indexType = indexType;
-this.__isset.indexType = true;
-this.tableName = tableName;
-this.__isset.tableName = true;
-this.dbName = dbName;
-this.__isset.dbName = true;
-this.colNames = colNames;
-this.__isset.colNames = true;
-}
+ public Index() {
+ }
-public String getIndexName() {
-return this.indexName;
-}
+ public Index(
+ String indexName,
+ int indexType,
+ String tableName,
+ String dbName,
+ List<String> colNames)
+ {
+ this();
+ this.indexName = indexName;
+ this.indexType = indexType;
+ this.__isset.indexType = true;
+ this.tableName = tableName;
+ this.dbName = dbName;
+ this.colNames = colNames;
+ }
-public void setIndexName(String indexName) {
-this.indexName = indexName;
-this.__isset.indexName = true;
-}
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Index(Index other) {
+ if (other.isSetIndexName()) {
+ this.indexName = other.indexName;
+ }
+ __isset.indexType = other.__isset.indexType;
+ this.indexType = other.indexType;
+ if (other.isSetTableName()) {
+ this.tableName = other.tableName;
+ }
+ if (other.isSetDbName()) {
+ this.dbName = other.dbName;
+ }
+ if (other.isSetColNames()) {
+ List<String> __this__colNames = new ArrayList<String>();
+ for (String other_element : other.colNames) {
+ __this__colNames.add(other_element);
+ }
+ this.colNames = __this__colNames;
+ }
+ }
-public void unsetIndexName() {
-this.__isset.indexName = false;
-}
+ @Override
+ public Index clone() {
+ return new Index(this);
+ }
-public int getIndexType() {
-return this.indexType;
-}
+ public String getIndexName() {
+ return this.indexName;
+ }
-public void setIndexType(int indexType) {
-this.indexType = indexType;
-this.__isset.indexType = true;
-}
+ public void setIndexName(String indexName) {
+ this.indexName = indexName;
+ }
-public void unsetIndexType() {
-this.__isset.indexType = false;
-}
+ public void unsetIndexName() {
+ this.indexName = null;
+ }
-public String getTableName() {
-return this.tableName;
-}
+ // Returns true if field indexName is set (has been asigned a value) and false otherwise
+ public boolean isSetIndexName() {
+ return this.indexName != null;
+ }
-public void setTableName(String tableName) {
-this.tableName = tableName;
-this.__isset.tableName = true;
-}
+ public int getIndexType() {
+ return this.indexType;
+ }
-public void unsetTableName() {
-this.__isset.tableName = false;
-}
+ public void setIndexType(int indexType) {
+ this.indexType = indexType;
+ this.__isset.indexType = true;
+ }
-public String getDbName() {
-return this.dbName;
-}
+ public void unsetIndexType() {
+ this.__isset.indexType = false;
+ }
-public void setDbName(String dbName) {
-this.dbName = dbName;
-this.__isset.dbName = true;
-}
+ // Returns true if field indexType is set (has been asigned a value) and false otherwise
+ public boolean isSetIndexType() {
+ return this.__isset.indexType;
+ }
-public void unsetDbName() {
-this.__isset.dbName = false;
-}
+ public String getTableName() {
+ return this.tableName;
+ }
-public int getColNamesSize() {
-return (this.colNames == null) ? 0 : this.colNames.size();
-}
+ public void setTableName(String tableName) {
+ this.tableName = tableName;
+ }
-public java.util.Iterator<String> getColNamesIterator() {
-return (this.colNames == null) ? null : this.colNames.iterator();
-}
+ public void unsetTableName() {
+ this.tableName = null;
+ }
-public void addToColNames(String elem) {
-if (this.colNames == null) {
-this.colNames = new ArrayList<String>();
-}
-this.colNames.add(elem);
-this.__isset.colNames = true;
-}
+ // Returns true if field tableName is set (has been asigned a value) and false otherwise
+ public boolean isSetTableName() {
+ return this.tableName != null;
+ }
-public List<String> getColNames() {
-return this.colNames;
-}
+ public String getDbName() {
+ return this.dbName;
+ }
-public void setColNames(List<String> colNames) {
-this.colNames = colNames;
-this.__isset.colNames = true;
-}
+ public void setDbName(String dbName) {
+ this.dbName = dbName;
+ }
-public void unsetColNames() {
-this.colNames = null;
-this.__isset.colNames = false;
-}
+ public void unsetDbName() {
+ this.dbName = null;
+ }
-public boolean equals(Object that) {
-if (that == null)
- return false;
-if (that instanceof Index)
- return this.equals((Index)that);
-return false;
-}
+ // Returns true if field dbName is set (has been asigned a value) and false otherwise
+ public boolean isSetDbName() {
+ return this.dbName != null;
+ }
-public boolean equals(Index that) {
-if (that == null)
- return false;
-
-boolean this_present_indexName = true && (this.indexName != null);
-boolean that_present_indexName = true && (that.indexName != null);
-if (this_present_indexName || that_present_indexName) {
-if (!(this_present_indexName && that_present_indexName))
- return false;
-if (!this.indexName.equals(that.indexName))
- return false;
-}
+ public int getColNamesSize() {
+ return (this.colNames == null) ? 0 : this.colNames.size();
+ }
-boolean this_present_indexType = true;
-boolean that_present_indexType = true;
-if (this_present_indexType || that_present_indexType) {
-if (!(this_present_indexType && that_present_indexType))
- return false;
-if (this.indexType != that.indexType)
- return false;
-}
+ public java.util.Iterator<String> getColNamesIterator() {
+ return (this.colNames == null) ? null : this.colNames.iterator();
+ }
-boolean this_present_tableName = true && (this.tableName != null);
-boolean that_present_tableName = true && (that.tableName != null);
-if (this_present_tableName || that_present_tableName) {
-if (!(this_present_tableName && that_present_tableName))
- return false;
-if (!this.tableName.equals(that.tableName))
- return false;
-}
+ public void addToColNames(String elem) {
+ if (this.colNames == null) {
+ this.colNames = new ArrayList<String>();
+ }
+ this.colNames.add(elem);
+ }
-boolean this_present_dbName = true && (this.dbName != null);
-boolean that_present_dbName = true && (that.dbName != null);
-if (this_present_dbName || that_present_dbName) {
-if (!(this_present_dbName && that_present_dbName))
- return false;
-if (!this.dbName.equals(that.dbName))
- return false;
-}
+ public List<String> getColNames() {
+ return this.colNames;
+ }
-boolean this_present_colNames = true && (this.colNames != null);
-boolean that_present_colNames = true && (that.colNames != null);
-if (this_present_colNames || that_present_colNames) {
-if (!(this_present_colNames && that_present_colNames))
- return false;
-if (!this.colNames.equals(that.colNames))
- return false;
-}
+ public void setColNames(List<String> colNames) {
+ this.colNames = colNames;
+ }
-return true;
-}
+ public void unsetColNames() {
+ this.colNames = null;
+ }
-public int hashCode() {
-return 0;
-}
+ // Returns true if field colNames is set (has been asigned a value) and false otherwise
+ public boolean isSetColNames() {
+ return this.colNames != null;
+ }
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) {
- break;
-}
-switch (field.id)
-{
- case 1:
- if (field.type == TType.STRING) {
- this.indexName = iprot.readString();
- this.__isset.indexName = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 2:
- if (field.type == TType.I32) {
- this.indexType = iprot.readI32();
- this.__isset.indexType = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 3:
- if (field.type == TType.STRING) {
- this.tableName = iprot.readString();
- this.__isset.tableName = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 4:
- if (field.type == TType.STRING) {
- this.dbName = iprot.readString();
- this.__isset.dbName = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- case 5:
- if (field.type == TType.LIST) {
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case INDEXNAME:
+ if (value == null) {
+ unsetIndexName();
+ } else {
+ setIndexName((String)value);
+ }
+ break;
+
+ case INDEXTYPE:
+ if (value == null) {
+ unsetIndexType();
+ } else {
+ setIndexType((Integer)value);
+ }
+ break;
+
+ case TABLENAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((String)value);
+ }
+ break;
+
+ case DBNAME:
+ if (value == null) {
+ unsetDbName();
+ } else {
+ setDbName((String)value);
+ }
+ break;
+
+ case COLNAMES:
+ if (value == null) {
+ unsetColNames();
+ } else {
+ setColNames((List<String>)value);
+ }
+ break;
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case INDEXNAME:
+ return getIndexName();
+
+ case INDEXTYPE:
+ return new Integer(getIndexType());
+
+ case TABLENAME:
+ return getTableName();
+
+ case DBNAME:
+ return getDbName();
+
+ case COLNAMES:
+ return getColNames();
+
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case INDEXNAME:
+ return isSetIndexName();
+ case INDEXTYPE:
+ return isSetIndexType();
+ case TABLENAME:
+ return isSetTableName();
+ case DBNAME:
+ return isSetDbName();
+ case COLNAMES:
+ return isSetColNames();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Index)
+ return this.equals((Index)that);
+ return false;
+ }
+
+ public boolean equals(Index that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_indexName = true && this.isSetIndexName();
+ boolean that_present_indexName = true && that.isSetIndexName();
+ if (this_present_indexName || that_present_indexName) {
+ if (!(this_present_indexName && that_present_indexName))
+ return false;
+ if (!this.indexName.equals(that.indexName))
+ return false;
+ }
+
+ boolean this_present_indexType = true;
+ boolean that_present_indexType = true;
+ if (this_present_indexType || that_present_indexType) {
+ if (!(this_present_indexType && that_present_indexType))
+ return false;
+ if (this.indexType != that.indexType)
+ return false;
+ }
+
+ boolean this_present_tableName = true && this.isSetTableName();
+ boolean that_present_tableName = true && that.isSetTableName();
+ if (this_present_tableName || that_present_tableName) {
+ if (!(this_present_tableName && that_present_tableName))
+ return false;
+ if (!this.tableName.equals(that.tableName))
+ return false;
+ }
+
+ boolean this_present_dbName = true && this.isSetDbName();
+ boolean that_present_dbName = true && that.isSetDbName();
+ if (this_present_dbName || that_present_dbName) {
+ if (!(this_present_dbName && that_present_dbName))
+ return false;
+ if (!this.dbName.equals(that.dbName))
+ return false;
+ }
+
+ boolean this_present_colNames = true && this.isSetColNames();
+ boolean that_present_colNames = true && that.isSetColNames();
+ if (this_present_colNames || that_present_colNames) {
+ if (!(this_present_colNames && that_present_colNames))
+ return false;
+ if (!this.colNames.equals(that.colNames))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
{
- TList _list44 = iprot.readListBegin();
- this.colNames = new ArrayList<String>(_list44.size);
- for (int _i45 = 0; _i45 < _list44.size; ++_i45)
- {
- String _elem46 = null;
- _elem46 = iprot.readString();
- this.colNames.add(_elem46);
+ case INDEXNAME:
+ if (field.type == TType.STRING) {
+ this.indexName = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case INDEXTYPE:
+ if (field.type == TType.I32) {
+ this.indexType = iprot.readI32();
+ this.__isset.indexType = true;
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case TABLENAME:
+ if (field.type == TType.STRING) {
+ this.tableName = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case DBNAME:
+ if (field.type == TType.STRING) {
+ this.dbName = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ case COLNAMES:
+ if (field.type == TType.LIST) {
+ {
+ TList _list44 = iprot.readListBegin();
+ this.colNames = new ArrayList<String>(_list44.size);
+ for (int _i45 = 0; _i45 < _list44.size; ++_i45)
+ {
+ String _elem46;
+ _elem46 = iprot.readString();
+ this.colNames.add(_elem46);
+ }
+ iprot.readListEnd();
+ }
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ validate();
+ }
+
+ public void write(TProtocol oprot) throws TException {
+ validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.indexName != null) {
+ oprot.writeFieldBegin(INDEX_NAME_FIELD_DESC);
+ oprot.writeString(this.indexName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(INDEX_TYPE_FIELD_DESC);
+ oprot.writeI32(this.indexType);
+ oprot.writeFieldEnd();
+ if (this.tableName != null) {
+ oprot.writeFieldBegin(TABLE_NAME_FIELD_DESC);
+ oprot.writeString(this.tableName);
+ oprot.writeFieldEnd();
+ }
+ if (this.dbName != null) {
+ oprot.writeFieldBegin(DB_NAME_FIELD_DESC);
+ oprot.writeString(this.dbName);
+ oprot.writeFieldEnd();
+ }
+ if (this.colNames != null) {
+ oprot.writeFieldBegin(COL_NAMES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new TList(TType.STRING, this.colNames.size()));
+ for (String _iter47 : this.colNames) {
+ oprot.writeString(_iter47);
}
- iprot.readListEnd();
+ oprot.writeListEnd();
}
- this.__isset.colNames = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, field.type);
- break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("Index");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.indexName != null) {
-field.name = "indexName";
-field.type = TType.STRING;
-field.id = 1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.indexName);
-oprot.writeFieldEnd();
-}
-field.name = "indexType";
-field.type = TType.I32;
-field.id = 2;
-oprot.writeFieldBegin(field);
-oprot.writeI32(this.indexType);
-oprot.writeFieldEnd();
-if (this.tableName != null) {
-field.name = "tableName";
-field.type = TType.STRING;
-field.id = 3;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.tableName);
-oprot.writeFieldEnd();
-}
-if (this.dbName != null) {
-field.name = "dbName";
-field.type = TType.STRING;
-field.id = 4;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.dbName);
-oprot.writeFieldEnd();
-}
-if (this.colNames != null) {
-field.name = "colNames";
-field.type = TType.LIST;
-field.id = 5;
-oprot.writeFieldBegin(field);
-{
- oprot.writeListBegin(new TList(TType.STRING, this.colNames.size()));
- for (String _iter47 : this.colNames) {
- oprot.writeString(_iter47);
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Index(");
+ boolean first = true;
+
+ sb.append("indexName:");
+ if (this.indexName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.indexName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("indexType:");
+ sb.append(this.indexType);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("tableName:");
+ if (this.tableName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.tableName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("dbName:");
+ if (this.dbName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.dbName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("colNames:");
+ if (this.colNames == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.colNames);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
}
- oprot.writeListEnd();
-}
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
-public String toString() {
-StringBuilder sb = new StringBuilder("Index(");
-sb.append("indexName:");
-sb.append(this.indexName);
-sb.append(",indexType:");
-sb.append(this.indexType);
-sb.append(",tableName:");
-sb.append(this.tableName);
-sb.append(",dbName:");
-sb.append(this.dbName);
-sb.append(",colNames:");
-sb.append(this.colNames);
-sb.append(")");
-return sb.toString();
-}
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
}
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/IndexAlreadyExistsException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
-
-public class IndexAlreadyExistsException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public IndexAlreadyExistsException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class IndexAlreadyExistsException extends Exception implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("IndexAlreadyExistsException");
+ private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+ private String message;
+ public static final int MESSAGE = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(IndexAlreadyExistsException.class, metaDataMap);
+ }
+
+ public IndexAlreadyExistsException() {
+ }
+
+ public IndexAlreadyExistsException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public IndexAlreadyExistsException(IndexAlreadyExistsException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
-public IndexAlreadyExistsException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+ @Override
+ public IndexAlreadyExistsException clone() {
+ return new IndexAlreadyExistsException(this);
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ // Returns true if field message is set (has been asigned a value) and false otherwise
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
-public String getMessage() {
-return this.message;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return getMessage();
-public void unsetMessage() {
-this.__isset.message = false;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(Object that) {
-if (that == null)
- return false;
-if (that instanceof IndexAlreadyExistsException)
- return this.equals((IndexAlreadyExistsException)that);
-return false;
-}
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return isSetMessage();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(IndexAlreadyExistsException that) {
-if (that == null)
- return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
- return false;
-if (!this.message.equals(that.message))
- return false;
-}
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof IndexAlreadyExistsException)
+ return this.equals((IndexAlreadyExistsException)that);
+ return false;
+ }
+
+ public boolean equals(IndexAlreadyExistsException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
-return true;
-}
+ return true;
+ }
-public int hashCode() {
-return 0;
-}
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case MESSAGE:
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) {
- break;
-}
-switch (field.id)
-{
- case -1:
- if (field.type == TType.STRING) {
- this.message = iprot.readString();
- this.__isset.message = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, field.type);
- break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
+ validate();
+ }
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("IndexAlreadyExistsException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+ public void write(TProtocol oprot) throws TException {
+ validate();
-public String toString() {
-StringBuilder sb = new StringBuilder("IndexAlreadyExistsException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("IndexAlreadyExistsException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
}
Modified: hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java
URL: http://svn.apache.org/viewvc/hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java?rev=793758&r1=793757&r2=793758&view=diff
==============================================================================
--- hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java (original)
+++ hadoop/hive/trunk/metastore/src/gen-javabean/org/apache/hadoop/hive/metastore/api/InvalidObjectException.java Tue Jul 14 00:01:05 2009
@@ -11,122 +11,201 @@
import java.util.HashMap;
import java.util.Set;
import java.util.HashSet;
-import com.facebook.thrift.*;
+import java.util.Collections;
+import org.apache.log4j.Logger;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
-
-public class InvalidObjectException extends Exception implements TBase, java.io.Serializable {
-private String message;
-
-public final Isset __isset = new Isset();
-public static final class Isset implements java.io.Serializable {
-public boolean message = false;
-}
-
-public InvalidObjectException() {
-}
+import org.apache.thrift.*;
+import org.apache.thrift.meta_data.*;
+import org.apache.thrift.protocol.*;
+
+public class InvalidObjectException extends Exception implements TBase, java.io.Serializable, Cloneable {
+ private static final TStruct STRUCT_DESC = new TStruct("InvalidObjectException");
+ private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)1);
+
+ private String message;
+ public static final int MESSAGE = 1;
+
+ private final Isset __isset = new Isset();
+ private static final class Isset implements java.io.Serializable {
+ }
+
+ public static final Map<Integer, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new HashMap<Integer, FieldMetaData>() {{
+ put(MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT,
+ new FieldValueMetaData(TType.STRING)));
+ }});
+
+ static {
+ FieldMetaData.addStructMetaDataMap(InvalidObjectException.class, metaDataMap);
+ }
+
+ public InvalidObjectException() {
+ }
+
+ public InvalidObjectException(
+ String message)
+ {
+ this();
+ this.message = message;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public InvalidObjectException(InvalidObjectException other) {
+ if (other.isSetMessage()) {
+ this.message = other.message;
+ }
+ }
-public InvalidObjectException(
-String message)
-{
-this();
-this.message = message;
-this.__isset.message = true;
-}
+ @Override
+ public InvalidObjectException clone() {
+ return new InvalidObjectException(this);
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public void unsetMessage() {
+ this.message = null;
+ }
+
+ // Returns true if field message is set (has been asigned a value) and false otherwise
+ public boolean isSetMessage() {
+ return this.message != null;
+ }
+
+ public void setFieldValue(int fieldID, Object value) {
+ switch (fieldID) {
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String)value);
+ }
+ break;
-public String getMessage() {
-return this.message;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public void setMessage(String message) {
-this.message = message;
-this.__isset.message = true;
-}
+ public Object getFieldValue(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return getMessage();
-public void unsetMessage() {
-this.__isset.message = false;
-}
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(Object that) {
-if (that == null)
- return false;
-if (that instanceof InvalidObjectException)
- return this.equals((InvalidObjectException)that);
-return false;
-}
+ // Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise
+ public boolean isSet(int fieldID) {
+ switch (fieldID) {
+ case MESSAGE:
+ return isSetMessage();
+ default:
+ throw new IllegalArgumentException("Field " + fieldID + " doesn't exist!");
+ }
+ }
-public boolean equals(InvalidObjectException that) {
-if (that == null)
- return false;
-
-boolean this_present_message = true && (this.message != null);
-boolean that_present_message = true && (that.message != null);
-if (this_present_message || that_present_message) {
-if (!(this_present_message && that_present_message))
- return false;
-if (!this.message.equals(that.message))
- return false;
-}
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof InvalidObjectException)
+ return this.equals((InvalidObjectException)that);
+ return false;
+ }
+
+ public boolean equals(InvalidObjectException that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_message = true && this.isSetMessage();
+ boolean that_present_message = true && that.isSetMessage();
+ if (this_present_message || that_present_message) {
+ if (!(this_present_message && that_present_message))
+ return false;
+ if (!this.message.equals(that.message))
+ return false;
+ }
-return true;
-}
+ return true;
+ }
-public int hashCode() {
-return 0;
-}
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public void read(TProtocol iprot) throws TException {
+ TField field;
+ iprot.readStructBegin();
+ while (true)
+ {
+ field = iprot.readFieldBegin();
+ if (field.type == TType.STOP) {
+ break;
+ }
+ switch (field.id)
+ {
+ case MESSAGE:
+ if (field.type == TType.STRING) {
+ this.message = iprot.readString();
+ } else {
+ TProtocolUtil.skip(iprot, field.type);
+ }
+ break;
+ default:
+ TProtocolUtil.skip(iprot, field.type);
+ break;
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
-public void read(TProtocol iprot) throws TException {
-TField field;
-iprot.readStructBegin();
-while (true)
-{
-field = iprot.readFieldBegin();
-if (field.type == TType.STOP) {
- break;
-}
-switch (field.id)
-{
- case -1:
- if (field.type == TType.STRING) {
- this.message = iprot.readString();
- this.__isset.message = true;
- } else {
- TProtocolUtil.skip(iprot, field.type);
- }
- break;
- default:
- TProtocolUtil.skip(iprot, field.type);
- break;
-}
-iprot.readFieldEnd();
-}
-iprot.readStructEnd();
-}
+ validate();
+ }
-public void write(TProtocol oprot) throws TException {
-TStruct struct = new TStruct("InvalidObjectException");
-oprot.writeStructBegin(struct);
-TField field = new TField();
-if (this.message != null) {
-field.name = "message";
-field.type = TType.STRING;
-field.id = -1;
-oprot.writeFieldBegin(field);
-oprot.writeString(this.message);
-oprot.writeFieldEnd();
-}
-oprot.writeFieldStop();
-oprot.writeStructEnd();
-}
+ public void write(TProtocol oprot) throws TException {
+ validate();
-public String toString() {
-StringBuilder sb = new StringBuilder("InvalidObjectException(");
-sb.append("message:");
-sb.append(this.message);
-sb.append(")");
-return sb.toString();
-}
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (this.message != null) {
+ oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
+ oprot.writeString(this.message);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("InvalidObjectException(");
+ boolean first = true;
+
+ sb.append("message:");
+ if (this.message == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.message);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws TException {
+ // check for required fields
+ // check that fields of type enum have valid values
+ }
}