You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2016/04/29 18:33:00 UTC
[12/25] spark git commit: [SPARK-14987][SQL] inline hive-service
(cli) into sql/hive-thriftserver
http://git-wip-us.apache.org/repos/asf/spark/blob/7feeb82c/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java
new file mode 100644
index 0000000..059408b
--- /dev/null
+++ b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI32Value.java
@@ -0,0 +1,386 @@
+/**
+ * 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 TI32Value implements org.apache.thrift.TBase<TI32Value, TI32Value._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI32Value");
+
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I32, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TI32ValueStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TI32ValueTupleSchemeFactory());
+ }
+
+ private int value; // 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 {
+ VALUE((short)1, "value");
+
+ 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: // VALUE
+ return 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
+ private static final int __VALUE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.VALUE};
+ 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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TI32Value.class, metaDataMap);
+ }
+
+ public TI32Value() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TI32Value(TI32Value other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.value = other.value;
+ }
+
+ public TI32Value deepCopy() {
+ return new TI32Value(this);
+ }
+
+ @Override
+ public void clear() {
+ setValueIsSet(false);
+ this.value = 0;
+ }
+
+ public int getValue() {
+ return this.value;
+ }
+
+ public void setValue(int value) {
+ this.value = value;
+ setValueIsSet(true);
+ }
+
+ public void unsetValue() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return EncodingUtils.testBit(__isset_bitfield, __VALUE_ISSET_ID);
+ }
+
+ public void setValueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VALUE:
+ return Integer.valueOf(getValue());
+
+ }
+ 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 VALUE:
+ return isSetValue();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TI32Value)
+ return this.equals((TI32Value)that);
+ return false;
+ }
+
+ public boolean equals(TI32Value that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (this.value != that.value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_value = true && (isSetValue());
+ builder.append(present_value);
+ if (present_value)
+ builder.append(value);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TI32Value other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TI32Value typedOther = (TI32Value)other;
+
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ 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("TI32Value(");
+ boolean first = true;
+
+ if (isSetValue()) {
+ sb.append("value:");
+ sb.append(this.value);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TI32ValueStandardSchemeFactory implements SchemeFactory {
+ public TI32ValueStandardScheme getScheme() {
+ return new TI32ValueStandardScheme();
+ }
+ }
+
+ private static class TI32ValueStandardScheme extends StandardScheme<TI32Value> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TI32Value 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: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.value = iprot.readI32();
+ struct.setValueIsSet(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, TI32Value struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetValue()) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeI32(struct.value);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TI32ValueTupleSchemeFactory implements SchemeFactory {
+ public TI32ValueTupleScheme getScheme() {
+ return new TI32ValueTupleScheme();
+ }
+ }
+
+ private static class TI32ValueTupleScheme extends TupleScheme<TI32Value> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TI32Value struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetValue()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetValue()) {
+ oprot.writeI32(struct.value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TI32Value struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.value = iprot.readI32();
+ struct.setValueIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/spark/blob/7feeb82c/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java
new file mode 100644
index 0000000..cc383ed
--- /dev/null
+++ b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Column.java
@@ -0,0 +1,548 @@
+/**
+ * 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 TI64Column implements org.apache.thrift.TBase<TI64Column, TI64Column._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI64Column");
+
+ private static final org.apache.thrift.protocol.TField VALUES_FIELD_DESC = new org.apache.thrift.protocol.TField("values", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField NULLS_FIELD_DESC = new org.apache.thrift.protocol.TField("nulls", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TI64ColumnStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TI64ColumnTupleSchemeFactory());
+ }
+
+ private List<Long> values; // required
+ private ByteBuffer nulls; // 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 {
+ VALUES((short)1, "values"),
+ NULLS((short)2, "nulls");
+
+ 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: // VALUES
+ return VALUES;
+ case 2: // NULLS
+ return NULLS;
+ 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.VALUES, new org.apache.thrift.meta_data.FieldMetaData("values", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
+ tmpMap.put(_Fields.NULLS, new org.apache.thrift.meta_data.FieldMetaData("nulls", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TI64Column.class, metaDataMap);
+ }
+
+ public TI64Column() {
+ }
+
+ public TI64Column(
+ List<Long> values,
+ ByteBuffer nulls)
+ {
+ this();
+ this.values = values;
+ this.nulls = nulls;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TI64Column(TI64Column other) {
+ if (other.isSetValues()) {
+ List<Long> __this__values = new ArrayList<Long>();
+ for (Long other_element : other.values) {
+ __this__values.add(other_element);
+ }
+ this.values = __this__values;
+ }
+ if (other.isSetNulls()) {
+ this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls);
+;
+ }
+ }
+
+ public TI64Column deepCopy() {
+ return new TI64Column(this);
+ }
+
+ @Override
+ public void clear() {
+ this.values = null;
+ this.nulls = null;
+ }
+
+ public int getValuesSize() {
+ return (this.values == null) ? 0 : this.values.size();
+ }
+
+ public java.util.Iterator<Long> getValuesIterator() {
+ return (this.values == null) ? null : this.values.iterator();
+ }
+
+ public void addToValues(long elem) {
+ if (this.values == null) {
+ this.values = new ArrayList<Long>();
+ }
+ this.values.add(elem);
+ }
+
+ public List<Long> getValues() {
+ return this.values;
+ }
+
+ public void setValues(List<Long> values) {
+ this.values = values;
+ }
+
+ public void unsetValues() {
+ this.values = null;
+ }
+
+ /** Returns true if field values is set (has been assigned a value) and false otherwise */
+ public boolean isSetValues() {
+ return this.values != null;
+ }
+
+ public void setValuesIsSet(boolean value) {
+ if (!value) {
+ this.values = null;
+ }
+ }
+
+ public byte[] getNulls() {
+ setNulls(org.apache.thrift.TBaseHelper.rightSize(nulls));
+ return nulls == null ? null : nulls.array();
+ }
+
+ public ByteBuffer bufferForNulls() {
+ return nulls;
+ }
+
+ public void setNulls(byte[] nulls) {
+ setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls));
+ }
+
+ public void setNulls(ByteBuffer nulls) {
+ this.nulls = nulls;
+ }
+
+ public void unsetNulls() {
+ this.nulls = null;
+ }
+
+ /** Returns true if field nulls is set (has been assigned a value) and false otherwise */
+ public boolean isSetNulls() {
+ return this.nulls != null;
+ }
+
+ public void setNullsIsSet(boolean value) {
+ if (!value) {
+ this.nulls = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VALUES:
+ if (value == null) {
+ unsetValues();
+ } else {
+ setValues((List<Long>)value);
+ }
+ break;
+
+ case NULLS:
+ if (value == null) {
+ unsetNulls();
+ } else {
+ setNulls((ByteBuffer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VALUES:
+ return getValues();
+
+ case NULLS:
+ return getNulls();
+
+ }
+ 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 VALUES:
+ return isSetValues();
+ case NULLS:
+ return isSetNulls();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TI64Column)
+ return this.equals((TI64Column)that);
+ return false;
+ }
+
+ public boolean equals(TI64Column that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_values = true && this.isSetValues();
+ boolean that_present_values = true && that.isSetValues();
+ if (this_present_values || that_present_values) {
+ if (!(this_present_values && that_present_values))
+ return false;
+ if (!this.values.equals(that.values))
+ return false;
+ }
+
+ boolean this_present_nulls = true && this.isSetNulls();
+ boolean that_present_nulls = true && that.isSetNulls();
+ if (this_present_nulls || that_present_nulls) {
+ if (!(this_present_nulls && that_present_nulls))
+ return false;
+ if (!this.nulls.equals(that.nulls))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_values = true && (isSetValues());
+ builder.append(present_values);
+ if (present_values)
+ builder.append(values);
+
+ boolean present_nulls = true && (isSetNulls());
+ builder.append(present_nulls);
+ if (present_nulls)
+ builder.append(nulls);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TI64Column other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TI64Column typedOther = (TI64Column)other;
+
+ lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValues()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNulls()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls);
+ 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("TI64Column(");
+ boolean first = true;
+
+ sb.append("values:");
+ if (this.values == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.values);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("nulls:");
+ if (this.nulls == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.nulls, sb);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetValues()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' is unset! Struct:" + toString());
+ }
+
+ if (!isSetNulls()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ 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 TI64ColumnStandardSchemeFactory implements SchemeFactory {
+ public TI64ColumnStandardScheme getScheme() {
+ return new TI64ColumnStandardScheme();
+ }
+ }
+
+ private static class TI64ColumnStandardScheme extends StandardScheme<TI64Column> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Column struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // VALUES
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
+ struct.values = new ArrayList<Long>(_list86.size);
+ for (int _i87 = 0; _i87 < _list86.size; ++_i87)
+ {
+ long _elem88; // optional
+ _elem88 = iprot.readI64();
+ struct.values.add(_elem88);
+ }
+ iprot.readListEnd();
+ }
+ struct.setValuesIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // NULLS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.nulls = iprot.readBinary();
+ struct.setNullsIsSet(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, TI64Column struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.values != null) {
+ oprot.writeFieldBegin(VALUES_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, struct.values.size()));
+ for (long _iter89 : struct.values)
+ {
+ oprot.writeI64(_iter89);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ if (struct.nulls != null) {
+ oprot.writeFieldBegin(NULLS_FIELD_DESC);
+ oprot.writeBinary(struct.nulls);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TI64ColumnTupleSchemeFactory implements SchemeFactory {
+ public TI64ColumnTupleScheme getScheme() {
+ return new TI64ColumnTupleScheme();
+ }
+ }
+
+ private static class TI64ColumnTupleScheme extends TupleScheme<TI64Column> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TI64Column struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ {
+ oprot.writeI32(struct.values.size());
+ for (long _iter90 : struct.values)
+ {
+ oprot.writeI64(_iter90);
+ }
+ }
+ oprot.writeBinary(struct.nulls);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TI64Column struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ {
+ org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32());
+ struct.values = new ArrayList<Long>(_list91.size);
+ for (int _i92 = 0; _i92 < _list91.size; ++_i92)
+ {
+ long _elem93; // optional
+ _elem93 = iprot.readI64();
+ struct.values.add(_elem93);
+ }
+ }
+ struct.setValuesIsSet(true);
+ struct.nulls = iprot.readBinary();
+ struct.setNullsIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/spark/blob/7feeb82c/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java
new file mode 100644
index 0000000..9a941cc
--- /dev/null
+++ b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TI64Value.java
@@ -0,0 +1,386 @@
+/**
+ * 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 TI64Value implements org.apache.thrift.TBase<TI64Value, TI64Value._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI64Value");
+
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I64, (short)1);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TI64ValueStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TI64ValueTupleSchemeFactory());
+ }
+
+ private long value; // 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 {
+ VALUE((short)1, "value");
+
+ 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: // VALUE
+ return 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
+ private static final int __VALUE_ISSET_ID = 0;
+ private byte __isset_bitfield = 0;
+ private _Fields optionals[] = {_Fields.VALUE};
+ 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.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TI64Value.class, metaDataMap);
+ }
+
+ public TI64Value() {
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TI64Value(TI64Value other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.value = other.value;
+ }
+
+ public TI64Value deepCopy() {
+ return new TI64Value(this);
+ }
+
+ @Override
+ public void clear() {
+ setValueIsSet(false);
+ this.value = 0;
+ }
+
+ public long getValue() {
+ return this.value;
+ }
+
+ public void setValue(long value) {
+ this.value = value;
+ setValueIsSet(true);
+ }
+
+ public void unsetValue() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field value is set (has been assigned a value) and false otherwise */
+ public boolean isSetValue() {
+ return EncodingUtils.testBit(__isset_bitfield, __VALUE_ISSET_ID);
+ }
+
+ public void setValueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((Long)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VALUE:
+ return Long.valueOf(getValue());
+
+ }
+ 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 VALUE:
+ return isSetValue();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TI64Value)
+ return this.equals((TI64Value)that);
+ return false;
+ }
+
+ public boolean equals(TI64Value that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_value = true && this.isSetValue();
+ boolean that_present_value = true && that.isSetValue();
+ if (this_present_value || that_present_value) {
+ if (!(this_present_value && that_present_value))
+ return false;
+ if (this.value != that.value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_value = true && (isSetValue());
+ builder.append(present_value);
+ if (present_value)
+ builder.append(value);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TI64Value other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TI64Value typedOther = (TI64Value)other;
+
+ lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValue()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value);
+ 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("TI64Value(");
+ boolean first = true;
+
+ if (isSetValue()) {
+ sb.append("value:");
+ sb.append(this.value);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TI64ValueStandardSchemeFactory implements SchemeFactory {
+ public TI64ValueStandardScheme getScheme() {
+ return new TI64ValueStandardScheme();
+ }
+ }
+
+ private static class TI64ValueStandardScheme extends StandardScheme<TI64Value> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Value 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: // VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.value = iprot.readI64();
+ struct.setValueIsSet(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, TI64Value struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetValue()) {
+ oprot.writeFieldBegin(VALUE_FIELD_DESC);
+ oprot.writeI64(struct.value);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TI64ValueTupleSchemeFactory implements SchemeFactory {
+ public TI64ValueTupleScheme getScheme() {
+ return new TI64ValueTupleScheme();
+ }
+ }
+
+ private static class TI64ValueTupleScheme extends TupleScheme<TI64Value> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TI64Value struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetValue()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetValue()) {
+ oprot.writeI64(struct.value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TI64Value struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.value = iprot.readI64();
+ struct.setValueIsSet(true);
+ }
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/spark/blob/7feeb82c/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java
new file mode 100644
index 0000000..425603c
--- /dev/null
+++ b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TMapTypeEntry.java
@@ -0,0 +1,478 @@
+/**
+ * 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 TMapTypeEntry implements org.apache.thrift.TBase<TMapTypeEntry, TMapTypeEntry._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TMapTypeEntry");
+
+ private static final org.apache.thrift.protocol.TField KEY_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("keyTypePtr", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField VALUE_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("valueTypePtr", 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 TMapTypeEntryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TMapTypeEntryTupleSchemeFactory());
+ }
+
+ private int keyTypePtr; // required
+ private int valueTypePtr; // 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 {
+ KEY_TYPE_PTR((short)1, "keyTypePtr"),
+ VALUE_TYPE_PTR((short)2, "valueTypePtr");
+
+ 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: // KEY_TYPE_PTR
+ return KEY_TYPE_PTR;
+ case 2: // VALUE_TYPE_PTR
+ return VALUE_TYPE_PTR;
+ 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 static final int __KEYTYPEPTR_ISSET_ID = 0;
+ private static final int __VALUETYPEPTR_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.KEY_TYPE_PTR, new org.apache.thrift.meta_data.FieldMetaData("keyTypePtr", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TTypeEntryPtr")));
+ tmpMap.put(_Fields.VALUE_TYPE_PTR, new org.apache.thrift.meta_data.FieldMetaData("valueTypePtr", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32 , "TTypeEntryPtr")));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TMapTypeEntry.class, metaDataMap);
+ }
+
+ public TMapTypeEntry() {
+ }
+
+ public TMapTypeEntry(
+ int keyTypePtr,
+ int valueTypePtr)
+ {
+ this();
+ this.keyTypePtr = keyTypePtr;
+ setKeyTypePtrIsSet(true);
+ this.valueTypePtr = valueTypePtr;
+ setValueTypePtrIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TMapTypeEntry(TMapTypeEntry other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.keyTypePtr = other.keyTypePtr;
+ this.valueTypePtr = other.valueTypePtr;
+ }
+
+ public TMapTypeEntry deepCopy() {
+ return new TMapTypeEntry(this);
+ }
+
+ @Override
+ public void clear() {
+ setKeyTypePtrIsSet(false);
+ this.keyTypePtr = 0;
+ setValueTypePtrIsSet(false);
+ this.valueTypePtr = 0;
+ }
+
+ public int getKeyTypePtr() {
+ return this.keyTypePtr;
+ }
+
+ public void setKeyTypePtr(int keyTypePtr) {
+ this.keyTypePtr = keyTypePtr;
+ setKeyTypePtrIsSet(true);
+ }
+
+ public void unsetKeyTypePtr() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __KEYTYPEPTR_ISSET_ID);
+ }
+
+ /** Returns true if field keyTypePtr is set (has been assigned a value) and false otherwise */
+ public boolean isSetKeyTypePtr() {
+ return EncodingUtils.testBit(__isset_bitfield, __KEYTYPEPTR_ISSET_ID);
+ }
+
+ public void setKeyTypePtrIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __KEYTYPEPTR_ISSET_ID, value);
+ }
+
+ public int getValueTypePtr() {
+ return this.valueTypePtr;
+ }
+
+ public void setValueTypePtr(int valueTypePtr) {
+ this.valueTypePtr = valueTypePtr;
+ setValueTypePtrIsSet(true);
+ }
+
+ public void unsetValueTypePtr() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VALUETYPEPTR_ISSET_ID);
+ }
+
+ /** Returns true if field valueTypePtr is set (has been assigned a value) and false otherwise */
+ public boolean isSetValueTypePtr() {
+ return EncodingUtils.testBit(__isset_bitfield, __VALUETYPEPTR_ISSET_ID);
+ }
+
+ public void setValueTypePtrIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VALUETYPEPTR_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case KEY_TYPE_PTR:
+ if (value == null) {
+ unsetKeyTypePtr();
+ } else {
+ setKeyTypePtr((Integer)value);
+ }
+ break;
+
+ case VALUE_TYPE_PTR:
+ if (value == null) {
+ unsetValueTypePtr();
+ } else {
+ setValueTypePtr((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case KEY_TYPE_PTR:
+ return Integer.valueOf(getKeyTypePtr());
+
+ case VALUE_TYPE_PTR:
+ return Integer.valueOf(getValueTypePtr());
+
+ }
+ 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 KEY_TYPE_PTR:
+ return isSetKeyTypePtr();
+ case VALUE_TYPE_PTR:
+ return isSetValueTypePtr();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TMapTypeEntry)
+ return this.equals((TMapTypeEntry)that);
+ return false;
+ }
+
+ public boolean equals(TMapTypeEntry that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_keyTypePtr = true;
+ boolean that_present_keyTypePtr = true;
+ if (this_present_keyTypePtr || that_present_keyTypePtr) {
+ if (!(this_present_keyTypePtr && that_present_keyTypePtr))
+ return false;
+ if (this.keyTypePtr != that.keyTypePtr)
+ return false;
+ }
+
+ boolean this_present_valueTypePtr = true;
+ boolean that_present_valueTypePtr = true;
+ if (this_present_valueTypePtr || that_present_valueTypePtr) {
+ if (!(this_present_valueTypePtr && that_present_valueTypePtr))
+ return false;
+ if (this.valueTypePtr != that.valueTypePtr)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_keyTypePtr = true;
+ builder.append(present_keyTypePtr);
+ if (present_keyTypePtr)
+ builder.append(keyTypePtr);
+
+ boolean present_valueTypePtr = true;
+ builder.append(present_valueTypePtr);
+ if (present_valueTypePtr)
+ builder.append(valueTypePtr);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TMapTypeEntry other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TMapTypeEntry typedOther = (TMapTypeEntry)other;
+
+ lastComparison = Boolean.valueOf(isSetKeyTypePtr()).compareTo(typedOther.isSetKeyTypePtr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetKeyTypePtr()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyTypePtr, typedOther.keyTypePtr);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetValueTypePtr()).compareTo(typedOther.isSetValueTypePtr());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetValueTypePtr()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueTypePtr, typedOther.valueTypePtr);
+ 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("TMapTypeEntry(");
+ boolean first = true;
+
+ sb.append("keyTypePtr:");
+ sb.append(this.keyTypePtr);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("valueTypePtr:");
+ sb.append(this.valueTypePtr);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetKeyTypePtr()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyTypePtr' is unset! Struct:" + toString());
+ }
+
+ if (!isSetValueTypePtr()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueTypePtr' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TMapTypeEntryStandardSchemeFactory implements SchemeFactory {
+ public TMapTypeEntryStandardScheme getScheme() {
+ return new TMapTypeEntryStandardScheme();
+ }
+ }
+
+ private static class TMapTypeEntryStandardScheme extends StandardScheme<TMapTypeEntry> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TMapTypeEntry 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: // KEY_TYPE_PTR
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.keyTypePtr = iprot.readI32();
+ struct.setKeyTypePtrIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // VALUE_TYPE_PTR
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.valueTypePtr = iprot.readI32();
+ struct.setValueTypePtrIsSet(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, TMapTypeEntry struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(KEY_TYPE_PTR_FIELD_DESC);
+ oprot.writeI32(struct.keyTypePtr);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(VALUE_TYPE_PTR_FIELD_DESC);
+ oprot.writeI32(struct.valueTypePtr);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TMapTypeEntryTupleSchemeFactory implements SchemeFactory {
+ public TMapTypeEntryTupleScheme getScheme() {
+ return new TMapTypeEntryTupleScheme();
+ }
+ }
+
+ private static class TMapTypeEntryTupleScheme extends TupleScheme<TMapTypeEntry> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TMapTypeEntry struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.keyTypePtr);
+ oprot.writeI32(struct.valueTypePtr);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TMapTypeEntry struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.keyTypePtr = iprot.readI32();
+ struct.setKeyTypePtrIsSet(true);
+ struct.valueTypePtr = iprot.readI32();
+ struct.setValueTypePtrIsSet(true);
+ }
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/spark/blob/7feeb82c/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java
----------------------------------------------------------------------
diff --git a/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java
new file mode 100644
index 0000000..c048161
--- /dev/null
+++ b/sql/hive-thriftserver/src/gen/java/org/apache/hive/service/cli/thrift/TOpenSessionReq.java
@@ -0,0 +1,785 @@
+/**
+ * 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 TOpenSessionReq implements org.apache.thrift.TBase<TOpenSessionReq, TOpenSessionReq._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOpenSessionReq");
+
+ private static final org.apache.thrift.protocol.TField CLIENT_PROTOCOL_FIELD_DESC = new org.apache.thrift.protocol.TField("client_protocol", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField USERNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("username", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField CONFIGURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("configuration", org.apache.thrift.protocol.TType.MAP, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TOpenSessionReqStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TOpenSessionReqTupleSchemeFactory());
+ }
+
+ private TProtocolVersion client_protocol; // required
+ private String username; // optional
+ private String password; // optional
+ private Map<String,String> configuration; // 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 {
+ /**
+ *
+ * @see TProtocolVersion
+ */
+ CLIENT_PROTOCOL((short)1, "client_protocol"),
+ USERNAME((short)2, "username"),
+ PASSWORD((short)3, "password"),
+ CONFIGURATION((short)4, "configuration");
+
+ 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: // CLIENT_PROTOCOL
+ return CLIENT_PROTOCOL;
+ case 2: // USERNAME
+ return USERNAME;
+ case 3: // PASSWORD
+ return PASSWORD;
+ case 4: // CONFIGURATION
+ return CONFIGURATION;
+ 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.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION};
+ 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.CLIENT_PROTOCOL, new org.apache.thrift.meta_data.FieldMetaData("client_protocol", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TProtocolVersion.class)));
+ tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.CONFIGURATION, new org.apache.thrift.meta_data.FieldMetaData("configuration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOpenSessionReq.class, metaDataMap);
+ }
+
+ public TOpenSessionReq() {
+ this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
+
+ }
+
+ public TOpenSessionReq(
+ TProtocolVersion client_protocol)
+ {
+ this();
+ this.client_protocol = client_protocol;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TOpenSessionReq(TOpenSessionReq other) {
+ if (other.isSetClient_protocol()) {
+ this.client_protocol = other.client_protocol;
+ }
+ if (other.isSetUsername()) {
+ this.username = other.username;
+ }
+ if (other.isSetPassword()) {
+ this.password = other.password;
+ }
+ if (other.isSetConfiguration()) {
+ Map<String,String> __this__configuration = new HashMap<String,String>();
+ for (Map.Entry<String, String> other_element : other.configuration.entrySet()) {
+
+ String other_element_key = other_element.getKey();
+ String other_element_value = other_element.getValue();
+
+ String __this__configuration_copy_key = other_element_key;
+
+ String __this__configuration_copy_value = other_element_value;
+
+ __this__configuration.put(__this__configuration_copy_key, __this__configuration_copy_value);
+ }
+ this.configuration = __this__configuration;
+ }
+ }
+
+ public TOpenSessionReq deepCopy() {
+ return new TOpenSessionReq(this);
+ }
+
+ @Override
+ public void clear() {
+ this.client_protocol = org.apache.hive.service.cli.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
+
+ this.username = null;
+ this.password = null;
+ this.configuration = null;
+ }
+
+ /**
+ *
+ * @see TProtocolVersion
+ */
+ public TProtocolVersion getClient_protocol() {
+ return this.client_protocol;
+ }
+
+ /**
+ *
+ * @see TProtocolVersion
+ */
+ public void setClient_protocol(TProtocolVersion client_protocol) {
+ this.client_protocol = client_protocol;
+ }
+
+ public void unsetClient_protocol() {
+ this.client_protocol = null;
+ }
+
+ /** Returns true if field client_protocol is set (has been assigned a value) and false otherwise */
+ public boolean isSetClient_protocol() {
+ return this.client_protocol != null;
+ }
+
+ public void setClient_protocolIsSet(boolean value) {
+ if (!value) {
+ this.client_protocol = null;
+ }
+ }
+
+ public String getUsername() {
+ return this.username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public void unsetUsername() {
+ this.username = null;
+ }
+
+ /** Returns true if field username is set (has been assigned a value) and false otherwise */
+ public boolean isSetUsername() {
+ return this.username != null;
+ }
+
+ public void setUsernameIsSet(boolean value) {
+ if (!value) {
+ this.username = null;
+ }
+ }
+
+ public String getPassword() {
+ return this.password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public void unsetPassword() {
+ this.password = null;
+ }
+
+ /** Returns true if field password is set (has been assigned a value) and false otherwise */
+ public boolean isSetPassword() {
+ return this.password != null;
+ }
+
+ public void setPasswordIsSet(boolean value) {
+ if (!value) {
+ this.password = null;
+ }
+ }
+
+ public int getConfigurationSize() {
+ return (this.configuration == null) ? 0 : this.configuration.size();
+ }
+
+ public void putToConfiguration(String key, String val) {
+ if (this.configuration == null) {
+ this.configuration = new HashMap<String,String>();
+ }
+ this.configuration.put(key, val);
+ }
+
+ public Map<String,String> getConfiguration() {
+ return this.configuration;
+ }
+
+ public void setConfiguration(Map<String,String> configuration) {
+ this.configuration = configuration;
+ }
+
+ public void unsetConfiguration() {
+ this.configuration = null;
+ }
+
+ /** Returns true if field configuration is set (has been assigned a value) and false otherwise */
+ public boolean isSetConfiguration() {
+ return this.configuration != null;
+ }
+
+ public void setConfigurationIsSet(boolean value) {
+ if (!value) {
+ this.configuration = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case CLIENT_PROTOCOL:
+ if (value == null) {
+ unsetClient_protocol();
+ } else {
+ setClient_protocol((TProtocolVersion)value);
+ }
+ break;
+
+ case USERNAME:
+ if (value == null) {
+ unsetUsername();
+ } else {
+ setUsername((String)value);
+ }
+ break;
+
+ case PASSWORD:
+ if (value == null) {
+ unsetPassword();
+ } else {
+ setPassword((String)value);
+ }
+ break;
+
+ case CONFIGURATION:
+ if (value == null) {
+ unsetConfiguration();
+ } else {
+ setConfiguration((Map<String,String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case CLIENT_PROTOCOL:
+ return getClient_protocol();
+
+ case USERNAME:
+ return getUsername();
+
+ case PASSWORD:
+ return getPassword();
+
+ case CONFIGURATION:
+ return getConfiguration();
+
+ }
+ 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 CLIENT_PROTOCOL:
+ return isSetClient_protocol();
+ case USERNAME:
+ return isSetUsername();
+ case PASSWORD:
+ return isSetPassword();
+ case CONFIGURATION:
+ return isSetConfiguration();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TOpenSessionReq)
+ return this.equals((TOpenSessionReq)that);
+ return false;
+ }
+
+ public boolean equals(TOpenSessionReq that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_client_protocol = true && this.isSetClient_protocol();
+ boolean that_present_client_protocol = true && that.isSetClient_protocol();
+ if (this_present_client_protocol || that_present_client_protocol) {
+ if (!(this_present_client_protocol && that_present_client_protocol))
+ return false;
+ if (!this.client_protocol.equals(that.client_protocol))
+ return false;
+ }
+
+ boolean this_present_username = true && this.isSetUsername();
+ boolean that_present_username = true && that.isSetUsername();
+ if (this_present_username || that_present_username) {
+ if (!(this_present_username && that_present_username))
+ return false;
+ if (!this.username.equals(that.username))
+ return false;
+ }
+
+ boolean this_present_password = true && this.isSetPassword();
+ boolean that_present_password = true && that.isSetPassword();
+ if (this_present_password || that_present_password) {
+ if (!(this_present_password && that_present_password))
+ return false;
+ if (!this.password.equals(that.password))
+ return false;
+ }
+
+ boolean this_present_configuration = true && this.isSetConfiguration();
+ boolean that_present_configuration = true && that.isSetConfiguration();
+ if (this_present_configuration || that_present_configuration) {
+ if (!(this_present_configuration && that_present_configuration))
+ return false;
+ if (!this.configuration.equals(that.configuration))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ HashCodeBuilder builder = new HashCodeBuilder();
+
+ boolean present_client_protocol = true && (isSetClient_protocol());
+ builder.append(present_client_protocol);
+ if (present_client_protocol)
+ builder.append(client_protocol.getValue());
+
+ boolean present_username = true && (isSetUsername());
+ builder.append(present_username);
+ if (present_username)
+ builder.append(username);
+
+ boolean present_password = true && (isSetPassword());
+ builder.append(present_password);
+ if (present_password)
+ builder.append(password);
+
+ boolean present_configuration = true && (isSetConfiguration());
+ builder.append(present_configuration);
+ if (present_configuration)
+ builder.append(configuration);
+
+ return builder.toHashCode();
+ }
+
+ public int compareTo(TOpenSessionReq other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ TOpenSessionReq typedOther = (TOpenSessionReq)other;
+
+ lastComparison = Boolean.valueOf(isSetClient_protocol()).compareTo(typedOther.isSetClient_protocol());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetClient_protocol()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, typedOther.client_protocol);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetUsername()).compareTo(typedOther.isSetUsername());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetUsername()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetPassword()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(typedOther.isSetConfiguration());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetConfiguration()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, typedOther.configuration);
+ 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("TOpenSessionReq(");
+ boolean first = true;
+
+ sb.append("client_protocol:");
+ if (this.client_protocol == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.client_protocol);
+ }
+ first = false;
+ if (isSetUsername()) {
+ if (!first) sb.append(", ");
+ sb.append("username:");
+ if (this.username == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.username);
+ }
+ first = false;
+ }
+ if (isSetPassword()) {
+ if (!first) sb.append(", ");
+ sb.append("password:");
+ if (this.password == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.password);
+ }
+ first = false;
+ }
+ if (isSetConfiguration()) {
+ if (!first) sb.append(", ");
+ sb.append("configuration:");
+ if (this.configuration == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.configuration);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetClient_protocol()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ }
+
+ 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 TOpenSessionReqStandardSchemeFactory implements SchemeFactory {
+ public TOpenSessionReqStandardScheme getScheme() {
+ return new TOpenSessionReqStandardScheme();
+ }
+ }
+
+ private static class TOpenSessionReqStandardScheme extends StandardScheme<TOpenSessionReq> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq 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: // CLIENT_PROTOCOL
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32());
+ struct.setClient_protocolIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // USERNAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.username = iprot.readString();
+ struct.setUsernameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // PASSWORD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // CONFIGURATION
+ if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
+ {
+ org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin();
+ struct.configuration = new HashMap<String,String>(2*_map142.size);
+ for (int _i143 = 0; _i143 < _map142.size; ++_i143)
+ {
+ String _key144; // required
+ String _val145; // required
+ _key144 = iprot.readString();
+ _val145 = iprot.readString();
+ struct.configuration.put(_key144, _val145);
+ }
+ iprot.readMapEnd();
+ }
+ struct.setConfigurationIsSet(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, TOpenSessionReq struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.client_protocol != null) {
+ oprot.writeFieldBegin(CLIENT_PROTOCOL_FIELD_DESC);
+ oprot.writeI32(struct.client_protocol.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.username != null) {
+ if (struct.isSetUsername()) {
+ oprot.writeFieldBegin(USERNAME_FIELD_DESC);
+ oprot.writeString(struct.username);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.password != null) {
+ if (struct.isSetPassword()) {
+ oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
+ oprot.writeString(struct.password);
+ oprot.writeFieldEnd();
+ }
+ }
+ if (struct.configuration != null) {
+ if (struct.isSetConfiguration()) {
+ oprot.writeFieldBegin(CONFIGURATION_FIELD_DESC);
+ {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.configuration.size()));
+ for (Map.Entry<String, String> _iter146 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter146.getKey());
+ oprot.writeString(_iter146.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TOpenSessionReqTupleSchemeFactory implements SchemeFactory {
+ public TOpenSessionReqTupleScheme getScheme() {
+ return new TOpenSessionReqTupleScheme();
+ }
+ }
+
+ private static class TOpenSessionReqTupleScheme extends TupleScheme<TOpenSessionReq> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.client_protocol.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetUsername()) {
+ optionals.set(0);
+ }
+ if (struct.isSetPassword()) {
+ optionals.set(1);
+ }
+ if (struct.isSetConfiguration()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetUsername()) {
+ oprot.writeString(struct.username);
+ }
+ if (struct.isSetPassword()) {
+ oprot.writeString(struct.password);
+ }
+ if (struct.isSetConfiguration()) {
+ {
+ oprot.writeI32(struct.configuration.size());
+ for (Map.Entry<String, String> _iter147 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter147.getKey());
+ oprot.writeString(_iter147.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32());
+ struct.setClient_protocolIsSet(true);
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.username = iprot.readString();
+ struct.setUsernameIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.password = iprot.readString();
+ struct.setPasswordIsSet(true);
+ }
+ if (incoming.get(2)) {
+ {
+ org.apache.thrift.protocol.TMap _map148 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.configuration = new HashMap<String,String>(2*_map148.size);
+ for (int _i149 = 0; _i149 < _map148.size; ++_i149)
+ {
+ String _key150; // required
+ String _val151; // required
+ _key150 = iprot.readString();
+ _val151 = iprot.readString();
+ struct.configuration.put(_key150, _val151);
+ }
+ }
+ struct.setConfigurationIsSet(true);
+ }
+ }
+ }
+
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org