You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/03/12 18:45:12 UTC
svn commit: r1455646 [13/25] - in /hive/trunk/service/src/gen/thrift:
gen-cpp/ gen-javabean/org/apache/hive/ gen-javabean/org/apache/hive/service/
gen-javabean/org/apache/hive/service/cli/
gen-javabean/org/apache/hive/service/cli/thrift/ gen-php/ gen-p...
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoResp.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoResp.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoResp.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoResp.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,493 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TGetInfoResp implements org.apache.thrift.TBase<TGetInfoResp, TGetInfoResp._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoResp");
+
+ private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField INFO_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("infoValue", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TGetInfoRespStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TGetInfoRespTupleSchemeFactory());
+ }
+
+ private TStatus status; // required
+ private TGetInfoValue infoValue; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ STATUS((short)1, "status"),
+ INFO_VALUE((short)2, "infoValue");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // STATUS
+ return STATUS;
+ case 2: // INFO_VALUE
+ return INFO_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStatus.class)));
+ tmpMap.put(_Fields.INFO_VALUE, new org.apache.thrift.meta_data.FieldMetaData("infoValue", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TGetInfoValue.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetInfoResp.class, metaDataMap);
+ }
+
+ public TGetInfoResp() {
+ }
+
+ public TGetInfoResp(
+ TStatus status,
+ TGetInfoValue infoValue)
+ {
+ this();
+ this.status = status;
+ this.infoValue = infoValue;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TGetInfoResp(TGetInfoResp other) {
+ if (other.isSetStatus()) {
+ this.status = new TStatus(other.status);
+ }
+ if (other.isSetInfoValue()) {
+ this.infoValue = new TGetInfoValue(other.infoValue);
+ }
+ }
+
+ public TGetInfoResp deepCopy() {
+ return new TGetInfoResp(this);
+ }
+
+ @Override
+ public void clear() {
+ this.status = null;
+ this.infoValue = null;
+ }
+
+ public TStatus getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(TStatus status) {
+ this.status = status;
+ }
+
+ public void unsetStatus() {
+ this.status = null;
+ }
+
+ /** Returns true if field status is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatus() {
+ return this.status != null;
+ }
+
+ public void setStatusIsSet(boolean value) {
+ if (!value) {
+ this.status = null;
+ }
+ }
+
+ public TGetInfoValue getInfoValue() {
+ return this.infoValue;
+ }
+
+ public void setInfoValue(TGetInfoValue infoValue) {
+ this.infoValue = infoValue;
+ }
+
+ public void unsetInfoValue() {
+ this.infoValue = null;
+ }
+
+ /** Returns true if field infoValue is set (has been assigned a value) and false otherwise */
+ public boolean isSetInfoValue() {
+ return this.infoValue != null;
+ }
+
+ public void setInfoValueIsSet(boolean value) {
+ if (!value) {
+ this.infoValue = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case STATUS:
+ if (value == null) {
+ unsetStatus();
+ } else {
+ setStatus((TStatus)value);
+ }
+ break;
+
+ case INFO_VALUE:
+ if (value == null) {
+ unsetInfoValue();
+ } else {
+ setInfoValue((TGetInfoValue)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STATUS:
+ return getStatus();
+
+ case INFO_VALUE:
+ return getInfoValue();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** 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();
+ }
+
+ switch (field) {
+ case STATUS:
+ return isSetStatus();
+ case INFO_VALUE:
+ return isSetInfoValue();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TGetInfoResp)
+ return this.equals((TGetInfoResp)that);
+ return false;
+ }
+
+ public boolean equals(TGetInfoResp that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_status = true && this.isSetStatus();
+ boolean that_present_status = true && that.isSetStatus();
+ if (this_present_status || that_present_status) {
+ if (!(this_present_status && that_present_status))
+ return false;
+ if (!this.status.equals(that.status))
+ return false;
+ }
+
+ boolean this_present_infoValue = true && this.isSetInfoValue();
+ boolean that_present_infoValue = true && that.isSetInfoValue();
+ if (this_present_infoValue || that_present_infoValue) {
+ if (!(this_present_infoValue && that_present_infoValue))
+ return false;
+ if (!this.infoValue.equals(that.infoValue))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_status = true && (isSetStatus());
+ builder.append(present_status);
+ if (present_status)
+ builder.append(status);
+
+ boolean present_infoValue = true && (isSetInfoValue());
+ builder.append(present_infoValue);
+ if (present_infoValue)
+ builder.append(infoValue);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TGetInfoResp other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TGetInfoResp typedOther = (TGetInfoResp)other;
+
+ lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetInfoValue()).compareTo(typedOther.isSetInfoValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetInfoValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoValue, typedOther.infoValue);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TGetInfoResp(");
+ boolean first = true;
+
+ sb.append("status:");
+ if (this.status == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.status);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("infoValue:");
+ if (this.infoValue == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.infoValue);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetStatus()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
+ }
+
+ if (!isSetInfoValue()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'infoValue' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (status != null) {
+ status.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TGetInfoRespStandardSchemeFactory implements SchemeFactory {
+ public TGetInfoRespStandardScheme getScheme() {
+ return new TGetInfoRespStandardScheme();
+ }
+ }
+
+ private static class TGetInfoRespStandardScheme extends StandardScheme<TGetInfoResp> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetInfoResp struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.status = new TStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // INFO_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.infoValue = new TGetInfoValue();
+ struct.infoValue.read(iprot);
+ struct.setInfoValueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetInfoResp struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.status != null) {
+ oprot.writeFieldBegin(STATUS_FIELD_DESC);
+ struct.status.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.infoValue != null) {
+ oprot.writeFieldBegin(INFO_VALUE_FIELD_DESC);
+ struct.infoValue.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TGetInfoRespTupleSchemeFactory implements SchemeFactory {
+ public TGetInfoRespTupleScheme getScheme() {
+ return new TGetInfoRespTupleScheme();
+ }
+ }
+
+ private static class TGetInfoRespTupleScheme extends TupleScheme<TGetInfoResp> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TGetInfoResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.status.write(oprot);
+ struct.infoValue.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TGetInfoResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.status = new TStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ struct.infoValue = new TGetInfoValue();
+ struct.infoValue.read(iprot);
+ struct.setInfoValueIsSet(true);
+ }
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoType.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoType.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoType.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoType.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,180 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TGetInfoType implements org.apache.thrift.TEnum {
+ CLI_MAX_DRIVER_CONNECTIONS(0),
+ CLI_MAX_CONCURRENT_ACTIVITIES(1),
+ CLI_DATA_SOURCE_NAME(2),
+ CLI_FETCH_DIRECTION(8),
+ CLI_SERVER_NAME(13),
+ CLI_SEARCH_PATTERN_ESCAPE(14),
+ CLI_DBMS_NAME(17),
+ CLI_DBMS_VER(18),
+ CLI_ACCESSIBLE_TABLES(19),
+ CLI_ACCESSIBLE_PROCEDURES(20),
+ CLI_CURSOR_COMMIT_BEHAVIOR(23),
+ CLI_DATA_SOURCE_READ_ONLY(25),
+ CLI_DEFAULT_TXN_ISOLATION(26),
+ CLI_IDENTIFIER_CASE(28),
+ CLI_IDENTIFIER_QUOTE_CHAR(29),
+ CLI_MAX_COLUMN_NAME_LEN(30),
+ CLI_MAX_CURSOR_NAME_LEN(31),
+ CLI_MAX_SCHEMA_NAME_LEN(32),
+ CLI_MAX_CATALOG_NAME_LEN(34),
+ CLI_MAX_TABLE_NAME_LEN(35),
+ CLI_SCROLL_CONCURRENCY(43),
+ CLI_TXN_CAPABLE(46),
+ CLI_USER_NAME(47),
+ CLI_TXN_ISOLATION_OPTION(72),
+ CLI_INTEGRITY(73),
+ CLI_GETDATA_EXTENSIONS(81),
+ CLI_NULL_COLLATION(85),
+ CLI_ALTER_TABLE(86),
+ CLI_ORDER_BY_COLUMNS_IN_SELECT(90),
+ CLI_SPECIAL_CHARACTERS(94),
+ CLI_MAX_COLUMNS_IN_GROUP_BY(97),
+ CLI_MAX_COLUMNS_IN_INDEX(98),
+ CLI_MAX_COLUMNS_IN_ORDER_BY(99),
+ CLI_MAX_COLUMNS_IN_SELECT(100),
+ CLI_MAX_COLUMNS_IN_TABLE(101),
+ CLI_MAX_INDEX_SIZE(102),
+ CLI_MAX_ROW_SIZE(104),
+ CLI_MAX_STATEMENT_LEN(105),
+ CLI_MAX_TABLES_IN_SELECT(106),
+ CLI_MAX_USER_NAME_LEN(107),
+ CLI_OJ_CAPABILITIES(115),
+ CLI_XOPEN_CLI_YEAR(10000),
+ CLI_CURSOR_SENSITIVITY(10001),
+ CLI_DESCRIBE_PARAMETER(10002),
+ CLI_CATALOG_NAME(10003),
+ CLI_COLLATION_SEQ(10004),
+ CLI_MAX_IDENTIFIER_LEN(10005);
+
+ private final int value;
+
+ private TGetInfoType(int value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the integer value of this enum value, as defined in the Thrift IDL.
+ */
+ public int getValue() {
+ return value;
+ }
+
+ /**
+ * Find a the enum type by its integer value, as defined in the Thrift IDL.
+ * @return null if the value is not found.
+ */
+ public static TGetInfoType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return CLI_MAX_DRIVER_CONNECTIONS;
+ case 1:
+ return CLI_MAX_CONCURRENT_ACTIVITIES;
+ case 2:
+ return CLI_DATA_SOURCE_NAME;
+ case 8:
+ return CLI_FETCH_DIRECTION;
+ case 13:
+ return CLI_SERVER_NAME;
+ case 14:
+ return CLI_SEARCH_PATTERN_ESCAPE;
+ case 17:
+ return CLI_DBMS_NAME;
+ case 18:
+ return CLI_DBMS_VER;
+ case 19:
+ return CLI_ACCESSIBLE_TABLES;
+ case 20:
+ return CLI_ACCESSIBLE_PROCEDURES;
+ case 23:
+ return CLI_CURSOR_COMMIT_BEHAVIOR;
+ case 25:
+ return CLI_DATA_SOURCE_READ_ONLY;
+ case 26:
+ return CLI_DEFAULT_TXN_ISOLATION;
+ case 28:
+ return CLI_IDENTIFIER_CASE;
+ case 29:
+ return CLI_IDENTIFIER_QUOTE_CHAR;
+ case 30:
+ return CLI_MAX_COLUMN_NAME_LEN;
+ case 31:
+ return CLI_MAX_CURSOR_NAME_LEN;
+ case 32:
+ return CLI_MAX_SCHEMA_NAME_LEN;
+ case 34:
+ return CLI_MAX_CATALOG_NAME_LEN;
+ case 35:
+ return CLI_MAX_TABLE_NAME_LEN;
+ case 43:
+ return CLI_SCROLL_CONCURRENCY;
+ case 46:
+ return CLI_TXN_CAPABLE;
+ case 47:
+ return CLI_USER_NAME;
+ case 72:
+ return CLI_TXN_ISOLATION_OPTION;
+ case 73:
+ return CLI_INTEGRITY;
+ case 81:
+ return CLI_GETDATA_EXTENSIONS;
+ case 85:
+ return CLI_NULL_COLLATION;
+ case 86:
+ return CLI_ALTER_TABLE;
+ case 90:
+ return CLI_ORDER_BY_COLUMNS_IN_SELECT;
+ case 94:
+ return CLI_SPECIAL_CHARACTERS;
+ case 97:
+ return CLI_MAX_COLUMNS_IN_GROUP_BY;
+ case 98:
+ return CLI_MAX_COLUMNS_IN_INDEX;
+ case 99:
+ return CLI_MAX_COLUMNS_IN_ORDER_BY;
+ case 100:
+ return CLI_MAX_COLUMNS_IN_SELECT;
+ case 101:
+ return CLI_MAX_COLUMNS_IN_TABLE;
+ case 102:
+ return CLI_MAX_INDEX_SIZE;
+ case 104:
+ return CLI_MAX_ROW_SIZE;
+ case 105:
+ return CLI_MAX_STATEMENT_LEN;
+ case 106:
+ return CLI_MAX_TABLES_IN_SELECT;
+ case 107:
+ return CLI_MAX_USER_NAME_LEN;
+ case 115:
+ return CLI_OJ_CAPABILITIES;
+ case 10000:
+ return CLI_XOPEN_CLI_YEAR;
+ case 10001:
+ return CLI_CURSOR_SENSITIVITY;
+ case 10002:
+ return CLI_DESCRIBE_PARAMETER;
+ case 10003:
+ return CLI_CATALOG_NAME;
+ case 10004:
+ return CLI_COLLATION_SEQ;
+ case 10005:
+ return CLI_MAX_IDENTIFIER_LEN;
+ default:
+ return null;
+ }
+ }
+}
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoValue.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoValue.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoValue.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetInfoValue.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,593 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TGetInfoValue extends org.apache.thrift.TUnion<TGetInfoValue, TGetInfoValue._Fields> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoValue");
+ private static final org.apache.thrift.protocol.TField STRING_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("stringValue", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField SMALL_INT_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("smallIntValue", org.apache.thrift.protocol.TType.I16, (short)2);
+ private static final org.apache.thrift.protocol.TField INTEGER_BITMASK_FIELD_DESC = new org.apache.thrift.protocol.TField("integerBitmask", org.apache.thrift.protocol.TType.I32, (short)3);
+ private static final org.apache.thrift.protocol.TField INTEGER_FLAG_FIELD_DESC = new org.apache.thrift.protocol.TField("integerFlag", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField BINARY_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("binaryValue", org.apache.thrift.protocol.TType.I32, (short)5);
+ private static final org.apache.thrift.protocol.TField LEN_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("lenValue", org.apache.thrift.protocol.TType.I64, (short)6);
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ STRING_VALUE((short)1, "stringValue"),
+ SMALL_INT_VALUE((short)2, "smallIntValue"),
+ INTEGER_BITMASK((short)3, "integerBitmask"),
+ INTEGER_FLAG((short)4, "integerFlag"),
+ BINARY_VALUE((short)5, "binaryValue"),
+ LEN_VALUE((short)6, "lenValue");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // STRING_VALUE
+ return STRING_VALUE;
+ case 2: // SMALL_INT_VALUE
+ return SMALL_INT_VALUE;
+ case 3: // INTEGER_BITMASK
+ return INTEGER_BITMASK;
+ case 4: // INTEGER_FLAG
+ return INTEGER_FLAG;
+ case 5: // BINARY_VALUE
+ return BINARY_VALUE;
+ case 6: // LEN_VALUE
+ return LEN_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.STRING_VALUE, new org.apache.thrift.meta_data.FieldMetaData("stringValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.SMALL_INT_VALUE, new org.apache.thrift.meta_data.FieldMetaData("smallIntValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
+ tmpMap.put(_Fields.INTEGER_BITMASK, new org.apache.thrift.meta_data.FieldMetaData("integerBitmask", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.INTEGER_FLAG, new org.apache.thrift.meta_data.FieldMetaData("integerFlag", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.BINARY_VALUE, new org.apache.thrift.meta_data.FieldMetaData("binaryValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.LEN_VALUE, new org.apache.thrift.meta_data.FieldMetaData("lenValue", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetInfoValue.class, metaDataMap);
+ }
+
+ public TGetInfoValue() {
+ super();
+ }
+
+ public TGetInfoValue(_Fields setField, Object value) {
+ super(setField, value);
+ }
+
+ public TGetInfoValue(TGetInfoValue other) {
+ super(other);
+ }
+ public TGetInfoValue deepCopy() {
+ return new TGetInfoValue(this);
+ }
+
+ public static TGetInfoValue stringValue(String value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setStringValue(value);
+ return x;
+ }
+
+ public static TGetInfoValue smallIntValue(short value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setSmallIntValue(value);
+ return x;
+ }
+
+ public static TGetInfoValue integerBitmask(int value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setIntegerBitmask(value);
+ return x;
+ }
+
+ public static TGetInfoValue integerFlag(int value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setIntegerFlag(value);
+ return x;
+ }
+
+ public static TGetInfoValue binaryValue(int value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setBinaryValue(value);
+ return x;
+ }
+
+ public static TGetInfoValue lenValue(long value) {
+ TGetInfoValue x = new TGetInfoValue();
+ x.setLenValue(value);
+ return x;
+ }
+
+
+ @Override
+ protected void checkType(_Fields setField, Object value) throws ClassCastException {
+ switch (setField) {
+ case STRING_VALUE:
+ if (value instanceof String) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type String for field 'stringValue', but got " + value.getClass().getSimpleName());
+ case SMALL_INT_VALUE:
+ if (value instanceof Short) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Short for field 'smallIntValue', but got " + value.getClass().getSimpleName());
+ case INTEGER_BITMASK:
+ if (value instanceof Integer) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Integer for field 'integerBitmask', but got " + value.getClass().getSimpleName());
+ case INTEGER_FLAG:
+ if (value instanceof Integer) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Integer for field 'integerFlag', but got " + value.getClass().getSimpleName());
+ case BINARY_VALUE:
+ if (value instanceof Integer) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Integer for field 'binaryValue', but got " + value.getClass().getSimpleName());
+ case LEN_VALUE:
+ if (value instanceof Long) {
+ break;
+ }
+ throw new ClassCastException("Was expecting value of type Long for field 'lenValue', but got " + value.getClass().getSimpleName());
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(field.id);
+ if (setField != null) {
+ switch (setField) {
+ case STRING_VALUE:
+ if (field.type == STRING_VALUE_FIELD_DESC.type) {
+ String stringValue;
+ stringValue = iprot.readString();
+ return stringValue;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case SMALL_INT_VALUE:
+ if (field.type == SMALL_INT_VALUE_FIELD_DESC.type) {
+ Short smallIntValue;
+ smallIntValue = iprot.readI16();
+ return smallIntValue;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case INTEGER_BITMASK:
+ if (field.type == INTEGER_BITMASK_FIELD_DESC.type) {
+ Integer integerBitmask;
+ integerBitmask = iprot.readI32();
+ return integerBitmask;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case INTEGER_FLAG:
+ if (field.type == INTEGER_FLAG_FIELD_DESC.type) {
+ Integer integerFlag;
+ integerFlag = iprot.readI32();
+ return integerFlag;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case BINARY_VALUE:
+ if (field.type == BINARY_VALUE_FIELD_DESC.type) {
+ Integer binaryValue;
+ binaryValue = iprot.readI32();
+ return binaryValue;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ case LEN_VALUE:
+ if (field.type == LEN_VALUE_FIELD_DESC.type) {
+ Long lenValue;
+ lenValue = iprot.readI64();
+ return lenValue;
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
+ return null;
+ }
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case STRING_VALUE:
+ String stringValue = (String)value_;
+ oprot.writeString(stringValue);
+ return;
+ case SMALL_INT_VALUE:
+ Short smallIntValue = (Short)value_;
+ oprot.writeI16(smallIntValue);
+ return;
+ case INTEGER_BITMASK:
+ Integer integerBitmask = (Integer)value_;
+ oprot.writeI32(integerBitmask);
+ return;
+ case INTEGER_FLAG:
+ Integer integerFlag = (Integer)value_;
+ oprot.writeI32(integerFlag);
+ return;
+ case BINARY_VALUE:
+ Integer binaryValue = (Integer)value_;
+ oprot.writeI32(binaryValue);
+ return;
+ case LEN_VALUE:
+ Long lenValue = (Long)value_;
+ oprot.writeI64(lenValue);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID) throws org.apache.thrift.TException {
+ _Fields setField = _Fields.findByThriftId(fieldID);
+ if (setField != null) {
+ switch (setField) {
+ case STRING_VALUE:
+ String stringValue;
+ stringValue = iprot.readString();
+ return stringValue;
+ case SMALL_INT_VALUE:
+ Short smallIntValue;
+ smallIntValue = iprot.readI16();
+ return smallIntValue;
+ case INTEGER_BITMASK:
+ Integer integerBitmask;
+ integerBitmask = iprot.readI32();
+ return integerBitmask;
+ case INTEGER_FLAG:
+ Integer integerFlag;
+ integerFlag = iprot.readI32();
+ return integerFlag;
+ case BINARY_VALUE:
+ Integer binaryValue;
+ binaryValue = iprot.readI32();
+ return binaryValue;
+ case LEN_VALUE:
+ Long lenValue;
+ lenValue = iprot.readI64();
+ return lenValue;
+ default:
+ throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!");
+ }
+ } else {
+ throw new TProtocolException("Couldn't find a field with field id " + fieldID);
+ }
+ }
+
+ @Override
+ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ switch (setField_) {
+ case STRING_VALUE:
+ String stringValue = (String)value_;
+ oprot.writeString(stringValue);
+ return;
+ case SMALL_INT_VALUE:
+ Short smallIntValue = (Short)value_;
+ oprot.writeI16(smallIntValue);
+ return;
+ case INTEGER_BITMASK:
+ Integer integerBitmask = (Integer)value_;
+ oprot.writeI32(integerBitmask);
+ return;
+ case INTEGER_FLAG:
+ Integer integerFlag = (Integer)value_;
+ oprot.writeI32(integerFlag);
+ return;
+ case BINARY_VALUE:
+ Integer binaryValue = (Integer)value_;
+ oprot.writeI32(binaryValue);
+ return;
+ case LEN_VALUE:
+ Long lenValue = (Long)value_;
+ oprot.writeI64(lenValue);
+ return;
+ default:
+ throw new IllegalStateException("Cannot write union with unknown field " + setField_);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TField getFieldDesc(_Fields setField) {
+ switch (setField) {
+ case STRING_VALUE:
+ return STRING_VALUE_FIELD_DESC;
+ case SMALL_INT_VALUE:
+ return SMALL_INT_VALUE_FIELD_DESC;
+ case INTEGER_BITMASK:
+ return INTEGER_BITMASK_FIELD_DESC;
+ case INTEGER_FLAG:
+ return INTEGER_FLAG_FIELD_DESC;
+ case BINARY_VALUE:
+ return BINARY_VALUE_FIELD_DESC;
+ case LEN_VALUE:
+ return LEN_VALUE_FIELD_DESC;
+ default:
+ throw new IllegalArgumentException("Unknown field id " + setField);
+ }
+ }
+
+ @Override
+ protected org.apache.thrift.protocol.TStruct getStructDesc() {
+ return STRUCT_DESC;
+ }
+
+ @Override
+ protected _Fields enumForId(short id) {
+ return _Fields.findByThriftIdOrThrow(id);
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+
+ public String getStringValue() {
+ if (getSetField() == _Fields.STRING_VALUE) {
+ return (String)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'stringValue' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setStringValue(String value) {
+ if (value == null) throw new NullPointerException();
+ setField_ = _Fields.STRING_VALUE;
+ value_ = value;
+ }
+
+ public short getSmallIntValue() {
+ if (getSetField() == _Fields.SMALL_INT_VALUE) {
+ return (Short)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'smallIntValue' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setSmallIntValue(short value) {
+ setField_ = _Fields.SMALL_INT_VALUE;
+ value_ = value;
+ }
+
+ public int getIntegerBitmask() {
+ if (getSetField() == _Fields.INTEGER_BITMASK) {
+ return (Integer)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'integerBitmask' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setIntegerBitmask(int value) {
+ setField_ = _Fields.INTEGER_BITMASK;
+ value_ = value;
+ }
+
+ public int getIntegerFlag() {
+ if (getSetField() == _Fields.INTEGER_FLAG) {
+ return (Integer)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'integerFlag' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setIntegerFlag(int value) {
+ setField_ = _Fields.INTEGER_FLAG;
+ value_ = value;
+ }
+
+ public int getBinaryValue() {
+ if (getSetField() == _Fields.BINARY_VALUE) {
+ return (Integer)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'binaryValue' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setBinaryValue(int value) {
+ setField_ = _Fields.BINARY_VALUE;
+ value_ = value;
+ }
+
+ public long getLenValue() {
+ if (getSetField() == _Fields.LEN_VALUE) {
+ return (Long)getFieldValue();
+ } else {
+ throw new RuntimeException("Cannot get field 'lenValue' because union is currently set to " + getFieldDesc(getSetField()).name);
+ }
+ }
+
+ public void setLenValue(long value) {
+ setField_ = _Fields.LEN_VALUE;
+ value_ = value;
+ }
+
+ public boolean isSetStringValue() {
+ return setField_ == _Fields.STRING_VALUE;
+ }
+
+
+ public boolean isSetSmallIntValue() {
+ return setField_ == _Fields.SMALL_INT_VALUE;
+ }
+
+
+ public boolean isSetIntegerBitmask() {
+ return setField_ == _Fields.INTEGER_BITMASK;
+ }
+
+
+ public boolean isSetIntegerFlag() {
+ return setField_ == _Fields.INTEGER_FLAG;
+ }
+
+
+ public boolean isSetBinaryValue() {
+ return setField_ == _Fields.BINARY_VALUE;
+ }
+
+
+ public boolean isSetLenValue() {
+ return setField_ == _Fields.LEN_VALUE;
+ }
+
+
+ public boolean equals(Object other) {
+ if (other instanceof TGetInfoValue) {
+ return equals((TGetInfoValue)other);
+ } else {
+ return false;
+ }
+ }
+
+ public boolean equals(TGetInfoValue other) {
+ return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue());
+ }
+
+ @Override
+ public int compareTo(TGetInfoValue other) {
+ int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField());
+ if (lastComparison == 0) {
+ return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue());
+ }
+ return lastComparison;
+ }
+
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder hcb = new HashCodeBuilder();
+ hcb.append(this.getClass().getName());
+ org.apache.thrift.TFieldIdEnum setField = getSetField();
+ if (setField != null) {
+ hcb.append(setField.getThriftFieldId());
+ Object value = getFieldValue();
+ if (value instanceof org.apache.thrift.TEnum) {
+ hcb.append(((org.apache.thrift.TEnum)getFieldValue()).getValue());
+ } else {
+ hcb.append(value);
+ }
+ }
+ return hcb.toHashCode();
+ }
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+
+}
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusReq.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,390 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TGetOperationStatusReq implements org.apache.thrift.TBase<TGetOperationStatusReq, TGetOperationStatusReq._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusReq");
+
+ private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TGetOperationStatusReqStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TGetOperationStatusReqTupleSchemeFactory());
+ }
+
+ private TOperationHandle operationHandle; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ OPERATION_HANDLE((short)1, "operationHandle");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // OPERATION_HANDLE
+ return OPERATION_HANDLE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.OPERATION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("operationHandle", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOperationHandle.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOperationStatusReq.class, metaDataMap);
+ }
+
+ public TGetOperationStatusReq() {
+ }
+
+ public TGetOperationStatusReq(
+ TOperationHandle operationHandle)
+ {
+ this();
+ this.operationHandle = operationHandle;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TGetOperationStatusReq(TGetOperationStatusReq other) {
+ if (other.isSetOperationHandle()) {
+ this.operationHandle = new TOperationHandle(other.operationHandle);
+ }
+ }
+
+ public TGetOperationStatusReq deepCopy() {
+ return new TGetOperationStatusReq(this);
+ }
+
+ @Override
+ public void clear() {
+ this.operationHandle = null;
+ }
+
+ public TOperationHandle getOperationHandle() {
+ return this.operationHandle;
+ }
+
+ public void setOperationHandle(TOperationHandle operationHandle) {
+ this.operationHandle = operationHandle;
+ }
+
+ public void unsetOperationHandle() {
+ this.operationHandle = null;
+ }
+
+ /** Returns true if field operationHandle is set (has been assigned a value) and false otherwise */
+ public boolean isSetOperationHandle() {
+ return this.operationHandle != null;
+ }
+
+ public void setOperationHandleIsSet(boolean value) {
+ if (!value) {
+ this.operationHandle = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OPERATION_HANDLE:
+ if (value == null) {
+ unsetOperationHandle();
+ } else {
+ setOperationHandle((TOperationHandle)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OPERATION_HANDLE:
+ return getOperationHandle();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** 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();
+ }
+
+ switch (field) {
+ case OPERATION_HANDLE:
+ return isSetOperationHandle();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TGetOperationStatusReq)
+ return this.equals((TGetOperationStatusReq)that);
+ return false;
+ }
+
+ public boolean equals(TGetOperationStatusReq that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_operationHandle = true && this.isSetOperationHandle();
+ boolean that_present_operationHandle = true && that.isSetOperationHandle();
+ if (this_present_operationHandle || that_present_operationHandle) {
+ if (!(this_present_operationHandle && that_present_operationHandle))
+ return false;
+ if (!this.operationHandle.equals(that.operationHandle))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_operationHandle = true && (isSetOperationHandle());
+ builder.append(present_operationHandle);
+ if (present_operationHandle)
+ builder.append(operationHandle);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TGetOperationStatusReq other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TGetOperationStatusReq typedOther = (TGetOperationStatusReq)other;
+
+ lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOperationHandle()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TGetOperationStatusReq(");
+ boolean first = true;
+
+ sb.append("operationHandle:");
+ if (this.operationHandle == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.operationHandle);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetOperationHandle()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (operationHandle != null) {
+ operationHandle.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TGetOperationStatusReqStandardSchemeFactory implements SchemeFactory {
+ public TGetOperationStatusReqStandardScheme getScheme() {
+ return new TGetOperationStatusReqStandardScheme();
+ }
+ }
+
+ private static class TGetOperationStatusReqStandardScheme extends StandardScheme<TGetOperationStatusReq> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatusReq struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // OPERATION_HANDLE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.operationHandle = new TOperationHandle();
+ struct.operationHandle.read(iprot);
+ struct.setOperationHandleIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatusReq struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.operationHandle != null) {
+ oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC);
+ struct.operationHandle.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TGetOperationStatusReqTupleSchemeFactory implements SchemeFactory {
+ public TGetOperationStatusReqTupleScheme getScheme() {
+ return new TGetOperationStatusReqTupleScheme();
+ }
+ }
+
+ private static class TGetOperationStatusReqTupleScheme extends TupleScheme<TGetOperationStatusReq> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.operationHandle.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.operationHandle = new TOperationHandle();
+ struct.operationHandle.read(iprot);
+ struct.setOperationHandleIsSet(true);
+ }
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusResp.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusResp.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusResp.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetOperationStatusResp.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,512 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TGetOperationStatusResp implements org.apache.thrift.TBase<TGetOperationStatusResp, TGetOperationStatusResp._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusResp");
+
+ private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField OPERATION_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationState", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TGetOperationStatusRespStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TGetOperationStatusRespTupleSchemeFactory());
+ }
+
+ private TStatus status; // required
+ private TOperationState operationState; // optional
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ STATUS((short)1, "status"),
+ /**
+ *
+ * @see TOperationState
+ */
+ OPERATION_STATE((short)2, "operationState");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // STATUS
+ return STATUS;
+ case 2: // OPERATION_STATE
+ return OPERATION_STATE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private _Fields optionals[] = {_Fields.OPERATION_STATE};
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TStatus.class)));
+ tmpMap.put(_Fields.OPERATION_STATE, new org.apache.thrift.meta_data.FieldMetaData("operationState", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TOperationState.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetOperationStatusResp.class, metaDataMap);
+ }
+
+ public TGetOperationStatusResp() {
+ }
+
+ public TGetOperationStatusResp(
+ TStatus status)
+ {
+ this();
+ this.status = status;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TGetOperationStatusResp(TGetOperationStatusResp other) {
+ if (other.isSetStatus()) {
+ this.status = new TStatus(other.status);
+ }
+ if (other.isSetOperationState()) {
+ this.operationState = other.operationState;
+ }
+ }
+
+ public TGetOperationStatusResp deepCopy() {
+ return new TGetOperationStatusResp(this);
+ }
+
+ @Override
+ public void clear() {
+ this.status = null;
+ this.operationState = null;
+ }
+
+ public TStatus getStatus() {
+ return this.status;
+ }
+
+ public void setStatus(TStatus status) {
+ this.status = status;
+ }
+
+ public void unsetStatus() {
+ this.status = null;
+ }
+
+ /** Returns true if field status is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatus() {
+ return this.status != null;
+ }
+
+ public void setStatusIsSet(boolean value) {
+ if (!value) {
+ this.status = null;
+ }
+ }
+
+ /**
+ *
+ * @see TOperationState
+ */
+ public TOperationState getOperationState() {
+ return this.operationState;
+ }
+
+ /**
+ *
+ * @see TOperationState
+ */
+ public void setOperationState(TOperationState operationState) {
+ this.operationState = operationState;
+ }
+
+ public void unsetOperationState() {
+ this.operationState = null;
+ }
+
+ /** Returns true if field operationState is set (has been assigned a value) and false otherwise */
+ public boolean isSetOperationState() {
+ return this.operationState != null;
+ }
+
+ public void setOperationStateIsSet(boolean value) {
+ if (!value) {
+ this.operationState = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case STATUS:
+ if (value == null) {
+ unsetStatus();
+ } else {
+ setStatus((TStatus)value);
+ }
+ break;
+
+ case OPERATION_STATE:
+ if (value == null) {
+ unsetOperationState();
+ } else {
+ setOperationState((TOperationState)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STATUS:
+ return getStatus();
+
+ case OPERATION_STATE:
+ return getOperationState();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** 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();
+ }
+
+ switch (field) {
+ case STATUS:
+ return isSetStatus();
+ case OPERATION_STATE:
+ return isSetOperationState();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TGetOperationStatusResp)
+ return this.equals((TGetOperationStatusResp)that);
+ return false;
+ }
+
+ public boolean equals(TGetOperationStatusResp that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_status = true && this.isSetStatus();
+ boolean that_present_status = true && that.isSetStatus();
+ if (this_present_status || that_present_status) {
+ if (!(this_present_status && that_present_status))
+ return false;
+ if (!this.status.equals(that.status))
+ return false;
+ }
+
+ boolean this_present_operationState = true && this.isSetOperationState();
+ boolean that_present_operationState = true && that.isSetOperationState();
+ if (this_present_operationState || that_present_operationState) {
+ if (!(this_present_operationState && that_present_operationState))
+ return false;
+ if (!this.operationState.equals(that.operationState))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_status = true && (isSetStatus());
+ builder.append(present_status);
+ if (present_status)
+ builder.append(status);
+
+ boolean present_operationState = true && (isSetOperationState());
+ builder.append(present_operationState);
+ if (present_operationState)
+ builder.append(operationState.getValue());
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TGetOperationStatusResp other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TGetOperationStatusResp typedOther = (TGetOperationStatusResp)other;
+
+ lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(typedOther.isSetOperationState());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOperationState()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, typedOther.operationState);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TGetOperationStatusResp(");
+ boolean first = true;
+
+ sb.append("status:");
+ if (this.status == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.status);
+ }
+ first = false;
+ if (isSetOperationState()) {
+ if (!first) sb.append(", ");
+ sb.append("operationState:");
+ if (this.operationState == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.operationState);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetStatus()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (status != null) {
+ status.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TGetOperationStatusRespStandardSchemeFactory implements SchemeFactory {
+ public TGetOperationStatusRespStandardScheme getScheme() {
+ return new TGetOperationStatusRespStandardScheme();
+ }
+ }
+
+ private static class TGetOperationStatusRespStandardScheme extends StandardScheme<TGetOperationStatusResp> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.status = new TStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OPERATION_STATE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.operationState = TOperationState.findByValue(iprot.readI32());
+ struct.setOperationStateIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.status != null) {
+ oprot.writeFieldBegin(STATUS_FIELD_DESC);
+ struct.status.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.operationState != null) {
+ if (struct.isSetOperationState()) {
+ oprot.writeFieldBegin(OPERATION_STATE_FIELD_DESC);
+ oprot.writeI32(struct.operationState.getValue());
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TGetOperationStatusRespTupleSchemeFactory implements SchemeFactory {
+ public TGetOperationStatusRespTupleScheme getScheme() {
+ return new TGetOperationStatusRespTupleScheme();
+ }
+ }
+
+ private static class TGetOperationStatusRespTupleScheme extends TupleScheme<TGetOperationStatusResp> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.status.write(oprot);
+ BitSet optionals = new BitSet();
+ if (struct.isSetOperationState()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetOperationState()) {
+ oprot.writeI32(struct.operationState.getValue());
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.status = new TStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.operationState = TOperationState.findByValue(iprot.readI32());
+ struct.setOperationStateIsSet(true);
+ }
+ }
+ }
+
+}
+
Added: hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java
URL: http://svn.apache.org/viewvc/hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java?rev=1455646&view=auto
==============================================================================
--- hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java (added)
+++ hive/trunk/service/src/gen/thrift/gen-javabean/org/apache/hive/service/cli/thrift/TGetResultSetMetadataReq.java Tue Mar 12 17:45:10 2013
@@ -0,0 +1,390 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.cli.thrift;
+
+import org.apache.commons.lang.builder.HashCodeBuilder;
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import org.apache.thrift.TException;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class TGetResultSetMetadataReq implements org.apache.thrift.TBase<TGetResultSetMetadataReq, TGetResultSetMetadataReq._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataReq");
+
+ private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TGetResultSetMetadataReqStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TGetResultSetMetadataReqTupleSchemeFactory());
+ }
+
+ private TOperationHandle operationHandle; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ OPERATION_HANDLE((short)1, "operationHandle");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // OPERATION_HANDLE
+ return OPERATION_HANDLE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.OPERATION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("operationHandle", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TOperationHandle.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TGetResultSetMetadataReq.class, metaDataMap);
+ }
+
+ public TGetResultSetMetadataReq() {
+ }
+
+ public TGetResultSetMetadataReq(
+ TOperationHandle operationHandle)
+ {
+ this();
+ this.operationHandle = operationHandle;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TGetResultSetMetadataReq(TGetResultSetMetadataReq other) {
+ if (other.isSetOperationHandle()) {
+ this.operationHandle = new TOperationHandle(other.operationHandle);
+ }
+ }
+
+ public TGetResultSetMetadataReq deepCopy() {
+ return new TGetResultSetMetadataReq(this);
+ }
+
+ @Override
+ public void clear() {
+ this.operationHandle = null;
+ }
+
+ public TOperationHandle getOperationHandle() {
+ return this.operationHandle;
+ }
+
+ public void setOperationHandle(TOperationHandle operationHandle) {
+ this.operationHandle = operationHandle;
+ }
+
+ public void unsetOperationHandle() {
+ this.operationHandle = null;
+ }
+
+ /** Returns true if field operationHandle is set (has been assigned a value) and false otherwise */
+ public boolean isSetOperationHandle() {
+ return this.operationHandle != null;
+ }
+
+ public void setOperationHandleIsSet(boolean value) {
+ if (!value) {
+ this.operationHandle = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OPERATION_HANDLE:
+ if (value == null) {
+ unsetOperationHandle();
+ } else {
+ setOperationHandle((TOperationHandle)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OPERATION_HANDLE:
+ return getOperationHandle();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** 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();
+ }
+
+ switch (field) {
+ case OPERATION_HANDLE:
+ return isSetOperationHandle();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TGetResultSetMetadataReq)
+ return this.equals((TGetResultSetMetadataReq)that);
+ return false;
+ }
+
+ public boolean equals(TGetResultSetMetadataReq that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_operationHandle = true && this.isSetOperationHandle();
+ boolean that_present_operationHandle = true && that.isSetOperationHandle();
+ if (this_present_operationHandle || that_present_operationHandle) {
+ if (!(this_present_operationHandle && that_present_operationHandle))
+ return false;
+ if (!this.operationHandle.equals(that.operationHandle))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_operationHandle = true && (isSetOperationHandle());
+ builder.append(present_operationHandle);
+ if (present_operationHandle)
+ builder.append(operationHandle);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TGetResultSetMetadataReq other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TGetResultSetMetadataReq typedOther = (TGetResultSetMetadataReq)other;
+
+ lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOperationHandle()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TGetResultSetMetadataReq(");
+ boolean first = true;
+
+ sb.append("operationHandle:");
+ if (this.operationHandle == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.operationHandle);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetOperationHandle()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (operationHandle != null) {
+ operationHandle.validate();
+ }
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TGetResultSetMetadataReqStandardSchemeFactory implements SchemeFactory {
+ public TGetResultSetMetadataReqStandardScheme getScheme() {
+ return new TGetResultSetMetadataReqStandardScheme();
+ }
+ }
+
+ private static class TGetResultSetMetadataReqStandardScheme extends StandardScheme<TGetResultSetMetadataReq> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetResultSetMetadataReq struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // OPERATION_HANDLE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.operationHandle = new TOperationHandle();
+ struct.operationHandle.read(iprot);
+ struct.setOperationHandleIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetResultSetMetadataReq struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.operationHandle != null) {
+ oprot.writeFieldBegin(OPERATION_HANDLE_FIELD_DESC);
+ struct.operationHandle.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TGetResultSetMetadataReqTupleSchemeFactory implements SchemeFactory {
+ public TGetResultSetMetadataReqTupleScheme getScheme() {
+ return new TGetResultSetMetadataReqTupleScheme();
+ }
+ }
+
+ private static class TGetResultSetMetadataReqTupleScheme extends TupleScheme<TGetResultSetMetadataReq> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TGetResultSetMetadataReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.operationHandle.write(oprot);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TGetResultSetMetadataReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.operationHandle = new TOperationHandle();
+ struct.operationHandle.read(iprot);
+ struct.setOperationHandleIsSet(true);
+ }
+ }
+
+}
+