FAQ
http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
new file mode 100644
index 0000000..1eaeee6
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionResp.java
@@ -0,0 +1,783 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class TOpenSessionResp implements org.apache.thrift.TBase<TOpenSessionResp, TOpenSessionResp._Fields>, java.io.Serializable, Cloneable, Comparable<TOpenSessionResp> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOpenSessionResp");
+
+ 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 SERVER_PROTOCOL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("serverProtocolVersion", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField SESSION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionHandle", org.apache.thrift.protocol.TType.STRUCT, (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 TOpenSessionRespStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TOpenSessionRespTupleSchemeFactory());
+ }
+
+ private TStatus status; // required
+ private TProtocolVersion serverProtocolVersion; // required
+ private TSessionHandle sessionHandle; // 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 {
+ STATUS((short)1, "status"),
+ /**
+ *
+ * @see TProtocolVersion
+ */
+ SERVER_PROTOCOL_VERSION((short)2, "serverProtocolVersion"),
+ SESSION_HANDLE((short)3, "sessionHandle"),
+ 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: // STATUS
+ return STATUS;
+ case 2: // SERVER_PROTOCOL_VERSION
+ return SERVER_PROTOCOL_VERSION;
+ case 3: // SESSION_HANDLE
+ return SESSION_HANDLE;
+ 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 static final _Fields optionals[] = {_Fields.SESSION_HANDLE,_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.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.SERVER_PROTOCOL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("serverProtocolVersion", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TProtocolVersion.class)));
+ tmpMap.put(_Fields.SESSION_HANDLE, new org.apache.thrift.meta_data.FieldMetaData("sessionHandle", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TSessionHandle.class)));
+ 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(TOpenSessionResp.class, metaDataMap);
+ }
+
+ public TOpenSessionResp() {
+ this.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
+
+ }
+
+ public TOpenSessionResp(
+ TStatus status,
+ TProtocolVersion serverProtocolVersion)
+ {
+ this();
+ this.status = status;
+ this.serverProtocolVersion = serverProtocolVersion;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TOpenSessionResp(TOpenSessionResp other) {
+ if (other.isSetStatus()) {
+ this.status = new TStatus(other.status);
+ }
+ if (other.isSetServerProtocolVersion()) {
+ this.serverProtocolVersion = other.serverProtocolVersion;
+ }
+ if (other.isSetSessionHandle()) {
+ this.sessionHandle = new TSessionHandle(other.sessionHandle);
+ }
+ if (other.isSetConfiguration()) {
+ Map<String,String> __this__configuration = new HashMap<String,String>(other.configuration);
+ this.configuration = __this__configuration;
+ }
+ }
+
+ public TOpenSessionResp deepCopy() {
+ return new TOpenSessionResp(this);
+ }
+
+ @Override
+ public void clear() {
+ this.status = null;
+ this.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.HIVE_CLI_SERVICE_PROTOCOL_V8;
+
+ this.sessionHandle = null;
+ this.configuration = 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 TProtocolVersion
+ */
+ public TProtocolVersion getServerProtocolVersion() {
+ return this.serverProtocolVersion;
+ }
+
+ /**
+ *
+ * @see TProtocolVersion
+ */
+ public void setServerProtocolVersion(TProtocolVersion serverProtocolVersion) {
+ this.serverProtocolVersion = serverProtocolVersion;
+ }
+
+ public void unsetServerProtocolVersion() {
+ this.serverProtocolVersion = null;
+ }
+
+ /** Returns true if field serverProtocolVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSetServerProtocolVersion() {
+ return this.serverProtocolVersion != null;
+ }
+
+ public void setServerProtocolVersionIsSet(boolean value) {
+ if (!value) {
+ this.serverProtocolVersion = null;
+ }
+ }
+
+ public TSessionHandle getSessionHandle() {
+ return this.sessionHandle;
+ }
+
+ public void setSessionHandle(TSessionHandle sessionHandle) {
+ this.sessionHandle = sessionHandle;
+ }
+
+ public void unsetSessionHandle() {
+ this.sessionHandle = null;
+ }
+
+ /** Returns true if field sessionHandle is set (has been assigned a value) and false otherwise */
+ public boolean isSetSessionHandle() {
+ return this.sessionHandle != null;
+ }
+
+ public void setSessionHandleIsSet(boolean value) {
+ if (!value) {
+ this.sessionHandle = 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 STATUS:
+ if (value == null) {
+ unsetStatus();
+ } else {
+ setStatus((TStatus)value);
+ }
+ break;
+
+ case SERVER_PROTOCOL_VERSION:
+ if (value == null) {
+ unsetServerProtocolVersion();
+ } else {
+ setServerProtocolVersion((TProtocolVersion)value);
+ }
+ break;
+
+ case SESSION_HANDLE:
+ if (value == null) {
+ unsetSessionHandle();
+ } else {
+ setSessionHandle((TSessionHandle)value);
+ }
+ break;
+
+ case CONFIGURATION:
+ if (value == null) {
+ unsetConfiguration();
+ } else {
+ setConfiguration((Map<String,String>)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case STATUS:
+ return getStatus();
+
+ case SERVER_PROTOCOL_VERSION:
+ return getServerProtocolVersion();
+
+ case SESSION_HANDLE:
+ return getSessionHandle();
+
+ 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 STATUS:
+ return isSetStatus();
+ case SERVER_PROTOCOL_VERSION:
+ return isSetServerProtocolVersion();
+ case SESSION_HANDLE:
+ return isSetSessionHandle();
+ case CONFIGURATION:
+ return isSetConfiguration();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TOpenSessionResp)
+ return this.equals((TOpenSessionResp)that);
+ return false;
+ }
+
+ public boolean equals(TOpenSessionResp 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_serverProtocolVersion = true && this.isSetServerProtocolVersion();
+ boolean that_present_serverProtocolVersion = true && that.isSetServerProtocolVersion();
+ if (this_present_serverProtocolVersion || that_present_serverProtocolVersion) {
+ if (!(this_present_serverProtocolVersion && that_present_serverProtocolVersion))
+ return false;
+ if (!this.serverProtocolVersion.equals(that.serverProtocolVersion))
+ return false;
+ }
+
+ boolean this_present_sessionHandle = true && this.isSetSessionHandle();
+ boolean that_present_sessionHandle = true && that.isSetSessionHandle();
+ if (this_present_sessionHandle || that_present_sessionHandle) {
+ if (!(this_present_sessionHandle && that_present_sessionHandle))
+ return false;
+ if (!this.sessionHandle.equals(that.sessionHandle))
+ 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() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_status = true && (isSetStatus());
+ list.add(present_status);
+ if (present_status)
+ list.add(status);
+
+ boolean present_serverProtocolVersion = true && (isSetServerProtocolVersion());
+ list.add(present_serverProtocolVersion);
+ if (present_serverProtocolVersion)
+ list.add(serverProtocolVersion.getValue());
+
+ boolean present_sessionHandle = true && (isSetSessionHandle());
+ list.add(present_sessionHandle);
+ if (present_sessionHandle)
+ list.add(sessionHandle);
+
+ boolean present_configuration = true && (isSetConfiguration());
+ list.add(present_configuration);
+ if (present_configuration)
+ list.add(configuration);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TOpenSessionResp other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetServerProtocolVersion()).compareTo(other.isSetServerProtocolVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetServerProtocolVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, other.serverProtocolVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSessionHandle()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetConfiguration()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.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("TOpenSessionResp(");
+ 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("serverProtocolVersion:");
+ if (this.serverProtocolVersion == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.serverProtocolVersion);
+ }
+ first = false;
+ if (isSetSessionHandle()) {
+ if (!first) sb.append(", ");
+ sb.append("sessionHandle:");
+ if (this.sessionHandle == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.sessionHandle);
+ }
+ 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 (!isSetStatus()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' is unset! Struct:" + toString());
+ }
+
+ if (!isSetServerProtocolVersion()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (status != null) {
+ status.validate();
+ }
+ if (sessionHandle != null) {
+ sessionHandle.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 TOpenSessionRespStandardSchemeFactory implements SchemeFactory {
+ public TOpenSessionRespStandardScheme getScheme() {
+ return new TOpenSessionRespStandardScheme();
+ }
+ }
+
+ private static class TOpenSessionRespStandardScheme extends StandardScheme<TOpenSessionResp> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp 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: // SERVER_PROTOCOL_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32());
+ struct.setServerProtocolVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // SESSION_HANDLE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.sessionHandle = new TSessionHandle();
+ struct.sessionHandle.read(iprot);
+ struct.setSessionHandleIsSet(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 _map152 = iprot.readMapBegin();
+ struct.configuration = new HashMap<String,String>(2*_map152.size);
+ String _key153;
+ String _val154;
+ for (int _i155 = 0; _i155 < _map152.size; ++_i155)
+ {
+ _key153 = iprot.readString();
+ _val154 = iprot.readString();
+ struct.configuration.put(_key153, _val154);
+ }
+ 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, TOpenSessionResp 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.serverProtocolVersion != null) {
+ oprot.writeFieldBegin(SERVER_PROTOCOL_VERSION_FIELD_DESC);
+ oprot.writeI32(struct.serverProtocolVersion.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.sessionHandle != null) {
+ if (struct.isSetSessionHandle()) {
+ oprot.writeFieldBegin(SESSION_HANDLE_FIELD_DESC);
+ struct.sessionHandle.write(oprot);
+ 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> _iter156 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter156.getKey());
+ oprot.writeString(_iter156.getValue());
+ }
+ oprot.writeMapEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TOpenSessionRespTupleSchemeFactory implements SchemeFactory {
+ public TOpenSessionRespTupleScheme getScheme() {
+ return new TOpenSessionRespTupleScheme();
+ }
+ }
+
+ private static class TOpenSessionRespTupleScheme extends TupleScheme<TOpenSessionResp> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.status.write(oprot);
+ oprot.writeI32(struct.serverProtocolVersion.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetSessionHandle()) {
+ optionals.set(0);
+ }
+ if (struct.isSetConfiguration()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetSessionHandle()) {
+ struct.sessionHandle.write(oprot);
+ }
+ if (struct.isSetConfiguration()) {
+ {
+ oprot.writeI32(struct.configuration.size());
+ for (Map.Entry<String, String> _iter157 : struct.configuration.entrySet())
+ {
+ oprot.writeString(_iter157.getKey());
+ oprot.writeString(_iter157.getValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.status = new TStatus();
+ struct.status.read(iprot);
+ struct.setStatusIsSet(true);
+ struct.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32());
+ struct.setServerProtocolVersionIsSet(true);
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.sessionHandle = new TSessionHandle();
+ struct.sessionHandle.read(iprot);
+ struct.setSessionHandleIsSet(true);
+ }
+ if (incoming.get(1)) {
+ {
+ org.apache.thrift.protocol.TMap _map158 = 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*_map158.size);
+ String _key159;
+ String _val160;
+ for (int _i161 = 0; _i161 < _map158.size; ++_i161)
+ {
+ _key159 = iprot.readString();
+ _val160 = iprot.readString();
+ struct.configuration.put(_key159, _val160);
+ }
+ }
+ struct.setConfigurationIsSet(true);
+ }
+ }
+ }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationHandle.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationHandle.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationHandle.java
new file mode 100644
index 0000000..9eaf2be
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationHandle.java
@@ -0,0 +1,709 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class TOperationHandle implements org.apache.thrift.TBase<TOperationHandle, TOperationHandle._Fields>, java.io.Serializable, Cloneable, Comparable<TOperationHandle> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOperationHandle");
+
+ private static final org.apache.thrift.protocol.TField OPERATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("operationId", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)2);
+ private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)3);
+ private static final org.apache.thrift.protocol.TField MODIFIED_ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("modifiedRowCount", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new TOperationHandleStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TOperationHandleTupleSchemeFactory());
+ }
+
+ private THandleIdentifier operationId; // required
+ private TOperationType operationType; // required
+ private boolean hasResultSet; // required
+ private double modifiedRowCount; // 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 {
+ OPERATION_ID((short)1, "operationId"),
+ /**
+ *
+ * @see TOperationType
+ */
+ OPERATION_TYPE((short)2, "operationType"),
+ HAS_RESULT_SET((short)3, "hasResultSet"),
+ MODIFIED_ROW_COUNT((short)4, "modifiedRowCount");
+
+ 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_ID
+ return OPERATION_ID;
+ case 2: // OPERATION_TYPE
+ return OPERATION_TYPE;
+ case 3: // HAS_RESULT_SET
+ return HAS_RESULT_SET;
+ case 4: // MODIFIED_ROW_COUNT
+ return MODIFIED_ROW_COUNT;
+ 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 __HASRESULTSET_ISSET_ID = 0;
+ private static final int __MODIFIEDROWCOUNT_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.MODIFIED_ROW_COUNT};
+ 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_ID, new org.apache.thrift.meta_data.FieldMetaData("operationId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THandleIdentifier.class)));
+ tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TOperationType.class)));
+ tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.MODIFIED_ROW_COUNT, new org.apache.thrift.meta_data.FieldMetaData("modifiedRowCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOperationHandle.class, metaDataMap);
+ }
+
+ public TOperationHandle() {
+ }
+
+ public TOperationHandle(
+ THandleIdentifier operationId,
+ TOperationType operationType,
+ boolean hasResultSet)
+ {
+ this();
+ this.operationId = operationId;
+ this.operationType = operationType;
+ this.hasResultSet = hasResultSet;
+ setHasResultSetIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TOperationHandle(TOperationHandle other) {
+ __isset_bitfield = other.__isset_bitfield;
+ if (other.isSetOperationId()) {
+ this.operationId = new THandleIdentifier(other.operationId);
+ }
+ if (other.isSetOperationType()) {
+ this.operationType = other.operationType;
+ }
+ this.hasResultSet = other.hasResultSet;
+ this.modifiedRowCount = other.modifiedRowCount;
+ }
+
+ public TOperationHandle deepCopy() {
+ return new TOperationHandle(this);
+ }
+
+ @Override
+ public void clear() {
+ this.operationId = null;
+ this.operationType = null;
+ setHasResultSetIsSet(false);
+ this.hasResultSet = false;
+ setModifiedRowCountIsSet(false);
+ this.modifiedRowCount = 0.0;
+ }
+
+ public THandleIdentifier getOperationId() {
+ return this.operationId;
+ }
+
+ public void setOperationId(THandleIdentifier operationId) {
+ this.operationId = operationId;
+ }
+
+ public void unsetOperationId() {
+ this.operationId = null;
+ }
+
+ /** Returns true if field operationId is set (has been assigned a value) and false otherwise */
+ public boolean isSetOperationId() {
+ return this.operationId != null;
+ }
+
+ public void setOperationIdIsSet(boolean value) {
+ if (!value) {
+ this.operationId = null;
+ }
+ }
+
+ /**
+ *
+ * @see TOperationType
+ */
+ public TOperationType getOperationType() {
+ return this.operationType;
+ }
+
+ /**
+ *
+ * @see TOperationType
+ */
+ public void setOperationType(TOperationType operationType) {
+ this.operationType = operationType;
+ }
+
+ public void unsetOperationType() {
+ this.operationType = null;
+ }
+
+ /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
+ public boolean isSetOperationType() {
+ return this.operationType != null;
+ }
+
+ public void setOperationTypeIsSet(boolean value) {
+ if (!value) {
+ this.operationType = null;
+ }
+ }
+
+ public boolean isHasResultSet() {
+ return this.hasResultSet;
+ }
+
+ public void setHasResultSet(boolean hasResultSet) {
+ this.hasResultSet = hasResultSet;
+ setHasResultSetIsSet(true);
+ }
+
+ public void unsetHasResultSet() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
+ }
+
+ /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */
+ public boolean isSetHasResultSet() {
+ return EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
+ }
+
+ public void setHasResultSetIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value);
+ }
+
+ public double getModifiedRowCount() {
+ return this.modifiedRowCount;
+ }
+
+ public void setModifiedRowCount(double modifiedRowCount) {
+ this.modifiedRowCount = modifiedRowCount;
+ setModifiedRowCountIsSet(true);
+ }
+
+ public void unsetModifiedRowCount() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID);
+ }
+
+ /** Returns true if field modifiedRowCount is set (has been assigned a value) and false otherwise */
+ public boolean isSetModifiedRowCount() {
+ return EncodingUtils.testBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID);
+ }
+
+ public void setModifiedRowCountIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case OPERATION_ID:
+ if (value == null) {
+ unsetOperationId();
+ } else {
+ setOperationId((THandleIdentifier)value);
+ }
+ break;
+
+ case OPERATION_TYPE:
+ if (value == null) {
+ unsetOperationType();
+ } else {
+ setOperationType((TOperationType)value);
+ }
+ break;
+
+ case HAS_RESULT_SET:
+ if (value == null) {
+ unsetHasResultSet();
+ } else {
+ setHasResultSet((Boolean)value);
+ }
+ break;
+
+ case MODIFIED_ROW_COUNT:
+ if (value == null) {
+ unsetModifiedRowCount();
+ } else {
+ setModifiedRowCount((Double)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case OPERATION_ID:
+ return getOperationId();
+
+ case OPERATION_TYPE:
+ return getOperationType();
+
+ case HAS_RESULT_SET:
+ return isHasResultSet();
+
+ case MODIFIED_ROW_COUNT:
+ return getModifiedRowCount();
+
+ }
+ 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_ID:
+ return isSetOperationId();
+ case OPERATION_TYPE:
+ return isSetOperationType();
+ case HAS_RESULT_SET:
+ return isSetHasResultSet();
+ case MODIFIED_ROW_COUNT:
+ return isSetModifiedRowCount();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TOperationHandle)
+ return this.equals((TOperationHandle)that);
+ return false;
+ }
+
+ public boolean equals(TOperationHandle that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_operationId = true && this.isSetOperationId();
+ boolean that_present_operationId = true && that.isSetOperationId();
+ if (this_present_operationId || that_present_operationId) {
+ if (!(this_present_operationId && that_present_operationId))
+ return false;
+ if (!this.operationId.equals(that.operationId))
+ return false;
+ }
+
+ boolean this_present_operationType = true && this.isSetOperationType();
+ boolean that_present_operationType = true && that.isSetOperationType();
+ if (this_present_operationType || that_present_operationType) {
+ if (!(this_present_operationType && that_present_operationType))
+ return false;
+ if (!this.operationType.equals(that.operationType))
+ return false;
+ }
+
+ boolean this_present_hasResultSet = true;
+ boolean that_present_hasResultSet = true;
+ if (this_present_hasResultSet || that_present_hasResultSet) {
+ if (!(this_present_hasResultSet && that_present_hasResultSet))
+ return false;
+ if (this.hasResultSet != that.hasResultSet)
+ return false;
+ }
+
+ boolean this_present_modifiedRowCount = true && this.isSetModifiedRowCount();
+ boolean that_present_modifiedRowCount = true && that.isSetModifiedRowCount();
+ if (this_present_modifiedRowCount || that_present_modifiedRowCount) {
+ if (!(this_present_modifiedRowCount && that_present_modifiedRowCount))
+ return false;
+ if (this.modifiedRowCount != that.modifiedRowCount)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_operationId = true && (isSetOperationId());
+ list.add(present_operationId);
+ if (present_operationId)
+ list.add(operationId);
+
+ boolean present_operationType = true && (isSetOperationType());
+ list.add(present_operationType);
+ if (present_operationType)
+ list.add(operationType.getValue());
+
+ boolean present_hasResultSet = true;
+ list.add(present_hasResultSet);
+ if (present_hasResultSet)
+ list.add(hasResultSet);
+
+ boolean present_modifiedRowCount = true && (isSetModifiedRowCount());
+ list.add(present_modifiedRowCount);
+ if (present_modifiedRowCount)
+ list.add(modifiedRowCount);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TOperationHandle other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOperationId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, other.operationId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOperationType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetHasResultSet()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(other.isSetModifiedRowCount());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetModifiedRowCount()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, other.modifiedRowCount);
+ 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("TOperationHandle(");
+ boolean first = true;
+
+ sb.append("operationId:");
+ if (this.operationId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.operationId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("operationType:");
+ if (this.operationType == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.operationType);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("hasResultSet:");
+ sb.append(this.hasResultSet);
+ first = false;
+ if (isSetModifiedRowCount()) {
+ if (!first) sb.append(", ");
+ sb.append("modifiedRowCount:");
+ sb.append(this.modifiedRowCount);
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetOperationId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationId' is unset! Struct:" + toString());
+ }
+
+ if (!isSetOperationType()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationType' is unset! Struct:" + toString());
+ }
+
+ if (!isSetHasResultSet()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (operationId != null) {
+ operationId.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 {
+ // 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 TOperationHandleStandardSchemeFactory implements SchemeFactory {
+ public TOperationHandleStandardScheme getScheme() {
+ return new TOperationHandleStandardScheme();
+ }
+ }
+
+ private static class TOperationHandleStandardScheme extends StandardScheme<TOperationHandle> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TOperationHandle 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_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.operationId = new THandleIdentifier();
+ struct.operationId.read(iprot);
+ struct.setOperationIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // OPERATION_TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32());
+ struct.setOperationTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // HAS_RESULT_SET
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.hasResultSet = iprot.readBool();
+ struct.setHasResultSetIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // MODIFIED_ROW_COUNT
+ if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+ struct.modifiedRowCount = iprot.readDouble();
+ struct.setModifiedRowCountIsSet(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, TOperationHandle struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.operationId != null) {
+ oprot.writeFieldBegin(OPERATION_ID_FIELD_DESC);
+ struct.operationId.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.operationType != null) {
+ oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
+ oprot.writeI32(struct.operationType.getValue());
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC);
+ oprot.writeBool(struct.hasResultSet);
+ oprot.writeFieldEnd();
+ if (struct.isSetModifiedRowCount()) {
+ oprot.writeFieldBegin(MODIFIED_ROW_COUNT_FIELD_DESC);
+ oprot.writeDouble(struct.modifiedRowCount);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TOperationHandleTupleSchemeFactory implements SchemeFactory {
+ public TOperationHandleTupleScheme getScheme() {
+ return new TOperationHandleTupleScheme();
+ }
+ }
+
+ private static class TOperationHandleTupleScheme extends TupleScheme<TOperationHandle> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TOperationHandle struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ struct.operationId.write(oprot);
+ oprot.writeI32(struct.operationType.getValue());
+ oprot.writeBool(struct.hasResultSet);
+ BitSet optionals = new BitSet();
+ if (struct.isSetModifiedRowCount()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetModifiedRowCount()) {
+ oprot.writeDouble(struct.modifiedRowCount);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TOperationHandle struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.operationId = new THandleIdentifier();
+ struct.operationId.read(iprot);
+ struct.setOperationIdIsSet(true);
+ struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32());
+ struct.setOperationTypeIsSet(true);
+ struct.hasResultSet = iprot.readBool();
+ struct.setHasResultSetIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.modifiedRowCount = iprot.readDouble();
+ struct.setModifiedRowCountIsSet(true);
+ }
+ }
+ }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationState.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationState.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationState.java
new file mode 100644
index 0000000..3fa49b0
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationState.java
@@ -0,0 +1,63 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TOperationState implements org.apache.thrift.TEnum {
+ INITIALIZED_STATE(0),
+ RUNNING_STATE(1),
+ FINISHED_STATE(2),
+ CANCELED_STATE(3),
+ CLOSED_STATE(4),
+ ERROR_STATE(5),
+ UKNOWN_STATE(6),
+ PENDING_STATE(7);
+
+ private final int value;
+
+ private TOperationState(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 TOperationState findByValue(int value) {
+ switch (value) {
+ case 0:
+ return INITIALIZED_STATE;
+ case 1:
+ return RUNNING_STATE;
+ case 2:
+ return FINISHED_STATE;
+ case 3:
+ return CANCELED_STATE;
+ case 4:
+ return CLOSED_STATE;
+ case 5:
+ return ERROR_STATE;
+ case 6:
+ return UKNOWN_STATE;
+ case 7:
+ return PENDING_STATE;
+ default:
+ return null;
+ }
+ }
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationType.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationType.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationType.java
new file mode 100644
index 0000000..08002ad
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOperationType.java
@@ -0,0 +1,66 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TOperationType implements org.apache.thrift.TEnum {
+ EXECUTE_STATEMENT(0),
+ GET_TYPE_INFO(1),
+ GET_CATALOGS(2),
+ GET_SCHEMAS(3),
+ GET_TABLES(4),
+ GET_TABLE_TYPES(5),
+ GET_COLUMNS(6),
+ GET_FUNCTIONS(7),
+ UNKNOWN(8);
+
+ private final int value;
+
+ private TOperationType(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 TOperationType findByValue(int value) {
+ switch (value) {
+ case 0:
+ return EXECUTE_STATEMENT;
+ case 1:
+ return GET_TYPE_INFO;
+ case 2:
+ return GET_CATALOGS;
+ case 3:
+ return GET_SCHEMAS;
+ case 4:
+ return GET_TABLES;
+ case 5:
+ return GET_TABLE_TYPES;
+ case 6:
+ return GET_COLUMNS;
+ case 7:
+ return GET_FUNCTIONS;
+ case 8:
+ return UNKNOWN;
+ default:
+ return null;
+ }
+ }
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
new file mode 100644
index 0000000..910c909
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TPrimitiveTypeEntry.java
@@ -0,0 +1,516 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+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 org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
+public class TPrimitiveTypeEntry implements org.apache.thrift.TBase<TPrimitiveTypeEntry, TPrimitiveTypeEntry._Fields>, java.io.Serializable, Cloneable, Comparable<TPrimitiveTypeEntry> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TPrimitiveTypeEntry");
+
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField TYPE_QUALIFIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("typeQualifiers", 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 TPrimitiveTypeEntryStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new TPrimitiveTypeEntryTupleSchemeFactory());
+ }
+
+ private TTypeId type; // required
+ private TTypeQualifiers typeQualifiers; // 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 TTypeId
+ */
+ TYPE((short)1, "type"),
+ TYPE_QUALIFIERS((short)2, "typeQualifiers");
+
+ 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: // TYPE
+ return TYPE;
+ case 2: // TYPE_QUALIFIERS
+ return TYPE_QUALIFIERS;
+ 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 _Fields optionals[] = {_Fields.TYPE_QUALIFIERS};
+ 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TTypeId.class)));
+ tmpMap.put(_Fields.TYPE_QUALIFIERS, new org.apache.thrift.meta_data.FieldMetaData("typeQualifiers", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTypeQualifiers.class)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TPrimitiveTypeEntry.class, metaDataMap);
+ }
+
+ public TPrimitiveTypeEntry() {
+ }
+
+ public TPrimitiveTypeEntry(
+ TTypeId type)
+ {
+ this();
+ this.type = type;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public TPrimitiveTypeEntry(TPrimitiveTypeEntry other) {
+ if (other.isSetType()) {
+ this.type = other.type;
+ }
+ if (other.isSetTypeQualifiers()) {
+ this.typeQualifiers = new TTypeQualifiers(other.typeQualifiers);
+ }
+ }
+
+ public TPrimitiveTypeEntry deepCopy() {
+ return new TPrimitiveTypeEntry(this);
+ }
+
+ @Override
+ public void clear() {
+ this.type = null;
+ this.typeQualifiers = null;
+ }
+
+ /**
+ *
+ * @see TTypeId
+ */
+ public TTypeId getType() {
+ return this.type;
+ }
+
+ /**
+ *
+ * @see TTypeId
+ */
+ public void setType(TTypeId type) {
+ this.type = type;
+ }
+
+ public void unsetType() {
+ this.type = null;
+ }
+
+ /** Returns true if field type is set (has been assigned a value) and false otherwise */
+ public boolean isSetType() {
+ return this.type != null;
+ }
+
+ public void setTypeIsSet(boolean value) {
+ if (!value) {
+ this.type = null;
+ }
+ }
+
+ public TTypeQualifiers getTypeQualifiers() {
+ return this.typeQualifiers;
+ }
+
+ public void setTypeQualifiers(TTypeQualifiers typeQualifiers) {
+ this.typeQualifiers = typeQualifiers;
+ }
+
+ public void unsetTypeQualifiers() {
+ this.typeQualifiers = null;
+ }
+
+ /** Returns true if field typeQualifiers is set (has been assigned a value) and false otherwise */
+ public boolean isSetTypeQualifiers() {
+ return this.typeQualifiers != null;
+ }
+
+ public void setTypeQualifiersIsSet(boolean value) {
+ if (!value) {
+ this.typeQualifiers = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((TTypeId)value);
+ }
+ break;
+
+ case TYPE_QUALIFIERS:
+ if (value == null) {
+ unsetTypeQualifiers();
+ } else {
+ setTypeQualifiers((TTypeQualifiers)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case TYPE:
+ return getType();
+
+ case TYPE_QUALIFIERS:
+ return getTypeQualifiers();
+
+ }
+ 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 TYPE:
+ return isSetType();
+ case TYPE_QUALIFIERS:
+ return isSetTypeQualifiers();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TPrimitiveTypeEntry)
+ return this.equals((TPrimitiveTypeEntry)that);
+ return false;
+ }
+
+ public boolean equals(TPrimitiveTypeEntry that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_type = true && this.isSetType();
+ boolean that_present_type = true && that.isSetType();
+ if (this_present_type || that_present_type) {
+ if (!(this_present_type && that_present_type))
+ return false;
+ if (!this.type.equals(that.type))
+ return false;
+ }
+
+ boolean this_present_typeQualifiers = true && this.isSetTypeQualifiers();
+ boolean that_present_typeQualifiers = true && that.isSetTypeQualifiers();
+ if (this_present_typeQualifiers || that_present_typeQualifiers) {
+ if (!(this_present_typeQualifiers && that_present_typeQualifiers))
+ return false;
+ if (!this.typeQualifiers.equals(that.typeQualifiers))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ List<Object> list = new ArrayList<Object>();
+
+ boolean present_type = true && (isSetType());
+ list.add(present_type);
+ if (present_type)
+ list.add(type.getValue());
+
+ boolean present_typeQualifiers = true && (isSetTypeQualifiers());
+ list.add(present_typeQualifiers);
+ if (present_typeQualifiers)
+ list.add(typeQualifiers);
+
+ return list.hashCode();
+ }
+
+ @Override
+ public int compareTo(TPrimitiveTypeEntry other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetType()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTypeQualifiers()).compareTo(other.isSetTypeQualifiers());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTypeQualifiers()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeQualifiers, other.typeQualifiers);
+ 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("TPrimitiveTypeEntry(");
+ boolean first = true;
+
+ sb.append("type:");
+ if (this.type == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.type);
+ }
+ first = false;
+ if (isSetTypeQualifiers()) {
+ if (!first) sb.append(", ");
+ sb.append("typeQualifiers:");
+ if (this.typeQualifiers == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.typeQualifiers);
+ }
+ first = false;
+ }
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ if (!isSetType()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
+ }
+
+ // check for sub-struct validity
+ if (typeQualifiers != null) {
+ typeQualifiers.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 TPrimitiveTypeEntryStandardSchemeFactory implements SchemeFactory {
+ public TPrimitiveTypeEntryStandardScheme getScheme() {
+ return new TPrimitiveTypeEntryStandardScheme();
+ }
+ }
+
+ private static class TPrimitiveTypeEntryStandardScheme extends StandardScheme<TPrimitiveTypeEntry> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TPrimitiveTypeEntry 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: // TYPE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.type = org.apache.hive.service.rpc.thrift.TTypeId.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // TYPE_QUALIFIERS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.typeQualifiers = new TTypeQualifiers();
+ struct.typeQualifiers.read(iprot);
+ struct.setTypeQualifiersIsSet(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, TPrimitiveTypeEntry struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.type != null) {
+ oprot.writeFieldBegin(TYPE_FIELD_DESC);
+ oprot.writeI32(struct.type.getValue());
+ oprot.writeFieldEnd();
+ }
+ if (struct.typeQualifiers != null) {
+ if (struct.isSetTypeQualifiers()) {
+ oprot.writeFieldBegin(TYPE_QUALIFIERS_FIELD_DESC);
+ struct.typeQualifiers.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TPrimitiveTypeEntryTupleSchemeFactory implements SchemeFactory {
+ public TPrimitiveTypeEntryTupleScheme getScheme() {
+ return new TPrimitiveTypeEntryTupleScheme();
+ }
+ }
+
+ private static class TPrimitiveTypeEntryTupleScheme extends TupleScheme<TPrimitiveTypeEntry> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TPrimitiveTypeEntry struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ oprot.writeI32(struct.type.getValue());
+ BitSet optionals = new BitSet();
+ if (struct.isSetTypeQualifiers()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetTypeQualifiers()) {
+ struct.typeQualifiers.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TPrimitiveTypeEntry struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ struct.type = org.apache.hive.service.rpc.thrift.TTypeId.findByValue(iprot.readI32());
+ struct.setTypeIsSet(true);
+ BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.typeQualifiers = new TTypeQualifiers();
+ struct.typeQualifiers.read(iprot);
+ struct.setTypeQualifiersIsSet(true);
+ }
+ }
+ }
+
+}
+

