Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Autogenerated by Thrift Compiler (0.9.3)
0003  *
0004  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
0005  *  @generated
0006  */
0007 package org.apache.hive.service.rpc.thrift;
0008 
0009 import org.apache.thrift.scheme.IScheme;
0010 import org.apache.thrift.scheme.SchemeFactory;
0011 import org.apache.thrift.scheme.StandardScheme;
0012 
0013 import org.apache.thrift.scheme.TupleScheme;
0014 import org.apache.thrift.protocol.TTupleProtocol;
0015 import org.apache.thrift.protocol.TProtocolException;
0016 import org.apache.thrift.EncodingUtils;
0017 import org.apache.thrift.TException;
0018 import org.apache.thrift.async.AsyncMethodCallback;
0019 import org.apache.thrift.server.AbstractNonblockingServer.*;
0020 import java.util.List;
0021 import java.util.ArrayList;
0022 import java.util.Map;
0023 import java.util.HashMap;
0024 import java.util.EnumMap;
0025 import java.util.Set;
0026 import java.util.HashSet;
0027 import java.util.EnumSet;
0028 import java.util.Collections;
0029 import java.util.BitSet;
0030 import java.nio.ByteBuffer;
0031 import java.util.Arrays;
0032 import javax.annotation.Generated;
0033 import org.slf4j.Logger;
0034 import org.slf4j.LoggerFactory;
0035 
0036 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
0037 @Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
0038 public class TOperationHandle implements org.apache.thrift.TBase<TOperationHandle, TOperationHandle._Fields>, java.io.Serializable, Cloneable, Comparable<TOperationHandle> {
0039   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TOperationHandle");
0040 
0041   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);
0042   private static final org.apache.thrift.protocol.TField OPERATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("operationType", org.apache.thrift.protocol.TType.I32, (short)2);
0043   private static final org.apache.thrift.protocol.TField HAS_RESULT_SET_FIELD_DESC = new org.apache.thrift.protocol.TField("hasResultSet", org.apache.thrift.protocol.TType.BOOL, (short)3);
0044   private static final org.apache.thrift.protocol.TField MODIFIED_ROW_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("modifiedRowCount", org.apache.thrift.protocol.TType.DOUBLE, (short)4);
0045 
0046   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
0047   static {
0048     schemes.put(StandardScheme.class, new TOperationHandleStandardSchemeFactory());
0049     schemes.put(TupleScheme.class, new TOperationHandleTupleSchemeFactory());
0050   }
0051 
0052   private THandleIdentifier operationId; // required
0053   private TOperationType operationType; // required
0054   private boolean hasResultSet; // required
0055   private double modifiedRowCount; // optional
0056 
0057   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
0058   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
0059     OPERATION_ID((short)1, "operationId"),
0060     /**
0061      * 
0062      * @see TOperationType
0063      */
0064     OPERATION_TYPE((short)2, "operationType"),
0065     HAS_RESULT_SET((short)3, "hasResultSet"),
0066     MODIFIED_ROW_COUNT((short)4, "modifiedRowCount");
0067 
0068     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
0069 
0070     static {
0071       for (_Fields field : EnumSet.allOf(_Fields.class)) {
0072         byName.put(field.getFieldName(), field);
0073       }
0074     }
0075 
0076     /**
0077      * Find the _Fields constant that matches fieldId, or null if its not found.
0078      */
0079     public static _Fields findByThriftId(int fieldId) {
0080       switch(fieldId) {
0081         case 1: // OPERATION_ID
0082           return OPERATION_ID;
0083         case 2: // OPERATION_TYPE
0084           return OPERATION_TYPE;
0085         case 3: // HAS_RESULT_SET
0086           return HAS_RESULT_SET;
0087         case 4: // MODIFIED_ROW_COUNT
0088           return MODIFIED_ROW_COUNT;
0089         default:
0090           return null;
0091       }
0092     }
0093 
0094     /**
0095      * Find the _Fields constant that matches fieldId, throwing an exception
0096      * if it is not found.
0097      */
0098     public static _Fields findByThriftIdOrThrow(int fieldId) {
0099       _Fields fields = findByThriftId(fieldId);
0100       if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
0101       return fields;
0102     }
0103 
0104     /**
0105      * Find the _Fields constant that matches name, or null if its not found.
0106      */
0107     public static _Fields findByName(String name) {
0108       return byName.get(name);
0109     }
0110 
0111     private final short _thriftId;
0112     private final String _fieldName;
0113 
0114     _Fields(short thriftId, String fieldName) {
0115       _thriftId = thriftId;
0116       _fieldName = fieldName;
0117     }
0118 
0119     public short getThriftFieldId() {
0120       return _thriftId;
0121     }
0122 
0123     public String getFieldName() {
0124       return _fieldName;
0125     }
0126   }
0127 
0128   // isset id assignments
0129   private static final int __HASRESULTSET_ISSET_ID = 0;
0130   private static final int __MODIFIEDROWCOUNT_ISSET_ID = 1;
0131   private byte __isset_bitfield = 0;
0132   private static final _Fields optionals[] = {_Fields.MODIFIED_ROW_COUNT};
0133   public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
0134   static {
0135     Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
0136     tmpMap.put(_Fields.OPERATION_ID, new org.apache.thrift.meta_data.FieldMetaData("operationId", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0137         new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, THandleIdentifier.class)));
0138     tmpMap.put(_Fields.OPERATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("operationType", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0139         new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TOperationType.class)));
0140     tmpMap.put(_Fields.HAS_RESULT_SET, new org.apache.thrift.meta_data.FieldMetaData("hasResultSet", org.apache.thrift.TFieldRequirementType.REQUIRED, 
0141         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
0142     tmpMap.put(_Fields.MODIFIED_ROW_COUNT, new org.apache.thrift.meta_data.FieldMetaData("modifiedRowCount", org.apache.thrift.TFieldRequirementType.OPTIONAL, 
0143         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
0144     metaDataMap = Collections.unmodifiableMap(tmpMap);
0145     org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TOperationHandle.class, metaDataMap);
0146   }
0147 
0148   public TOperationHandle() {
0149   }
0150 
0151   public TOperationHandle(
0152     THandleIdentifier operationId,
0153     TOperationType operationType,
0154     boolean hasResultSet)
0155   {
0156     this();
0157     this.operationId = operationId;
0158     this.operationType = operationType;
0159     this.hasResultSet = hasResultSet;
0160     setHasResultSetIsSet(true);
0161   }
0162 
0163   /**
0164    * Performs a deep copy on <i>other</i>.
0165    */
0166   public TOperationHandle(TOperationHandle other) {
0167     __isset_bitfield = other.__isset_bitfield;
0168     if (other.isSetOperationId()) {
0169       this.operationId = new THandleIdentifier(other.operationId);
0170     }
0171     if (other.isSetOperationType()) {
0172       this.operationType = other.operationType;
0173     }
0174     this.hasResultSet = other.hasResultSet;
0175     this.modifiedRowCount = other.modifiedRowCount;
0176   }
0177 
0178   public TOperationHandle deepCopy() {
0179     return new TOperationHandle(this);
0180   }
0181 
0182   @Override
0183   public void clear() {
0184     this.operationId = null;
0185     this.operationType = null;
0186     setHasResultSetIsSet(false);
0187     this.hasResultSet = false;
0188     setModifiedRowCountIsSet(false);
0189     this.modifiedRowCount = 0.0;
0190   }
0191 
0192   public THandleIdentifier getOperationId() {
0193     return this.operationId;
0194   }
0195 
0196   public void setOperationId(THandleIdentifier operationId) {
0197     this.operationId = operationId;
0198   }
0199 
0200   public void unsetOperationId() {
0201     this.operationId = null;
0202   }
0203 
0204   /** Returns true if field operationId is set (has been assigned a value) and false otherwise */
0205   public boolean isSetOperationId() {
0206     return this.operationId != null;
0207   }
0208 
0209   public void setOperationIdIsSet(boolean value) {
0210     if (!value) {
0211       this.operationId = null;
0212     }
0213   }
0214 
0215   /**
0216    * 
0217    * @see TOperationType
0218    */
0219   public TOperationType getOperationType() {
0220     return this.operationType;
0221   }
0222 
0223   /**
0224    * 
0225    * @see TOperationType
0226    */
0227   public void setOperationType(TOperationType operationType) {
0228     this.operationType = operationType;
0229   }
0230 
0231   public void unsetOperationType() {
0232     this.operationType = null;
0233   }
0234 
0235   /** Returns true if field operationType is set (has been assigned a value) and false otherwise */
0236   public boolean isSetOperationType() {
0237     return this.operationType != null;
0238   }
0239 
0240   public void setOperationTypeIsSet(boolean value) {
0241     if (!value) {
0242       this.operationType = null;
0243     }
0244   }
0245 
0246   public boolean isHasResultSet() {
0247     return this.hasResultSet;
0248   }
0249 
0250   public void setHasResultSet(boolean hasResultSet) {
0251     this.hasResultSet = hasResultSet;
0252     setHasResultSetIsSet(true);
0253   }
0254 
0255   public void unsetHasResultSet() {
0256     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
0257   }
0258 
0259   /** Returns true if field hasResultSet is set (has been assigned a value) and false otherwise */
0260   public boolean isSetHasResultSet() {
0261     return EncodingUtils.testBit(__isset_bitfield, __HASRESULTSET_ISSET_ID);
0262   }
0263 
0264   public void setHasResultSetIsSet(boolean value) {
0265     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASRESULTSET_ISSET_ID, value);
0266   }
0267 
0268   public double getModifiedRowCount() {
0269     return this.modifiedRowCount;
0270   }
0271 
0272   public void setModifiedRowCount(double modifiedRowCount) {
0273     this.modifiedRowCount = modifiedRowCount;
0274     setModifiedRowCountIsSet(true);
0275   }
0276 
0277   public void unsetModifiedRowCount() {
0278     __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID);
0279   }
0280 
0281   /** Returns true if field modifiedRowCount is set (has been assigned a value) and false otherwise */
0282   public boolean isSetModifiedRowCount() {
0283     return EncodingUtils.testBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID);
0284   }
0285 
0286   public void setModifiedRowCountIsSet(boolean value) {
0287     __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MODIFIEDROWCOUNT_ISSET_ID, value);
0288   }
0289 
0290   public void setFieldValue(_Fields field, Object value) {
0291     switch (field) {
0292     case OPERATION_ID:
0293       if (value == null) {
0294         unsetOperationId();
0295       } else {
0296         setOperationId((THandleIdentifier)value);
0297       }
0298       break;
0299 
0300     case OPERATION_TYPE:
0301       if (value == null) {
0302         unsetOperationType();
0303       } else {
0304         setOperationType((TOperationType)value);
0305       }
0306       break;
0307 
0308     case HAS_RESULT_SET:
0309       if (value == null) {
0310         unsetHasResultSet();
0311       } else {
0312         setHasResultSet((Boolean)value);
0313       }
0314       break;
0315 
0316     case MODIFIED_ROW_COUNT:
0317       if (value == null) {
0318         unsetModifiedRowCount();
0319       } else {
0320         setModifiedRowCount((Double)value);
0321       }
0322       break;
0323 
0324     }
0325   }
0326 
0327   public Object getFieldValue(_Fields field) {
0328     switch (field) {
0329     case OPERATION_ID:
0330       return getOperationId();
0331 
0332     case OPERATION_TYPE:
0333       return getOperationType();
0334 
0335     case HAS_RESULT_SET:
0336       return isHasResultSet();
0337 
0338     case MODIFIED_ROW_COUNT:
0339       return getModifiedRowCount();
0340 
0341     }
0342     throw new IllegalStateException();
0343   }
0344 
0345   /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
0346   public boolean isSet(_Fields field) {
0347     if (field == null) {
0348       throw new IllegalArgumentException();
0349     }
0350 
0351     switch (field) {
0352     case OPERATION_ID:
0353       return isSetOperationId();
0354     case OPERATION_TYPE:
0355       return isSetOperationType();
0356     case HAS_RESULT_SET:
0357       return isSetHasResultSet();
0358     case MODIFIED_ROW_COUNT:
0359       return isSetModifiedRowCount();
0360     }
0361     throw new IllegalStateException();
0362   }
0363 
0364   @Override
0365   public boolean equals(Object that) {
0366     if (that == null)
0367       return false;
0368     if (that instanceof TOperationHandle)
0369       return this.equals((TOperationHandle)that);
0370     return false;
0371   }
0372 
0373   public boolean equals(TOperationHandle that) {
0374     if (that == null)
0375       return false;
0376 
0377     boolean this_present_operationId = true && this.isSetOperationId();
0378     boolean that_present_operationId = true && that.isSetOperationId();
0379     if (this_present_operationId || that_present_operationId) {
0380       if (!(this_present_operationId && that_present_operationId))
0381         return false;
0382       if (!this.operationId.equals(that.operationId))
0383         return false;
0384     }
0385 
0386     boolean this_present_operationType = true && this.isSetOperationType();
0387     boolean that_present_operationType = true && that.isSetOperationType();
0388     if (this_present_operationType || that_present_operationType) {
0389       if (!(this_present_operationType && that_present_operationType))
0390         return false;
0391       if (!this.operationType.equals(that.operationType))
0392         return false;
0393     }
0394 
0395     boolean this_present_hasResultSet = true;
0396     boolean that_present_hasResultSet = true;
0397     if (this_present_hasResultSet || that_present_hasResultSet) {
0398       if (!(this_present_hasResultSet && that_present_hasResultSet))
0399         return false;
0400       if (this.hasResultSet != that.hasResultSet)
0401         return false;
0402     }
0403 
0404     boolean this_present_modifiedRowCount = true && this.isSetModifiedRowCount();
0405     boolean that_present_modifiedRowCount = true && that.isSetModifiedRowCount();
0406     if (this_present_modifiedRowCount || that_present_modifiedRowCount) {
0407       if (!(this_present_modifiedRowCount && that_present_modifiedRowCount))
0408         return false;
0409       if (this.modifiedRowCount != that.modifiedRowCount)
0410         return false;
0411     }
0412 
0413     return true;
0414   }
0415 
0416   @Override
0417   public int hashCode() {
0418     List<Object> list = new ArrayList<Object>();
0419 
0420     boolean present_operationId = true && (isSetOperationId());
0421     list.add(present_operationId);
0422     if (present_operationId)
0423       list.add(operationId);
0424 
0425     boolean present_operationType = true && (isSetOperationType());
0426     list.add(present_operationType);
0427     if (present_operationType)
0428       list.add(operationType.getValue());
0429 
0430     boolean present_hasResultSet = true;
0431     list.add(present_hasResultSet);
0432     if (present_hasResultSet)
0433       list.add(hasResultSet);
0434 
0435     boolean present_modifiedRowCount = true && (isSetModifiedRowCount());
0436     list.add(present_modifiedRowCount);
0437     if (present_modifiedRowCount)
0438       list.add(modifiedRowCount);
0439 
0440     return list.hashCode();
0441   }
0442 
0443   @Override
0444   public int compareTo(TOperationHandle other) {
0445     if (!getClass().equals(other.getClass())) {
0446       return getClass().getName().compareTo(other.getClass().getName());
0447     }
0448 
0449     int lastComparison = 0;
0450 
0451     lastComparison = Boolean.valueOf(isSetOperationId()).compareTo(other.isSetOperationId());
0452     if (lastComparison != 0) {
0453       return lastComparison;
0454     }
0455     if (isSetOperationId()) {
0456       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationId, other.operationId);
0457       if (lastComparison != 0) {
0458         return lastComparison;
0459       }
0460     }
0461     lastComparison = Boolean.valueOf(isSetOperationType()).compareTo(other.isSetOperationType());
0462     if (lastComparison != 0) {
0463       return lastComparison;
0464     }
0465     if (isSetOperationType()) {
0466       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.operationType, other.operationType);
0467       if (lastComparison != 0) {
0468         return lastComparison;
0469       }
0470     }
0471     lastComparison = Boolean.valueOf(isSetHasResultSet()).compareTo(other.isSetHasResultSet());
0472     if (lastComparison != 0) {
0473       return lastComparison;
0474     }
0475     if (isSetHasResultSet()) {
0476       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.hasResultSet, other.hasResultSet);
0477       if (lastComparison != 0) {
0478         return lastComparison;
0479       }
0480     }
0481     lastComparison = Boolean.valueOf(isSetModifiedRowCount()).compareTo(other.isSetModifiedRowCount());
0482     if (lastComparison != 0) {
0483       return lastComparison;
0484     }
0485     if (isSetModifiedRowCount()) {
0486       lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.modifiedRowCount, other.modifiedRowCount);
0487       if (lastComparison != 0) {
0488         return lastComparison;
0489       }
0490     }
0491     return 0;
0492   }
0493 
0494   public _Fields fieldForId(int fieldId) {
0495     return _Fields.findByThriftId(fieldId);
0496   }
0497 
0498   public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
0499     schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
0500   }
0501 
0502   public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
0503     schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
0504   }
0505 
0506   @Override
0507   public String toString() {
0508     StringBuilder sb = new StringBuilder("TOperationHandle(");
0509     boolean first = true;
0510 
0511     sb.append("operationId:");
0512     if (this.operationId == null) {
0513       sb.append("null");
0514     } else {
0515       sb.append(this.operationId);
0516     }
0517     first = false;
0518     if (!first) sb.append(", ");
0519     sb.append("operationType:");
0520     if (this.operationType == null) {
0521       sb.append("null");
0522     } else {
0523       sb.append(this.operationType);
0524     }
0525     first = false;
0526     if (!first) sb.append(", ");
0527     sb.append("hasResultSet:");
0528     sb.append(this.hasResultSet);
0529     first = false;
0530     if (isSetModifiedRowCount()) {
0531       if (!first) sb.append(", ");
0532       sb.append("modifiedRowCount:");
0533       sb.append(this.modifiedRowCount);
0534       first = false;
0535     }
0536     sb.append(")");
0537     return sb.toString();
0538   }
0539 
0540   public void validate() throws org.apache.thrift.TException {
0541     // check for required fields
0542     if (!isSetOperationId()) {
0543       throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationId' is unset! Struct:" + toString());
0544     }
0545 
0546     if (!isSetOperationType()) {
0547       throw new org.apache.thrift.protocol.TProtocolException("Required field 'operationType' is unset! Struct:" + toString());
0548     }
0549 
0550     if (!isSetHasResultSet()) {
0551       throw new org.apache.thrift.protocol.TProtocolException("Required field 'hasResultSet' is unset! Struct:" + toString());
0552     }
0553 
0554     // check for sub-struct validity
0555     if (operationId != null) {
0556       operationId.validate();
0557     }
0558   }
0559 
0560   private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
0561     try {
0562       write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
0563     } catch (org.apache.thrift.TException te) {
0564       throw new java.io.IOException(te);
0565     }
0566   }
0567 
0568   private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
0569     try {
0570       // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
0571       __isset_bitfield = 0;
0572       read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
0573     } catch (org.apache.thrift.TException te) {
0574       throw new java.io.IOException(te);
0575     }
0576   }
0577 
0578   private static class TOperationHandleStandardSchemeFactory implements SchemeFactory {
0579     public TOperationHandleStandardScheme getScheme() {
0580       return new TOperationHandleStandardScheme();
0581     }
0582   }
0583 
0584   private static class TOperationHandleStandardScheme extends StandardScheme<TOperationHandle> {
0585 
0586     public void read(org.apache.thrift.protocol.TProtocol iprot, TOperationHandle struct) throws org.apache.thrift.TException {
0587       org.apache.thrift.protocol.TField schemeField;
0588       iprot.readStructBegin();
0589       while (true)
0590       {
0591         schemeField = iprot.readFieldBegin();
0592         if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { 
0593           break;
0594         }
0595         switch (schemeField.id) {
0596           case 1: // OPERATION_ID
0597             if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
0598               struct.operationId = new THandleIdentifier();
0599               struct.operationId.read(iprot);
0600               struct.setOperationIdIsSet(true);
0601             } else { 
0602               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0603             }
0604             break;
0605           case 2: // OPERATION_TYPE
0606             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
0607               struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32());
0608               struct.setOperationTypeIsSet(true);
0609             } else { 
0610               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0611             }
0612             break;
0613           case 3: // HAS_RESULT_SET
0614             if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
0615               struct.hasResultSet = iprot.readBool();
0616               struct.setHasResultSetIsSet(true);
0617             } else { 
0618               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0619             }
0620             break;
0621           case 4: // MODIFIED_ROW_COUNT
0622             if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
0623               struct.modifiedRowCount = iprot.readDouble();
0624               struct.setModifiedRowCountIsSet(true);
0625             } else { 
0626               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0627             }
0628             break;
0629           default:
0630             org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
0631         }
0632         iprot.readFieldEnd();
0633       }
0634       iprot.readStructEnd();
0635       struct.validate();
0636     }
0637 
0638     public void write(org.apache.thrift.protocol.TProtocol oprot, TOperationHandle struct) throws org.apache.thrift.TException {
0639       struct.validate();
0640 
0641       oprot.writeStructBegin(STRUCT_DESC);
0642       if (struct.operationId != null) {
0643         oprot.writeFieldBegin(OPERATION_ID_FIELD_DESC);
0644         struct.operationId.write(oprot);
0645         oprot.writeFieldEnd();
0646       }
0647       if (struct.operationType != null) {
0648         oprot.writeFieldBegin(OPERATION_TYPE_FIELD_DESC);
0649         oprot.writeI32(struct.operationType.getValue());
0650         oprot.writeFieldEnd();
0651       }
0652       oprot.writeFieldBegin(HAS_RESULT_SET_FIELD_DESC);
0653       oprot.writeBool(struct.hasResultSet);
0654       oprot.writeFieldEnd();
0655       if (struct.isSetModifiedRowCount()) {
0656         oprot.writeFieldBegin(MODIFIED_ROW_COUNT_FIELD_DESC);
0657         oprot.writeDouble(struct.modifiedRowCount);
0658         oprot.writeFieldEnd();
0659       }
0660       oprot.writeFieldStop();
0661       oprot.writeStructEnd();
0662     }
0663 
0664   }
0665 
0666   private static class TOperationHandleTupleSchemeFactory implements SchemeFactory {
0667     public TOperationHandleTupleScheme getScheme() {
0668       return new TOperationHandleTupleScheme();
0669     }
0670   }
0671 
0672   private static class TOperationHandleTupleScheme extends TupleScheme<TOperationHandle> {
0673 
0674     @Override
0675     public void write(org.apache.thrift.protocol.TProtocol prot, TOperationHandle struct) throws org.apache.thrift.TException {
0676       TTupleProtocol oprot = (TTupleProtocol) prot;
0677       struct.operationId.write(oprot);
0678       oprot.writeI32(struct.operationType.getValue());
0679       oprot.writeBool(struct.hasResultSet);
0680       BitSet optionals = new BitSet();
0681       if (struct.isSetModifiedRowCount()) {
0682         optionals.set(0);
0683       }
0684       oprot.writeBitSet(optionals, 1);
0685       if (struct.isSetModifiedRowCount()) {
0686         oprot.writeDouble(struct.modifiedRowCount);
0687       }
0688     }
0689 
0690     @Override
0691     public void read(org.apache.thrift.protocol.TProtocol prot, TOperationHandle struct) throws org.apache.thrift.TException {
0692       TTupleProtocol iprot = (TTupleProtocol) prot;
0693       struct.operationId = new THandleIdentifier();
0694       struct.operationId.read(iprot);
0695       struct.setOperationIdIsSet(true);
0696       struct.operationType = org.apache.hive.service.rpc.thrift.TOperationType.findByValue(iprot.readI32());
0697       struct.setOperationTypeIsSet(true);
0698       struct.hasResultSet = iprot.readBool();
0699       struct.setHasResultSetIsSet(true);
0700       BitSet incoming = iprot.readBitSet(1);
0701       if (incoming.get(0)) {
0702         struct.modifiedRowCount = iprot.readDouble();
0703         struct.setModifiedRowCountIsSet(true);
0704       }
0705     }
0706   }
0707 
0708 }
0709