diff --git a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java index a242501..bba4250 100644 --- a/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java +++ b/jdbc/src/java/org/apache/hive/jdbc/HiveStatement.java @@ -669,8 +669,8 @@ public int getUpdateCount() throws SQLException { * client might end up using executeAsync and then call this to check if the query run is * finished. */ - waitForOperationToComplete(); - return -1; + long numRows = waitForResultSetStatus().getNumRows(); + return (int)numRows; } /* diff --git a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java index 42d398d..ecc6226 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/Driver.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/Driver.java @@ -1853,11 +1853,15 @@ public int execute() throws CommandNeedRetryException { Map stats = SessionState.get().getMapRedStats(); if (stats != null && !stats.isEmpty()) { long totalCpu = 0; + long numRows = 0; console.printInfo("MapReduce Jobs Launched: "); for (Map.Entry entry : stats.entrySet()) { console.printInfo("Stage-" + entry.getKey() + ": " + entry.getValue()); totalCpu += entry.getValue().getCpuMSec(); + numRows += entry.getValue().getNumrows(); } + LOG.info("-----------------"+numRows); + SessionState.get().setNumRows(numRows); console.printInfo("Total MapReduce CPU Time Spent: " + Utilities.formatMsecToStr(totalCpu)); } LOG.info("Completed executing command(queryId=" + queryId + "); Time taken: " + duration + " seconds"); diff --git a/ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java b/ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java index 4b60514..2a7c034 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/MapRedStats.java @@ -32,13 +32,14 @@ public class MapRedStats { int numMap; int numReduce; + long numrows; long cpuMSec; Counters counters = null; boolean success; String jobId; - public MapRedStats(int numMap, int numReduce, long cpuMSec, boolean ifSuccess, String jobId) { + public MapRedStats(int numMap, int numReduce, long cpuMSec, boolean ifSuccess, String jobId) { this.numMap = numMap; this.numReduce = numReduce; this.cpuMSec = cpuMSec; @@ -53,6 +54,9 @@ public boolean isSuccess() { public long getCpuMSec() { return cpuMSec; } + public long getNumrows() {return numrows; } + + public void setNumrows(long numrows) { this.numrows = numrows; } public int getNumMap() { return numMap; diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java index bb6ed84..d2a8f71 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/HadoopJobExecHelper.java @@ -376,6 +376,7 @@ private MapRedStats progress(ExecDriverTaskHandle th) throws IOException, LockEx } Counters ctrs = th.getCounters(); + //ctrs.findCounter("HIVE","RECORDS_IN"); if (ctrs != null) { Counter counterCpuMsec = ctrs.findCounter("org.apache.hadoop.mapred.Task$Counter", @@ -418,6 +419,8 @@ private MapRedStats progress(ExecDriverTaskHandle th) throws IOException, LockEx // update based on the final value of the counters updateCounters(ctrs, rj); + long numRows =mapRedStats.getCounters().findCounter("HIVE","RECORDS_IN").getValue(); + mapRedStats.setNumrows(numRows); SessionState ss = SessionState.get(); if (ss != null) { diff --git a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java index 408c92e..326fbc5 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java @@ -184,6 +184,7 @@ private CreateTableAutomaticGrant createTableGrants; private Map mapRedStats; + private long numRows; private Map hiveVariables; @@ -1445,6 +1446,9 @@ public void setCreateTableGrants(CreateTableAutomaticGrant createTableGrants) { this.createTableGrants = createTableGrants; } + public long getNumRows() { return numRows; } + public void setNumRows(long numRows) { this.numRows = numRows; } + public Map getMapRedStats() { return mapRedStats; } diff --git a/service-rpc/if/TCLIService.thrift b/service-rpc/if/TCLIService.thrift index a4fa7b0..2bb0640 100644 --- a/service-rpc/if/TCLIService.thrift +++ b/service-rpc/if/TCLIService.thrift @@ -1047,6 +1047,9 @@ struct TGetOperationStatusResp { // If the operation has the result 9: optional bool hasResultSet + // The affected Rows for the DML command + 10:optional i64 numRows + } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java index 358e322..6273fcc 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TArrayTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TArrayTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TArrayTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TArrayTypeEntry"); private static final org.apache.thrift.protocol.TField OBJECT_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("objectTypePtr", org.apache.thrift.protocol.TType.I32, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TArrayTypeEntryTupleSchemeFactory()); } - private int objectTypePtr; // required + public int objectTypePtr; // 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 { @@ -151,9 +146,10 @@ public int getObjectTypePtr() { return this.objectTypePtr; } - public void setObjectTypePtr(int objectTypePtr) { + public TArrayTypeEntry setObjectTypePtr(int objectTypePtr) { this.objectTypePtr = objectTypePtr; setObjectTypePtrIsSet(true); + return this; } public void unsetObjectTypePtr() { @@ -185,7 +181,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case OBJECT_TYPE_PTR: - return getObjectTypePtr(); + return Integer.valueOf(getObjectTypePtr()); } throw new IllegalStateException(); @@ -231,30 +227,23 @@ public boolean equals(TArrayTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_objectTypePtr = true; - list.add(present_objectTypePtr); - if (present_objectTypePtr) - list.add(objectTypePtr); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TArrayTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TArrayTypeEntry typedOther = (TArrayTypeEntry)other; - lastComparison = Boolean.valueOf(isSetObjectTypePtr()).compareTo(other.isSetObjectTypePtr()); + lastComparison = Boolean.valueOf(isSetObjectTypePtr()).compareTo(typedOther.isSetObjectTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetObjectTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectTypePtr, other.objectTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.objectTypePtr, typedOther.objectTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -288,10 +277,7 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetObjectTypePtr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'objectTypePtr' is unset! Struct:" + toString()); - } - + // alas, we cannot check 'objectTypePtr' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -345,6 +331,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TArrayTypeEntry str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetObjectTypePtr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'objectTypePtr' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java index a869cee..ff2f326 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBinaryColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TBinaryColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TBinaryColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBinaryColumn"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TBinaryColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TBinaryColumn( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,17 @@ public TBinaryColumn( */ public TBinaryColumn(TBinaryColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (ByteBuffer other_element : other.values) { + ByteBuffer temp_binary_element = org.apache.thrift.TBaseHelper.copyBinary(other_element); +; + __this__values.add(temp_binary_element); + } this.values = __this__values; } if (other.isSetNulls()) { this.nulls = org.apache.thrift.TBaseHelper.copyBinary(other.nulls); +; } } @@ -178,8 +179,9 @@ public void addToValues(ByteBuffer elem) { return this.values; } - public void setValues(List values) { + public TBinaryColumn setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +205,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TBinaryColumn setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TBinaryColumn setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +317,33 @@ public boolean equals(TBinaryColumn that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TBinaryColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TBinaryColumn typedOther = (TBinaryColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -380,7 +372,7 @@ public String toString() { if (this.values == null) { sb.append("null"); } else { - org.apache.thrift.TBaseHelper.toString(this.values, sb); + sb.append(this.values); } first = false; if (!first) sb.append(", "); @@ -397,14 +389,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +437,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBinaryColumn struc { org.apache.thrift.protocol.TList _list110 = iprot.readListBegin(); struct.values = new ArrayList(_list110.size); - ByteBuffer _elem111; - for (int _i112 = 0; _i112 < _list110.size; ++_i112) + for (int _i111 = 0; _i111 < _list110.size; ++_i111) { - _elem111 = iprot.readBinary(); - struct.values.add(_elem111); + ByteBuffer _elem112; // required + _elem112 = iprot.readBinary(); + struct.values.add(_elem112); } iprot.readListEnd(); } @@ -474,6 +464,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBinaryColumn struc iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +523,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TBinaryColumn struct { org.apache.thrift.protocol.TList _list115 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.values = new ArrayList(_list115.size); - ByteBuffer _elem116; - for (int _i117 = 0; _i117 < _list115.size; ++_i117) + for (int _i116 = 0; _i116 < _list115.size; ++_i116) { - _elem116 = iprot.readBinary(); - struct.values.add(_elem116); + ByteBuffer _elem117; // required + _elem117 = iprot.readBinary(); + struct.values.add(_elem117); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java index 9bb6366..05af9ff 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TBoolColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TBoolColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolColumn"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TBoolColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TBoolColumn( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TBoolColumn( */ public TBoolColumn(TBoolColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (Boolean 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(boolean elem) { return this.values; } - public void setValues(List values) { + public TBoolColumn setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TBoolColumn setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TBoolColumn setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TBoolColumn that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TBoolColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TBoolColumn typedOther = (TBoolColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolColumn struct) { org.apache.thrift.protocol.TList _list54 = iprot.readListBegin(); struct.values = new ArrayList(_list54.size); - boolean _elem55; - for (int _i56 = 0; _i56 < _list54.size; ++_i56) + for (int _i55 = 0; _i55 < _list54.size; ++_i55) { - _elem55 = iprot.readBool(); - struct.values.add(_elem55); + boolean _elem56; // required + _elem56 = iprot.readBool(); + struct.values.add(_elem56); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolColumn struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TBoolColumn struct) { org.apache.thrift.protocol.TList _list59 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BOOL, iprot.readI32()); struct.values = new ArrayList(_list59.size); - boolean _elem60; - for (int _i61 = 0; _i61 < _list59.size; ++_i61) + for (int _i60 = 0; _i60 < _list59.size; ++_i60) { - _elem60 = iprot.readBool(); - struct.values.add(_elem60); + boolean _elem61; // required + _elem61 = iprot.readBool(); + struct.values.add(_elem61); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java index 87b3070..c2bff03 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TBoolValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TBoolValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TBoolValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TBoolValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BOOL, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TBoolValueTupleSchemeFactory()); } - private boolean value; // optional + public boolean 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public boolean isValue() { return this.value; } - public void setValue(boolean value) { + public TBoolValue setValue(boolean value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return isValue(); + return Boolean.valueOf(isValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TBoolValue that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TBoolValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TBoolValue typedOther = (TBoolValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TBoolValue struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java index 68b3d3c..4b2c3a3 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TByteColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TByteColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteColumn"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TByteColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TByteColumn( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TByteColumn( */ public TByteColumn(TByteColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (Byte 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(byte elem) { return this.values; } - public void setValues(List values) { + public TByteColumn setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TByteColumn setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TByteColumn setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TByteColumn that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TByteColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TByteColumn typedOther = (TByteColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TByteColumn struct) { org.apache.thrift.protocol.TList _list62 = iprot.readListBegin(); struct.values = new ArrayList(_list62.size); - byte _elem63; - for (int _i64 = 0; _i64 < _list62.size; ++_i64) + for (int _i63 = 0; _i63 < _list62.size; ++_i63) { - _elem63 = iprot.readByte(); - struct.values.add(_elem63); + byte _elem64; // required + _elem64 = iprot.readByte(); + struct.values.add(_elem64); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TByteColumn struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TByteColumn struct) { org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.BYTE, iprot.readI32()); struct.values = new ArrayList(_list67.size); - byte _elem68; - for (int _i69 = 0; _i69 < _list67.size; ++_i69) + for (int _i68 = 0; _i68 < _list67.size; ++_i68) { - _elem68 = iprot.readByte(); - struct.values.add(_elem68); + byte _elem69; // required + _elem69 = iprot.readByte(); + struct.values.add(_elem69); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java index a3d5951..3dc5af5 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TByteValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TByteValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TByteValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TByteValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.BYTE, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TByteValueTupleSchemeFactory()); } - private byte value; // optional + public byte 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public byte getValue() { return this.value; } - public void setValue(byte value) { + public TByteValue setValue(byte value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return getValue(); + return Byte.valueOf(getValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TByteValue that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TByteValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TByteValue typedOther = (TByteValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TByteValue struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java index 6dba051..8b2a417 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIService.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,12 +27,9 @@ 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 TCLIService { public interface Iface { @@ -85,47 +80,47 @@ public interface AsyncIface { - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; - public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; + public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException; } @@ -650,7 +645,7 @@ public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, super(protocolFactory, clientManager, transport); } - public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); OpenSession_call method_call = new OpenSession_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -659,7 +654,7 @@ public void OpenSession(TOpenSessionReq req, org.apache.thrift.async.AsyncMethod public static class OpenSession_call extends org.apache.thrift.async.TAsyncMethodCall { private TOpenSessionReq req; - public OpenSession_call(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public OpenSession_call(TOpenSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -682,7 +677,7 @@ public TOpenSessionResp getResult() throws org.apache.thrift.TException { } } - public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CloseSession_call method_call = new CloseSession_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -691,7 +686,7 @@ public void CloseSession(TCloseSessionReq req, org.apache.thrift.async.AsyncMeth public static class CloseSession_call extends org.apache.thrift.async.TAsyncMethodCall { private TCloseSessionReq req; - public CloseSession_call(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public CloseSession_call(TCloseSessionReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -714,7 +709,7 @@ public TCloseSessionResp getResult() throws org.apache.thrift.TException { } } - public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetInfo_call method_call = new GetInfo_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -723,7 +718,7 @@ public void GetInfo(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback public static class GetInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetInfoReq req; - public GetInfo_call(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetInfo_call(TGetInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -746,7 +741,7 @@ public TGetInfoResp getResult() throws org.apache.thrift.TException { } } - public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); ExecuteStatement_call method_call = new ExecuteStatement_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -755,7 +750,7 @@ public void ExecuteStatement(TExecuteStatementReq req, org.apache.thrift.async.A public static class ExecuteStatement_call extends org.apache.thrift.async.TAsyncMethodCall { private TExecuteStatementReq req; - public ExecuteStatement_call(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public ExecuteStatement_call(TExecuteStatementReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -778,7 +773,7 @@ public TExecuteStatementResp getResult() throws org.apache.thrift.TException { } } - public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTypeInfo_call method_call = new GetTypeInfo_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -787,7 +782,7 @@ public void GetTypeInfo(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethod public static class GetTypeInfo_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTypeInfoReq req; - public GetTypeInfo_call(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetTypeInfo_call(TGetTypeInfoReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -810,7 +805,7 @@ public TGetTypeInfoResp getResult() throws org.apache.thrift.TException { } } - public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetCatalogs_call method_call = new GetCatalogs_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -819,7 +814,7 @@ public void GetCatalogs(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethod public static class GetCatalogs_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetCatalogsReq req; - public GetCatalogs_call(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetCatalogs_call(TGetCatalogsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -842,7 +837,7 @@ public TGetCatalogsResp getResult() throws org.apache.thrift.TException { } } - public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetSchemas_call method_call = new GetSchemas_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -851,7 +846,7 @@ public void GetSchemas(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCa public static class GetSchemas_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetSchemasReq req; - public GetSchemas_call(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetSchemas_call(TGetSchemasReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -874,7 +869,7 @@ public TGetSchemasResp getResult() throws org.apache.thrift.TException { } } - public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTables_call method_call = new GetTables_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -883,7 +878,7 @@ public void GetTables(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCall public static class GetTables_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTablesReq req; - public GetTables_call(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetTables_call(TGetTablesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -906,7 +901,7 @@ public TGetTablesResp getResult() throws org.apache.thrift.TException { } } - public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetTableTypes_call method_call = new GetTableTypes_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -915,7 +910,7 @@ public void GetTableTypes(TGetTableTypesReq req, org.apache.thrift.async.AsyncMe public static class GetTableTypes_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetTableTypesReq req; - public GetTableTypes_call(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetTableTypes_call(TGetTableTypesReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -938,7 +933,7 @@ public TGetTableTypesResp getResult() throws org.apache.thrift.TException { } } - public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetColumns_call method_call = new GetColumns_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -947,7 +942,7 @@ public void GetColumns(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCa public static class GetColumns_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetColumnsReq req; - public GetColumns_call(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetColumns_call(TGetColumnsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -970,7 +965,7 @@ public TGetColumnsResp getResult() throws org.apache.thrift.TException { } } - public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetFunctions_call method_call = new GetFunctions_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -979,7 +974,7 @@ public void GetFunctions(TGetFunctionsReq req, org.apache.thrift.async.AsyncMeth public static class GetFunctions_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetFunctionsReq req; - public GetFunctions_call(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetFunctions_call(TGetFunctionsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1002,7 +997,7 @@ public TGetFunctionsResp getResult() throws org.apache.thrift.TException { } } - public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetPrimaryKeys_call method_call = new GetPrimaryKeys_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1011,7 +1006,7 @@ public void GetPrimaryKeys(TGetPrimaryKeysReq req, org.apache.thrift.async.Async public static class GetPrimaryKeys_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetPrimaryKeysReq req; - public GetPrimaryKeys_call(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetPrimaryKeys_call(TGetPrimaryKeysReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1034,7 +1029,7 @@ public TGetPrimaryKeysResp getResult() throws org.apache.thrift.TException { } } - public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetCrossReference_call method_call = new GetCrossReference_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1043,7 +1038,7 @@ public void GetCrossReference(TGetCrossReferenceReq req, org.apache.thrift.async public static class GetCrossReference_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetCrossReferenceReq req; - public GetCrossReference_call(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetCrossReference_call(TGetCrossReferenceReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1066,7 +1061,7 @@ public TGetCrossReferenceResp getResult() throws org.apache.thrift.TException { } } - public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetOperationStatus_call method_call = new GetOperationStatus_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1075,7 +1070,7 @@ public void GetOperationStatus(TGetOperationStatusReq req, org.apache.thrift.asy public static class GetOperationStatus_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetOperationStatusReq req; - public GetOperationStatus_call(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetOperationStatus_call(TGetOperationStatusReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1098,7 +1093,7 @@ public TGetOperationStatusResp getResult() throws org.apache.thrift.TException { } } - public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CancelOperation_call method_call = new CancelOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1107,7 +1102,7 @@ public void CancelOperation(TCancelOperationReq req, org.apache.thrift.async.Asy public static class CancelOperation_call extends org.apache.thrift.async.TAsyncMethodCall { private TCancelOperationReq req; - public CancelOperation_call(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public CancelOperation_call(TCancelOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1130,7 +1125,7 @@ public TCancelOperationResp getResult() throws org.apache.thrift.TException { } } - public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CloseOperation_call method_call = new CloseOperation_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1139,7 +1134,7 @@ public void CloseOperation(TCloseOperationReq req, org.apache.thrift.async.Async public static class CloseOperation_call extends org.apache.thrift.async.TAsyncMethodCall { private TCloseOperationReq req; - public CloseOperation_call(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public CloseOperation_call(TCloseOperationReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1162,7 +1157,7 @@ public TCloseOperationResp getResult() throws org.apache.thrift.TException { } } - public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetResultSetMetadata_call method_call = new GetResultSetMetadata_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1171,7 +1166,7 @@ public void GetResultSetMetadata(TGetResultSetMetadataReq req, org.apache.thrift public static class GetResultSetMetadata_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetResultSetMetadataReq req; - public GetResultSetMetadata_call(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetResultSetMetadata_call(TGetResultSetMetadataReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1194,7 +1189,7 @@ public TGetResultSetMetadataResp getResult() throws org.apache.thrift.TException } } - public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); FetchResults_call method_call = new FetchResults_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1203,7 +1198,7 @@ public void FetchResults(TFetchResultsReq req, org.apache.thrift.async.AsyncMeth public static class FetchResults_call extends org.apache.thrift.async.TAsyncMethodCall { private TFetchResultsReq req; - public FetchResults_call(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public FetchResults_call(TFetchResultsReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1226,7 +1221,7 @@ public TFetchResultsResp getResult() throws org.apache.thrift.TException { } } - public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); GetDelegationToken_call method_call = new GetDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1235,7 +1230,7 @@ public void GetDelegationToken(TGetDelegationTokenReq req, org.apache.thrift.asy public static class GetDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TGetDelegationTokenReq req; - public GetDelegationToken_call(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public GetDelegationToken_call(TGetDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1258,7 +1253,7 @@ public TGetDelegationTokenResp getResult() throws org.apache.thrift.TException { } } - public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); CancelDelegationToken_call method_call = new CancelDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1267,7 +1262,7 @@ public void CancelDelegationToken(TCancelDelegationTokenReq req, org.apache.thri public static class CancelDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TCancelDelegationTokenReq req; - public CancelDelegationToken_call(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public CancelDelegationToken_call(TCancelDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1290,7 +1285,7 @@ public TCancelDelegationTokenResp getResult() throws org.apache.thrift.TExceptio } } - public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { + public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException { checkReady(); RenewDelegationToken_call method_call = new RenewDelegationToken_call(req, resultHandler, this, ___protocolFactory, ___transport); this.___currentMethod = method_call; @@ -1299,7 +1294,7 @@ public void RenewDelegationToken(TRenewDelegationTokenReq req, org.apache.thrift public static class RenewDelegationToken_call extends org.apache.thrift.async.TAsyncMethodCall { private TRenewDelegationTokenReq req; - public RenewDelegationToken_call(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { + public RenewDelegationToken_call(TRenewDelegationTokenReq req, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException { super(client, protocolFactory, transport, resultHandler, false); this.req = req; } @@ -1781,1115 +1776,7 @@ public RenewDelegationToken_result getResult(I iface, RenewDelegationToken_args } - public static class AsyncProcessor extends org.apache.thrift.TBaseAsyncProcessor { - private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName()); - public AsyncProcessor(I iface) { - super(iface, getProcessMap(new HashMap>())); - } - - protected AsyncProcessor(I iface, Map> processMap) { - super(iface, getProcessMap(processMap)); - } - - private static Map> getProcessMap(Map> processMap) { - processMap.put("OpenSession", new OpenSession()); - processMap.put("CloseSession", new CloseSession()); - processMap.put("GetInfo", new GetInfo()); - processMap.put("ExecuteStatement", new ExecuteStatement()); - processMap.put("GetTypeInfo", new GetTypeInfo()); - processMap.put("GetCatalogs", new GetCatalogs()); - processMap.put("GetSchemas", new GetSchemas()); - processMap.put("GetTables", new GetTables()); - processMap.put("GetTableTypes", new GetTableTypes()); - processMap.put("GetColumns", new GetColumns()); - processMap.put("GetFunctions", new GetFunctions()); - processMap.put("GetPrimaryKeys", new GetPrimaryKeys()); - processMap.put("GetCrossReference", new GetCrossReference()); - processMap.put("GetOperationStatus", new GetOperationStatus()); - processMap.put("CancelOperation", new CancelOperation()); - processMap.put("CloseOperation", new CloseOperation()); - processMap.put("GetResultSetMetadata", new GetResultSetMetadata()); - processMap.put("FetchResults", new FetchResults()); - processMap.put("GetDelegationToken", new GetDelegationToken()); - processMap.put("CancelDelegationToken", new CancelDelegationToken()); - processMap.put("RenewDelegationToken", new RenewDelegationToken()); - return processMap; - } - - public static class OpenSession extends org.apache.thrift.AsyncProcessFunction { - public OpenSession() { - super("OpenSession"); - } - - public OpenSession_args getEmptyArgsInstance() { - return new OpenSession_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TOpenSessionResp o) { - OpenSession_result result = new OpenSession_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - OpenSession_result result = new OpenSession_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, OpenSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.OpenSession(args.req,resultHandler); - } - } - - public static class CloseSession extends org.apache.thrift.AsyncProcessFunction { - public CloseSession() { - super("CloseSession"); - } - - public CloseSession_args getEmptyArgsInstance() { - return new CloseSession_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TCloseSessionResp o) { - CloseSession_result result = new CloseSession_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - CloseSession_result result = new CloseSession_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, CloseSession_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.CloseSession(args.req,resultHandler); - } - } - - public static class GetInfo extends org.apache.thrift.AsyncProcessFunction { - public GetInfo() { - super("GetInfo"); - } - - public GetInfo_args getEmptyArgsInstance() { - return new GetInfo_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetInfoResp o) { - GetInfo_result result = new GetInfo_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetInfo_result result = new GetInfo_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetInfo(args.req,resultHandler); - } - } - - public static class ExecuteStatement extends org.apache.thrift.AsyncProcessFunction { - public ExecuteStatement() { - super("ExecuteStatement"); - } - - public ExecuteStatement_args getEmptyArgsInstance() { - return new ExecuteStatement_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TExecuteStatementResp o) { - ExecuteStatement_result result = new ExecuteStatement_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - ExecuteStatement_result result = new ExecuteStatement_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, ExecuteStatement_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.ExecuteStatement(args.req,resultHandler); - } - } - - public static class GetTypeInfo extends org.apache.thrift.AsyncProcessFunction { - public GetTypeInfo() { - super("GetTypeInfo"); - } - - public GetTypeInfo_args getEmptyArgsInstance() { - return new GetTypeInfo_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetTypeInfoResp o) { - GetTypeInfo_result result = new GetTypeInfo_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetTypeInfo_result result = new GetTypeInfo_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetTypeInfo_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetTypeInfo(args.req,resultHandler); - } - } - - public static class GetCatalogs extends org.apache.thrift.AsyncProcessFunction { - public GetCatalogs() { - super("GetCatalogs"); - } - - public GetCatalogs_args getEmptyArgsInstance() { - return new GetCatalogs_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetCatalogsResp o) { - GetCatalogs_result result = new GetCatalogs_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetCatalogs_result result = new GetCatalogs_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetCatalogs_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetCatalogs(args.req,resultHandler); - } - } - - public static class GetSchemas extends org.apache.thrift.AsyncProcessFunction { - public GetSchemas() { - super("GetSchemas"); - } - - public GetSchemas_args getEmptyArgsInstance() { - return new GetSchemas_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetSchemasResp o) { - GetSchemas_result result = new GetSchemas_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetSchemas_result result = new GetSchemas_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetSchemas_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetSchemas(args.req,resultHandler); - } - } - - public static class GetTables extends org.apache.thrift.AsyncProcessFunction { - public GetTables() { - super("GetTables"); - } - - public GetTables_args getEmptyArgsInstance() { - return new GetTables_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetTablesResp o) { - GetTables_result result = new GetTables_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetTables_result result = new GetTables_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetTables_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetTables(args.req,resultHandler); - } - } - - public static class GetTableTypes extends org.apache.thrift.AsyncProcessFunction { - public GetTableTypes() { - super("GetTableTypes"); - } - - public GetTableTypes_args getEmptyArgsInstance() { - return new GetTableTypes_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetTableTypesResp o) { - GetTableTypes_result result = new GetTableTypes_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetTableTypes_result result = new GetTableTypes_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetTableTypes_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetTableTypes(args.req,resultHandler); - } - } - - public static class GetColumns extends org.apache.thrift.AsyncProcessFunction { - public GetColumns() { - super("GetColumns"); - } - - public GetColumns_args getEmptyArgsInstance() { - return new GetColumns_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetColumnsResp o) { - GetColumns_result result = new GetColumns_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetColumns_result result = new GetColumns_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetColumns_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetColumns(args.req,resultHandler); - } - } - - public static class GetFunctions extends org.apache.thrift.AsyncProcessFunction { - public GetFunctions() { - super("GetFunctions"); - } - - public GetFunctions_args getEmptyArgsInstance() { - return new GetFunctions_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetFunctionsResp o) { - GetFunctions_result result = new GetFunctions_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetFunctions_result result = new GetFunctions_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetFunctions_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetFunctions(args.req,resultHandler); - } - } - - public static class GetPrimaryKeys extends org.apache.thrift.AsyncProcessFunction { - public GetPrimaryKeys() { - super("GetPrimaryKeys"); - } - - public GetPrimaryKeys_args getEmptyArgsInstance() { - return new GetPrimaryKeys_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetPrimaryKeysResp o) { - GetPrimaryKeys_result result = new GetPrimaryKeys_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetPrimaryKeys_result result = new GetPrimaryKeys_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetPrimaryKeys_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetPrimaryKeys(args.req,resultHandler); - } - } - - public static class GetCrossReference extends org.apache.thrift.AsyncProcessFunction { - public GetCrossReference() { - super("GetCrossReference"); - } - - public GetCrossReference_args getEmptyArgsInstance() { - return new GetCrossReference_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetCrossReferenceResp o) { - GetCrossReference_result result = new GetCrossReference_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetCrossReference_result result = new GetCrossReference_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetCrossReference_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetCrossReference(args.req,resultHandler); - } - } - - public static class GetOperationStatus extends org.apache.thrift.AsyncProcessFunction { - public GetOperationStatus() { - super("GetOperationStatus"); - } - - public GetOperationStatus_args getEmptyArgsInstance() { - return new GetOperationStatus_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetOperationStatusResp o) { - GetOperationStatus_result result = new GetOperationStatus_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetOperationStatus_result result = new GetOperationStatus_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetOperationStatus_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetOperationStatus(args.req,resultHandler); - } - } - - public static class CancelOperation extends org.apache.thrift.AsyncProcessFunction { - public CancelOperation() { - super("CancelOperation"); - } - - public CancelOperation_args getEmptyArgsInstance() { - return new CancelOperation_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TCancelOperationResp o) { - CancelOperation_result result = new CancelOperation_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - CancelOperation_result result = new CancelOperation_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, CancelOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.CancelOperation(args.req,resultHandler); - } - } - - public static class CloseOperation extends org.apache.thrift.AsyncProcessFunction { - public CloseOperation() { - super("CloseOperation"); - } - - public CloseOperation_args getEmptyArgsInstance() { - return new CloseOperation_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TCloseOperationResp o) { - CloseOperation_result result = new CloseOperation_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - CloseOperation_result result = new CloseOperation_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, CloseOperation_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.CloseOperation(args.req,resultHandler); - } - } - - public static class GetResultSetMetadata extends org.apache.thrift.AsyncProcessFunction { - public GetResultSetMetadata() { - super("GetResultSetMetadata"); - } - - public GetResultSetMetadata_args getEmptyArgsInstance() { - return new GetResultSetMetadata_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetResultSetMetadataResp o) { - GetResultSetMetadata_result result = new GetResultSetMetadata_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetResultSetMetadata_result result = new GetResultSetMetadata_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetResultSetMetadata_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetResultSetMetadata(args.req,resultHandler); - } - } - - public static class FetchResults extends org.apache.thrift.AsyncProcessFunction { - public FetchResults() { - super("FetchResults"); - } - - public FetchResults_args getEmptyArgsInstance() { - return new FetchResults_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TFetchResultsResp o) { - FetchResults_result result = new FetchResults_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - FetchResults_result result = new FetchResults_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, FetchResults_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.FetchResults(args.req,resultHandler); - } - } - - public static class GetDelegationToken extends org.apache.thrift.AsyncProcessFunction { - public GetDelegationToken() { - super("GetDelegationToken"); - } - - public GetDelegationToken_args getEmptyArgsInstance() { - return new GetDelegationToken_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TGetDelegationTokenResp o) { - GetDelegationToken_result result = new GetDelegationToken_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - GetDelegationToken_result result = new GetDelegationToken_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, GetDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.GetDelegationToken(args.req,resultHandler); - } - } - - public static class CancelDelegationToken extends org.apache.thrift.AsyncProcessFunction { - public CancelDelegationToken() { - super("CancelDelegationToken"); - } - - public CancelDelegationToken_args getEmptyArgsInstance() { - return new CancelDelegationToken_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TCancelDelegationTokenResp o) { - CancelDelegationToken_result result = new CancelDelegationToken_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - CancelDelegationToken_result result = new CancelDelegationToken_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, CancelDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.CancelDelegationToken(args.req,resultHandler); - } - } - - public static class RenewDelegationToken extends org.apache.thrift.AsyncProcessFunction { - public RenewDelegationToken() { - super("RenewDelegationToken"); - } - - public RenewDelegationToken_args getEmptyArgsInstance() { - return new RenewDelegationToken_args(); - } - - public AsyncMethodCallback getResultHandler(final AsyncFrameBuffer fb, final int seqid) { - final org.apache.thrift.AsyncProcessFunction fcall = this; - return new AsyncMethodCallback() { - public void onComplete(TRenewDelegationTokenResp o) { - RenewDelegationToken_result result = new RenewDelegationToken_result(); - result.success = o; - try { - fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); - return; - } catch (Exception e) { - LOGGER.error("Exception writing to internal frame buffer", e); - } - fb.close(); - } - public void onError(Exception e) { - byte msgType = org.apache.thrift.protocol.TMessageType.REPLY; - org.apache.thrift.TBase msg; - RenewDelegationToken_result result = new RenewDelegationToken_result(); - { - msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION; - msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage()); - } - try { - fcall.sendResponse(fb,msg,msgType,seqid); - return; - } catch (Exception ex) { - LOGGER.error("Exception writing to internal frame buffer", ex); - } - fb.close(); - } - }; - } - - protected boolean isOneway() { - return false; - } - - public void start(I iface, RenewDelegationToken_args args, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws TException { - iface.RenewDelegationToken(args.req,resultHandler); - } - } - - } - - public static class OpenSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class OpenSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -2900,7 +1787,7 @@ public void start(I iface, RenewDelegationToken_args args, org.apache.thrift.asy schemes.put(TupleScheme.class, new OpenSession_argsTupleSchemeFactory()); } - private TOpenSessionReq req; // required + public TOpenSessionReq req; // 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 { @@ -3002,8 +1889,9 @@ public TOpenSessionReq getReq() { return this.req; } - public void setReq(TOpenSessionReq req) { + public OpenSession_args setReq(TOpenSessionReq req) { this.req = req; + return this; } public void unsetReq() { @@ -3083,30 +1971,23 @@ public boolean equals(OpenSession_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(OpenSession_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + OpenSession_args typedOther = (OpenSession_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -3199,6 +2080,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_args st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -3252,7 +2135,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args str } - public static class OpenSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class OpenSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OpenSession_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -3263,7 +2146,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_args str schemes.put(TupleScheme.class, new OpenSession_resultTupleSchemeFactory()); } - private TOpenSessionResp success; // required + public TOpenSessionResp success; // 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 { @@ -3365,8 +2248,9 @@ public TOpenSessionResp getSuccess() { return this.success; } - public void setSuccess(TOpenSessionResp success) { + public OpenSession_result setSuccess(TOpenSessionResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -3446,30 +2330,23 @@ public boolean equals(OpenSession_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(OpenSession_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + OpenSession_result typedOther = (OpenSession_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -3562,6 +2439,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, OpenSession_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -3615,7 +2494,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_result s } - public static class CloseSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CloseSession_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -3626,7 +2505,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, OpenSession_result s schemes.put(TupleScheme.class, new CloseSession_argsTupleSchemeFactory()); } - private TCloseSessionReq req; // required + public TCloseSessionReq req; // 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 { @@ -3728,8 +2607,9 @@ public TCloseSessionReq getReq() { return this.req; } - public void setReq(TCloseSessionReq req) { + public CloseSession_args setReq(TCloseSessionReq req) { this.req = req; + return this; } public void unsetReq() { @@ -3809,30 +2689,23 @@ public boolean equals(CloseSession_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CloseSession_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CloseSession_args typedOther = (CloseSession_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -3925,6 +2798,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_args s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -3978,7 +2853,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_args st } - public static class CloseSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CloseSession_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseSession_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -3989,7 +2864,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_args st schemes.put(TupleScheme.class, new CloseSession_resultTupleSchemeFactory()); } - private TCloseSessionResp success; // required + public TCloseSessionResp success; // 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 { @@ -4091,8 +2966,9 @@ public TCloseSessionResp getSuccess() { return this.success; } - public void setSuccess(TCloseSessionResp success) { + public CloseSession_result setSuccess(TCloseSessionResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -4172,30 +3048,23 @@ public boolean equals(CloseSession_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CloseSession_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CloseSession_result typedOther = (CloseSession_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -4288,6 +3157,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseSession_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -4341,7 +3212,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_result } - public static class GetInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -4352,7 +3223,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseSession_result schemes.put(TupleScheme.class, new GetInfo_argsTupleSchemeFactory()); } - private TGetInfoReq req; // required + public TGetInfoReq req; // 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 { @@ -4454,8 +3325,9 @@ public TGetInfoReq getReq() { return this.req; } - public void setReq(TGetInfoReq req) { + public GetInfo_args setReq(TGetInfoReq req) { this.req = req; + return this; } public void unsetReq() { @@ -4535,30 +3407,23 @@ public boolean equals(GetInfo_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetInfo_args typedOther = (GetInfo_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -4651,6 +3516,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_args struct iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -4704,7 +3571,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) } - public static class GetInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetInfo_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -4715,7 +3582,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_args struct) schemes.put(TupleScheme.class, new GetInfo_resultTupleSchemeFactory()); } - private TGetInfoResp success; // required + public TGetInfoResp success; // 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 { @@ -4817,8 +3684,9 @@ public TGetInfoResp getSuccess() { return this.success; } - public void setSuccess(TGetInfoResp success) { + public GetInfo_result setSuccess(TGetInfoResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -4898,30 +3766,23 @@ public boolean equals(GetInfo_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetInfo_result typedOther = (GetInfo_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -5014,6 +3875,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetInfo_result stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -5067,7 +3930,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struc } - public static class ExecuteStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class ExecuteStatement_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -5078,7 +3941,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetInfo_result struc schemes.put(TupleScheme.class, new ExecuteStatement_argsTupleSchemeFactory()); } - private TExecuteStatementReq req; // required + public TExecuteStatementReq req; // 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 { @@ -5180,8 +4043,9 @@ public TExecuteStatementReq getReq() { return this.req; } - public void setReq(TExecuteStatementReq req) { + public ExecuteStatement_args setReq(TExecuteStatementReq req) { this.req = req; + return this; } public void unsetReq() { @@ -5261,30 +4125,23 @@ public boolean equals(ExecuteStatement_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(ExecuteStatement_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ExecuteStatement_args typedOther = (ExecuteStatement_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -5377,6 +4234,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_ar iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -5430,7 +4289,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_arg } - public static class ExecuteStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class ExecuteStatement_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ExecuteStatement_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -5441,7 +4300,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_arg schemes.put(TupleScheme.class, new ExecuteStatement_resultTupleSchemeFactory()); } - private TExecuteStatementResp success; // required + public TExecuteStatementResp success; // 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 { @@ -5543,8 +4402,9 @@ public TExecuteStatementResp getSuccess() { return this.success; } - public void setSuccess(TExecuteStatementResp success) { + public ExecuteStatement_result setSuccess(TExecuteStatementResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -5624,30 +4484,23 @@ public boolean equals(ExecuteStatement_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(ExecuteStatement_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + ExecuteStatement_result typedOther = (ExecuteStatement_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -5740,6 +4593,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, ExecuteStatement_re iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -5793,7 +4648,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_res } - public static class GetTypeInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTypeInfo_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -5804,7 +4659,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, ExecuteStatement_res schemes.put(TupleScheme.class, new GetTypeInfo_argsTupleSchemeFactory()); } - private TGetTypeInfoReq req; // required + public TGetTypeInfoReq req; // 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 { @@ -5906,8 +4761,9 @@ public TGetTypeInfoReq getReq() { return this.req; } - public void setReq(TGetTypeInfoReq req) { + public GetTypeInfo_args setReq(TGetTypeInfoReq req) { this.req = req; + return this; } public void unsetReq() { @@ -5987,30 +4843,23 @@ public boolean equals(GetTypeInfo_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTypeInfo_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTypeInfo_args typedOther = (GetTypeInfo_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -6103,6 +4952,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_args st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -6156,7 +5007,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args str } - public static class GetTypeInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTypeInfo_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTypeInfo_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -6167,7 +5018,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_args str schemes.put(TupleScheme.class, new GetTypeInfo_resultTupleSchemeFactory()); } - private TGetTypeInfoResp success; // required + public TGetTypeInfoResp success; // 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 { @@ -6269,8 +5120,9 @@ public TGetTypeInfoResp getSuccess() { return this.success; } - public void setSuccess(TGetTypeInfoResp success) { + public GetTypeInfo_result setSuccess(TGetTypeInfoResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -6350,30 +5202,23 @@ public boolean equals(GetTypeInfo_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTypeInfo_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTypeInfo_result typedOther = (GetTypeInfo_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -6466,6 +5311,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTypeInfo_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -6519,7 +5366,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result s } - public static class GetCatalogs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetCatalogs_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -6530,7 +5377,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTypeInfo_result s schemes.put(TupleScheme.class, new GetCatalogs_argsTupleSchemeFactory()); } - private TGetCatalogsReq req; // required + public TGetCatalogsReq req; // 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 { @@ -6632,8 +5479,9 @@ public TGetCatalogsReq getReq() { return this.req; } - public void setReq(TGetCatalogsReq req) { + public GetCatalogs_args setReq(TGetCatalogsReq req) { this.req = req; + return this; } public void unsetReq() { @@ -6713,30 +5561,23 @@ public boolean equals(GetCatalogs_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetCatalogs_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetCatalogs_args typedOther = (GetCatalogs_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -6829,6 +5670,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_args st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -6882,7 +5725,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args str } - public static class GetCatalogs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetCatalogs_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCatalogs_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -6893,7 +5736,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_args str schemes.put(TupleScheme.class, new GetCatalogs_resultTupleSchemeFactory()); } - private TGetCatalogsResp success; // required + public TGetCatalogsResp success; // 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 { @@ -6995,8 +5838,9 @@ public TGetCatalogsResp getSuccess() { return this.success; } - public void setSuccess(TGetCatalogsResp success) { + public GetCatalogs_result setSuccess(TGetCatalogsResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -7076,30 +5920,23 @@ public boolean equals(GetCatalogs_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetCatalogs_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetCatalogs_result typedOther = (GetCatalogs_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -7192,6 +6029,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCatalogs_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -7245,7 +6084,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result s } - public static class GetSchemas_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetSchemas_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -7256,7 +6095,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCatalogs_result s schemes.put(TupleScheme.class, new GetSchemas_argsTupleSchemeFactory()); } - private TGetSchemasReq req; // required + public TGetSchemasReq req; // 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 { @@ -7358,8 +6197,9 @@ public TGetSchemasReq getReq() { return this.req; } - public void setReq(TGetSchemasReq req) { + public GetSchemas_args setReq(TGetSchemasReq req) { this.req = req; + return this; } public void unsetReq() { @@ -7439,30 +6279,23 @@ public boolean equals(GetSchemas_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetSchemas_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetSchemas_args typedOther = (GetSchemas_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -7555,6 +6388,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_args str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -7608,7 +6443,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args stru } - public static class GetSchemas_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetSchemas_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetSchemas_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -7619,7 +6454,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_args stru schemes.put(TupleScheme.class, new GetSchemas_resultTupleSchemeFactory()); } - private TGetSchemasResp success; // required + public TGetSchemasResp success; // 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 { @@ -7721,8 +6556,9 @@ public TGetSchemasResp getSuccess() { return this.success; } - public void setSuccess(TGetSchemasResp success) { + public GetSchemas_result setSuccess(TGetSchemasResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -7802,30 +6638,23 @@ public boolean equals(GetSchemas_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetSchemas_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetSchemas_result typedOther = (GetSchemas_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -7918,6 +6747,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetSchemas_result s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -7971,7 +6802,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result st } - public static class GetTables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTables_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -7982,7 +6813,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetSchemas_result st schemes.put(TupleScheme.class, new GetTables_argsTupleSchemeFactory()); } - private TGetTablesReq req; // required + public TGetTablesReq req; // 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 { @@ -8084,8 +6915,9 @@ public TGetTablesReq getReq() { return this.req; } - public void setReq(TGetTablesReq req) { + public GetTables_args setReq(TGetTablesReq req) { this.req = req; + return this; } public void unsetReq() { @@ -8165,30 +6997,23 @@ public boolean equals(GetTables_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTables_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTables_args typedOther = (GetTables_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -8281,6 +7106,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_args stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -8334,7 +7161,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_args struc } - public static class GetTables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTables_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTables_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -8345,7 +7172,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_args struc schemes.put(TupleScheme.class, new GetTables_resultTupleSchemeFactory()); } - private TGetTablesResp success; // required + public TGetTablesResp success; // 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 { @@ -8447,8 +7274,9 @@ public TGetTablesResp getSuccess() { return this.success; } - public void setSuccess(TGetTablesResp success) { + public GetTables_result setSuccess(TGetTablesResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -8528,30 +7356,23 @@ public boolean equals(GetTables_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTables_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTables_result typedOther = (GetTables_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -8644,6 +7465,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTables_result st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -8697,7 +7520,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_result str } - public static class GetTableTypes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTableTypes_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -8708,7 +7531,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTables_result str schemes.put(TupleScheme.class, new GetTableTypes_argsTupleSchemeFactory()); } - private TGetTableTypesReq req; // required + public TGetTableTypesReq req; // 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 { @@ -8810,8 +7633,9 @@ public TGetTableTypesReq getReq() { return this.req; } - public void setReq(TGetTableTypesReq req) { + public GetTableTypes_args setReq(TGetTableTypesReq req) { this.req = req; + return this; } public void unsetReq() { @@ -8891,30 +7715,23 @@ public boolean equals(GetTableTypes_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTableTypes_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTableTypes_args typedOther = (GetTableTypes_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -9007,6 +7824,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_args iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -9060,7 +7879,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args s } - public static class GetTableTypes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetTableTypes_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetTableTypes_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -9071,7 +7890,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_args s schemes.put(TupleScheme.class, new GetTableTypes_resultTupleSchemeFactory()); } - private TGetTableTypesResp success; // required + public TGetTableTypesResp success; // 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 { @@ -9173,8 +7992,9 @@ public TGetTableTypesResp getSuccess() { return this.success; } - public void setSuccess(TGetTableTypesResp success) { + public GetTableTypes_result setSuccess(TGetTableTypesResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -9254,30 +8074,23 @@ public boolean equals(GetTableTypes_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetTableTypes_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetTableTypes_result typedOther = (GetTableTypes_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -9370,6 +8183,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetTableTypes_resul iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -9423,7 +8238,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result } - public static class GetColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetColumns_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -9434,7 +8249,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetTableTypes_result schemes.put(TupleScheme.class, new GetColumns_argsTupleSchemeFactory()); } - private TGetColumnsReq req; // required + public TGetColumnsReq req; // 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 { @@ -9536,8 +8351,9 @@ public TGetColumnsReq getReq() { return this.req; } - public void setReq(TGetColumnsReq req) { + public GetColumns_args setReq(TGetColumnsReq req) { this.req = req; + return this; } public void unsetReq() { @@ -9617,30 +8433,23 @@ public boolean equals(GetColumns_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetColumns_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetColumns_args typedOther = (GetColumns_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -9733,6 +8542,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_args str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -9786,7 +8597,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_args stru } - public static class GetColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetColumns_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetColumns_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -9797,7 +8608,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_args stru schemes.put(TupleScheme.class, new GetColumns_resultTupleSchemeFactory()); } - private TGetColumnsResp success; // required + public TGetColumnsResp success; // 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 { @@ -9899,8 +8710,9 @@ public TGetColumnsResp getSuccess() { return this.success; } - public void setSuccess(TGetColumnsResp success) { + public GetColumns_result setSuccess(TGetColumnsResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -9980,30 +8792,23 @@ public boolean equals(GetColumns_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetColumns_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetColumns_result typedOther = (GetColumns_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -10096,6 +8901,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetColumns_result s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -10149,7 +8956,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_result st } - public static class GetFunctions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetFunctions_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -10160,7 +8967,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetColumns_result st schemes.put(TupleScheme.class, new GetFunctions_argsTupleSchemeFactory()); } - private TGetFunctionsReq req; // required + public TGetFunctionsReq req; // 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 { @@ -10262,8 +9069,9 @@ public TGetFunctionsReq getReq() { return this.req; } - public void setReq(TGetFunctionsReq req) { + public GetFunctions_args setReq(TGetFunctionsReq req) { this.req = req; + return this; } public void unsetReq() { @@ -10343,30 +9151,23 @@ public boolean equals(GetFunctions_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetFunctions_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetFunctions_args typedOther = (GetFunctions_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -10459,6 +9260,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_args s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -10512,7 +9315,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args st } - public static class GetFunctions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetFunctions_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetFunctions_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -10523,7 +9326,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_args st schemes.put(TupleScheme.class, new GetFunctions_resultTupleSchemeFactory()); } - private TGetFunctionsResp success; // required + public TGetFunctionsResp success; // 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 { @@ -10625,8 +9428,9 @@ public TGetFunctionsResp getSuccess() { return this.success; } - public void setSuccess(TGetFunctionsResp success) { + public GetFunctions_result setSuccess(TGetFunctionsResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -10706,30 +9510,23 @@ public boolean equals(GetFunctions_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetFunctions_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetFunctions_result typedOther = (GetFunctions_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -10822,6 +9619,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetFunctions_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -10875,7 +9674,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result } - public static class GetPrimaryKeys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetPrimaryKeys_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrimaryKeys_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -10886,7 +9685,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetFunctions_result schemes.put(TupleScheme.class, new GetPrimaryKeys_argsTupleSchemeFactory()); } - private TGetPrimaryKeysReq req; // required + public TGetPrimaryKeysReq req; // 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 { @@ -10988,8 +9787,9 @@ public TGetPrimaryKeysReq getReq() { return this.req; } - public void setReq(TGetPrimaryKeysReq req) { + public GetPrimaryKeys_args setReq(TGetPrimaryKeysReq req) { this.req = req; + return this; } public void unsetReq() { @@ -11069,30 +9869,23 @@ public boolean equals(GetPrimaryKeys_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetPrimaryKeys_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetPrimaryKeys_args typedOther = (GetPrimaryKeys_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -11185,6 +9978,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrimaryKeys_args iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -11238,7 +10033,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_args } - public static class GetPrimaryKeys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetPrimaryKeys_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetPrimaryKeys_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -11249,7 +10044,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_args schemes.put(TupleScheme.class, new GetPrimaryKeys_resultTupleSchemeFactory()); } - private TGetPrimaryKeysResp success; // required + public TGetPrimaryKeysResp success; // 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 { @@ -11351,8 +10146,9 @@ public TGetPrimaryKeysResp getSuccess() { return this.success; } - public void setSuccess(TGetPrimaryKeysResp success) { + public GetPrimaryKeys_result setSuccess(TGetPrimaryKeysResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -11432,30 +10228,23 @@ public boolean equals(GetPrimaryKeys_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetPrimaryKeys_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetPrimaryKeys_result typedOther = (GetPrimaryKeys_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -11548,6 +10337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetPrimaryKeys_resu iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -11601,7 +10392,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_resul } - public static class GetCrossReference_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetCrossReference_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCrossReference_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -11612,7 +10403,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetPrimaryKeys_resul schemes.put(TupleScheme.class, new GetCrossReference_argsTupleSchemeFactory()); } - private TGetCrossReferenceReq req; // required + public TGetCrossReferenceReq req; // 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 { @@ -11714,8 +10505,9 @@ public TGetCrossReferenceReq getReq() { return this.req; } - public void setReq(TGetCrossReferenceReq req) { + public GetCrossReference_args setReq(TGetCrossReferenceReq req) { this.req = req; + return this; } public void unsetReq() { @@ -11795,30 +10587,23 @@ public boolean equals(GetCrossReference_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetCrossReference_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetCrossReference_args typedOther = (GetCrossReference_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -11911,6 +10696,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCrossReference_a iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -11964,7 +10751,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_ar } - public static class GetCrossReference_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetCrossReference_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetCrossReference_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -11975,7 +10762,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_ar schemes.put(TupleScheme.class, new GetCrossReference_resultTupleSchemeFactory()); } - private TGetCrossReferenceResp success; // required + public TGetCrossReferenceResp success; // 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 { @@ -12077,8 +10864,9 @@ public TGetCrossReferenceResp getSuccess() { return this.success; } - public void setSuccess(TGetCrossReferenceResp success) { + public GetCrossReference_result setSuccess(TGetCrossReferenceResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -12158,30 +10946,23 @@ public boolean equals(GetCrossReference_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetCrossReference_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetCrossReference_result typedOther = (GetCrossReference_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -12274,6 +11055,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetCrossReference_r iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -12327,7 +11110,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_re } - public static class GetOperationStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetOperationStatus_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOperationStatus_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -12338,7 +11121,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetCrossReference_re schemes.put(TupleScheme.class, new GetOperationStatus_argsTupleSchemeFactory()); } - private TGetOperationStatusReq req; // required + public TGetOperationStatusReq req; // 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 { @@ -12440,8 +11223,9 @@ public TGetOperationStatusReq getReq() { return this.req; } - public void setReq(TGetOperationStatusReq req) { + public GetOperationStatus_args setReq(TGetOperationStatusReq req) { this.req = req; + return this; } public void unsetReq() { @@ -12521,30 +11305,23 @@ public boolean equals(GetOperationStatus_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetOperationStatus_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetOperationStatus_args typedOther = (GetOperationStatus_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -12637,6 +11414,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetOperationStatus_ iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -12690,7 +11469,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_a } - public static class GetOperationStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetOperationStatus_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetOperationStatus_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -12701,7 +11480,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_a schemes.put(TupleScheme.class, new GetOperationStatus_resultTupleSchemeFactory()); } - private TGetOperationStatusResp success; // required + public TGetOperationStatusResp success; // 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 { @@ -12803,8 +11582,9 @@ public TGetOperationStatusResp getSuccess() { return this.success; } - public void setSuccess(TGetOperationStatusResp success) { + public GetOperationStatus_result setSuccess(TGetOperationStatusResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -12884,30 +11664,23 @@ public boolean equals(GetOperationStatus_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetOperationStatus_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetOperationStatus_result typedOther = (GetOperationStatus_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -13000,6 +11773,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetOperationStatus_ iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -13053,7 +11828,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_r } - public static class CancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CancelOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelOperation_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -13064,7 +11839,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetOperationStatus_r schemes.put(TupleScheme.class, new CancelOperation_argsTupleSchemeFactory()); } - private TCancelOperationReq req; // required + public TCancelOperationReq req; // 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 { @@ -13166,8 +11941,9 @@ public TCancelOperationReq getReq() { return this.req; } - public void setReq(TCancelOperationReq req) { + public CancelOperation_args setReq(TCancelOperationReq req) { this.req = req; + return this; } public void unsetReq() { @@ -13247,30 +12023,23 @@ public boolean equals(CancelOperation_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CancelOperation_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CancelOperation_args typedOther = (CancelOperation_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -13363,6 +12132,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CancelOperation_arg iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -13416,7 +12187,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_args } - public static class CancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CancelOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelOperation_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -13427,7 +12198,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_args schemes.put(TupleScheme.class, new CancelOperation_resultTupleSchemeFactory()); } - private TCancelOperationResp success; // required + public TCancelOperationResp success; // 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 { @@ -13529,8 +12300,9 @@ public TCancelOperationResp getSuccess() { return this.success; } - public void setSuccess(TCancelOperationResp success) { + public CancelOperation_result setSuccess(TCancelOperationResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -13610,30 +12382,23 @@ public boolean equals(CancelOperation_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CancelOperation_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CancelOperation_result typedOther = (CancelOperation_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -13726,6 +12491,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CancelOperation_res iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -13779,7 +12546,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_resu } - public static class CloseOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CloseOperation_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseOperation_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -13790,7 +12557,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelOperation_resu schemes.put(TupleScheme.class, new CloseOperation_argsTupleSchemeFactory()); } - private TCloseOperationReq req; // required + public TCloseOperationReq req; // 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 { @@ -13892,8 +12659,9 @@ public TCloseOperationReq getReq() { return this.req; } - public void setReq(TCloseOperationReq req) { + public CloseOperation_args setReq(TCloseOperationReq req) { this.req = req; + return this; } public void unsetReq() { @@ -13973,30 +12741,23 @@ public boolean equals(CloseOperation_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CloseOperation_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CloseOperation_args typedOther = (CloseOperation_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -14089,6 +12850,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseOperation_args iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -14142,7 +12905,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_args } - public static class CloseOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CloseOperation_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CloseOperation_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -14153,7 +12916,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_args schemes.put(TupleScheme.class, new CloseOperation_resultTupleSchemeFactory()); } - private TCloseOperationResp success; // required + public TCloseOperationResp success; // 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 { @@ -14255,8 +13018,9 @@ public TCloseOperationResp getSuccess() { return this.success; } - public void setSuccess(TCloseOperationResp success) { + public CloseOperation_result setSuccess(TCloseOperationResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -14336,30 +13100,23 @@ public boolean equals(CloseOperation_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CloseOperation_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CloseOperation_result typedOther = (CloseOperation_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -14452,6 +13209,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CloseOperation_resu iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -14505,7 +13264,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_resul } - public static class GetResultSetMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetResultSetMetadata_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetResultSetMetadata_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -14516,7 +13275,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CloseOperation_resul schemes.put(TupleScheme.class, new GetResultSetMetadata_argsTupleSchemeFactory()); } - private TGetResultSetMetadataReq req; // required + public TGetResultSetMetadataReq req; // 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 { @@ -14618,8 +13377,9 @@ public TGetResultSetMetadataReq getReq() { return this.req; } - public void setReq(TGetResultSetMetadataReq req) { + public GetResultSetMetadata_args setReq(TGetResultSetMetadataReq req) { this.req = req; + return this; } public void unsetReq() { @@ -14699,30 +13459,23 @@ public boolean equals(GetResultSetMetadata_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetResultSetMetadata_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetResultSetMetadata_args typedOther = (GetResultSetMetadata_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -14815,6 +13568,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetResultSetMetadat iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -14868,7 +13623,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata } - public static class GetResultSetMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetResultSetMetadata_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetResultSetMetadata_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -14879,7 +13634,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata schemes.put(TupleScheme.class, new GetResultSetMetadata_resultTupleSchemeFactory()); } - private TGetResultSetMetadataResp success; // required + public TGetResultSetMetadataResp success; // 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 { @@ -14981,8 +13736,9 @@ public TGetResultSetMetadataResp getSuccess() { return this.success; } - public void setSuccess(TGetResultSetMetadataResp success) { + public GetResultSetMetadata_result setSuccess(TGetResultSetMetadataResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -15062,30 +13818,23 @@ public boolean equals(GetResultSetMetadata_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetResultSetMetadata_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetResultSetMetadata_result typedOther = (GetResultSetMetadata_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -15178,6 +13927,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetResultSetMetadat iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -15231,7 +13982,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata } - public static class FetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class FetchResults_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FetchResults_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -15242,7 +13993,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetResultSetMetadata schemes.put(TupleScheme.class, new FetchResults_argsTupleSchemeFactory()); } - private TFetchResultsReq req; // required + public TFetchResultsReq req; // 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 { @@ -15344,8 +14095,9 @@ public TFetchResultsReq getReq() { return this.req; } - public void setReq(TFetchResultsReq req) { + public FetchResults_args setReq(TFetchResultsReq req) { this.req = req; + return this; } public void unsetReq() { @@ -15425,30 +14177,23 @@ public boolean equals(FetchResults_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(FetchResults_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + FetchResults_args typedOther = (FetchResults_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -15541,6 +14286,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, FetchResults_args s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -15594,7 +14341,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_args st } - public static class FetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class FetchResults_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FetchResults_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -15605,7 +14352,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_args st schemes.put(TupleScheme.class, new FetchResults_resultTupleSchemeFactory()); } - private TFetchResultsResp success; // required + public TFetchResultsResp success; // 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 { @@ -15707,8 +14454,9 @@ public TFetchResultsResp getSuccess() { return this.success; } - public void setSuccess(TFetchResultsResp success) { + public FetchResults_result setSuccess(TFetchResultsResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -15788,30 +14536,23 @@ public boolean equals(FetchResults_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(FetchResults_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + FetchResults_result typedOther = (FetchResults_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -15904,6 +14645,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, FetchResults_result iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -15957,7 +14700,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_result } - public static class GetDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetDelegationToken_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -15968,7 +14711,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, FetchResults_result schemes.put(TupleScheme.class, new GetDelegationToken_argsTupleSchemeFactory()); } - private TGetDelegationTokenReq req; // required + public TGetDelegationTokenReq req; // 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 { @@ -16070,8 +14813,9 @@ public TGetDelegationTokenReq getReq() { return this.req; } - public void setReq(TGetDelegationTokenReq req) { + public GetDelegationToken_args setReq(TGetDelegationTokenReq req) { this.req = req; + return this; } public void unsetReq() { @@ -16151,30 +14895,23 @@ public boolean equals(GetDelegationToken_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetDelegationToken_args typedOther = (GetDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -16267,6 +15004,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetDelegationToken_ iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -16320,7 +15059,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_a } - public static class GetDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class GetDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GetDelegationToken_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -16331,7 +15070,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_a schemes.put(TupleScheme.class, new GetDelegationToken_resultTupleSchemeFactory()); } - private TGetDelegationTokenResp success; // required + public TGetDelegationTokenResp success; // 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 { @@ -16433,8 +15172,9 @@ public TGetDelegationTokenResp getSuccess() { return this.success; } - public void setSuccess(TGetDelegationTokenResp success) { + public GetDelegationToken_result setSuccess(TGetDelegationTokenResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -16514,30 +15254,23 @@ public boolean equals(GetDelegationToken_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(GetDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + GetDelegationToken_result typedOther = (GetDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -16630,6 +15363,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, GetDelegationToken_ iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -16683,7 +15418,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_r } - public static class CancelDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CancelDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelDelegationToken_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -16694,7 +15429,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, GetDelegationToken_r schemes.put(TupleScheme.class, new CancelDelegationToken_argsTupleSchemeFactory()); } - private TCancelDelegationTokenReq req; // required + public TCancelDelegationTokenReq req; // 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 { @@ -16796,8 +15531,9 @@ public TCancelDelegationTokenReq getReq() { return this.req; } - public void setReq(TCancelDelegationTokenReq req) { + public CancelDelegationToken_args setReq(TCancelDelegationTokenReq req) { this.req = req; + return this; } public void unsetReq() { @@ -16877,30 +15613,23 @@ public boolean equals(CancelDelegationToken_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CancelDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CancelDelegationToken_args typedOther = (CancelDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -16993,6 +15722,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CancelDelegationTok iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -17046,7 +15777,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke } - public static class CancelDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class CancelDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("CancelDelegationToken_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -17057,7 +15788,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke schemes.put(TupleScheme.class, new CancelDelegationToken_resultTupleSchemeFactory()); } - private TCancelDelegationTokenResp success; // required + public TCancelDelegationTokenResp success; // 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 { @@ -17159,8 +15890,9 @@ public TCancelDelegationTokenResp getSuccess() { return this.success; } - public void setSuccess(TCancelDelegationTokenResp success) { + public CancelDelegationToken_result setSuccess(TCancelDelegationTokenResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -17240,30 +15972,23 @@ public boolean equals(CancelDelegationToken_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(CancelDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + CancelDelegationToken_result typedOther = (CancelDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -17356,6 +16081,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, CancelDelegationTok iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -17409,7 +16136,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke } - public static class RenewDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class RenewDelegationToken_args implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RenewDelegationToken_args"); private static final org.apache.thrift.protocol.TField REQ_FIELD_DESC = new org.apache.thrift.protocol.TField("req", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -17420,7 +16147,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, CancelDelegationToke schemes.put(TupleScheme.class, new RenewDelegationToken_argsTupleSchemeFactory()); } - private TRenewDelegationTokenReq req; // required + public TRenewDelegationTokenReq req; // 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 { @@ -17522,8 +16249,9 @@ public TRenewDelegationTokenReq getReq() { return this.req; } - public void setReq(TRenewDelegationTokenReq req) { + public RenewDelegationToken_args setReq(TRenewDelegationTokenReq req) { this.req = req; + return this; } public void unsetReq() { @@ -17603,30 +16331,23 @@ public boolean equals(RenewDelegationToken_args that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_req = true && (isSetReq()); - list.add(present_req); - if (present_req) - list.add(req); - - return list.hashCode(); + return 0; } - @Override public int compareTo(RenewDelegationToken_args other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + RenewDelegationToken_args typedOther = (RenewDelegationToken_args)other; - lastComparison = Boolean.valueOf(isSetReq()).compareTo(other.isSetReq()); + lastComparison = Boolean.valueOf(isSetReq()).compareTo(typedOther.isSetReq()); if (lastComparison != 0) { return lastComparison; } if (isSetReq()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, other.req); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.req, typedOther.req); if (lastComparison != 0) { return lastComparison; } @@ -17719,6 +16440,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, RenewDelegationToke iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -17772,7 +16495,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, RenewDelegationToken } - public static class RenewDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { + public static class RenewDelegationToken_result implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("RenewDelegationToken_result"); private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0); @@ -17783,7 +16506,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, RenewDelegationToken schemes.put(TupleScheme.class, new RenewDelegationToken_resultTupleSchemeFactory()); } - private TRenewDelegationTokenResp success; // required + public TRenewDelegationTokenResp success; // 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 { @@ -17885,8 +16608,9 @@ public TRenewDelegationTokenResp getSuccess() { return this.success; } - public void setSuccess(TRenewDelegationTokenResp success) { + public RenewDelegationToken_result setSuccess(TRenewDelegationTokenResp success) { this.success = success; + return this; } public void unsetSuccess() { @@ -17966,30 +16690,23 @@ public boolean equals(RenewDelegationToken_result that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_success = true && (isSetSuccess()); - list.add(present_success); - if (present_success) - list.add(success); - - return list.hashCode(); + return 0; } - @Override public int compareTo(RenewDelegationToken_result other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + RenewDelegationToken_result typedOther = (RenewDelegationToken_result)other; - lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess()); + lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess()); if (lastComparison != 0) { return lastComparison; } if (isSetSuccess()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success); if (lastComparison != 0) { return lastComparison; } @@ -18082,6 +16799,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, RenewDelegationToke iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java index 930bed7..d257417 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCLIServiceConstants.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TCLIServiceConstants { public static final Set PRIMITIVE_TYPES = new HashSet(); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java index a7d4e7d..447b2a1 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCancelDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCancelDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelDelegationTokenReq"); 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)1); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TCancelDelegationTokenReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String delegationToken; // required + public TSessionHandle sessionHandle; // required + public String delegationToken; // 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 { @@ -161,8 +156,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TCancelDelegationTokenReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -184,8 +180,9 @@ public String getDelegationToken() { return this.delegationToken; } - public void setDelegationToken(String delegationToken) { + public TCancelDelegationTokenReq setDelegationToken(String delegationToken) { this.delegationToken = delegationToken; + return this; } public void unsetDelegationToken() { @@ -287,45 +284,33 @@ public boolean equals(TCancelDelegationTokenReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_delegationToken = true && (isSetDelegationToken()); - list.add(present_delegationToken); - if (present_delegationToken) - list.add(delegationToken); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCancelDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCancelDelegationTokenReq typedOther = (TCancelDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); if (lastComparison != 0) { return lastComparison; } @@ -371,14 +356,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetDelegationToken()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'delegationToken' is unset! Struct:" + toString()); + if (delegationToken == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'delegationToken' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -442,6 +425,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelDelegationTo iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java index 611e92c..d1f04aa 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelDelegationTokenResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCancelDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCancelDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelDelegationTokenResp"); 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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCancelDelegationTokenRespTupleSchemeFactory()); } - private TStatus status; // required + public TStatus status; // 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 { @@ -148,8 +143,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TCancelDelegationTokenResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -229,30 +225,23 @@ public boolean equals(TCancelDelegationTokenResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCancelDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCancelDelegationTokenResp typedOther = (TCancelDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelDelegationTo iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java index 4076c57..54718a2 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCancelOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelOperationReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCancelOperationReqTupleSchemeFactory()); } - private TOperationHandle operationHandle; // required + public TOperationHandle operationHandle; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -148,8 +143,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TCancelOperationReq setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -229,30 +225,23 @@ public boolean equals(TCancelOperationReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCancelOperationReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCancelOperationReq typedOther = (TCancelOperationReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetOperationHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); + if (operationHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelOperationReq iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java index 7bcc765..718b35e 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCancelOperationResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCancelOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCancelOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCancelOperationResp"); 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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCancelOperationRespTupleSchemeFactory()); } - private TStatus status; // required + public TStatus status; // 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 { @@ -148,8 +143,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TCancelOperationResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -229,30 +225,23 @@ public boolean equals(TCancelOperationResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCancelOperationResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCancelOperationResp typedOther = (TCancelOperationResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCancelOperationRes iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java index 47a6b83..914f719 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCloseOperationReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseOperationReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCloseOperationReqTupleSchemeFactory()); } - private TOperationHandle operationHandle; // required + public TOperationHandle operationHandle; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -148,8 +143,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TCloseOperationReq setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -229,30 +225,23 @@ public boolean equals(TCloseOperationReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCloseOperationReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCloseOperationReq typedOther = (TCloseOperationReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetOperationHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); + if (operationHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCloseOperationReq iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java index 0860a2b..44b67df 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseOperationResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCloseOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCloseOperationResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseOperationResp"); 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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCloseOperationRespTupleSchemeFactory()); } - private TStatus status; // required + public TStatus status; // 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 { @@ -148,8 +143,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TCloseOperationResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -229,30 +225,23 @@ public boolean equals(TCloseOperationResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCloseOperationResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCloseOperationResp typedOther = (TCloseOperationResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCloseOperationResp iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java index 43ee87f..80f4eff 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCloseSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseSessionReq"); 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)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCloseSessionReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required + public TSessionHandle sessionHandle; // 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 { @@ -148,8 +143,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TCloseSessionReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -229,30 +225,23 @@ public boolean equals(TCloseSessionReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCloseSessionReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCloseSessionReq typedOther = (TCloseSessionReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCloseSessionReq st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java index 38f82ac..91bf7b5 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TCloseSessionResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TCloseSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TCloseSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TCloseSessionResp"); 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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TCloseSessionRespTupleSchemeFactory()); } - private TStatus status; // required + public TStatus status; // 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 { @@ -148,8 +143,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TCloseSessionResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -229,30 +225,23 @@ public boolean equals(TCloseSessionResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TCloseSessionResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TCloseSessionResp typedOther = (TCloseSessionResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TCloseSessionResp s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java index 3c09c6b..6d2d756 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TColumn extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumn"); private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -348,7 +344,6 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @@ -699,22 +694,14 @@ public int compareTo(TColumn other) { } + /** + * If you'd like this to perform more respectably, use the hashcode generator option. + */ @Override public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); + return 0; } + 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))); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java index 31472c8..badbc6a 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnDesc.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TColumnDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TColumnDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnDesc"); private static final org.apache.thrift.protocol.TField COLUMN_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("columnName", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -49,10 +44,10 @@ schemes.put(TupleScheme.class, new TColumnDescTupleSchemeFactory()); } - private String columnName; // required - private TTypeDesc typeDesc; // required - private int position; // required - private String comment; // optional + public String columnName; // required + public TTypeDesc typeDesc; // required + public int position; // required + public String comment; // 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 { @@ -124,7 +119,7 @@ public String getFieldName() { // isset id assignments private static final int __POSITION_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.COMMENT}; + private _Fields optionals[] = {_Fields.COMMENT}; 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); @@ -189,8 +184,9 @@ public String getColumnName() { return this.columnName; } - public void setColumnName(String columnName) { + public TColumnDesc setColumnName(String columnName) { this.columnName = columnName; + return this; } public void unsetColumnName() { @@ -212,8 +208,9 @@ public TTypeDesc getTypeDesc() { return this.typeDesc; } - public void setTypeDesc(TTypeDesc typeDesc) { + public TColumnDesc setTypeDesc(TTypeDesc typeDesc) { this.typeDesc = typeDesc; + return this; } public void unsetTypeDesc() { @@ -235,9 +232,10 @@ public int getPosition() { return this.position; } - public void setPosition(int position) { + public TColumnDesc setPosition(int position) { this.position = position; setPositionIsSet(true); + return this; } public void unsetPosition() { @@ -257,8 +255,9 @@ public String getComment() { return this.comment; } - public void setComment(String comment) { + public TColumnDesc setComment(String comment) { this.comment = comment; + return this; } public void unsetComment() { @@ -322,7 +321,7 @@ public Object getFieldValue(_Fields field) { return getTypeDesc(); case POSITION: - return getPosition(); + return Integer.valueOf(getPosition()); case COMMENT: return getComment(); @@ -404,75 +403,53 @@ public boolean equals(TColumnDesc that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_columnName = true && (isSetColumnName()); - list.add(present_columnName); - if (present_columnName) - list.add(columnName); - - boolean present_typeDesc = true && (isSetTypeDesc()); - list.add(present_typeDesc); - if (present_typeDesc) - list.add(typeDesc); - - boolean present_position = true; - list.add(present_position); - if (present_position) - list.add(position); - - boolean present_comment = true && (isSetComment()); - list.add(present_comment); - if (present_comment) - list.add(comment); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TColumnDesc other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TColumnDesc typedOther = (TColumnDesc)other; - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTypeDesc()).compareTo(other.isSetTypeDesc()); + lastComparison = Boolean.valueOf(isSetTypeDesc()).compareTo(typedOther.isSetTypeDesc()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeDesc()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeDesc, other.typeDesc); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeDesc, typedOther.typeDesc); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPosition()).compareTo(other.isSetPosition()); + lastComparison = Boolean.valueOf(isSetPosition()).compareTo(typedOther.isSetPosition()); if (lastComparison != 0) { return lastComparison; } if (isSetPosition()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, other.position); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.position, typedOther.position); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetComment()).compareTo(other.isSetComment()); + lastComparison = Boolean.valueOf(isSetComment()).compareTo(typedOther.isSetComment()); if (lastComparison != 0) { return lastComparison; } if (isSetComment()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, other.comment); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.comment, typedOther.comment); if (lastComparison != 0) { return lastComparison; } @@ -532,18 +509,13 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetColumnName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnName' is unset! Struct:" + toString()); + if (columnName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'columnName' was not present! Struct: " + toString()); } - - if (!isSetTypeDesc()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeDesc' is unset! Struct:" + toString()); - } - - if (!isSetPosition()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'position' is unset! Struct:" + toString()); + if (typeDesc == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeDesc' was not present! Struct: " + toString()); } - + // alas, we cannot check 'position' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (typeDesc != null) { typeDesc.validate(); @@ -625,6 +597,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TColumnDesc struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetPosition()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'position' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java index be99ce0..f060015 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TColumnValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TColumnValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TColumnValue"); private static final org.apache.thrift.protocol.TField BOOL_VAL_FIELD_DESC = new org.apache.thrift.protocol.TField("boolVal", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -321,7 +317,6 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @@ -638,22 +633,14 @@ public int compareTo(TColumnValue other) { } + /** + * If you'd like this to perform more respectably, use the hashcode generator option. + */ @Override public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); + return 0; } + 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))); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java index f93c9b4..a2e9f3f 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TDoubleColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TDoubleColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDoubleColumn"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TDoubleColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TDoubleColumn( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TDoubleColumn( */ public TDoubleColumn(TDoubleColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (Double 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(double elem) { return this.values; } - public void setValues(List values) { + public TDoubleColumn setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TDoubleColumn setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TDoubleColumn setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TDoubleColumn that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TDoubleColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TDoubleColumn typedOther = (TDoubleColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TDoubleColumn struc { org.apache.thrift.protocol.TList _list94 = iprot.readListBegin(); struct.values = new ArrayList(_list94.size); - double _elem95; - for (int _i96 = 0; _i96 < _list94.size; ++_i96) + for (int _i95 = 0; _i95 < _list94.size; ++_i95) { - _elem95 = iprot.readDouble(); - struct.values.add(_elem95); + double _elem96; // required + _elem96 = iprot.readDouble(); + struct.values.add(_elem96); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TDoubleColumn struc iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TDoubleColumn struct { org.apache.thrift.protocol.TList _list99 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); struct.values = new ArrayList(_list99.size); - double _elem100; - for (int _i101 = 0; _i101 < _list99.size; ++_i101) + for (int _i100 = 0; _i100 < _list99.size; ++_i100) { - _elem100 = iprot.readDouble(); - struct.values.add(_elem100); + double _elem101; // required + _elem101 = iprot.readDouble(); + struct.values.add(_elem101); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java index 5700355..4483eb9 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TDoubleValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TDoubleValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TDoubleValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TDoubleValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.DOUBLE, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TDoubleValueTupleSchemeFactory()); } - private double value; // optional + public double 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public double getValue() { return this.value; } - public void setValue(double value) { + public TDoubleValue setValue(double value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return getValue(); + return Double.valueOf(getValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TDoubleValue that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TDoubleValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TDoubleValue typedOther = (TDoubleValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TDoubleValue struct iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java index 1f73cec..5afd54b 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TExecuteStatementReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExecuteStatementReq"); 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)1); @@ -50,11 +45,11 @@ schemes.put(TupleScheme.class, new TExecuteStatementReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String statement; // required - private Map confOverlay; // optional - private boolean runAsync; // optional - private long queryTimeout; // optional + public TSessionHandle sessionHandle; // required + public String statement; // required + public Map confOverlay; // optional + public boolean runAsync; // optional + public long queryTimeout; // 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 { @@ -130,7 +125,7 @@ public String getFieldName() { private static final int __RUNASYNC_ISSET_ID = 0; private static final int __QUERYTIMEOUT_ISSET_ID = 1; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.CONF_OVERLAY,_Fields.RUN_ASYNC,_Fields.QUERY_TIMEOUT}; + private _Fields optionals[] = {_Fields.CONF_OVERLAY,_Fields.RUN_ASYNC,_Fields.QUERY_TIMEOUT}; 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); @@ -178,7 +173,18 @@ public TExecuteStatementReq(TExecuteStatementReq other) { this.statement = other.statement; } if (other.isSetConfOverlay()) { - Map __this__confOverlay = new HashMap(other.confOverlay); + Map __this__confOverlay = new HashMap(); + for (Map.Entry other_element : other.confOverlay.entrySet()) { + + String other_element_key = other_element.getKey(); + String other_element_value = other_element.getValue(); + + String __this__confOverlay_copy_key = other_element_key; + + String __this__confOverlay_copy_value = other_element_value; + + __this__confOverlay.put(__this__confOverlay_copy_key, __this__confOverlay_copy_value); + } this.confOverlay = __this__confOverlay; } this.runAsync = other.runAsync; @@ -204,8 +210,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TExecuteStatementReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -227,8 +234,9 @@ public String getStatement() { return this.statement; } - public void setStatement(String statement) { + public TExecuteStatementReq setStatement(String statement) { this.statement = statement; + return this; } public void unsetStatement() { @@ -261,8 +269,9 @@ public void putToConfOverlay(String key, String val) { return this.confOverlay; } - public void setConfOverlay(Map confOverlay) { + public TExecuteStatementReq setConfOverlay(Map confOverlay) { this.confOverlay = confOverlay; + return this; } public void unsetConfOverlay() { @@ -284,9 +293,10 @@ public boolean isRunAsync() { return this.runAsync; } - public void setRunAsync(boolean runAsync) { + public TExecuteStatementReq setRunAsync(boolean runAsync) { this.runAsync = runAsync; setRunAsyncIsSet(true); + return this; } public void unsetRunAsync() { @@ -306,9 +316,10 @@ public long getQueryTimeout() { return this.queryTimeout; } - public void setQueryTimeout(long queryTimeout) { + public TExecuteStatementReq setQueryTimeout(long queryTimeout) { this.queryTimeout = queryTimeout; setQueryTimeoutIsSet(true); + return this; } public void unsetQueryTimeout() { @@ -381,10 +392,10 @@ public Object getFieldValue(_Fields field) { return getConfOverlay(); case RUN_ASYNC: - return isRunAsync(); + return Boolean.valueOf(isRunAsync()); case QUERY_TIMEOUT: - return getQueryTimeout(); + return Long.valueOf(getQueryTimeout()); } throw new IllegalStateException(); @@ -474,90 +485,63 @@ public boolean equals(TExecuteStatementReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_statement = true && (isSetStatement()); - list.add(present_statement); - if (present_statement) - list.add(statement); - - boolean present_confOverlay = true && (isSetConfOverlay()); - list.add(present_confOverlay); - if (present_confOverlay) - list.add(confOverlay); - - boolean present_runAsync = true && (isSetRunAsync()); - list.add(present_runAsync); - if (present_runAsync) - list.add(runAsync); - - boolean present_queryTimeout = true && (isSetQueryTimeout()); - list.add(present_queryTimeout); - if (present_queryTimeout) - list.add(queryTimeout); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TExecuteStatementReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TExecuteStatementReq typedOther = (TExecuteStatementReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetStatement()).compareTo(other.isSetStatement()); + lastComparison = Boolean.valueOf(isSetStatement()).compareTo(typedOther.isSetStatement()); if (lastComparison != 0) { return lastComparison; } if (isSetStatement()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, other.statement); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statement, typedOther.statement); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfOverlay()).compareTo(other.isSetConfOverlay()); + lastComparison = Boolean.valueOf(isSetConfOverlay()).compareTo(typedOther.isSetConfOverlay()); if (lastComparison != 0) { return lastComparison; } if (isSetConfOverlay()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.confOverlay, other.confOverlay); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.confOverlay, typedOther.confOverlay); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRunAsync()).compareTo(other.isSetRunAsync()); + lastComparison = Boolean.valueOf(isSetRunAsync()).compareTo(typedOther.isSetRunAsync()); if (lastComparison != 0) { return lastComparison; } if (isSetRunAsync()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAsync, other.runAsync); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.runAsync, typedOther.runAsync); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetQueryTimeout()).compareTo(other.isSetQueryTimeout()); + lastComparison = Boolean.valueOf(isSetQueryTimeout()).compareTo(typedOther.isSetQueryTimeout()); if (lastComparison != 0) { return lastComparison; } if (isSetQueryTimeout()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryTimeout, other.queryTimeout); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.queryTimeout, typedOther.queryTimeout); if (lastComparison != 0) { return lastComparison; } @@ -625,14 +609,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetStatement()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' is unset! Struct:" + toString()); + if (statement == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statement' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -697,13 +679,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementRe { org.apache.thrift.protocol.TMap _map162 = iprot.readMapBegin(); struct.confOverlay = new HashMap(2*_map162.size); - String _key163; - String _val164; - for (int _i165 = 0; _i165 < _map162.size; ++_i165) + for (int _i163 = 0; _i163 < _map162.size; ++_i163) { - _key163 = iprot.readString(); - _val164 = iprot.readString(); - struct.confOverlay.put(_key163, _val164); + String _key164; // required + String _val165; // required + _key164 = iprot.readString(); + _val165 = iprot.readString(); + struct.confOverlay.put(_key164, _val165); } iprot.readMapEnd(); } @@ -734,6 +716,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementRe iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -837,13 +821,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TExecuteStatementReq { org.apache.thrift.protocol.TMap _map168 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.confOverlay = new HashMap(2*_map168.size); - String _key169; - String _val170; - for (int _i171 = 0; _i171 < _map168.size; ++_i171) + for (int _i169 = 0; _i169 < _map168.size; ++_i169) { - _key169 = iprot.readString(); - _val170 = iprot.readString(); - struct.confOverlay.put(_key169, _val170); + String _key170; // required + String _val171; // required + _key170 = iprot.readString(); + _val171 = iprot.readString(); + struct.confOverlay.put(_key170, _val171); } } struct.setConfOverlayIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java index 7101fa5..0cde244 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TExecuteStatementResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TExecuteStatementResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TExecuteStatementResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TExecuteStatementRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TExecuteStatementResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TExecuteStatementResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TExecuteStatementResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TExecuteStatementResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TExecuteStatementResp typedOther = (TExecuteStatementResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TExecuteStatementRe iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java index 159be45..93de478 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchOrientation.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java index 2c93339..12d6ff4 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TFetchResultsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFetchResultsReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -49,10 +44,14 @@ schemes.put(TupleScheme.class, new TFetchResultsReqTupleSchemeFactory()); } - private TOperationHandle operationHandle; // required - private TFetchOrientation orientation; // required - private long maxRows; // required - private short fetchType; // optional + public TOperationHandle operationHandle; // required + /** + * + * @see TFetchOrientation + */ + public TFetchOrientation orientation; // required + public long maxRows; // required + public short fetchType; // 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 { @@ -129,7 +128,7 @@ public String getFieldName() { private static final int __MAXROWS_ISSET_ID = 0; private static final int __FETCHTYPE_ISSET_ID = 1; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.FETCH_TYPE}; + private _Fields optionals[] = {_Fields.FETCH_TYPE}; 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); @@ -198,8 +197,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TFetchResultsReq setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -229,8 +229,9 @@ public TFetchOrientation getOrientation() { * * @see TFetchOrientation */ - public void setOrientation(TFetchOrientation orientation) { + public TFetchResultsReq setOrientation(TFetchOrientation orientation) { this.orientation = orientation; + return this; } public void unsetOrientation() { @@ -252,9 +253,10 @@ public long getMaxRows() { return this.maxRows; } - public void setMaxRows(long maxRows) { + public TFetchResultsReq setMaxRows(long maxRows) { this.maxRows = maxRows; setMaxRowsIsSet(true); + return this; } public void unsetMaxRows() { @@ -274,9 +276,10 @@ public short getFetchType() { return this.fetchType; } - public void setFetchType(short fetchType) { + public TFetchResultsReq setFetchType(short fetchType) { this.fetchType = fetchType; setFetchTypeIsSet(true); + return this; } public void unsetFetchType() { @@ -338,10 +341,10 @@ public Object getFieldValue(_Fields field) { return getOrientation(); case MAX_ROWS: - return getMaxRows(); + return Long.valueOf(getMaxRows()); case FETCH_TYPE: - return getFetchType(); + return Short.valueOf(getFetchType()); } throw new IllegalStateException(); @@ -420,75 +423,53 @@ public boolean equals(TFetchResultsReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - boolean present_orientation = true && (isSetOrientation()); - list.add(present_orientation); - if (present_orientation) - list.add(orientation.getValue()); - - boolean present_maxRows = true; - list.add(present_maxRows); - if (present_maxRows) - list.add(maxRows); - - boolean present_fetchType = true && (isSetFetchType()); - list.add(present_fetchType); - if (present_fetchType) - list.add(fetchType); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TFetchResultsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TFetchResultsReq typedOther = (TFetchResultsReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOrientation()).compareTo(other.isSetOrientation()); + lastComparison = Boolean.valueOf(isSetOrientation()).compareTo(typedOther.isSetOrientation()); if (lastComparison != 0) { return lastComparison; } if (isSetOrientation()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientation, other.orientation); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orientation, typedOther.orientation); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetMaxRows()).compareTo(other.isSetMaxRows()); + lastComparison = Boolean.valueOf(isSetMaxRows()).compareTo(typedOther.isSetMaxRows()); if (lastComparison != 0) { return lastComparison; } if (isSetMaxRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRows, other.maxRows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.maxRows, typedOther.maxRows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFetchType()).compareTo(other.isSetFetchType()); + lastComparison = Boolean.valueOf(isSetFetchType()).compareTo(typedOther.isSetFetchType()); if (lastComparison != 0) { return lastComparison; } if (isSetFetchType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchType, other.fetchType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fetchType, typedOther.fetchType); if (lastComparison != 0) { return lastComparison; } @@ -544,18 +525,13 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetOperationHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); - } - - if (!isSetOrientation()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'orientation' is unset! Struct:" + toString()); + if (operationHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' was not present! Struct: " + toString()); } - - if (!isSetMaxRows()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxRows' is unset! Struct:" + toString()); + if (orientation == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'orientation' was not present! Struct: " + toString()); } - + // alas, we cannot check 'maxRows' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); @@ -609,7 +585,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsReq st break; case 2: // ORIENTATION if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.findByValue(iprot.readI32()); + struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -637,6 +613,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsReq st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetMaxRows()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'maxRows' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } @@ -698,7 +679,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TFetchResultsReq str struct.operationHandle = new TOperationHandle(); struct.operationHandle.read(iprot); struct.setOperationHandleIsSet(true); - struct.orientation = org.apache.hive.service.rpc.thrift.TFetchOrientation.findByValue(iprot.readI32()); + struct.orientation = TFetchOrientation.findByValue(iprot.readI32()); struct.setOrientationIsSet(true); struct.maxRows = iprot.readI64(); struct.setMaxRowsIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java index 8f86cee..42ce1cf 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TFetchResultsResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TFetchResultsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TFetchResultsResp"); 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); @@ -48,9 +43,9 @@ schemes.put(TupleScheme.class, new TFetchResultsRespTupleSchemeFactory()); } - private TStatus status; // required - private boolean hasMoreRows; // optional - private TRowSet results; // optional + public TStatus status; // required + public boolean hasMoreRows; // optional + public TRowSet results; // 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 { @@ -119,7 +114,7 @@ public String getFieldName() { // isset id assignments private static final int __HASMOREROWS_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.HAS_MORE_ROWS,_Fields.RESULTS}; + private _Fields optionals[] = {_Fields.HAS_MORE_ROWS,_Fields.RESULTS}; 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); @@ -173,8 +168,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TFetchResultsResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -196,9 +192,10 @@ public boolean isHasMoreRows() { return this.hasMoreRows; } - public void setHasMoreRows(boolean hasMoreRows) { + public TFetchResultsResp setHasMoreRows(boolean hasMoreRows) { this.hasMoreRows = hasMoreRows; setHasMoreRowsIsSet(true); + return this; } public void unsetHasMoreRows() { @@ -218,8 +215,9 @@ public TRowSet getResults() { return this.results; } - public void setResults(TRowSet results) { + public TFetchResultsResp setResults(TRowSet results) { this.results = results; + return this; } public void unsetResults() { @@ -272,7 +270,7 @@ public Object getFieldValue(_Fields field) { return getStatus(); case HAS_MORE_ROWS: - return isHasMoreRows(); + return Boolean.valueOf(isHasMoreRows()); case RESULTS: return getResults(); @@ -343,60 +341,43 @@ public boolean equals(TFetchResultsResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_hasMoreRows = true && (isSetHasMoreRows()); - list.add(present_hasMoreRows); - if (present_hasMoreRows) - list.add(hasMoreRows); - - boolean present_results = true && (isSetResults()); - list.add(present_results); - if (present_results) - list.add(results); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TFetchResultsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TFetchResultsResp typedOther = (TFetchResultsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHasMoreRows()).compareTo(other.isSetHasMoreRows()); + lastComparison = Boolean.valueOf(isSetHasMoreRows()).compareTo(typedOther.isSetHasMoreRows()); if (lastComparison != 0) { return lastComparison; } if (isSetHasMoreRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasMoreRows, other.hasMoreRows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasMoreRows, typedOther.hasMoreRows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetResults()).compareTo(other.isSetResults()); + lastComparison = Boolean.valueOf(isSetResults()).compareTo(typedOther.isSetResults()); if (lastComparison != 0) { return lastComparison; } if (isSetResults()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.results, other.results); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.results, typedOther.results); if (lastComparison != 0) { return lastComparison; } @@ -450,10 +431,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -531,6 +511,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TFetchResultsResp s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java index b8a2ca6..32cd3ef 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetCatalogsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetCatalogsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCatalogsReq"); 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)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TGetCatalogsReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required + public TSessionHandle sessionHandle; // 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 { @@ -148,8 +143,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetCatalogsReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -229,30 +225,23 @@ public boolean equals(TGetCatalogsReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetCatalogsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetCatalogsReq typedOther = (TGetCatalogsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCatalogsReq str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java index eeeac9a..98ef31e 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCatalogsResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetCatalogsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetCatalogsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCatalogsResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetCatalogsRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetCatalogsResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetCatalogsResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetCatalogsResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetCatalogsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetCatalogsResp typedOther = (TGetCatalogsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCatalogsResp st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java index ba80279..aa073c3 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetColumnsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetColumnsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetColumnsReq"); 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)1); @@ -50,11 +45,11 @@ schemes.put(TupleScheme.class, new TGetColumnsReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String catalogName; // optional - private String schemaName; // optional - private String tableName; // optional - private String columnName; // optional + public TSessionHandle sessionHandle; // required + public String catalogName; // optional + public String schemaName; // optional + public String tableName; // optional + public String columnName; // 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 { @@ -127,7 +122,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.COLUMN_NAME}; + private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.COLUMN_NAME}; 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); @@ -193,8 +188,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetColumnsReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -216,8 +212,9 @@ public String getCatalogName() { return this.catalogName; } - public void setCatalogName(String catalogName) { + public TGetColumnsReq setCatalogName(String catalogName) { this.catalogName = catalogName; + return this; } public void unsetCatalogName() { @@ -239,8 +236,9 @@ public String getSchemaName() { return this.schemaName; } - public void setSchemaName(String schemaName) { + public TGetColumnsReq setSchemaName(String schemaName) { this.schemaName = schemaName; + return this; } public void unsetSchemaName() { @@ -262,8 +260,9 @@ public String getTableName() { return this.tableName; } - public void setTableName(String tableName) { + public TGetColumnsReq setTableName(String tableName) { this.tableName = tableName; + return this; } public void unsetTableName() { @@ -285,8 +284,9 @@ public String getColumnName() { return this.columnName; } - public void setColumnName(String columnName) { + public TGetColumnsReq setColumnName(String columnName) { this.columnName = columnName; + return this; } public void unsetColumnName() { @@ -454,90 +454,63 @@ public boolean equals(TGetColumnsReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_catalogName = true && (isSetCatalogName()); - list.add(present_catalogName); - if (present_catalogName) - list.add(catalogName); - - boolean present_schemaName = true && (isSetSchemaName()); - list.add(present_schemaName); - if (present_schemaName) - list.add(schemaName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_columnName = true && (isSetColumnName()); - list.add(present_columnName); - if (present_columnName) - list.add(columnName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetColumnsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetColumnsReq typedOther = (TGetColumnsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(other.isSetColumnName()); + lastComparison = Boolean.valueOf(isSetColumnName()).compareTo(typedOther.isSetColumnName()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, other.columnName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnName, typedOther.columnName); if (lastComparison != 0) { return lastComparison; } @@ -615,10 +588,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -706,6 +678,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetColumnsReq stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java index c68aac9..94163ab 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetColumnsResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetColumnsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetColumnsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetColumnsResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetColumnsRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetColumnsResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetColumnsResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetColumnsResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetColumnsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetColumnsResp typedOther = (TGetColumnsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetColumnsResp str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java index 9729570..b1b4f7a 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetCrossReferenceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetCrossReferenceReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCrossReferenceReq"); 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)1); @@ -52,13 +47,13 @@ schemes.put(TupleScheme.class, new TGetCrossReferenceReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String parentCatalogName; // optional - private String parentSchemaName; // optional - private String parentTableName; // optional - private String foreignCatalogName; // optional - private String foreignSchemaName; // optional - private String foreignTableName; // optional + public TSessionHandle sessionHandle; // required + public String parentCatalogName; // optional + public String parentSchemaName; // optional + public String parentTableName; // optional + public String foreignCatalogName; // optional + public String foreignSchemaName; // optional + public String foreignTableName; // 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 { @@ -137,7 +132,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.PARENT_CATALOG_NAME,_Fields.PARENT_SCHEMA_NAME,_Fields.PARENT_TABLE_NAME,_Fields.FOREIGN_CATALOG_NAME,_Fields.FOREIGN_SCHEMA_NAME,_Fields.FOREIGN_TABLE_NAME}; + private _Fields optionals[] = {_Fields.PARENT_CATALOG_NAME,_Fields.PARENT_SCHEMA_NAME,_Fields.PARENT_TABLE_NAME,_Fields.FOREIGN_CATALOG_NAME,_Fields.FOREIGN_SCHEMA_NAME,_Fields.FOREIGN_TABLE_NAME}; 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); @@ -215,8 +210,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetCrossReferenceReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -238,8 +234,9 @@ public String getParentCatalogName() { return this.parentCatalogName; } - public void setParentCatalogName(String parentCatalogName) { + public TGetCrossReferenceReq setParentCatalogName(String parentCatalogName) { this.parentCatalogName = parentCatalogName; + return this; } public void unsetParentCatalogName() { @@ -261,8 +258,9 @@ public String getParentSchemaName() { return this.parentSchemaName; } - public void setParentSchemaName(String parentSchemaName) { + public TGetCrossReferenceReq setParentSchemaName(String parentSchemaName) { this.parentSchemaName = parentSchemaName; + return this; } public void unsetParentSchemaName() { @@ -284,8 +282,9 @@ public String getParentTableName() { return this.parentTableName; } - public void setParentTableName(String parentTableName) { + public TGetCrossReferenceReq setParentTableName(String parentTableName) { this.parentTableName = parentTableName; + return this; } public void unsetParentTableName() { @@ -307,8 +306,9 @@ public String getForeignCatalogName() { return this.foreignCatalogName; } - public void setForeignCatalogName(String foreignCatalogName) { + public TGetCrossReferenceReq setForeignCatalogName(String foreignCatalogName) { this.foreignCatalogName = foreignCatalogName; + return this; } public void unsetForeignCatalogName() { @@ -330,8 +330,9 @@ public String getForeignSchemaName() { return this.foreignSchemaName; } - public void setForeignSchemaName(String foreignSchemaName) { + public TGetCrossReferenceReq setForeignSchemaName(String foreignSchemaName) { this.foreignSchemaName = foreignSchemaName; + return this; } public void unsetForeignSchemaName() { @@ -353,8 +354,9 @@ public String getForeignTableName() { return this.foreignTableName; } - public void setForeignTableName(String foreignTableName) { + public TGetCrossReferenceReq setForeignTableName(String foreignTableName) { this.foreignTableName = foreignTableName; + return this; } public void unsetForeignTableName() { @@ -566,120 +568,83 @@ public boolean equals(TGetCrossReferenceReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_parentCatalogName = true && (isSetParentCatalogName()); - list.add(present_parentCatalogName); - if (present_parentCatalogName) - list.add(parentCatalogName); - - boolean present_parentSchemaName = true && (isSetParentSchemaName()); - list.add(present_parentSchemaName); - if (present_parentSchemaName) - list.add(parentSchemaName); - - boolean present_parentTableName = true && (isSetParentTableName()); - list.add(present_parentTableName); - if (present_parentTableName) - list.add(parentTableName); - - boolean present_foreignCatalogName = true && (isSetForeignCatalogName()); - list.add(present_foreignCatalogName); - if (present_foreignCatalogName) - list.add(foreignCatalogName); - - boolean present_foreignSchemaName = true && (isSetForeignSchemaName()); - list.add(present_foreignSchemaName); - if (present_foreignSchemaName) - list.add(foreignSchemaName); - - boolean present_foreignTableName = true && (isSetForeignTableName()); - list.add(present_foreignTableName); - if (present_foreignTableName) - list.add(foreignTableName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetCrossReferenceReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetCrossReferenceReq typedOther = (TGetCrossReferenceReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetParentCatalogName()).compareTo(other.isSetParentCatalogName()); + lastComparison = Boolean.valueOf(isSetParentCatalogName()).compareTo(typedOther.isSetParentCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetParentCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentCatalogName, other.parentCatalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentCatalogName, typedOther.parentCatalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetParentSchemaName()).compareTo(other.isSetParentSchemaName()); + lastComparison = Boolean.valueOf(isSetParentSchemaName()).compareTo(typedOther.isSetParentSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetParentSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSchemaName, other.parentSchemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSchemaName, typedOther.parentSchemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetParentTableName()).compareTo(other.isSetParentTableName()); + lastComparison = Boolean.valueOf(isSetParentTableName()).compareTo(typedOther.isSetParentTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetParentTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentTableName, other.parentTableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentTableName, typedOther.parentTableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetForeignCatalogName()).compareTo(other.isSetForeignCatalogName()); + lastComparison = Boolean.valueOf(isSetForeignCatalogName()).compareTo(typedOther.isSetForeignCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetForeignCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignCatalogName, other.foreignCatalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignCatalogName, typedOther.foreignCatalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetForeignSchemaName()).compareTo(other.isSetForeignSchemaName()); + lastComparison = Boolean.valueOf(isSetForeignSchemaName()).compareTo(typedOther.isSetForeignSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetForeignSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignSchemaName, other.foreignSchemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignSchemaName, typedOther.foreignSchemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetForeignTableName()).compareTo(other.isSetForeignTableName()); + lastComparison = Boolean.valueOf(isSetForeignTableName()).compareTo(typedOther.isSetForeignTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetForeignTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignTableName, other.foreignTableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.foreignTableName, typedOther.foreignTableName); if (lastComparison != 0) { return lastComparison; } @@ -777,10 +742,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -884,6 +848,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCrossReferenceR iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java index 1bfe6d1..5af14bd 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetCrossReferenceResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetCrossReferenceResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetCrossReferenceResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetCrossReferenceResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetCrossReferenceRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetCrossReferenceResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetCrossReferenceResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetCrossReferenceResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetCrossReferenceResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetCrossReferenceResp typedOther = (TGetCrossReferenceResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetCrossReferenceR iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java index e3e28c5..a5b5b9a 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetDelegationTokenReq"); 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)1); @@ -48,9 +43,9 @@ schemes.put(TupleScheme.class, new TGetDelegationTokenReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String owner; // required - private String renewer; // required + public TSessionHandle sessionHandle; // required + public String owner; // required + public String renewer; // 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 { @@ -174,8 +169,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetDelegationTokenReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -197,8 +193,9 @@ public String getOwner() { return this.owner; } - public void setOwner(String owner) { + public TGetDelegationTokenReq setOwner(String owner) { this.owner = owner; + return this; } public void unsetOwner() { @@ -220,8 +217,9 @@ public String getRenewer() { return this.renewer; } - public void setRenewer(String renewer) { + public TGetDelegationTokenReq setRenewer(String renewer) { this.renewer = renewer; + return this; } public void unsetRenewer() { @@ -345,60 +343,43 @@ public boolean equals(TGetDelegationTokenReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_owner = true && (isSetOwner()); - list.add(present_owner); - if (present_owner) - list.add(owner); - - boolean present_renewer = true && (isSetRenewer()); - list.add(present_renewer); - if (present_renewer) - list.add(renewer); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetDelegationTokenReq typedOther = (TGetDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner()); + lastComparison = Boolean.valueOf(isSetOwner()).compareTo(typedOther.isSetOwner()); if (lastComparison != 0) { return lastComparison; } if (isSetOwner()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, other.owner); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.owner, typedOther.owner); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRenewer()).compareTo(other.isSetRenewer()); + lastComparison = Boolean.valueOf(isSetRenewer()).compareTo(typedOther.isSetRenewer()); if (lastComparison != 0) { return lastComparison; } if (isSetRenewer()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer, other.renewer); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.renewer, typedOther.renewer); if (lastComparison != 0) { return lastComparison; } @@ -452,18 +433,15 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetOwner()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'owner' is unset! Struct:" + toString()); + if (owner == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'owner' was not present! Struct: " + toString()); } - - if (!isSetRenewer()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'renewer' is unset! Struct:" + toString()); + if (renewer == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'renewer' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -535,6 +513,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetDelegationToken iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java index 6ef2acb..fa9499b 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetDelegationTokenResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetDelegationTokenResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetDelegationTokenRespTupleSchemeFactory()); } - private TStatus status; // required - private String delegationToken; // optional + public TStatus status; // required + public String delegationToken; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.DELEGATION_TOKEN}; + private _Fields optionals[] = {_Fields.DELEGATION_TOKEN}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetDelegationTokenResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public String getDelegationToken() { return this.delegationToken; } - public void setDelegationToken(String delegationToken) { + public TGetDelegationTokenResp setDelegationToken(String delegationToken) { this.delegationToken = delegationToken; + return this; } public void unsetDelegationToken() { @@ -286,45 +283,33 @@ public boolean equals(TGetDelegationTokenResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_delegationToken = true && (isSetDelegationToken()); - list.add(present_delegationToken); - if (present_delegationToken) - list.add(delegationToken); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetDelegationTokenResp typedOther = (TGetDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -439,6 +423,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetDelegationToken iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java index ad4f8a5..78661ca 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetFunctionsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetFunctionsReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetFunctionsReq"); 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)1); @@ -49,10 +44,10 @@ schemes.put(TupleScheme.class, new TGetFunctionsReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String catalogName; // optional - private String schemaName; // optional - private String functionName; // required + public TSessionHandle sessionHandle; // required + public String catalogName; // optional + public String schemaName; // optional + public String functionName; // 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 { @@ -122,7 +117,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; + private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; 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); @@ -184,8 +179,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetFunctionsReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -207,8 +203,9 @@ public String getCatalogName() { return this.catalogName; } - public void setCatalogName(String catalogName) { + public TGetFunctionsReq setCatalogName(String catalogName) { this.catalogName = catalogName; + return this; } public void unsetCatalogName() { @@ -230,8 +227,9 @@ public String getSchemaName() { return this.schemaName; } - public void setSchemaName(String schemaName) { + public TGetFunctionsReq setSchemaName(String schemaName) { this.schemaName = schemaName; + return this; } public void unsetSchemaName() { @@ -253,8 +251,9 @@ public String getFunctionName() { return this.functionName; } - public void setFunctionName(String functionName) { + public TGetFunctionsReq setFunctionName(String functionName) { this.functionName = functionName; + return this; } public void unsetFunctionName() { @@ -400,75 +399,53 @@ public boolean equals(TGetFunctionsReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_catalogName = true && (isSetCatalogName()); - list.add(present_catalogName); - if (present_catalogName) - list.add(catalogName); - - boolean present_schemaName = true && (isSetSchemaName()); - list.add(present_schemaName); - if (present_schemaName) - list.add(schemaName); - - boolean present_functionName = true && (isSetFunctionName()); - list.add(present_functionName); - if (present_functionName) - list.add(functionName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetFunctionsReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetFunctionsReq typedOther = (TGetFunctionsReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(other.isSetFunctionName()); + lastComparison = Boolean.valueOf(isSetFunctionName()).compareTo(typedOther.isSetFunctionName()); if (lastComparison != 0) { return lastComparison; } if (isSetFunctionName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, other.functionName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.functionName, typedOther.functionName); if (lastComparison != 0) { return lastComparison; } @@ -534,14 +511,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetFunctionName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'functionName' is unset! Struct:" + toString()); + if (functionName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'functionName' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -621,6 +596,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetFunctionsReq st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java index ead37fb..7e09afe 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetFunctionsResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetFunctionsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetFunctionsResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetFunctionsResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetFunctionsRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetFunctionsResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetFunctionsResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetFunctionsResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetFunctionsResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetFunctionsResp typedOther = (TGetFunctionsResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetFunctionsResp s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoReq.java index b319b70..572ae80 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoReq"); 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)1); @@ -47,8 +42,12 @@ schemes.put(TupleScheme.class, new TGetInfoReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private TGetInfoType infoType; // required + public TSessionHandle sessionHandle; // required + /** + * + * @see TGetInfoType + */ + public TGetInfoType infoType; // 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 { @@ -165,8 +164,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetInfoReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -196,8 +196,9 @@ public TGetInfoType getInfoType() { * * @see TGetInfoType */ - public void setInfoType(TGetInfoType infoType) { + public TGetInfoReq setInfoType(TGetInfoType infoType) { this.infoType = infoType; + return this; } public void unsetInfoType() { @@ -299,45 +300,33 @@ public boolean equals(TGetInfoReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_infoType = true && (isSetInfoType()); - list.add(present_infoType); - if (present_infoType) - list.add(infoType.getValue()); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetInfoReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetInfoReq typedOther = (TGetInfoReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoType()).compareTo(other.isSetInfoType()); + lastComparison = Boolean.valueOf(isSetInfoType()).compareTo(typedOther.isSetInfoType()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoType, other.infoType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoType, typedOther.infoType); if (lastComparison != 0) { return lastComparison; } @@ -383,14 +372,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetInfoType()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'infoType' is unset! Struct:" + toString()); + if (infoType == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'infoType' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -442,7 +429,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetInfoReq struct) break; case 2: // INFO_TYPE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.infoType = org.apache.hive.service.rpc.thrift.TGetInfoType.findByValue(iprot.readI32()); + struct.infoType = TGetInfoType.findByValue(iprot.readI32()); struct.setInfoTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -454,6 +441,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetInfoReq struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -498,7 +487,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetInfoReq struct) struct.sessionHandle = new TSessionHandle(); struct.sessionHandle.read(iprot); struct.setSessionHandleIsSet(true); - struct.infoType = org.apache.hive.service.rpc.thrift.TGetInfoType.findByValue(iprot.readI32()); + struct.infoType = TGetInfoType.findByValue(iprot.readI32()); struct.setInfoTypeIsSet(true); } } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoResp.java index 9be810b..7448634 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetInfoRespTupleSchemeFactory()); } - private TStatus status; // required - private TGetInfoValue infoValue; // required + public TStatus status; // required + public TGetInfoValue infoValue; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -161,8 +156,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetInfoResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -184,8 +180,9 @@ public TGetInfoValue getInfoValue() { return this.infoValue; } - public void setInfoValue(TGetInfoValue infoValue) { + public TGetInfoResp setInfoValue(TGetInfoValue infoValue) { this.infoValue = infoValue; + return this; } public void unsetInfoValue() { @@ -287,45 +284,33 @@ public boolean equals(TGetInfoResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_infoValue = true && (isSetInfoValue()); - list.add(present_infoValue); - if (present_infoValue) - list.add(infoValue); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetInfoResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetInfoResp typedOther = (TGetInfoResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoValue()).compareTo(other.isSetInfoValue()); + lastComparison = Boolean.valueOf(isSetInfoValue()).compareTo(typedOther.isSetInfoValue()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoValue, other.infoValue); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoValue, typedOther.infoValue); if (lastComparison != 0) { return lastComparison; } @@ -371,14 +356,12 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - - if (!isSetInfoValue()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'infoValue' is unset! Struct:" + toString()); + if (infoValue == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'infoValue' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +426,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetInfoResp struct iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoType.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoType.java index 5b219b6..7723162 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoType.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoType.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoValue.java index 6b0a68e..ee3fa77 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetInfoValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TGetInfoValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetInfoValue"); private static final org.apache.thrift.protocol.TField STRING_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("stringValue", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -288,7 +284,6 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @@ -560,22 +555,14 @@ public int compareTo(TGetInfoValue other) { } + /** + * If you'd like this to perform more respectably, use the hashcode generator option. + */ @Override public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); + return 0; } + 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))); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java index 84c64cd..ed08e52 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetOperationStatusReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TGetOperationStatusReqTupleSchemeFactory()); } - private TOperationHandle operationHandle; // required + public TOperationHandle operationHandle; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -148,8 +143,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetOperationStatusReq setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -229,30 +225,23 @@ public boolean equals(TGetOperationStatusReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetOperationStatusReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetOperationStatusReq typedOther = (TGetOperationStatusReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetOperationHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); + if (operationHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java index b981368..4c8bf7f 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetOperationStatusResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetOperationStatusResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetOperationStatusResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetOperationStatusResp"); private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -47,6 +42,7 @@ private static final org.apache.thrift.protocol.TField OPERATION_STARTED_FIELD_DESC = new org.apache.thrift.protocol.TField("operationStarted", org.apache.thrift.protocol.TType.I64, (short)7); private static final org.apache.thrift.protocol.TField OPERATION_COMPLETED_FIELD_DESC = new org.apache.thrift.protocol.TField("operationCompleted", org.apache.thrift.protocol.TType.I64, (short)8); 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)9); + private static final org.apache.thrift.protocol.TField NUM_ROWS_FIELD_DESC = new org.apache.thrift.protocol.TField("numRows", org.apache.thrift.protocol.TType.I64, (short)10); private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>(); static { @@ -54,15 +50,20 @@ schemes.put(TupleScheme.class, new TGetOperationStatusRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationState operationState; // optional - private String sqlState; // optional - private int errorCode; // optional - private String errorMessage; // optional - private String taskStatus; // optional - private long operationStarted; // optional - private long operationCompleted; // optional - private boolean hasResultSet; // optional + public TStatus status; // required + /** + * + * @see TOperationState + */ + public TOperationState operationState; // optional + public String sqlState; // optional + public int errorCode; // optional + public String errorMessage; // optional + public String taskStatus; // optional + public long operationStarted; // optional + public long operationCompleted; // optional + public boolean hasResultSet; // optional + public long numRows; // 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 { @@ -78,7 +79,8 @@ TASK_STATUS((short)6, "taskStatus"), OPERATION_STARTED((short)7, "operationStarted"), OPERATION_COMPLETED((short)8, "operationCompleted"), - HAS_RESULT_SET((short)9, "hasResultSet"); + HAS_RESULT_SET((short)9, "hasResultSet"), + NUM_ROWS((short)10, "numRows"); private static final Map byName = new HashMap(); @@ -111,6 +113,8 @@ public static _Fields findByThriftId(int fieldId) { return OPERATION_COMPLETED; case 9: // HAS_RESULT_SET return HAS_RESULT_SET; + case 10: // NUM_ROWS + return NUM_ROWS; default: return null; } @@ -155,8 +159,9 @@ public String getFieldName() { private static final int __OPERATIONSTARTED_ISSET_ID = 1; private static final int __OPERATIONCOMPLETED_ISSET_ID = 2; private static final int __HASRESULTSET_ISSET_ID = 3; + private static final int __NUMROWS_ISSET_ID = 4; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED,_Fields.HAS_RESULT_SET}; + private _Fields optionals[] = {_Fields.OPERATION_STATE,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE,_Fields.TASK_STATUS,_Fields.OPERATION_STARTED,_Fields.OPERATION_COMPLETED,_Fields.HAS_RESULT_SET,_Fields.NUM_ROWS}; 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); @@ -178,6 +183,8 @@ public String getFieldName() { new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))); tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))); + tmpMap.put(_Fields.NUM_ROWS, new org.apache.thrift.meta_data.FieldMetaData("numRows", 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(TGetOperationStatusResp.class, metaDataMap); } @@ -216,6 +223,7 @@ public TGetOperationStatusResp(TGetOperationStatusResp other) { this.operationStarted = other.operationStarted; this.operationCompleted = other.operationCompleted; this.hasResultSet = other.hasResultSet; + this.numRows = other.numRows; } public TGetOperationStatusResp deepCopy() { @@ -237,14 +245,17 @@ public void clear() { this.operationCompleted = 0; setHasResultSetIsSet(false); this.hasResultSet = false; + setNumRowsIsSet(false); + this.numRows = 0; } public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetOperationStatusResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -274,8 +285,9 @@ public TOperationState getOperationState() { * * @see TOperationState */ - public void setOperationState(TOperationState operationState) { + public TGetOperationStatusResp setOperationState(TOperationState operationState) { this.operationState = operationState; + return this; } public void unsetOperationState() { @@ -297,8 +309,9 @@ public String getSqlState() { return this.sqlState; } - public void setSqlState(String sqlState) { + public TGetOperationStatusResp setSqlState(String sqlState) { this.sqlState = sqlState; + return this; } public void unsetSqlState() { @@ -320,9 +333,10 @@ public int getErrorCode() { return this.errorCode; } - public void setErrorCode(int errorCode) { + public TGetOperationStatusResp setErrorCode(int errorCode) { this.errorCode = errorCode; setErrorCodeIsSet(true); + return this; } public void unsetErrorCode() { @@ -342,8 +356,9 @@ public String getErrorMessage() { return this.errorMessage; } - public void setErrorMessage(String errorMessage) { + public TGetOperationStatusResp setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; + return this; } public void unsetErrorMessage() { @@ -365,8 +380,9 @@ public String getTaskStatus() { return this.taskStatus; } - public void setTaskStatus(String taskStatus) { + public TGetOperationStatusResp setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; + return this; } public void unsetTaskStatus() { @@ -388,9 +404,10 @@ public long getOperationStarted() { return this.operationStarted; } - public void setOperationStarted(long operationStarted) { + public TGetOperationStatusResp setOperationStarted(long operationStarted) { this.operationStarted = operationStarted; setOperationStartedIsSet(true); + return this; } public void unsetOperationStarted() { @@ -410,9 +427,10 @@ public long getOperationCompleted() { return this.operationCompleted; } - public void setOperationCompleted(long operationCompleted) { + public TGetOperationStatusResp setOperationCompleted(long operationCompleted) { this.operationCompleted = operationCompleted; setOperationCompletedIsSet(true); + return this; } public void unsetOperationCompleted() { @@ -432,9 +450,10 @@ public boolean isHasResultSet() { return this.hasResultSet; } - public void setHasResultSet(boolean hasResultSet) { + public TGetOperationStatusResp setHasResultSet(boolean hasResultSet) { this.hasResultSet = hasResultSet; setHasResultSetIsSet(true); + return this; } public void unsetHasResultSet() { @@ -450,6 +469,29 @@ public void setHasResultSetIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value); } + public long getNumRows() { + return this.numRows; + } + + public TGetOperationStatusResp setNumRows(long numRows) { + this.numRows = numRows; + setNumRowsIsSet(true); + return this; + } + + public void unsetNumRows() { + __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + /** Returns true if field numRows is set (has been assigned a value) and false otherwise */ + public boolean isSetNumRows() { + return EncodingUtils.testBit(__isset_bitfield, __NUMROWS_ISSET_ID); + } + + public void setNumRowsIsSet(boolean value) { + __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __NUMROWS_ISSET_ID, value); + } + public void setFieldValue(_Fields field, Object value) { switch (field) { case STATUS: @@ -524,6 +566,14 @@ public void setFieldValue(_Fields field, Object value) { } break; + case NUM_ROWS: + if (value == null) { + unsetNumRows(); + } else { + setNumRows((Long)value); + } + break; + } } @@ -539,7 +589,7 @@ public Object getFieldValue(_Fields field) { return getSqlState(); case ERROR_CODE: - return getErrorCode(); + return Integer.valueOf(getErrorCode()); case ERROR_MESSAGE: return getErrorMessage(); @@ -548,13 +598,16 @@ public Object getFieldValue(_Fields field) { return getTaskStatus(); case OPERATION_STARTED: - return getOperationStarted(); + return Long.valueOf(getOperationStarted()); case OPERATION_COMPLETED: - return getOperationCompleted(); + return Long.valueOf(getOperationCompleted()); case HAS_RESULT_SET: - return isHasResultSet(); + return Boolean.valueOf(isHasResultSet()); + + case NUM_ROWS: + return Long.valueOf(getNumRows()); } throw new IllegalStateException(); @@ -585,6 +638,8 @@ public boolean isSet(_Fields field) { return isSetOperationCompleted(); case HAS_RESULT_SET: return isSetHasResultSet(); + case NUM_ROWS: + return isSetNumRows(); } throw new IllegalStateException(); } @@ -683,155 +738,127 @@ public boolean equals(TGetOperationStatusResp that) { return false; } + boolean this_present_numRows = true && this.isSetNumRows(); + boolean that_present_numRows = true && that.isSetNumRows(); + if (this_present_numRows || that_present_numRows) { + if (!(this_present_numRows && that_present_numRows)) + return false; + if (this.numRows != that.numRows) + return false; + } + return true; } @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationState = true && (isSetOperationState()); - list.add(present_operationState); - if (present_operationState) - list.add(operationState.getValue()); - - boolean present_sqlState = true && (isSetSqlState()); - list.add(present_sqlState); - if (present_sqlState) - list.add(sqlState); - - boolean present_errorCode = true && (isSetErrorCode()); - list.add(present_errorCode); - if (present_errorCode) - list.add(errorCode); - - boolean present_errorMessage = true && (isSetErrorMessage()); - list.add(present_errorMessage); - if (present_errorMessage) - list.add(errorMessage); - - boolean present_taskStatus = true && (isSetTaskStatus()); - list.add(present_taskStatus); - if (present_taskStatus) - list.add(taskStatus); - - boolean present_operationStarted = true && (isSetOperationStarted()); - list.add(present_operationStarted); - if (present_operationStarted) - list.add(operationStarted); - - boolean present_operationCompleted = true && (isSetOperationCompleted()); - list.add(present_operationCompleted); - if (present_operationCompleted) - list.add(operationCompleted); - - boolean present_hasResultSet = true && (isSetHasResultSet()); - list.add(present_hasResultSet); - if (present_hasResultSet) - list.add(hasResultSet); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetOperationStatusResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetOperationStatusResp typedOther = (TGetOperationStatusResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(other.isSetOperationState()); + lastComparison = Boolean.valueOf(isSetOperationState()).compareTo(typedOther.isSetOperationState()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, other.operationState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationState, typedOther.operationState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState()); + lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(typedOther.isSetSqlState()); if (lastComparison != 0) { return lastComparison; } if (isSetSqlState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, typedOther.sqlState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(typedOther.isSetErrorMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, typedOther.errorMessage); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(other.isSetTaskStatus()); + lastComparison = Boolean.valueOf(isSetTaskStatus()).compareTo(typedOther.isSetTaskStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetTaskStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, other.taskStatus); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.taskStatus, typedOther.taskStatus); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationStarted()).compareTo(other.isSetOperationStarted()); + lastComparison = Boolean.valueOf(isSetOperationStarted()).compareTo(typedOther.isSetOperationStarted()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationStarted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationStarted, other.operationStarted); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationStarted, typedOther.operationStarted); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationCompleted()).compareTo(other.isSetOperationCompleted()); + lastComparison = Boolean.valueOf(isSetOperationCompleted()).compareTo(typedOther.isSetOperationCompleted()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationCompleted()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationCompleted, other.operationCompleted); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationCompleted, typedOther.operationCompleted); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet()); + lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(typedOther.isSetHasResultSet()); if (lastComparison != 0) { return lastComparison; } if (isSetHasResultSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, typedOther.hasResultSet); + if (lastComparison != 0) { + return lastComparison; + } + } + lastComparison = Boolean.valueOf(isSetNumRows()).compareTo(typedOther.isSetNumRows()); + if (lastComparison != 0) { + return lastComparison; + } + if (isSetNumRows()) { + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numRows, typedOther.numRows); if (lastComparison != 0) { return lastComparison; } @@ -927,16 +954,21 @@ public String toString() { sb.append(this.hasResultSet); first = false; } + if (isSetNumRows()) { + if (!first) sb.append(", "); + sb.append("numRows:"); + sb.append(this.numRows); + 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -990,7 +1022,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus break; case 2: // OPERATION_STATE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32()); + struct.operationState = TOperationState.findByValue(iprot.readI32()); struct.setOperationStateIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -1052,12 +1084,22 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetOperationStatus org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; + case 10: // NUM_ROWS + if (schemeField.type == org.apache.thrift.protocol.TType.I64) { + struct.numRows = iprot.readI64(); + struct.setNumRowsIsSet(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(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -1118,6 +1160,11 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, TGetOperationStatu oprot.writeBool(struct.hasResultSet); oprot.writeFieldEnd(); } + if (struct.isSetNumRows()) { + oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); + oprot.writeI64(struct.numRows); + oprot.writeFieldEnd(); + } oprot.writeFieldStop(); oprot.writeStructEnd(); } @@ -1161,7 +1208,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatus if (struct.isSetHasResultSet()) { optionals.set(7); } - oprot.writeBitSet(optionals, 8); + if (struct.isSetNumRows()) { + optionals.set(8); + } + oprot.writeBitSet(optionals, 9); if (struct.isSetOperationState()) { oprot.writeI32(struct.operationState.getValue()); } @@ -1186,6 +1236,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatus if (struct.isSetHasResultSet()) { oprot.writeBool(struct.hasResultSet); } + if (struct.isSetNumRows()) { + oprot.writeI64(struct.numRows); + } } @Override @@ -1194,9 +1247,9 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusR struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); - BitSet incoming = iprot.readBitSet(8); + BitSet incoming = iprot.readBitSet(9); if (incoming.get(0)) { - struct.operationState = org.apache.hive.service.rpc.thrift.TOperationState.findByValue(iprot.readI32()); + struct.operationState = TOperationState.findByValue(iprot.readI32()); struct.setOperationStateIsSet(true); } if (incoming.get(1)) { @@ -1227,6 +1280,10 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetOperationStatusR struct.hasResultSet = iprot.readBool(); struct.setHasResultSetIsSet(true); } + if (incoming.get(8)) { + struct.numRows = iprot.readI64(); + struct.setNumRowsIsSet(true); + } } } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java index 1bec9b5..04e1d66 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetPrimaryKeysReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetPrimaryKeysReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetPrimaryKeysReq"); 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)1); @@ -49,10 +44,10 @@ schemes.put(TupleScheme.class, new TGetPrimaryKeysReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String catalogName; // optional - private String schemaName; // optional - private String tableName; // optional + public TSessionHandle sessionHandle; // required + public String catalogName; // optional + public String schemaName; // optional + public String tableName; // 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 { @@ -122,7 +117,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME}; + private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME}; 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); @@ -182,8 +177,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetPrimaryKeysReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -205,8 +201,9 @@ public String getCatalogName() { return this.catalogName; } - public void setCatalogName(String catalogName) { + public TGetPrimaryKeysReq setCatalogName(String catalogName) { this.catalogName = catalogName; + return this; } public void unsetCatalogName() { @@ -228,8 +225,9 @@ public String getSchemaName() { return this.schemaName; } - public void setSchemaName(String schemaName) { + public TGetPrimaryKeysReq setSchemaName(String schemaName) { this.schemaName = schemaName; + return this; } public void unsetSchemaName() { @@ -251,8 +249,9 @@ public String getTableName() { return this.tableName; } - public void setTableName(String tableName) { + public TGetPrimaryKeysReq setTableName(String tableName) { this.tableName = tableName; + return this; } public void unsetTableName() { @@ -398,75 +397,53 @@ public boolean equals(TGetPrimaryKeysReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_catalogName = true && (isSetCatalogName()); - list.add(present_catalogName); - if (present_catalogName) - list.add(catalogName); - - boolean present_schemaName = true && (isSetSchemaName()); - list.add(present_schemaName); - if (present_schemaName) - list.add(schemaName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetPrimaryKeysReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetPrimaryKeysReq typedOther = (TGetPrimaryKeysReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); if (lastComparison != 0) { return lastComparison; } @@ -534,10 +511,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -617,6 +593,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetPrimaryKeysReq iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java index 72d9507..85549fa 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetPrimaryKeysResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetPrimaryKeysResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetPrimaryKeysResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetPrimaryKeysResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetPrimaryKeysRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetPrimaryKeysResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetPrimaryKeysResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetPrimaryKeysResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetPrimaryKeysResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetPrimaryKeysResp typedOther = (TGetPrimaryKeysResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetPrimaryKeysResp iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java index b94d827..8335891 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetResultSetMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetResultSetMetadataReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataReq"); private static final org.apache.thrift.protocol.TField OPERATION_HANDLE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationHandle", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TGetResultSetMetadataReqTupleSchemeFactory()); } - private TOperationHandle operationHandle; // required + public TOperationHandle operationHandle; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { @@ -148,8 +143,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetResultSetMetadataReq setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -229,30 +225,23 @@ public boolean equals(TGetResultSetMetadataReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetResultSetMetadataReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetResultSetMetadataReq typedOther = (TGetResultSetMetadataReq)other; - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetOperationHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' is unset! Struct:" + toString()); + if (operationHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (operationHandle != null) { operationHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetResultSetMetada iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java index ae2021e..5209e89 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetResultSetMetadataResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetResultSetMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetResultSetMetadataResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetResultSetMetadataResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetResultSetMetadataRespTupleSchemeFactory()); } - private TStatus status; // required - private TTableSchema schema; // optional + public TStatus status; // required + public TTableSchema schema; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.SCHEMA}; + private _Fields optionals[] = {_Fields.SCHEMA}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetResultSetMetadataResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TTableSchema getSchema() { return this.schema; } - public void setSchema(TTableSchema schema) { + public TGetResultSetMetadataResp setSchema(TTableSchema schema) { this.schema = schema; + return this; } public void unsetSchema() { @@ -286,45 +283,33 @@ public boolean equals(TGetResultSetMetadataResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_schema = true && (isSetSchema()); - list.add(present_schema); - if (present_schema) - list.add(schema); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetResultSetMetadataResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetResultSetMetadataResp typedOther = (TGetResultSetMetadataResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchema()).compareTo(other.isSetSchema()); + lastComparison = Boolean.valueOf(isSetSchema()).compareTo(typedOther.isSetSchema()); if (lastComparison != 0) { return lastComparison; } if (isSetSchema()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, other.schema); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schema, typedOther.schema); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetResultSetMetada iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java index 17eed87..57591af 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetSchemasReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetSchemasReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSchemasReq"); 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)1); @@ -48,9 +43,9 @@ schemes.put(TupleScheme.class, new TGetSchemasReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String catalogName; // optional - private String schemaName; // optional + public TSessionHandle sessionHandle; // required + public String catalogName; // optional + public String schemaName; // 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 { @@ -117,7 +112,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; + private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME}; 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); @@ -171,8 +166,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetSchemasReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -194,8 +190,9 @@ public String getCatalogName() { return this.catalogName; } - public void setCatalogName(String catalogName) { + public TGetSchemasReq setCatalogName(String catalogName) { this.catalogName = catalogName; + return this; } public void unsetCatalogName() { @@ -217,8 +214,9 @@ public String getSchemaName() { return this.schemaName; } - public void setSchemaName(String schemaName) { + public TGetSchemasReq setSchemaName(String schemaName) { this.schemaName = schemaName; + return this; } public void unsetSchemaName() { @@ -342,60 +340,43 @@ public boolean equals(TGetSchemasReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_catalogName = true && (isSetCatalogName()); - list.add(present_catalogName); - if (present_catalogName) - list.add(catalogName); - - boolean present_schemaName = true && (isSetSchemaName()); - list.add(present_schemaName); - if (present_schemaName) - list.add(schemaName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetSchemasReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetSchemasReq typedOther = (TGetSchemasReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); if (lastComparison != 0) { return lastComparison; } @@ -453,10 +434,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -528,6 +508,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetSchemasReq stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java index e5317f7..70e5ee3 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetSchemasResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetSchemasResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetSchemasResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetSchemasResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetSchemasRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetSchemasResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetSchemasResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetSchemasResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetSchemasResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetSchemasResp typedOther = (TGetSchemasResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetSchemasResp str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java index c027748..eebe28e 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTableTypesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTableTypesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTableTypesReq"); 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)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TGetTableTypesReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required + public TSessionHandle sessionHandle; // 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 { @@ -148,8 +143,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetTableTypesReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -229,30 +225,23 @@ public boolean equals(TGetTableTypesReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTableTypesReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTableTypesReq typedOther = (TGetTableTypesReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTableTypesReq s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java index c6ce0d4..f2998bc 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTableTypesResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTableTypesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTableTypesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTableTypesResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetTableTypesRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetTableTypesResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetTableTypesResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetTableTypesResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTableTypesResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTableTypesResp typedOther = (TGetTableTypesResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTableTypesResp iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesReq.java index 1aa3f94..c19aa41 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTablesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTablesReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTablesReq"); 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)1); @@ -50,11 +45,11 @@ schemes.put(TupleScheme.class, new TGetTablesReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String catalogName; // optional - private String schemaName; // optional - private String tableName; // optional - private List tableTypes; // optional + public TSessionHandle sessionHandle; // required + public String catalogName; // optional + public String schemaName; // optional + public String tableName; // optional + public List tableTypes; // 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 { @@ -127,7 +122,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.TABLE_TYPES}; + private _Fields optionals[] = {_Fields.CATALOG_NAME,_Fields.SCHEMA_NAME,_Fields.TABLE_NAME,_Fields.TABLE_TYPES}; 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); @@ -173,7 +168,10 @@ public TGetTablesReq(TGetTablesReq other) { this.tableName = other.tableName; } if (other.isSetTableTypes()) { - List __this__tableTypes = new ArrayList(other.tableTypes); + List __this__tableTypes = new ArrayList(); + for (String other_element : other.tableTypes) { + __this__tableTypes.add(other_element); + } this.tableTypes = __this__tableTypes; } } @@ -195,8 +193,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetTablesReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -218,8 +217,9 @@ public String getCatalogName() { return this.catalogName; } - public void setCatalogName(String catalogName) { + public TGetTablesReq setCatalogName(String catalogName) { this.catalogName = catalogName; + return this; } public void unsetCatalogName() { @@ -241,8 +241,9 @@ public String getSchemaName() { return this.schemaName; } - public void setSchemaName(String schemaName) { + public TGetTablesReq setSchemaName(String schemaName) { this.schemaName = schemaName; + return this; } public void unsetSchemaName() { @@ -264,8 +265,9 @@ public String getTableName() { return this.tableName; } - public void setTableName(String tableName) { + public TGetTablesReq setTableName(String tableName) { this.tableName = tableName; + return this; } public void unsetTableName() { @@ -302,8 +304,9 @@ public void addToTableTypes(String elem) { return this.tableTypes; } - public void setTableTypes(List tableTypes) { + public TGetTablesReq setTableTypes(List tableTypes) { this.tableTypes = tableTypes; + return this; } public void unsetTableTypes() { @@ -471,90 +474,63 @@ public boolean equals(TGetTablesReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_catalogName = true && (isSetCatalogName()); - list.add(present_catalogName); - if (present_catalogName) - list.add(catalogName); - - boolean present_schemaName = true && (isSetSchemaName()); - list.add(present_schemaName); - if (present_schemaName) - list.add(schemaName); - - boolean present_tableName = true && (isSetTableName()); - list.add(present_tableName); - if (present_tableName) - list.add(tableName); - - boolean present_tableTypes = true && (isSetTableTypes()); - list.add(present_tableTypes); - if (present_tableTypes) - list.add(tableTypes); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTablesReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTablesReq typedOther = (TGetTablesReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(other.isSetCatalogName()); + lastComparison = Boolean.valueOf(isSetCatalogName()).compareTo(typedOther.isSetCatalogName()); if (lastComparison != 0) { return lastComparison; } if (isSetCatalogName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, other.catalogName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catalogName, typedOther.catalogName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(other.isSetSchemaName()); + lastComparison = Boolean.valueOf(isSetSchemaName()).compareTo(typedOther.isSetSchemaName()); if (lastComparison != 0) { return lastComparison; } if (isSetSchemaName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, other.schemaName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.schemaName, typedOther.schemaName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName()); + lastComparison = Boolean.valueOf(isSetTableName()).compareTo(typedOther.isSetTableName()); if (lastComparison != 0) { return lastComparison; } if (isSetTableName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, other.tableName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableName, typedOther.tableName); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTableTypes()).compareTo(other.isSetTableTypes()); + lastComparison = Boolean.valueOf(isSetTableTypes()).compareTo(typedOther.isSetTableTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetTableTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableTypes, other.tableTypes); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableTypes, typedOther.tableTypes); if (lastComparison != 0) { return lastComparison; } @@ -632,10 +608,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -714,11 +689,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTablesReq struc { org.apache.thrift.protocol.TList _list172 = iprot.readListBegin(); struct.tableTypes = new ArrayList(_list172.size); - String _elem173; - for (int _i174 = 0; _i174 < _list172.size; ++_i174) + for (int _i173 = 0; _i173 < _list172.size; ++_i173) { - _elem173 = iprot.readString(); - struct.tableTypes.add(_elem173); + String _elem174; // required + _elem174 = iprot.readString(); + struct.tableTypes.add(_elem174); } iprot.readListEnd(); } @@ -733,6 +708,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTablesReq struc iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -855,11 +832,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TGetTablesReq struct { org.apache.thrift.protocol.TList _list177 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.tableTypes = new ArrayList(_list177.size); - String _elem178; - for (int _i179 = 0; _i179 < _list177.size; ++_i179) + for (int _i178 = 0; _i178 < _list177.size; ++_i178) { - _elem178 = iprot.readString(); - struct.tableTypes.add(_elem178); + String _elem179; // required + _elem179 = iprot.readString(); + struct.tableTypes.add(_elem179); } } struct.setTableTypesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesResp.java index 0b7c382..520b104 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTablesResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTablesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTablesResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTablesResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetTablesRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetTablesResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetTablesResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetTablesResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTablesResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTablesResp typedOther = (TGetTablesResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTablesResp stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java index 2e0ec60..c65b482 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTypeInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTypeInfoReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTypeInfoReq"); 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)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TGetTypeInfoReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required + public TSessionHandle sessionHandle; // 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 { @@ -148,8 +143,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TGetTypeInfoReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -229,30 +225,23 @@ public boolean equals(TGetTypeInfoReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTypeInfoReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTypeInfoReq typedOther = (TGetTypeInfoReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTypeInfoReq str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java index cc2910e..992f105 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TGetTypeInfoResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TGetTypeInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TGetTypeInfoResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TGetTypeInfoResp"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TGetTypeInfoRespTupleSchemeFactory()); } - private TStatus status; // required - private TOperationHandle operationHandle; // optional + public TStatus status; // required + public TOperationHandle operationHandle; // 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 { @@ -112,7 +107,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.OPERATION_HANDLE}; + private _Fields optionals[] = {_Fields.OPERATION_HANDLE}; 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); @@ -160,8 +155,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TGetTypeInfoResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -183,8 +179,9 @@ public TOperationHandle getOperationHandle() { return this.operationHandle; } - public void setOperationHandle(TOperationHandle operationHandle) { + public TGetTypeInfoResp setOperationHandle(TOperationHandle operationHandle) { this.operationHandle = operationHandle; + return this; } public void unsetOperationHandle() { @@ -286,45 +283,33 @@ public boolean equals(TGetTypeInfoResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - boolean present_operationHandle = true && (isSetOperationHandle()); - list.add(present_operationHandle); - if (present_operationHandle) - list.add(operationHandle); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TGetTypeInfoResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TGetTypeInfoResp typedOther = (TGetTypeInfoResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(other.isSetOperationHandle()); + lastComparison = Boolean.valueOf(isSetOperationHandle()).compareTo(typedOther.isSetOperationHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, other.operationHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationHandle, typedOther.operationHandle); if (lastComparison != 0) { return lastComparison; } @@ -372,10 +357,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -443,6 +427,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TGetTypeInfoResp st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/THandleIdentifier.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/THandleIdentifier.java index a3879d8..81d8d18 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/THandleIdentifier.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/THandleIdentifier.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 THandleIdentifier implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class THandleIdentifier implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("THandleIdentifier"); private static final org.apache.thrift.protocol.TField GUID_FIELD_DESC = new org.apache.thrift.protocol.TField("guid", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new THandleIdentifierTupleSchemeFactory()); } - private ByteBuffer guid; // required - private ByteBuffer secret; // required + public ByteBuffer guid; // required + public ByteBuffer secret; // 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 { @@ -131,8 +126,8 @@ public THandleIdentifier( ByteBuffer secret) { this(); - this.guid = org.apache.thrift.TBaseHelper.copyBinary(guid); - this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret); + this.guid = guid; + this.secret = secret; } /** @@ -141,9 +136,11 @@ public THandleIdentifier( public THandleIdentifier(THandleIdentifier other) { if (other.isSetGuid()) { this.guid = org.apache.thrift.TBaseHelper.copyBinary(other.guid); +; } if (other.isSetSecret()) { this.secret = org.apache.thrift.TBaseHelper.copyBinary(other.secret); +; } } @@ -163,15 +160,17 @@ public void clear() { } public ByteBuffer bufferForGuid() { - return org.apache.thrift.TBaseHelper.copyBinary(guid); + return guid; } - public void setGuid(byte[] guid) { - this.guid = guid == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(guid, guid.length)); + public THandleIdentifier setGuid(byte[] guid) { + setGuid(guid == null ? (ByteBuffer)null : ByteBuffer.wrap(guid)); + return this; } - public void setGuid(ByteBuffer guid) { - this.guid = org.apache.thrift.TBaseHelper.copyBinary(guid); + public THandleIdentifier setGuid(ByteBuffer guid) { + this.guid = guid; + return this; } public void unsetGuid() { @@ -195,15 +194,17 @@ public void setGuidIsSet(boolean value) { } public ByteBuffer bufferForSecret() { - return org.apache.thrift.TBaseHelper.copyBinary(secret); + return secret; } - public void setSecret(byte[] secret) { - this.secret = secret == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(secret, secret.length)); + public THandleIdentifier setSecret(byte[] secret) { + setSecret(secret == null ? (ByteBuffer)null : ByteBuffer.wrap(secret)); + return this; } - public void setSecret(ByteBuffer secret) { - this.secret = org.apache.thrift.TBaseHelper.copyBinary(secret); + public THandleIdentifier setSecret(ByteBuffer secret) { + this.secret = secret; + return this; } public void unsetSecret() { @@ -305,45 +306,33 @@ public boolean equals(THandleIdentifier that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_guid = true && (isSetGuid()); - list.add(present_guid); - if (present_guid) - list.add(guid); - - boolean present_secret = true && (isSetSecret()); - list.add(present_secret); - if (present_secret) - list.add(secret); - - return list.hashCode(); + return 0; } - @Override public int compareTo(THandleIdentifier other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + THandleIdentifier typedOther = (THandleIdentifier)other; - lastComparison = Boolean.valueOf(isSetGuid()).compareTo(other.isSetGuid()); + lastComparison = Boolean.valueOf(isSetGuid()).compareTo(typedOther.isSetGuid()); if (lastComparison != 0) { return lastComparison; } if (isSetGuid()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guid, other.guid); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.guid, typedOther.guid); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSecret()).compareTo(other.isSetSecret()); + lastComparison = Boolean.valueOf(isSetSecret()).compareTo(typedOther.isSetSecret()); if (lastComparison != 0) { return lastComparison; } if (isSetSecret()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secret, other.secret); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secret, typedOther.secret); if (lastComparison != 0) { return lastComparison; } @@ -389,14 +378,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetGuid()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'guid' is unset! Struct:" + toString()); + if (guid == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'guid' was not present! Struct: " + toString()); } - - if (!isSetSecret()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'secret' is unset! Struct:" + toString()); + if (secret == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'secret' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -456,6 +443,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, THandleIdentifier s iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Column.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Column.java index 3c44b60..a85cb44 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Column.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Column.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI16Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI16Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI16Column"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TI16ColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TI16Column( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TI16Column( */ public TI16Column(TI16Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (Short 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(short elem) { return this.values; } - public void setValues(List values) { + public TI16Column setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TI16Column setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TI16Column setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TI16Column that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TI16Column other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TI16Column typedOther = (TI16Column)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI16Column struct) { org.apache.thrift.protocol.TList _list70 = iprot.readListBegin(); struct.values = new ArrayList(_list70.size); - short _elem71; - for (int _i72 = 0; _i72 < _list70.size; ++_i72) + for (int _i71 = 0; _i71 < _list70.size; ++_i71) { - _elem71 = iprot.readI16(); - struct.values.add(_elem71); + short _elem72; // required + _elem72 = iprot.readI16(); + struct.values.add(_elem72); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI16Column struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI16Column struct) t { org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I16, iprot.readI32()); struct.values = new ArrayList(_list75.size); - short _elem76; - for (int _i77 = 0; _i77 < _list75.size; ++_i77) + for (int _i76 = 0; _i76 < _list75.size; ++_i76) { - _elem76 = iprot.readI16(); - struct.values.add(_elem76); + short _elem77; // required + _elem77 = iprot.readI16(); + struct.values.add(_elem77); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Value.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Value.java index 29fb4cb..6748eda 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Value.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI16Value.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI16Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI16Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI16Value"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.I16, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TI16ValueTupleSchemeFactory()); } - private short value; // optional + public short 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public short getValue() { return this.value; } - public void setValue(short value) { + public TI16Value setValue(short value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return getValue(); + return Short.valueOf(getValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TI16Value that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TI16Value other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TI16Value typedOther = (TI16Value)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI16Value struct) t iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Column.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Column.java index 9834f1c..ee7c723 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Column.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Column.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI32Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI32Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TI32Column"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TI32ColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TI32Column( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TI32Column( */ public TI32Column(TI32Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (Integer 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(int elem) { return this.values; } - public void setValues(List values) { + public TI32Column setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TI32Column setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TI32Column setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TI32Column that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TI32Column other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TI32Column typedOther = (TI32Column)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI32Column struct) { org.apache.thrift.protocol.TList _list78 = iprot.readListBegin(); struct.values = new ArrayList(_list78.size); - int _elem79; - for (int _i80 = 0; _i80 < _list78.size; ++_i80) + for (int _i79 = 0; _i79 < _list78.size; ++_i79) { - _elem79 = iprot.readI32(); - struct.values.add(_elem79); + int _elem80; // required + _elem80 = iprot.readI32(); + struct.values.add(_elem80); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI32Column struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI32Column struct) t { org.apache.thrift.protocol.TList _list83 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.values = new ArrayList(_list83.size); - int _elem84; - for (int _i85 = 0; _i85 < _list83.size; ++_i85) + for (int _i84 = 0; _i84 < _list83.size; ++_i84) { - _elem84 = iprot.readI32(); - struct.values.add(_elem84); + int _elem85; // required + _elem85 = iprot.readI32(); + struct.values.add(_elem85); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Value.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Value.java index 8a69632..cc4ae5d 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Value.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI32Value.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI32Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI32Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TI32ValueTupleSchemeFactory()); } - private int value; // optional + public 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public int getValue() { return this.value; } - public void setValue(int value) { + public TI32Value setValue(int value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return getValue(); + return Integer.valueOf(getValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TI32Value that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override 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(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI32Value struct) t iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Column.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Column.java index cd5ef2d..7ada0f9 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Column.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Column.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI64Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI64Column implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TI64ColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TI64Column( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TI64Column( */ public TI64Column(TI64Column other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(long elem) { return this.values; } - public void setValues(List values) { + public TI64Column setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TI64Column setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TI64Column setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TI64Column that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override 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(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Column struct) { org.apache.thrift.protocol.TList _list86 = iprot.readListBegin(); struct.values = new ArrayList(_list86.size); - long _elem87; - for (int _i88 = 0; _i88 < _list86.size; ++_i88) + for (int _i87 = 0; _i87 < _list86.size; ++_i87) { - _elem87 = iprot.readI64(); - struct.values.add(_elem87); + long _elem88; // required + _elem88 = iprot.readI64(); + struct.values.add(_elem88); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Column struct) iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TI64Column struct) t { org.apache.thrift.protocol.TList _list91 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, iprot.readI32()); struct.values = new ArrayList(_list91.size); - long _elem92; - for (int _i93 = 0; _i93 < _list91.size; ++_i93) + for (int _i92 = 0; _i92 < _list91.size; ++_i92) { - _elem92 = iprot.readI64(); - struct.values.add(_elem92); + long _elem93; // required + _elem93 = iprot.readI64(); + struct.values.add(_elem93); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Value.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Value.java index 393c0bd..a1ed530 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Value.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TI64Value.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TI64Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TI64Value implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TI64ValueTupleSchemeFactory()); } - private long value; // optional + public 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 { @@ -109,7 +104,7 @@ public String getFieldName() { // isset id assignments private static final int __VALUE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -144,9 +139,10 @@ public long getValue() { return this.value; } - public void setValue(long value) { + public TI64Value setValue(long value) { this.value = value; setValueIsSet(true); + return this; } public void unsetValue() { @@ -178,7 +174,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case VALUE: - return getValue(); + return Long.valueOf(getValue()); } throw new IllegalStateException(); @@ -224,30 +220,23 @@ public boolean equals(TI64Value that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override 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(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -336,6 +325,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TI64Value struct) t iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java index 7ebc15c..eceaf63 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TMapTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TMapTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TMapTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TMapTypeEntryTupleSchemeFactory()); } - private int keyTypePtr; // required - private int valueTypePtr; // required + public int keyTypePtr; // required + public 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 { @@ -165,9 +160,10 @@ public int getKeyTypePtr() { return this.keyTypePtr; } - public void setKeyTypePtr(int keyTypePtr) { + public TMapTypeEntry setKeyTypePtr(int keyTypePtr) { this.keyTypePtr = keyTypePtr; setKeyTypePtrIsSet(true); + return this; } public void unsetKeyTypePtr() { @@ -187,9 +183,10 @@ public int getValueTypePtr() { return this.valueTypePtr; } - public void setValueTypePtr(int valueTypePtr) { + public TMapTypeEntry setValueTypePtr(int valueTypePtr) { this.valueTypePtr = valueTypePtr; setValueTypePtrIsSet(true); + return this; } public void unsetValueTypePtr() { @@ -229,10 +226,10 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case KEY_TYPE_PTR: - return getKeyTypePtr(); + return Integer.valueOf(getKeyTypePtr()); case VALUE_TYPE_PTR: - return getValueTypePtr(); + return Integer.valueOf(getValueTypePtr()); } throw new IllegalStateException(); @@ -289,45 +286,33 @@ public boolean equals(TMapTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_keyTypePtr = true; - list.add(present_keyTypePtr); - if (present_keyTypePtr) - list.add(keyTypePtr); - - boolean present_valueTypePtr = true; - list.add(present_valueTypePtr); - if (present_valueTypePtr) - list.add(valueTypePtr); - - return list.hashCode(); + return 0; } - @Override 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(other.isSetKeyTypePtr()); + lastComparison = Boolean.valueOf(isSetKeyTypePtr()).compareTo(typedOther.isSetKeyTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetKeyTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyTypePtr, other.keyTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.keyTypePtr, typedOther.keyTypePtr); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetValueTypePtr()).compareTo(other.isSetValueTypePtr()); + lastComparison = Boolean.valueOf(isSetValueTypePtr()).compareTo(typedOther.isSetValueTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetValueTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueTypePtr, other.valueTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.valueTypePtr, typedOther.valueTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -365,14 +350,8 @@ public String 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()); - } - + // alas, we cannot check 'keyTypePtr' because it's a primitive and you chose the non-beans generator. + // alas, we cannot check 'valueTypePtr' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity } @@ -434,6 +413,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TMapTypeEntry struc iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetKeyTypePtr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'keyTypePtr' was not found in serialized data! Struct: " + toString()); + } + if (!struct.isSetValueTypePtr()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'valueTypePtr' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java index 18937d9..daf9499 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TOpenSessionReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TOpenSessionReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -49,10 +44,14 @@ schemes.put(TupleScheme.class, new TOpenSessionReqTupleSchemeFactory()); } - private TProtocolVersion client_protocol; // required - private String username; // optional - private String password; // optional - private Map configuration; // optional + /** + * + * @see TProtocolVersion + */ + public TProtocolVersion client_protocol; // required + public String username; // optional + public String password; // optional + public Map 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 { @@ -126,7 +125,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.USERNAME,_Fields.PASSWORD,_Fields.CONFIGURATION}; + 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); @@ -170,7 +169,18 @@ public TOpenSessionReq(TOpenSessionReq other) { this.password = other.password; } if (other.isSetConfiguration()) { - Map __this__configuration = new HashMap(other.configuration); + Map __this__configuration = new HashMap(); + for (Map.Entry 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; } } @@ -200,8 +210,9 @@ public TProtocolVersion getClient_protocol() { * * @see TProtocolVersion */ - public void setClient_protocol(TProtocolVersion client_protocol) { + public TOpenSessionReq setClient_protocol(TProtocolVersion client_protocol) { this.client_protocol = client_protocol; + return this; } public void unsetClient_protocol() { @@ -223,8 +234,9 @@ public String getUsername() { return this.username; } - public void setUsername(String username) { + public TOpenSessionReq setUsername(String username) { this.username = username; + return this; } public void unsetUsername() { @@ -246,8 +258,9 @@ public String getPassword() { return this.password; } - public void setPassword(String password) { + public TOpenSessionReq setPassword(String password) { this.password = password; + return this; } public void unsetPassword() { @@ -280,8 +293,9 @@ public void putToConfiguration(String key, String val) { return this.configuration; } - public void setConfiguration(Map configuration) { + public TOpenSessionReq setConfiguration(Map configuration) { this.configuration = configuration; + return this; } public void unsetConfiguration() { @@ -427,75 +441,53 @@ public boolean equals(TOpenSessionReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_client_protocol = true && (isSetClient_protocol()); - list.add(present_client_protocol); - if (present_client_protocol) - list.add(client_protocol.getValue()); - - boolean present_username = true && (isSetUsername()); - list.add(present_username); - if (present_username) - list.add(username); - - boolean present_password = true && (isSetPassword()); - list.add(present_password); - if (present_password) - list.add(password); - - boolean present_configuration = true && (isSetConfiguration()); - list.add(present_configuration); - if (present_configuration) - list.add(configuration); - - return list.hashCode(); + return 0; } - @Override 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(other.isSetClient_protocol()); + 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, other.client_protocol); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.client_protocol, typedOther.client_protocol); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername()); + lastComparison = Boolean.valueOf(isSetUsername()).compareTo(typedOther.isSetUsername()); if (lastComparison != 0) { return lastComparison; } if (isSetUsername()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, other.username); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.username, typedOther.username); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword()); + lastComparison = Boolean.valueOf(isSetPassword()).compareTo(typedOther.isSetPassword()); if (lastComparison != 0) { return lastComparison; } if (isSetPassword()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, other.password); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.password, typedOther.password); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(typedOther.isSetConfiguration()); if (lastComparison != 0) { return lastComparison; } if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, typedOther.configuration); if (lastComparison != 0) { return lastComparison; } @@ -563,10 +555,9 @@ public String 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()); + if (client_protocol == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'client_protocol' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -606,7 +597,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str switch (schemeField.id) { case 1: // CLIENT_PROTOCOL if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); + struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32()); struct.setClient_protocolIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -633,13 +624,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str { org.apache.thrift.protocol.TMap _map142 = iprot.readMapBegin(); struct.configuration = new HashMap(2*_map142.size); - String _key143; - String _val144; - for (int _i145 = 0; _i145 < _map142.size; ++_i145) + for (int _i143 = 0; _i143 < _map142.size; ++_i143) { - _key143 = iprot.readString(); - _val144 = iprot.readString(); - struct.configuration.put(_key143, _val144); + String _key144; // required + String _val145; // required + _key144 = iprot.readString(); + _val145 = iprot.readString(); + struct.configuration.put(_key144, _val145); } iprot.readMapEnd(); } @@ -654,6 +645,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionReq str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -745,7 +738,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq str @Override public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.client_protocol = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); + struct.client_protocol = TProtocolVersion.findByValue(iprot.readI32()); struct.setClient_protocolIsSet(true); BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { @@ -760,13 +753,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionReq stru { 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(2*_map148.size); - String _key149; - String _val150; - for (int _i151 = 0; _i151 < _map148.size; ++_i151) + for (int _i149 = 0; _i149 < _map148.size; ++_i149) { - _key149 = iprot.readString(); - _val150 = iprot.readString(); - struct.configuration.put(_key149, _val150); + String _key150; // required + String _val151; // required + _key150 = iprot.readString(); + _val151 = iprot.readString(); + struct.configuration.put(_key150, _val151); } } struct.setConfigurationIsSet(true); 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 index 0a3c121..7bb06ac 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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, java.io.Serializable, Cloneable, Comparable { +public class TOpenSessionResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -49,10 +44,14 @@ schemes.put(TupleScheme.class, new TOpenSessionRespTupleSchemeFactory()); } - private TStatus status; // required - private TProtocolVersion serverProtocolVersion; // required - private TSessionHandle sessionHandle; // optional - private Map configuration; // optional + public TStatus status; // required + /** + * + * @see TProtocolVersion + */ + public TProtocolVersion serverProtocolVersion; // required + public TSessionHandle sessionHandle; // optional + public Map 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 { @@ -126,7 +125,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.SESSION_HANDLE,_Fields.CONFIGURATION}; + private _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); @@ -172,7 +171,18 @@ public TOpenSessionResp(TOpenSessionResp other) { this.sessionHandle = new TSessionHandle(other.sessionHandle); } if (other.isSetConfiguration()) { - Map __this__configuration = new HashMap(other.configuration); + Map __this__configuration = new HashMap(); + for (Map.Entry 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; } } @@ -194,8 +204,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TOpenSessionResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -225,8 +236,9 @@ public TProtocolVersion getServerProtocolVersion() { * * @see TProtocolVersion */ - public void setServerProtocolVersion(TProtocolVersion serverProtocolVersion) { + public TOpenSessionResp setServerProtocolVersion(TProtocolVersion serverProtocolVersion) { this.serverProtocolVersion = serverProtocolVersion; + return this; } public void unsetServerProtocolVersion() { @@ -248,8 +260,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TOpenSessionResp setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -282,8 +295,9 @@ public void putToConfiguration(String key, String val) { return this.configuration; } - public void setConfiguration(Map configuration) { + public TOpenSessionResp setConfiguration(Map configuration) { this.configuration = configuration; + return this; } public void unsetConfiguration() { @@ -429,75 +443,53 @@ public boolean equals(TOpenSessionResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - 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(); + return 0; } - @Override public int compareTo(TOpenSessionResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TOpenSessionResp typedOther = (TOpenSessionResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetServerProtocolVersion()).compareTo(other.isSetServerProtocolVersion()); + lastComparison = Boolean.valueOf(isSetServerProtocolVersion()).compareTo(typedOther.isSetServerProtocolVersion()); if (lastComparison != 0) { return lastComparison; } if (isSetServerProtocolVersion()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, other.serverProtocolVersion); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serverProtocolVersion, typedOther.serverProtocolVersion); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(other.isSetConfiguration()); + lastComparison = Boolean.valueOf(isSetConfiguration()).compareTo(typedOther.isSetConfiguration()); if (lastComparison != 0) { return lastComparison; } if (isSetConfiguration()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, other.configuration); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.configuration, typedOther.configuration); if (lastComparison != 0) { return lastComparison; } @@ -563,14 +555,12 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - - if (!isSetServerProtocolVersion()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' is unset! Struct:" + toString()); + if (serverProtocolVersion == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'serverProtocolVersion' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -625,7 +615,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp st 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.serverProtocolVersion = TProtocolVersion.findByValue(iprot.readI32()); struct.setServerProtocolVersionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -645,13 +635,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp st { org.apache.thrift.protocol.TMap _map152 = iprot.readMapBegin(); struct.configuration = new HashMap(2*_map152.size); - String _key153; - String _val154; - for (int _i155 = 0; _i155 < _map152.size; ++_i155) + for (int _i153 = 0; _i153 < _map152.size; ++_i153) { - _key153 = iprot.readString(); - _val154 = iprot.readString(); - struct.configuration.put(_key153, _val154); + String _key154; // required + String _val155; // required + _key154 = iprot.readString(); + _val155 = iprot.readString(); + struct.configuration.put(_key154, _val155); } iprot.readMapEnd(); } @@ -666,6 +656,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOpenSessionResp st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -753,7 +745,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp str struct.status = new TStatus(); struct.status.read(iprot); struct.setStatusIsSet(true); - struct.serverProtocolVersion = org.apache.hive.service.rpc.thrift.TProtocolVersion.findByValue(iprot.readI32()); + struct.serverProtocolVersion = TProtocolVersion.findByValue(iprot.readI32()); struct.setServerProtocolVersionIsSet(true); BitSet incoming = iprot.readBitSet(2); if (incoming.get(0)) { @@ -765,13 +757,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOpenSessionResp str { 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(2*_map158.size); - String _key159; - String _val160; - for (int _i161 = 0; _i161 < _map158.size; ++_i161) + for (int _i159 = 0; _i159 < _map158.size; ++_i159) { - _key159 = iprot.readString(); - _val160 = iprot.readString(); - struct.configuration.put(_key159, _val160); + String _key160; // required + String _val161; // required + _key160 = iprot.readString(); + _val161 = iprot.readString(); + struct.configuration.put(_key160, _val161); } } struct.setConfigurationIsSet(true); 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 index 9eaf2be..5753385 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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, java.io.Serializable, Cloneable, Comparable { +public class TOperationHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -49,10 +44,14 @@ schemes.put(TupleScheme.class, new TOperationHandleTupleSchemeFactory()); } - private THandleIdentifier operationId; // required - private TOperationType operationType; // required - private boolean hasResultSet; // required - private double modifiedRowCount; // optional + public THandleIdentifier operationId; // required + /** + * + * @see TOperationType + */ + public TOperationType operationType; // required + public boolean hasResultSet; // required + public 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 { @@ -129,7 +128,7 @@ public String getFieldName() { 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}; + private _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); @@ -193,8 +192,9 @@ public THandleIdentifier getOperationId() { return this.operationId; } - public void setOperationId(THandleIdentifier operationId) { + public TOperationHandle setOperationId(THandleIdentifier operationId) { this.operationId = operationId; + return this; } public void unsetOperationId() { @@ -224,8 +224,9 @@ public TOperationType getOperationType() { * * @see TOperationType */ - public void setOperationType(TOperationType operationType) { + public TOperationHandle setOperationType(TOperationType operationType) { this.operationType = operationType; + return this; } public void unsetOperationType() { @@ -247,9 +248,10 @@ public boolean isHasResultSet() { return this.hasResultSet; } - public void setHasResultSet(boolean hasResultSet) { + public TOperationHandle setHasResultSet(boolean hasResultSet) { this.hasResultSet = hasResultSet; setHasResultSetIsSet(true); + return this; } public void unsetHasResultSet() { @@ -269,9 +271,10 @@ public double getModifiedRowCount() { return this.modifiedRowCount; } - public void setModifiedRowCount(double modifiedRowCount) { + public TOperationHandle setModifiedRowCount(double modifiedRowCount) { this.modifiedRowCount = modifiedRowCount; setModifiedRowCountIsSet(true); + return this; } public void unsetModifiedRowCount() { @@ -333,10 +336,10 @@ public Object getFieldValue(_Fields field) { return getOperationType(); case HAS_RESULT_SET: - return isHasResultSet(); + return Boolean.valueOf(isHasResultSet()); case MODIFIED_ROW_COUNT: - return getModifiedRowCount(); + return Double.valueOf(getModifiedRowCount()); } throw new IllegalStateException(); @@ -415,75 +418,53 @@ public boolean equals(TOperationHandle that) { @Override public int hashCode() { - List list = new ArrayList(); - - 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(); + return 0; } - @Override public int compareTo(TOperationHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TOperationHandle typedOther = (TOperationHandle)other; - lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId()); + lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(typedOther.isSetOperationId()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, other.operationId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, typedOther.operationId); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType()); + lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(typedOther.isSetOperationType()); if (lastComparison != 0) { return lastComparison; } if (isSetOperationType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, typedOther.operationType); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet()); + lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(typedOther.isSetHasResultSet()); if (lastComparison != 0) { return lastComparison; } if (isSetHasResultSet()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, typedOther.hasResultSet); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(other.isSetModifiedRowCount()); + lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(typedOther.isSetModifiedRowCount()); if (lastComparison != 0) { return lastComparison; } if (isSetModifiedRowCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, other.modifiedRowCount); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, typedOther.modifiedRowCount); if (lastComparison != 0) { return lastComparison; } @@ -539,18 +520,13 @@ public String 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 (operationId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationId' was not present! Struct: " + toString()); } - - if (!isSetHasResultSet()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' is unset! Struct:" + toString()); + if (operationType == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationType' was not present! Struct: " + toString()); } - + // alas, we cannot check 'hasResultSet' because it's a primitive and you chose the non-beans generator. // check for sub-struct validity if (operationId != null) { operationId.validate(); @@ -604,7 +580,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOperationHandle st 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.operationType = TOperationType.findByValue(iprot.readI32()); struct.setOperationTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -632,6 +608,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TOperationHandle st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetHasResultSet()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } @@ -693,7 +674,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TOperationHandle str struct.operationId = new THandleIdentifier(); struct.operationId.read(iprot); struct.setOperationIdIsSet(true); - struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32()); + struct.operationType = TOperationType.findByValue(iprot.readI32()); struct.setOperationTypeIsSet(true); struct.hasResultSet = iprot.readBool(); struct.setHasResultSetIsSet(true); 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 index 4390b4b..d4c5732 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated 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 index 08002ad..b125faa 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated 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 index 910c909..09f03c6 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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, java.io.Serializable, Cloneable, Comparable { +public class TPrimitiveTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("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); @@ -47,8 +42,12 @@ schemes.put(TupleScheme.class, new TPrimitiveTypeEntryTupleSchemeFactory()); } - private TTypeId type; // required - private TTypeQualifiers typeQualifiers; // optional + /** + * + * @see TTypeId + */ + public TTypeId type; // required + public 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 { @@ -116,7 +115,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.TYPE_QUALIFIERS}; + private _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); @@ -172,8 +171,9 @@ public TTypeId getType() { * * @see TTypeId */ - public void setType(TTypeId type) { + public TPrimitiveTypeEntry setType(TTypeId type) { this.type = type; + return this; } public void unsetType() { @@ -195,8 +195,9 @@ public TTypeQualifiers getTypeQualifiers() { return this.typeQualifiers; } - public void setTypeQualifiers(TTypeQualifiers typeQualifiers) { + public TPrimitiveTypeEntry setTypeQualifiers(TTypeQualifiers typeQualifiers) { this.typeQualifiers = typeQualifiers; + return this; } public void unsetTypeQualifiers() { @@ -298,45 +299,33 @@ public boolean equals(TPrimitiveTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - 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(); + return 0; } - @Override public int compareTo(TPrimitiveTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TPrimitiveTypeEntry typedOther = (TPrimitiveTypeEntry)other; - lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType()); + lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType()); if (lastComparison != 0) { return lastComparison; } if (isSetType()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, other.type); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetTypeQualifiers()).compareTo(other.isSetTypeQualifiers()); + lastComparison = Boolean.valueOf(isSetTypeQualifiers()).compareTo(typedOther.isSetTypeQualifiers()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeQualifiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeQualifiers, other.typeQualifiers); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeQualifiers, typedOther.typeQualifiers); if (lastComparison != 0) { return lastComparison; } @@ -384,10 +373,9 @@ public String 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()); + if (type == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString()); } - // check for sub-struct validity if (typeQualifiers != null) { typeQualifiers.validate(); @@ -430,7 +418,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TPrimitiveTypeEntry 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.type = TTypeId.findByValue(iprot.readI32()); struct.setTypeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -451,6 +439,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TPrimitiveTypeEntry iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -501,7 +491,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TPrimitiveTypeEntry @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.type = TTypeId.findByValue(iprot.readI32()); struct.setTypeIsSet(true); BitSet incoming = iprot.readBitSet(1); if (incoming.get(0)) { 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 index bce2a0c..c82d2ca 100644 --- 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 @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java index 8957ebc..f8627d8 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenReq.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TRenewDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TRenewDelegationTokenReq implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRenewDelegationTokenReq"); 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)1); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TRenewDelegationTokenReqTupleSchemeFactory()); } - private TSessionHandle sessionHandle; // required - private String delegationToken; // required + public TSessionHandle sessionHandle; // required + public String delegationToken; // 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 { @@ -161,8 +156,9 @@ public TSessionHandle getSessionHandle() { return this.sessionHandle; } - public void setSessionHandle(TSessionHandle sessionHandle) { + public TRenewDelegationTokenReq setSessionHandle(TSessionHandle sessionHandle) { this.sessionHandle = sessionHandle; + return this; } public void unsetSessionHandle() { @@ -184,8 +180,9 @@ public String getDelegationToken() { return this.delegationToken; } - public void setDelegationToken(String delegationToken) { + public TRenewDelegationTokenReq setDelegationToken(String delegationToken) { this.delegationToken = delegationToken; + return this; } public void unsetDelegationToken() { @@ -287,45 +284,33 @@ public boolean equals(TRenewDelegationTokenReq that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionHandle = true && (isSetSessionHandle()); - list.add(present_sessionHandle); - if (present_sessionHandle) - list.add(sessionHandle); - - boolean present_delegationToken = true && (isSetDelegationToken()); - list.add(present_delegationToken); - if (present_delegationToken) - list.add(delegationToken); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TRenewDelegationTokenReq other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TRenewDelegationTokenReq typedOther = (TRenewDelegationTokenReq)other; - lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(other.isSetSessionHandle()); + lastComparison = Boolean.valueOf(isSetSessionHandle()).compareTo(typedOther.isSetSessionHandle()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionHandle()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, other.sessionHandle); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionHandle, typedOther.sessionHandle); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(other.isSetDelegationToken()); + lastComparison = Boolean.valueOf(isSetDelegationToken()).compareTo(typedOther.isSetDelegationToken()); if (lastComparison != 0) { return lastComparison; } if (isSetDelegationToken()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, other.delegationToken); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.delegationToken, typedOther.delegationToken); if (lastComparison != 0) { return lastComparison; } @@ -371,14 +356,12 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionHandle()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' is unset! Struct:" + toString()); + if (sessionHandle == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionHandle' was not present! Struct: " + toString()); } - - if (!isSetDelegationToken()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'delegationToken' is unset! Struct:" + toString()); + if (delegationToken == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'delegationToken' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionHandle != null) { sessionHandle.validate(); @@ -442,6 +425,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRenewDelegationTok iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java index 6f5004c..b4b4351 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRenewDelegationTokenResp.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TRenewDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TRenewDelegationTokenResp implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRenewDelegationTokenResp"); 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); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TRenewDelegationTokenRespTupleSchemeFactory()); } - private TStatus status; // required + public TStatus status; // 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 { @@ -148,8 +143,9 @@ public TStatus getStatus() { return this.status; } - public void setStatus(TStatus status) { + public TRenewDelegationTokenResp setStatus(TStatus status) { this.status = status; + return this; } public void unsetStatus() { @@ -229,30 +225,23 @@ public boolean equals(TRenewDelegationTokenResp that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_status = true && (isSetStatus()); - list.add(present_status); - if (present_status) - list.add(status); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TRenewDelegationTokenResp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TRenewDelegationTokenResp typedOther = (TRenewDelegationTokenResp)other; - lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus()); + lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus()); if (lastComparison != 0) { return lastComparison; } if (isSetStatus()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String 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 (status == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'status' was not present! Struct: " + toString()); } - // check for sub-struct validity if (status != null) { status.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRenewDelegationTok iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRow.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRow.java index e95299d..6dbfe69 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRow.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRow.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TRow implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TRow implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRow"); private static final org.apache.thrift.protocol.TField COL_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("colVals", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TRowTupleSchemeFactory()); } - private List colVals; // required + public List colVals; // 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 { @@ -132,7 +127,7 @@ public TRow( */ public TRow(TRow other) { if (other.isSetColVals()) { - List __this__colVals = new ArrayList(other.colVals.size()); + List __this__colVals = new ArrayList(); for (TColumnValue other_element : other.colVals) { __this__colVals.add(new TColumnValue(other_element)); } @@ -168,8 +163,9 @@ public void addToColVals(TColumnValue elem) { return this.colVals; } - public void setColVals(List colVals) { + public TRow setColVals(List colVals) { this.colVals = colVals; + return this; } public void unsetColVals() { @@ -249,30 +245,23 @@ public boolean equals(TRow that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_colVals = true && (isSetColVals()); - list.add(present_colVals); - if (present_colVals) - list.add(colVals); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TRow other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TRow typedOther = (TRow)other; - lastComparison = Boolean.valueOf(isSetColVals()).compareTo(other.isSetColVals()); + lastComparison = Boolean.valueOf(isSetColVals()).compareTo(typedOther.isSetColVals()); if (lastComparison != 0) { return lastComparison; } if (isSetColVals()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colVals, other.colVals); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.colVals, typedOther.colVals); if (lastComparison != 0) { return lastComparison; } @@ -310,10 +299,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetColVals()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'colVals' is unset! Struct:" + toString()); + if (colVals == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'colVals' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -356,12 +344,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRow struct) throws { org.apache.thrift.protocol.TList _list46 = iprot.readListBegin(); struct.colVals = new ArrayList(_list46.size); - TColumnValue _elem47; - for (int _i48 = 0; _i48 < _list46.size; ++_i48) + for (int _i47 = 0; _i47 < _list46.size; ++_i47) { - _elem47 = new TColumnValue(); - _elem47.read(iprot); - struct.colVals.add(_elem47); + TColumnValue _elem48; // required + _elem48 = new TColumnValue(); + _elem48.read(iprot); + struct.colVals.add(_elem48); } iprot.readListEnd(); } @@ -376,6 +364,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRow struct) throws iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -427,12 +417,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TRow struct) throws { org.apache.thrift.protocol.TList _list51 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.colVals = new ArrayList(_list51.size); - TColumnValue _elem52; - for (int _i53 = 0; _i53 < _list51.size; ++_i53) + for (int _i52 = 0; _i52 < _list51.size; ++_i52) { - _elem52 = new TColumnValue(); - _elem52.read(iprot); - struct.colVals.add(_elem52); + TColumnValue _elem53; // required + _elem53 = new TColumnValue(); + _elem53.read(iprot); + struct.colVals.add(_elem53); } } struct.setColValsIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRowSet.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRowSet.java index da3d9d3..c18f8d4 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRowSet.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TRowSet.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TRowSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TRowSet implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TRowSet"); private static final org.apache.thrift.protocol.TField START_ROW_OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("startRowOffset", org.apache.thrift.protocol.TType.I64, (short)1); @@ -50,11 +45,11 @@ schemes.put(TupleScheme.class, new TRowSetTupleSchemeFactory()); } - private long startRowOffset; // required - private List rows; // required - private List columns; // optional - private ByteBuffer binaryColumns; // optional - private int columnCount; // optional + public long startRowOffset; // required + public List rows; // required + public List columns; // optional + public ByteBuffer binaryColumns; // optional + public int columnCount; // 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 { @@ -130,7 +125,7 @@ public String getFieldName() { private static final int __STARTROWOFFSET_ISSET_ID = 0; private static final int __COLUMNCOUNT_ISSET_ID = 1; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.BINARY_COLUMNS,_Fields.COLUMN_COUNT}; + private _Fields optionals[] = {_Fields.COLUMNS,_Fields.BINARY_COLUMNS,_Fields.COLUMN_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); @@ -170,14 +165,14 @@ public TRowSet(TRowSet other) { __isset_bitfield = other.__isset_bitfield; this.startRowOffset = other.startRowOffset; if (other.isSetRows()) { - List __this__rows = new ArrayList(other.rows.size()); + List __this__rows = new ArrayList(); for (TRow other_element : other.rows) { __this__rows.add(new TRow(other_element)); } this.rows = __this__rows; } if (other.isSetColumns()) { - List __this__columns = new ArrayList(other.columns.size()); + List __this__columns = new ArrayList(); for (TColumn other_element : other.columns) { __this__columns.add(new TColumn(other_element)); } @@ -185,6 +180,7 @@ public TRowSet(TRowSet other) { } if (other.isSetBinaryColumns()) { this.binaryColumns = org.apache.thrift.TBaseHelper.copyBinary(other.binaryColumns); +; } this.columnCount = other.columnCount; } @@ -208,9 +204,10 @@ public long getStartRowOffset() { return this.startRowOffset; } - public void setStartRowOffset(long startRowOffset) { + public TRowSet setStartRowOffset(long startRowOffset) { this.startRowOffset = startRowOffset; setStartRowOffsetIsSet(true); + return this; } public void unsetStartRowOffset() { @@ -245,8 +242,9 @@ public void addToRows(TRow elem) { return this.rows; } - public void setRows(List rows) { + public TRowSet setRows(List rows) { this.rows = rows; + return this; } public void unsetRows() { @@ -283,8 +281,9 @@ public void addToColumns(TColumn elem) { return this.columns; } - public void setColumns(List columns) { + public TRowSet setColumns(List columns) { this.columns = columns; + return this; } public void unsetColumns() { @@ -308,15 +307,17 @@ public void setColumnsIsSet(boolean value) { } public ByteBuffer bufferForBinaryColumns() { - return org.apache.thrift.TBaseHelper.copyBinary(binaryColumns); + return binaryColumns; } - public void setBinaryColumns(byte[] binaryColumns) { - this.binaryColumns = binaryColumns == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(binaryColumns, binaryColumns.length)); + public TRowSet setBinaryColumns(byte[] binaryColumns) { + setBinaryColumns(binaryColumns == null ? (ByteBuffer)null : ByteBuffer.wrap(binaryColumns)); + return this; } - public void setBinaryColumns(ByteBuffer binaryColumns) { - this.binaryColumns = org.apache.thrift.TBaseHelper.copyBinary(binaryColumns); + public TRowSet setBinaryColumns(ByteBuffer binaryColumns) { + this.binaryColumns = binaryColumns; + return this; } public void unsetBinaryColumns() { @@ -338,9 +339,10 @@ public int getColumnCount() { return this.columnCount; } - public void setColumnCount(int columnCount) { + public TRowSet setColumnCount(int columnCount) { this.columnCount = columnCount; setColumnCountIsSet(true); + return this; } public void unsetColumnCount() { @@ -404,7 +406,7 @@ public void setFieldValue(_Fields field, Object value) { public Object getFieldValue(_Fields field) { switch (field) { case START_ROW_OFFSET: - return getStartRowOffset(); + return Long.valueOf(getStartRowOffset()); case ROWS: return getRows(); @@ -416,7 +418,7 @@ public Object getFieldValue(_Fields field) { return getBinaryColumns(); case COLUMN_COUNT: - return getColumnCount(); + return Integer.valueOf(getColumnCount()); } throw new IllegalStateException(); @@ -506,90 +508,63 @@ public boolean equals(TRowSet that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_startRowOffset = true; - list.add(present_startRowOffset); - if (present_startRowOffset) - list.add(startRowOffset); - - boolean present_rows = true && (isSetRows()); - list.add(present_rows); - if (present_rows) - list.add(rows); - - boolean present_columns = true && (isSetColumns()); - list.add(present_columns); - if (present_columns) - list.add(columns); - - boolean present_binaryColumns = true && (isSetBinaryColumns()); - list.add(present_binaryColumns); - if (present_binaryColumns) - list.add(binaryColumns); - - boolean present_columnCount = true && (isSetColumnCount()); - list.add(present_columnCount); - if (present_columnCount) - list.add(columnCount); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TRowSet other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TRowSet typedOther = (TRowSet)other; - lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(other.isSetStartRowOffset()); + lastComparison = Boolean.valueOf(isSetStartRowOffset()).compareTo(typedOther.isSetStartRowOffset()); if (lastComparison != 0) { return lastComparison; } if (isSetStartRowOffset()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, other.startRowOffset); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startRowOffset, typedOther.startRowOffset); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetRows()).compareTo(other.isSetRows()); + lastComparison = Boolean.valueOf(isSetRows()).compareTo(typedOther.isSetRows()); if (lastComparison != 0) { return lastComparison; } if (isSetRows()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, other.rows); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rows, typedOther.rows); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetBinaryColumns()).compareTo(other.isSetBinaryColumns()); + lastComparison = Boolean.valueOf(isSetBinaryColumns()).compareTo(typedOther.isSetBinaryColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetBinaryColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryColumns, other.binaryColumns); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.binaryColumns, typedOther.binaryColumns); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetColumnCount()).compareTo(other.isSetColumnCount()); + lastComparison = Boolean.valueOf(isSetColumnCount()).compareTo(typedOther.isSetColumnCount()); if (lastComparison != 0) { return lastComparison; } if (isSetColumnCount()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCount, other.columnCount); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columnCount, typedOther.columnCount); if (lastComparison != 0) { return lastComparison; } @@ -657,14 +632,10 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetStartRowOffset()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'startRowOffset' is unset! Struct:" + toString()); - } - - if (!isSetRows()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'rows' is unset! Struct:" + toString()); + // alas, we cannot check 'startRowOffset' because it's a primitive and you chose the non-beans generator. + if (rows == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'rows' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -717,12 +688,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr { org.apache.thrift.protocol.TList _list118 = iprot.readListBegin(); struct.rows = new ArrayList(_list118.size); - TRow _elem119; - for (int _i120 = 0; _i120 < _list118.size; ++_i120) + for (int _i119 = 0; _i119 < _list118.size; ++_i119) { - _elem119 = new TRow(); - _elem119.read(iprot); - struct.rows.add(_elem119); + TRow _elem120; // required + _elem120 = new TRow(); + _elem120.read(iprot); + struct.rows.add(_elem120); } iprot.readListEnd(); } @@ -736,12 +707,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr { org.apache.thrift.protocol.TList _list121 = iprot.readListBegin(); struct.columns = new ArrayList(_list121.size); - TColumn _elem122; - for (int _i123 = 0; _i123 < _list121.size; ++_i123) + for (int _i122 = 0; _i122 < _list121.size; ++_i122) { - _elem122 = new TColumn(); - _elem122.read(iprot); - struct.columns.add(_elem122); + TColumn _elem123; // required + _elem123 = new TColumn(); + _elem123.read(iprot); + struct.columns.add(_elem123); } iprot.readListEnd(); } @@ -772,6 +743,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TRowSet struct) thr iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method + if (!struct.isSetStartRowOffset()) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'startRowOffset' was not found in serialized data! Struct: " + toString()); + } struct.validate(); } @@ -881,12 +857,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) thro { org.apache.thrift.protocol.TList _list128 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.rows = new ArrayList(_list128.size); - TRow _elem129; - for (int _i130 = 0; _i130 < _list128.size; ++_i130) + for (int _i129 = 0; _i129 < _list128.size; ++_i129) { - _elem129 = new TRow(); - _elem129.read(iprot); - struct.rows.add(_elem129); + TRow _elem130; // required + _elem130 = new TRow(); + _elem130.read(iprot); + struct.rows.add(_elem130); } } struct.setRowsIsSet(true); @@ -895,12 +871,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TRowSet struct) thro { org.apache.thrift.protocol.TList _list131 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList(_list131.size); - TColumn _elem132; - for (int _i133 = 0; _i133 < _list131.size; ++_i133) + for (int _i132 = 0; _i132 < _list131.size; ++_i132) { - _elem132 = new TColumn(); - _elem132.read(iprot); - struct.columns.add(_elem132); + TColumn _elem133; // required + _elem133 = new TColumn(); + _elem133.read(iprot); + struct.columns.add(_elem133); } } struct.setColumnsIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TSessionHandle.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TSessionHandle.java index b5cb6e7..f199806 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TSessionHandle.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TSessionHandle.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TSessionHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TSessionHandle implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSessionHandle"); private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TSessionHandleTupleSchemeFactory()); } - private THandleIdentifier sessionId; // required + public THandleIdentifier sessionId; // 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 { @@ -148,8 +143,9 @@ public THandleIdentifier getSessionId() { return this.sessionId; } - public void setSessionId(THandleIdentifier sessionId) { + public TSessionHandle setSessionId(THandleIdentifier sessionId) { this.sessionId = sessionId; + return this; } public void unsetSessionId() { @@ -229,30 +225,23 @@ public boolean equals(TSessionHandle that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_sessionId = true && (isSetSessionId()); - list.add(present_sessionId); - if (present_sessionId) - list.add(sessionId); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TSessionHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TSessionHandle typedOther = (TSessionHandle)other; - lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId()); + lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId()); if (lastComparison != 0) { return lastComparison; } if (isSetSessionId()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, other.sessionId); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetSessionId()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' is unset! Struct:" + toString()); + if (sessionId == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'sessionId' was not present! Struct: " + toString()); } - // check for sub-struct validity if (sessionId != null) { sessionId.validate(); @@ -349,6 +337,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TSessionHandle stru iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatus.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatus.java index 50f4531..b7b74cd 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatus.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatus.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TStatus implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TStatus implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStatus"); private static final org.apache.thrift.protocol.TField STATUS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCode", org.apache.thrift.protocol.TType.I32, (short)1); @@ -50,11 +45,15 @@ schemes.put(TupleScheme.class, new TStatusTupleSchemeFactory()); } - private TStatusCode statusCode; // required - private List infoMessages; // optional - private String sqlState; // optional - private int errorCode; // optional - private String errorMessage; // optional + /** + * + * @see TStatusCode + */ + public TStatusCode statusCode; // required + public List infoMessages; // optional + public String sqlState; // optional + public int errorCode; // optional + public String errorMessage; // 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 { @@ -133,7 +132,7 @@ public String getFieldName() { // isset id assignments private static final int __ERRORCODE_ISSET_ID = 0; private byte __isset_bitfield = 0; - private static final _Fields optionals[] = {_Fields.INFO_MESSAGES,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE}; + private _Fields optionals[] = {_Fields.INFO_MESSAGES,_Fields.SQL_STATE,_Fields.ERROR_CODE,_Fields.ERROR_MESSAGE}; 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); @@ -171,7 +170,10 @@ public TStatus(TStatus other) { this.statusCode = other.statusCode; } if (other.isSetInfoMessages()) { - List __this__infoMessages = new ArrayList(other.infoMessages); + List __this__infoMessages = new ArrayList(); + for (String other_element : other.infoMessages) { + __this__infoMessages.add(other_element); + } this.infoMessages = __this__infoMessages; } if (other.isSetSqlState()) { @@ -209,8 +211,9 @@ public TStatusCode getStatusCode() { * * @see TStatusCode */ - public void setStatusCode(TStatusCode statusCode) { + public TStatus setStatusCode(TStatusCode statusCode) { this.statusCode = statusCode; + return this; } public void unsetStatusCode() { @@ -247,8 +250,9 @@ public void addToInfoMessages(String elem) { return this.infoMessages; } - public void setInfoMessages(List infoMessages) { + public TStatus setInfoMessages(List infoMessages) { this.infoMessages = infoMessages; + return this; } public void unsetInfoMessages() { @@ -270,8 +274,9 @@ public String getSqlState() { return this.sqlState; } - public void setSqlState(String sqlState) { + public TStatus setSqlState(String sqlState) { this.sqlState = sqlState; + return this; } public void unsetSqlState() { @@ -293,9 +298,10 @@ public int getErrorCode() { return this.errorCode; } - public void setErrorCode(int errorCode) { + public TStatus setErrorCode(int errorCode) { this.errorCode = errorCode; setErrorCodeIsSet(true); + return this; } public void unsetErrorCode() { @@ -315,8 +321,9 @@ public String getErrorMessage() { return this.errorMessage; } - public void setErrorMessage(String errorMessage) { + public TStatus setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; + return this; } public void unsetErrorMessage() { @@ -391,7 +398,7 @@ public Object getFieldValue(_Fields field) { return getSqlState(); case ERROR_CODE: - return getErrorCode(); + return Integer.valueOf(getErrorCode()); case ERROR_MESSAGE: return getErrorMessage(); @@ -484,90 +491,63 @@ public boolean equals(TStatus that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_statusCode = true && (isSetStatusCode()); - list.add(present_statusCode); - if (present_statusCode) - list.add(statusCode.getValue()); - - boolean present_infoMessages = true && (isSetInfoMessages()); - list.add(present_infoMessages); - if (present_infoMessages) - list.add(infoMessages); - - boolean present_sqlState = true && (isSetSqlState()); - list.add(present_sqlState); - if (present_sqlState) - list.add(sqlState); - - boolean present_errorCode = true && (isSetErrorCode()); - list.add(present_errorCode); - if (present_errorCode) - list.add(errorCode); - - boolean present_errorMessage = true && (isSetErrorMessage()); - list.add(present_errorMessage); - if (present_errorMessage) - list.add(errorMessage); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TStatus other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TStatus typedOther = (TStatus)other; - lastComparison = Boolean.valueOf(isSetStatusCode()).compareTo(other.isSetStatusCode()); + lastComparison = Boolean.valueOf(isSetStatusCode()).compareTo(typedOther.isSetStatusCode()); if (lastComparison != 0) { return lastComparison; } if (isSetStatusCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, other.statusCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, typedOther.statusCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetInfoMessages()).compareTo(other.isSetInfoMessages()); + lastComparison = Boolean.valueOf(isSetInfoMessages()).compareTo(typedOther.isSetInfoMessages()); if (lastComparison != 0) { return lastComparison; } if (isSetInfoMessages()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoMessages, other.infoMessages); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.infoMessages, typedOther.infoMessages); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(other.isSetSqlState()); + lastComparison = Boolean.valueOf(isSetSqlState()).compareTo(typedOther.isSetSqlState()); if (lastComparison != 0) { return lastComparison; } if (isSetSqlState()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, other.sqlState); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sqlState, typedOther.sqlState); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(other.isSetErrorCode()); + lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorCode()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, other.errorCode); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(other.isSetErrorMessage()); + lastComparison = Boolean.valueOf(isSetErrorMessage()).compareTo(typedOther.isSetErrorMessage()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorMessage()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, other.errorMessage); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorMessage, typedOther.errorMessage); if (lastComparison != 0) { return lastComparison; } @@ -641,10 +621,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetStatusCode()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'statusCode' is unset! Struct:" + toString()); + if (statusCode == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'statusCode' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -686,7 +665,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStatus struct) thr switch (schemeField.id) { case 1: // STATUS_CODE if (schemeField.type == org.apache.thrift.protocol.TType.I32) { - struct.statusCode = org.apache.hive.service.rpc.thrift.TStatusCode.findByValue(iprot.readI32()); + struct.statusCode = TStatusCode.findByValue(iprot.readI32()); struct.setStatusCodeIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); @@ -697,11 +676,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStatus struct) thr { org.apache.thrift.protocol.TList _list134 = iprot.readListBegin(); struct.infoMessages = new ArrayList(_list134.size); - String _elem135; - for (int _i136 = 0; _i136 < _list134.size; ++_i136) + for (int _i135 = 0; _i135 < _list134.size; ++_i135) { - _elem135 = iprot.readString(); - struct.infoMessages.add(_elem135); + String _elem136; // required + _elem136 = iprot.readString(); + struct.infoMessages.add(_elem136); } iprot.readListEnd(); } @@ -740,6 +719,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStatus struct) thr iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -840,18 +821,18 @@ public void write(org.apache.thrift.protocol.TProtocol prot, TStatus struct) thr @Override public void read(org.apache.thrift.protocol.TProtocol prot, TStatus struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; - struct.statusCode = org.apache.hive.service.rpc.thrift.TStatusCode.findByValue(iprot.readI32()); + struct.statusCode = TStatusCode.findByValue(iprot.readI32()); struct.setStatusCodeIsSet(true); BitSet incoming = iprot.readBitSet(4); if (incoming.get(0)) { { org.apache.thrift.protocol.TList _list139 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.infoMessages = new ArrayList(_list139.size); - String _elem140; - for (int _i141 = 0; _i141 < _list139.size; ++_i141) + for (int _i140 = 0; _i140 < _list139.size; ++_i140) { - _elem140 = iprot.readString(); - struct.infoMessages.add(_elem140); + String _elem141; // required + _elem141 = iprot.readString(); + struct.infoMessages.add(_elem141); } } struct.setInfoMessagesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatusCode.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatusCode.java index fbf1418..d41e085 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatusCode.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStatusCode.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringColumn.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringColumn.java index c83a1fd..4194089 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringColumn.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringColumn.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TStringColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TStringColumn implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStringColumn"); 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); @@ -47,8 +42,8 @@ schemes.put(TupleScheme.class, new TStringColumnTupleSchemeFactory()); } - private List values; // required - private ByteBuffer nulls; // required + public List values; // required + public 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 { @@ -133,7 +128,7 @@ public TStringColumn( { this(); this.values = values; - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + this.nulls = nulls; } /** @@ -141,11 +136,15 @@ public TStringColumn( */ public TStringColumn(TStringColumn other) { if (other.isSetValues()) { - List __this__values = new ArrayList(other.values); + List __this__values = new ArrayList(); + for (String 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); +; } } @@ -178,8 +177,9 @@ public void addToValues(String elem) { return this.values; } - public void setValues(List values) { + public TStringColumn setValues(List values) { this.values = values; + return this; } public void unsetValues() { @@ -203,15 +203,17 @@ public void setValuesIsSet(boolean value) { } public ByteBuffer bufferForNulls() { - return org.apache.thrift.TBaseHelper.copyBinary(nulls); + return nulls; } - public void setNulls(byte[] nulls) { - this.nulls = nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(nulls, nulls.length)); + public TStringColumn setNulls(byte[] nulls) { + setNulls(nulls == null ? (ByteBuffer)null : ByteBuffer.wrap(nulls)); + return this; } - public void setNulls(ByteBuffer nulls) { - this.nulls = org.apache.thrift.TBaseHelper.copyBinary(nulls); + public TStringColumn setNulls(ByteBuffer nulls) { + this.nulls = nulls; + return this; } public void unsetNulls() { @@ -313,45 +315,33 @@ public boolean equals(TStringColumn that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_values = true && (isSetValues()); - list.add(present_values); - if (present_values) - list.add(values); - - boolean present_nulls = true && (isSetNulls()); - list.add(present_nulls); - if (present_nulls) - list.add(nulls); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TStringColumn other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TStringColumn typedOther = (TStringColumn)other; - lastComparison = Boolean.valueOf(isSetValues()).compareTo(other.isSetValues()); + lastComparison = Boolean.valueOf(isSetValues()).compareTo(typedOther.isSetValues()); if (lastComparison != 0) { return lastComparison; } if (isSetValues()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, other.values); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.values, typedOther.values); if (lastComparison != 0) { return lastComparison; } } - lastComparison = Boolean.valueOf(isSetNulls()).compareTo(other.isSetNulls()); + lastComparison = Boolean.valueOf(isSetNulls()).compareTo(typedOther.isSetNulls()); if (lastComparison != 0) { return lastComparison; } if (isSetNulls()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, other.nulls); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nulls, typedOther.nulls); if (lastComparison != 0) { return lastComparison; } @@ -397,14 +387,12 @@ public String 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 (values == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'values' was not present! Struct: " + toString()); } - - if (!isSetNulls()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' is unset! Struct:" + toString()); + if (nulls == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nulls' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -447,11 +435,11 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStringColumn struc { org.apache.thrift.protocol.TList _list102 = iprot.readListBegin(); struct.values = new ArrayList(_list102.size); - String _elem103; - for (int _i104 = 0; _i104 < _list102.size; ++_i104) + for (int _i103 = 0; _i103 < _list102.size; ++_i103) { - _elem103 = iprot.readString(); - struct.values.add(_elem103); + String _elem104; // required + _elem104 = iprot.readString(); + struct.values.add(_elem104); } iprot.readListEnd(); } @@ -474,6 +462,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStringColumn struc iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -531,11 +521,11 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TStringColumn struct { org.apache.thrift.protocol.TList _list107 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32()); struct.values = new ArrayList(_list107.size); - String _elem108; - for (int _i109 = 0; _i109 < _list107.size; ++_i109) + for (int _i108 = 0; _i108 < _list107.size; ++_i108) { - _elem108 = iprot.readString(); - struct.values.add(_elem108); + String _elem109; // required + _elem109 = iprot.readString(); + struct.values.add(_elem109); } } struct.setValuesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringValue.java index 13874e5..320aa9d 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStringValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TStringValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TStringValue implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStringValue"); private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TStringValueTupleSchemeFactory()); } - private String value; // optional + public String 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 { @@ -107,7 +102,7 @@ public String getFieldName() { } // isset id assignments - private static final _Fields optionals[] = {_Fields.VALUE}; + 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); @@ -142,8 +137,9 @@ public String getValue() { return this.value; } - public void setValue(String value) { + public TStringValue setValue(String value) { this.value = value; + return this; } public void unsetValue() { @@ -223,30 +219,23 @@ public boolean equals(TStringValue that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_value = true && (isSetValue()); - list.add(present_value); - if (present_value) - list.add(value); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TStringValue other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TStringValue typedOther = (TStringValue)other; - lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue()); + lastComparison = Boolean.valueOf(isSetValue()).compareTo(typedOther.isSetValue()); if (lastComparison != 0) { return lastComparison; } if (isSetValue()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, other.value); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.value, typedOther.value); if (lastComparison != 0) { return lastComparison; } @@ -337,6 +326,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStringValue struct iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java index 6c2c4f5..0ad81ef 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TStructTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TStructTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TStructTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TStructTypeEntry"); private static final org.apache.thrift.protocol.TField NAME_TO_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("nameToTypePtr", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TStructTypeEntryTupleSchemeFactory()); } - private Map nameToTypePtr; // required + public Map nameToTypePtr; // 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 { @@ -133,7 +128,7 @@ public TStructTypeEntry( */ public TStructTypeEntry(TStructTypeEntry other) { if (other.isSetNameToTypePtr()) { - Map __this__nameToTypePtr = new HashMap(other.nameToTypePtr.size()); + Map __this__nameToTypePtr = new HashMap(); for (Map.Entry other_element : other.nameToTypePtr.entrySet()) { String other_element_key = other_element.getKey(); @@ -173,8 +168,9 @@ public void putToNameToTypePtr(String key, int val) { return this.nameToTypePtr; } - public void setNameToTypePtr(Map nameToTypePtr) { + public TStructTypeEntry setNameToTypePtr(Map nameToTypePtr) { this.nameToTypePtr = nameToTypePtr; + return this; } public void unsetNameToTypePtr() { @@ -254,30 +250,23 @@ public boolean equals(TStructTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_nameToTypePtr = true && (isSetNameToTypePtr()); - list.add(present_nameToTypePtr); - if (present_nameToTypePtr) - list.add(nameToTypePtr); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TStructTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TStructTypeEntry typedOther = (TStructTypeEntry)other; - lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(other.isSetNameToTypePtr()); + lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(typedOther.isSetNameToTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetNameToTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, other.nameToTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, typedOther.nameToTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -315,10 +304,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetNameToTypePtr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nameToTypePtr' is unset! Struct:" + toString()); + if (nameToTypePtr == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nameToTypePtr' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -361,13 +349,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStructTypeEntry st { org.apache.thrift.protocol.TMap _map10 = iprot.readMapBegin(); struct.nameToTypePtr = new HashMap(2*_map10.size); - String _key11; - int _val12; - for (int _i13 = 0; _i13 < _map10.size; ++_i13) + for (int _i11 = 0; _i11 < _map10.size; ++_i11) { - _key11 = iprot.readString(); - _val12 = iprot.readI32(); - struct.nameToTypePtr.put(_key11, _val12); + String _key12; // required + int _val13; // required + _key12 = iprot.readString(); + _val13 = iprot.readI32(); + struct.nameToTypePtr.put(_key12, _val13); } iprot.readMapEnd(); } @@ -382,6 +370,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TStructTypeEntry st iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -435,13 +425,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TStructTypeEntry str { org.apache.thrift.protocol.TMap _map16 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.nameToTypePtr = new HashMap(2*_map16.size); - String _key17; - int _val18; - for (int _i19 = 0; _i19 < _map16.size; ++_i19) + for (int _i17 = 0; _i17 < _map16.size; ++_i17) { - _key17 = iprot.readString(); - _val18 = iprot.readI32(); - struct.nameToTypePtr.put(_key17, _val18); + String _key18; // required + int _val19; // required + _key18 = iprot.readString(); + _val19 = iprot.readI32(); + struct.nameToTypePtr.put(_key18, _val19); } } struct.setNameToTypePtrIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTableSchema.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTableSchema.java index 007b160..9cd6cc3 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTableSchema.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTableSchema.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TTableSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TTableSchema implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTableSchema"); private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TTableSchemaTupleSchemeFactory()); } - private List columns; // required + public List columns; // 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 { @@ -132,7 +127,7 @@ public TTableSchema( */ public TTableSchema(TTableSchema other) { if (other.isSetColumns()) { - List __this__columns = new ArrayList(other.columns.size()); + List __this__columns = new ArrayList(); for (TColumnDesc other_element : other.columns) { __this__columns.add(new TColumnDesc(other_element)); } @@ -168,8 +163,9 @@ public void addToColumns(TColumnDesc elem) { return this.columns; } - public void setColumns(List columns) { + public TTableSchema setColumns(List columns) { this.columns = columns; + return this; } public void unsetColumns() { @@ -249,30 +245,23 @@ public boolean equals(TTableSchema that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_columns = true && (isSetColumns()); - list.add(present_columns); - if (present_columns) - list.add(columns); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TTableSchema other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TTableSchema typedOther = (TTableSchema)other; - lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns()); + lastComparison = Boolean.valueOf(isSetColumns()).compareTo(typedOther.isSetColumns()); if (lastComparison != 0) { return lastComparison; } if (isSetColumns()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, other.columns); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.columns, typedOther.columns); if (lastComparison != 0) { return lastComparison; } @@ -310,10 +299,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetColumns()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'columns' is unset! Struct:" + toString()); + if (columns == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'columns' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -356,12 +344,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTableSchema struct { org.apache.thrift.protocol.TList _list38 = iprot.readListBegin(); struct.columns = new ArrayList(_list38.size); - TColumnDesc _elem39; - for (int _i40 = 0; _i40 < _list38.size; ++_i40) + for (int _i39 = 0; _i39 < _list38.size; ++_i39) { - _elem39 = new TColumnDesc(); - _elem39.read(iprot); - struct.columns.add(_elem39); + TColumnDesc _elem40; // required + _elem40 = new TColumnDesc(); + _elem40.read(iprot); + struct.columns.add(_elem40); } iprot.readListEnd(); } @@ -376,6 +364,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTableSchema struct iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -427,12 +417,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTableSchema struct) { org.apache.thrift.protocol.TList _list43 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.columns = new ArrayList(_list43.size); - TColumnDesc _elem44; - for (int _i45 = 0; _i45 < _list43.size; ++_i45) + for (int _i44 = 0; _i44 < _list43.size; ++_i44) { - _elem44 = new TColumnDesc(); - _elem44.read(iprot); - struct.columns.add(_elem44); + TColumnDesc _elem45; // required + _elem45 = new TColumnDesc(); + _elem45.read(iprot); + struct.columns.add(_elem45); } } struct.setColumnsIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeDesc.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeDesc.java index 055a14d..db4908d 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeDesc.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeDesc.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TTypeDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TTypeDesc implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeDesc"); private static final org.apache.thrift.protocol.TField TYPES_FIELD_DESC = new org.apache.thrift.protocol.TField("types", org.apache.thrift.protocol.TType.LIST, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TTypeDescTupleSchemeFactory()); } - private List types; // required + public List types; // 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 { @@ -132,7 +127,7 @@ public TTypeDesc( */ public TTypeDesc(TTypeDesc other) { if (other.isSetTypes()) { - List __this__types = new ArrayList(other.types.size()); + List __this__types = new ArrayList(); for (TTypeEntry other_element : other.types) { __this__types.add(new TTypeEntry(other_element)); } @@ -168,8 +163,9 @@ public void addToTypes(TTypeEntry elem) { return this.types; } - public void setTypes(List types) { + public TTypeDesc setTypes(List types) { this.types = types; + return this; } public void unsetTypes() { @@ -249,30 +245,23 @@ public boolean equals(TTypeDesc that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_types = true && (isSetTypes()); - list.add(present_types); - if (present_types) - list.add(types); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TTypeDesc other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TTypeDesc typedOther = (TTypeDesc)other; - lastComparison = Boolean.valueOf(isSetTypes()).compareTo(other.isSetTypes()); + lastComparison = Boolean.valueOf(isSetTypes()).compareTo(typedOther.isSetTypes()); if (lastComparison != 0) { return lastComparison; } if (isSetTypes()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, other.types); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.types, typedOther.types); if (lastComparison != 0) { return lastComparison; } @@ -310,10 +299,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetTypes()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'types' is unset! Struct:" + toString()); + if (types == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'types' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -356,12 +344,12 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeDesc struct) t { org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(); struct.types = new ArrayList(_list30.size); - TTypeEntry _elem31; - for (int _i32 = 0; _i32 < _list30.size; ++_i32) + for (int _i31 = 0; _i31 < _list30.size; ++_i31) { - _elem31 = new TTypeEntry(); - _elem31.read(iprot); - struct.types.add(_elem31); + TTypeEntry _elem32; // required + _elem32 = new TTypeEntry(); + _elem32.read(iprot); + struct.types.add(_elem32); } iprot.readListEnd(); } @@ -376,6 +364,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeDesc struct) t iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -427,12 +417,12 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTypeDesc struct) th { org.apache.thrift.protocol.TList _list35 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.types = new ArrayList(_list35.size); - TTypeEntry _elem36; - for (int _i37 = 0; _i37 < _list35.size; ++_i37) + for (int _i36 = 0; _i36 < _list35.size; ++_i36) { - _elem36 = new TTypeEntry(); - _elem36.read(iprot); - struct.types.add(_elem36); + TTypeEntry _elem37; // required + _elem37 = new TTypeEntry(); + _elem37.read(iprot); + struct.types.add(_elem37); } } struct.setTypesIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeEntry.java index 3dbed9d..5c6cc27 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TTypeEntry extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeEntry"); private static final org.apache.thrift.protocol.TField PRIMITIVE_ENTRY_FIELD_DESC = new org.apache.thrift.protocol.TField("primitiveEntry", org.apache.thrift.protocol.TType.STRUCT, (short)1); @@ -294,7 +290,6 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @@ -577,22 +572,14 @@ public int compareTo(TTypeEntry other) { } + /** + * If you'd like this to perform more respectably, use the hashcode generator option. + */ @Override public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); + return 0; } + 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))); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeId.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeId.java index a3735eb..036363c 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeId.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeId.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java index 0fa69c8..8ebae97 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifierValue.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,11 +27,9 @@ 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"}) public class TTypeQualifierValue extends org.apache.thrift.TUnion { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeQualifierValue"); private static final org.apache.thrift.protocol.TField I32_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("i32Value", org.apache.thrift.protocol.TType.I32, (short)1); @@ -184,7 +180,6 @@ protected Object standardSchemeReadValue(org.apache.thrift.protocol.TProtocol ip throw new IllegalStateException("setField wasn't null, but didn't match any of the case statements!"); } } else { - org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type); return null; } } @@ -328,22 +323,14 @@ public int compareTo(TTypeQualifierValue other) { } + /** + * If you'd like this to perform more respectably, use the hashcode generator option. + */ @Override public int hashCode() { - List list = new ArrayList(); - list.add(this.getClass().getName()); - org.apache.thrift.TFieldIdEnum setField = getSetField(); - if (setField != null) { - list.add(setField.getThriftFieldId()); - Object value = getFieldValue(); - if (value instanceof org.apache.thrift.TEnum) { - list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); - } else { - list.add(value); - } - } - return list.hashCode(); + return 0; } + 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))); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java index f46d2ce..1405cea 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TTypeQualifiers.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TTypeQualifiers implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TTypeQualifiers implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTypeQualifiers"); private static final org.apache.thrift.protocol.TField QUALIFIERS_FIELD_DESC = new org.apache.thrift.protocol.TField("qualifiers", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TTypeQualifiersTupleSchemeFactory()); } - private Map qualifiers; // required + public Map qualifiers; // 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 { @@ -133,7 +128,7 @@ public TTypeQualifiers( */ public TTypeQualifiers(TTypeQualifiers other) { if (other.isSetQualifiers()) { - Map __this__qualifiers = new HashMap(other.qualifiers.size()); + Map __this__qualifiers = new HashMap(); for (Map.Entry other_element : other.qualifiers.entrySet()) { String other_element_key = other_element.getKey(); @@ -173,8 +168,9 @@ public void putToQualifiers(String key, TTypeQualifierValue val) { return this.qualifiers; } - public void setQualifiers(Map qualifiers) { + public TTypeQualifiers setQualifiers(Map qualifiers) { this.qualifiers = qualifiers; + return this; } public void unsetQualifiers() { @@ -254,30 +250,23 @@ public boolean equals(TTypeQualifiers that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_qualifiers = true && (isSetQualifiers()); - list.add(present_qualifiers); - if (present_qualifiers) - list.add(qualifiers); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TTypeQualifiers other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TTypeQualifiers typedOther = (TTypeQualifiers)other; - lastComparison = Boolean.valueOf(isSetQualifiers()).compareTo(other.isSetQualifiers()); + lastComparison = Boolean.valueOf(isSetQualifiers()).compareTo(typedOther.isSetQualifiers()); if (lastComparison != 0) { return lastComparison; } if (isSetQualifiers()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifiers, other.qualifiers); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifiers, typedOther.qualifiers); if (lastComparison != 0) { return lastComparison; } @@ -315,10 +304,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetQualifiers()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifiers' is unset! Struct:" + toString()); + if (qualifiers == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'qualifiers' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -361,14 +349,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeQualifiers str { org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin(); struct.qualifiers = new HashMap(2*_map0.size); - String _key1; - TTypeQualifierValue _val2; - for (int _i3 = 0; _i3 < _map0.size; ++_i3) + for (int _i1 = 0; _i1 < _map0.size; ++_i1) { - _key1 = iprot.readString(); - _val2 = new TTypeQualifierValue(); - _val2.read(iprot); - struct.qualifiers.put(_key1, _val2); + String _key2; // required + TTypeQualifierValue _val3; // required + _key2 = iprot.readString(); + _val3 = new TTypeQualifierValue(); + _val3.read(iprot); + struct.qualifiers.put(_key2, _val3); } iprot.readMapEnd(); } @@ -383,6 +371,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TTypeQualifiers str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -436,14 +426,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TTypeQualifiers stru { org.apache.thrift.protocol.TMap _map6 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.qualifiers = new HashMap(2*_map6.size); - String _key7; - TTypeQualifierValue _val8; - for (int _i9 = 0; _i9 < _map6.size; ++_i9) + for (int _i7 = 0; _i7 < _map6.size; ++_i7) { - _key7 = iprot.readString(); - _val8 = new TTypeQualifierValue(); - _val8.read(iprot); - struct.qualifiers.put(_key7, _val8); + String _key8; // required + TTypeQualifierValue _val9; // required + _key8 = iprot.readString(); + _val9 = new TTypeQualifierValue(); + _val9.read(iprot); + struct.qualifiers.put(_key8, _val9); } } struct.setQualifiersIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java index d53f74c..edf2495 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUnionTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TUnionTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TUnionTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUnionTypeEntry"); private static final org.apache.thrift.protocol.TField NAME_TO_TYPE_PTR_FIELD_DESC = new org.apache.thrift.protocol.TField("nameToTypePtr", org.apache.thrift.protocol.TType.MAP, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TUnionTypeEntryTupleSchemeFactory()); } - private Map nameToTypePtr; // required + public Map nameToTypePtr; // 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 { @@ -133,7 +128,7 @@ public TUnionTypeEntry( */ public TUnionTypeEntry(TUnionTypeEntry other) { if (other.isSetNameToTypePtr()) { - Map __this__nameToTypePtr = new HashMap(other.nameToTypePtr.size()); + Map __this__nameToTypePtr = new HashMap(); for (Map.Entry other_element : other.nameToTypePtr.entrySet()) { String other_element_key = other_element.getKey(); @@ -173,8 +168,9 @@ public void putToNameToTypePtr(String key, int val) { return this.nameToTypePtr; } - public void setNameToTypePtr(Map nameToTypePtr) { + public TUnionTypeEntry setNameToTypePtr(Map nameToTypePtr) { this.nameToTypePtr = nameToTypePtr; + return this; } public void unsetNameToTypePtr() { @@ -254,30 +250,23 @@ public boolean equals(TUnionTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_nameToTypePtr = true && (isSetNameToTypePtr()); - list.add(present_nameToTypePtr); - if (present_nameToTypePtr) - list.add(nameToTypePtr); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TUnionTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TUnionTypeEntry typedOther = (TUnionTypeEntry)other; - lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(other.isSetNameToTypePtr()); + lastComparison = Boolean.valueOf(isSetNameToTypePtr()).compareTo(typedOther.isSetNameToTypePtr()); if (lastComparison != 0) { return lastComparison; } if (isSetNameToTypePtr()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, other.nameToTypePtr); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nameToTypePtr, typedOther.nameToTypePtr); if (lastComparison != 0) { return lastComparison; } @@ -315,10 +304,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetNameToTypePtr()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'nameToTypePtr' is unset! Struct:" + toString()); + if (nameToTypePtr == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'nameToTypePtr' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -361,13 +349,13 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TUnionTypeEntry str { org.apache.thrift.protocol.TMap _map20 = iprot.readMapBegin(); struct.nameToTypePtr = new HashMap(2*_map20.size); - String _key21; - int _val22; - for (int _i23 = 0; _i23 < _map20.size; ++_i23) + for (int _i21 = 0; _i21 < _map20.size; ++_i21) { - _key21 = iprot.readString(); - _val22 = iprot.readI32(); - struct.nameToTypePtr.put(_key21, _val22); + String _key22; // required + int _val23; // required + _key22 = iprot.readString(); + _val23 = iprot.readI32(); + struct.nameToTypePtr.put(_key22, _val23); } iprot.readMapEnd(); } @@ -382,6 +370,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TUnionTypeEntry str iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } @@ -435,13 +425,13 @@ public void read(org.apache.thrift.protocol.TProtocol prot, TUnionTypeEntry stru { org.apache.thrift.protocol.TMap _map26 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I32, iprot.readI32()); struct.nameToTypePtr = new HashMap(2*_map26.size); - String _key27; - int _val28; - for (int _i29 = 0; _i29 < _map26.size; ++_i29) + for (int _i27 = 0; _i27 < _map26.size; ++_i27) { - _key27 = iprot.readString(); - _val28 = iprot.readI32(); - struct.nameToTypePtr.put(_key27, _val28); + String _key28; // required + int _val29; // required + _key28 = iprot.readString(); + _val29 = iprot.readI32(); + struct.nameToTypePtr.put(_key28, _val29); } } struct.setNameToTypePtrIsSet(true); diff --git a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java index b80c4dd..e2b1eb0 100644 --- a/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java +++ b/service-rpc/src/gen/thrift/gen-javabean/org/apache/hive/service/rpc/thrift/TUserDefinedTypeEntry.java @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.3) + * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -15,8 +15,6 @@ 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; @@ -29,13 +27,10 @@ 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 TUserDefinedTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable { +public class TUserDefinedTypeEntry implements org.apache.thrift.TBase, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TUserDefinedTypeEntry"); private static final org.apache.thrift.protocol.TField TYPE_CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("typeClassName", org.apache.thrift.protocol.TType.STRING, (short)1); @@ -46,7 +41,7 @@ schemes.put(TupleScheme.class, new TUserDefinedTypeEntryTupleSchemeFactory()); } - private String typeClassName; // required + public String typeClassName; // 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 { @@ -148,8 +143,9 @@ public String getTypeClassName() { return this.typeClassName; } - public void setTypeClassName(String typeClassName) { + public TUserDefinedTypeEntry setTypeClassName(String typeClassName) { this.typeClassName = typeClassName; + return this; } public void unsetTypeClassName() { @@ -229,30 +225,23 @@ public boolean equals(TUserDefinedTypeEntry that) { @Override public int hashCode() { - List list = new ArrayList(); - - boolean present_typeClassName = true && (isSetTypeClassName()); - list.add(present_typeClassName); - if (present_typeClassName) - list.add(typeClassName); - - return list.hashCode(); + return 0; } - @Override public int compareTo(TUserDefinedTypeEntry other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; + TUserDefinedTypeEntry typedOther = (TUserDefinedTypeEntry)other; - lastComparison = Boolean.valueOf(isSetTypeClassName()).compareTo(other.isSetTypeClassName()); + lastComparison = Boolean.valueOf(isSetTypeClassName()).compareTo(typedOther.isSetTypeClassName()); if (lastComparison != 0) { return lastComparison; } if (isSetTypeClassName()) { - lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeClassName, other.typeClassName); + lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.typeClassName, typedOther.typeClassName); if (lastComparison != 0) { return lastComparison; } @@ -290,10 +279,9 @@ public String toString() { public void validate() throws org.apache.thrift.TException { // check for required fields - if (!isSetTypeClassName()) { - throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeClassName' is unset! Struct:" + toString()); + if (typeClassName == null) { + throw new org.apache.thrift.protocol.TProtocolException("Required field 'typeClassName' was not present! Struct: " + toString()); } - // check for sub-struct validity } @@ -345,6 +333,8 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, TUserDefinedTypeEnt iprot.readFieldEnd(); } iprot.readStructEnd(); + + // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } diff --git a/service/src/java/org/apache/hive/service/cli/CLIService.java b/service/src/java/org/apache/hive/service/cli/CLIService.java index 662e55c..b9ee46e 100644 --- a/service/src/java/org/apache/hive/service/cli/CLIService.java +++ b/service/src/java/org/apache/hive/service/cli/CLIService.java @@ -454,7 +454,10 @@ public OperationStatus getOperationStatus(OperationHandle opHandle) // In this case, the call might return sooner than long polling timeout } } + OperationStatus opStatus = operation.getStatus(); + long numRows = operation.getParentSession().getSessionState().getNumRows(); + opStatus.setNumRows(numRows); LOG.debug(opHandle + ": getOperationStatus()"); return opStatus; } diff --git a/service/src/java/org/apache/hive/service/cli/OperationStatus.java b/service/src/java/org/apache/hive/service/cli/OperationStatus.java index b0a26e3..c647ee8 100644 --- a/service/src/java/org/apache/hive/service/cli/OperationStatus.java +++ b/service/src/java/org/apache/hive/service/cli/OperationStatus.java @@ -28,6 +28,7 @@ private final String taskStatus; private final long operationStarted; private final long operationCompleted; + private long numRows; private final boolean hasResultSet; private final HiveSQLException operationException; @@ -48,6 +49,9 @@ public String getTaskStatus() { return taskStatus; } + public long getNumRows() {return numRows;} + + public void setNumRows(long numRows){this.numRows = numRows;} public long getOperationStarted() { return operationStarted; } diff --git a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java index 2938338..3150903 100644 --- a/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java +++ b/service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java @@ -40,17 +40,7 @@ import org.apache.hive.service.auth.HiveAuthFactory; import org.apache.hive.service.auth.TSetIpAddressProcessor; import org.apache.hive.service.auth.HiveAuthFactory.AuthTypes; -import org.apache.hive.service.cli.CLIService; -import org.apache.hive.service.cli.FetchOrientation; -import org.apache.hive.service.cli.FetchType; -import org.apache.hive.service.cli.GetInfoType; -import org.apache.hive.service.cli.GetInfoValue; -import org.apache.hive.service.cli.HiveSQLException; -import org.apache.hive.service.cli.OperationHandle; -import org.apache.hive.service.cli.OperationStatus; -import org.apache.hive.service.cli.RowSet; -import org.apache.hive.service.cli.SessionHandle; -import org.apache.hive.service.cli.TableSchema; +import org.apache.hive.service.cli.*; import org.apache.hive.service.cli.session.SessionManager; import org.apache.hive.service.rpc.thrift.TCLIService; import org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq; @@ -632,6 +622,11 @@ public TGetOperationStatusResp GetOperationStatus(TGetOperationStatusReq req) th try { OperationStatus operationStatus = cliService.getOperationStatus( new OperationHandle(req.getOperationHandle())); + if(operationStatus.getState().equals(OperationState.FINISHED)){ + long numRows = operationStatus.getNumRows(); + resp.setNumRows(numRows); + LOG.info("AAAAAAAAAAAAAAAAAAAA" + numRows); + } resp.setOperationState(operationStatus.getState().toTOperationState()); HiveSQLException opException = operationStatus.getOperationException(); resp.setTaskStatus(operationStatus.getTaskStatus());