http://git-wip-us.apache.org/repos/asf/hive/blob/3a1c4b57/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
----------------------------------------------------------------------
diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TProtocolVersion.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
new file mode 100644
index 0000000..14d50ed
--- /dev/null
+++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TProtocolVersion.java
@@ -0,0 +1,63 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package org.apache.hive.service.rpc.thrift;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+public enum TProtocolVersion implements org.apache.thrift.TEnum {
+ HIVE_CLI_SERVICE_PROTOCOL_V1(0),
+ HIVE_CLI_SERVICE_PROTOCOL_V2(1),
+ HIVE_CLI_SERVICE_PROTOCOL_V3(2),
+ HIVE_CLI_SERVICE_PROTOCOL_V4(3),
+ HIVE_CLI_SERVICE_PROTOCOL_V5(4),
+ HIVE_CLI_SERVICE_PROTOCOL_V6(5),
+ HIVE_CLI_SERVICE_PROTOCOL_V7(6),
+ HIVE_CLI_SERVICE_PROTOCOL_V8(7);
+
+ private final int value;
+
+ private TProtocolVersion(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 TProtocolVersion findByValue(int value) {
+ switch (value) {
+ case 0:
+ return HIVE_CLI_SERVICE_PROTOCOL_V1;
+ case 1:
+ return HIVE_CLI_SERVICE_PROTOCOL_V2;
+ case 2:
+ return HIVE_CLI_SERVICE_PROTOCOL_V3;
+ case 3:
+ return HIVE_CLI_SERVICE_PROTOCOL_V4;
+ case 4:
+ return HIVE_CLI_SERVICE_PROTOCOL_V5;
+ case 5:
+ return HIVE_CLI_SERVICE_PROTOCOL_V6;
+ case 6:
+ return HIVE_CLI_SERVICE_PROTOCOL_V7;
+ case 7:
+ return HIVE_CLI_SERVICE_PROTOCOL_V8;
+ default:
+ return null;
+ }
+ }
+}

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 83 of 102 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 8, '16 at 12:19a
activeJan 11, '16 at 8:25a
posts102
users1
websitehive.apache.org

1 user in discussion

Vgumashta: 102 posts

People

Translate

site design / logo © 2021 Grokbase