public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // WHY
          if (field.type == TType.STRING) {
            this.why = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // VALUES
          if (field.type == TType.LIST) {
            {
              TList _list0 = iprot.readListBegin();
              this.values = new ArrayList<ByteBuffer>(_list0.size);
              for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                ByteBuffer _elem2;
                _elem2 = iprot.readBinary();
                this.values.add(_elem2);
              }
              iprot.readListEnd();
            }
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // INTERPRETATIONS
          if (field.type == TType.LIST) {
            {
              TList _list44 = iprot.readListBegin();
              this.interpretations = new ArrayList<GeocodeInterpretation>(_list44.size);
              for (int _i45 = 0; _i45 < _list44.size; ++_i45) {
                GeocodeInterpretation _elem46;
                _elem46 = new GeocodeInterpretation();
                _elem46.read(iprot);
                this.interpretations.add(_elem46);
              }
              iprot.readListEnd();
            }
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // DEBUG_LINES
          if (field.type == TType.LIST) {
            {
              TList _list47 = iprot.readListBegin();
              this.debugLines = new ArrayList<String>(_list47.size);
              for (int _i48 = 0; _i48 < _list47.size; ++_i48) {
                String _elem49;
                _elem49 = iprot.readString();
                this.debugLines.add(_elem49);
              }
              iprot.readListEnd();
            }
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // REQUEST_WKT_GEOMETRY
          if (field.type == TType.STRING) {
            this.requestWktGeometry = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // START
          if (field.type == TType.STRING) {
            this.start = iprot.readBinary();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // FINISH
          if (field.type == TType.STRING) {
            this.finish = iprot.readBinary();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // REVERSED
          if (field.type == TType.BOOL) {
            this.reversed = iprot.readBool();
            setReversedIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // COUNT
          if (field.type == TType.I32) {
            this.count = iprot.readI32();
            setCountIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    if (!isSetReversed()) {
      throw new TProtocolException(
          "Required field 'reversed' was not found in serialized data! Struct: " + toString());
    }
    if (!isSetCount()) {
      throw new TProtocolException(
          "Required field 'count' was not found in serialized data! Struct: " + toString());
    }
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // START_TOKEN
          if (field.type == TType.STRING) {
            this.start_token = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // END_TOKEN
          if (field.type == TType.STRING) {
            this.end_token = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // ENDPOINTS
          if (field.type == TType.LIST) {
            {
              TList _list16 = iprot.readListBegin();
              this.endpoints = new ArrayList<String>(_list16.size);
              for (int _i17 = 0; _i17 < _list16.size; ++_i17) {
                String _elem18;
                _elem18 = iprot.readString();
                this.endpoints.add(_elem18);
              }
              iprot.readListEnd();
            }
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case ROW:
            if (field.type == TType.STRING) {
              this.row = iprot.readBinary();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case COLUMNS:
            if (field.type == TType.MAP) {
              {
                TMap _map4 = iprot.readMapBegin();
                this.columns = new HashMap<byte[], TCell>(2 * _map4.size);
                for (int _i5 = 0; _i5 < _map4.size; ++_i5) {
                  byte[] _key6;
                  TCell _val7;
                  _key6 = iprot.readBinary();
                  _val7 = new TCell();
                  _val7.read(iprot);
                  this.columns.put(_key6, _val7);
                }
                iprot.readMapEnd();
              }
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
Exemple #7
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // TIMESTAMP
          if (field.type == TType.I64) {
            this.timestamp = iprot.readI64();
            setTimestampIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // SUPER_COLUMN
          if (field.type == TType.STRING) {
            this.super_column = iprot.readBinary();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // PREDICATE
          if (field.type == TType.STRUCT) {
            this.predicate = new SlicePredicate();
            this.predicate.read(iprot);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    if (!isSetTimestamp()) {
      throw new TProtocolException(
          "Required field 'timestamp' was not found in serialized data! Struct: " + toString());
    }
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // NAME
          if (field.type == TType.STRING) {
            this.name = iprot.readBinary();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // COLUMNS
          if (field.type == TType.LIST) {
            {
              TList _list0 = iprot.readListBegin();
              this.columns = new ArrayList<Column>(_list0.size);
              for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
                Column _elem2;
                _elem2 = new Column();
                _elem2.read(iprot);
                this.columns.add(_elem2);
              }
              iprot.readListEnd();
            }
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // RESPONSE_CODE
          if (field.type == TType.I32) {
            this.responseCode = iprot.readI32();
            setResponseCodeIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // TRANSACTION_ID
          if (field.type == TType.I64) {
            this.transactionID = iprot.readI64();
            setTransactionIDIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // DESCRIPTION
          if (field.type == TType.STRING) {
            this.description = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // TIMESTAMP
          if (field.type == TType.I64) {
            this.timestamp = iprot.readI64();
            setTimestampIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // WHAT
          if (field.type == TType.I32) {
            this.what = iprot.readI32();
            setWhatIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // WHY
          if (field.type == TType.STRING) {
            this.why = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
Exemple #11
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // MESSAGE
          if (field.type == TType.STRING) {
            this.message = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // LOG_CONTEXT
          if (field.type == TType.STRING) {
            this.log_context = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // HANDLE
          if (field.type == TType.STRUCT) {
            this.handle = new QueryHandle();
            this.handle.read(iprot);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
Exemple #12
0
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // MYINT
         if (field.type == TType.I32) {
           this.myint = iprot.readI32();
           setMyintIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // MY_STRING
         if (field.type == TType.STRING) {
           this.myString = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // UNDERSCORE_INT
         if (field.type == TType.I32) {
           this.underscore_int = iprot.readI32();
           setUnderscore_intIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
Exemple #13
0
 Object recv(TProtocol protocol, int seqid) throws Exception {
   TMessage msg = protocol.readMessageBegin();
   if (msg.type == TMessageType.EXCEPTION) {
     TApplicationException applicationException = TApplicationException.read(protocol);
     protocol.readMessageEnd();
     throw applicationException;
   }
   if (msg.seqid != seqid) {
     throw new TApplicationException(
         TApplicationException.BAD_SEQUENCE_ID, methodName + " failed: out of sequence response");
   }
   protocol.readStructBegin();
   Object success = null;
   Exception exception = null;
   while (true) {
     TField tField = protocol.readFieldBegin();
     if (tField.type == TType.STOP) {
       break;
     }
     FieldSpec fieldSpec = null;
     if (tField.id == 0) {
       fieldSpec = responseSuccessType;
     } else {
       fieldSpec = responseExceptionTypeMap.get(tField.id);
     }
     if (fieldSpec == null || fieldSpec.typeAdapter.getTType() != tField.type) {
       TProtocolUtil.skip(protocol, tField.type);
     } else {
       Object value = fieldSpec.typeAdapter.read(protocol);
       if (tField.id == 0) {
         success = value;
       } else {
         exception = (Exception) value;
       }
     }
     protocol.readFieldEnd();
   }
   protocol.readStructEnd();
   protocol.readMessageEnd();
   if (exception != null) {
     throw exception;
   }
   if (success != null) {
     return success;
   }
   if (isVoid) {
     return null;
   }
   throw new TApplicationException(
       org.apache.thrift.TApplicationException.MISSING_RESULT,
       methodName + " failed: unknown result");
 }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case TRACKERS:
            if (field.type == TType.LIST) {
              {
                TList _list39 = iprot.readListBegin();
                this.trackers = new ArrayList<ThriftTaskTrackerStatus>(_list39.size);
                for (int _i40 = 0; _i40 < _list39.size; ++_i40) {
                  ThriftTaskTrackerStatus _elem41;
                  _elem41 = new ThriftTaskTrackerStatus();
                  _elem41.read(iprot);
                  this.trackers.add(_elem41);
                }
                iprot.readListEnd();
              }
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
Exemple #15
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case USER:
            if (field.type == TType.STRING) {
              this.user = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case JOB_ID:
            if (field.type == TType.STRUCT) {
              this.jobID = new ThriftJobID();
              this.jobID.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case JOB_FILE:
            if (field.type == TType.STRING) {
              this.jobFile = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case NAME:
            if (field.type == TType.STRING) {
              this.name = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case QUEUE_NAME:
            if (field.type == TType.STRING) {
              this.queueName = iprot.readString();
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // MESSAGE
         if (field.type == TType.STRING) {
           this.message = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case 1: // UID
          if (field.type == TType.I32) {
            this.uid = iprot.readI32();
            setUidIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 2: // ITEM_NUMBER
          if (field.type == TType.STRING) {
            this.itemNumber = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 3: // RESERVE_QUANTITY
          if (field.type == TType.I32) {
            this.reserveQuantity = iprot.readI32();
            setReserveQuantityIsSet(true);
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 4: // ORDER_NUMBER
          if (field.type == TType.STRING) {
            this.orderNumber = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case 5: // FROM_ID
          if (field.type == TType.STRING) {
            this.fromId = iprot.readString();
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case TASKTRACKERS:
          if (field.type == TType.I32) {
            this.taskTrackers = iprot.readI32();
            this.__isset.taskTrackers = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case MAPTASKS:
          if (field.type == TType.I32) {
            this.mapTasks = iprot.readI32();
            this.__isset.mapTasks = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case REDUCETASKS:
          if (field.type == TType.I32) {
            this.reduceTasks = iprot.readI32();
            this.__isset.reduceTasks = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case MAXMAPTASKS:
          if (field.type == TType.I32) {
            this.maxMapTasks = iprot.readI32();
            this.__isset.maxMapTasks = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case MAXREDUCETASKS:
          if (field.type == TType.I32) {
            this.maxReduceTasks = iprot.readI32();
            this.__isset.maxReduceTasks = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case STATE:
          if (field.type == TType.I32) {
            this.state = iprot.readI32();
            this.__isset.state = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
          break;
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    validate();
  }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 2: // INCLUDE_TITLE
         if (field.type == TType.BOOL) {
           this.includeTitle = iprot.readBool();
           setIncludeTitleIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // INCLUDE_CONTENT_LENGTH
         if (field.type == TType.BOOL) {
           this.includeContentLength = iprot.readBool();
           setIncludeContentLengthIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 6: // INCLUDE_CREATED
         if (field.type == TType.BOOL) {
           this.includeCreated = iprot.readBool();
           setIncludeCreatedIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 7: // INCLUDE_UPDATED
         if (field.type == TType.BOOL) {
           this.includeUpdated = iprot.readBool();
           setIncludeUpdatedIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 10: // INCLUDE_UPDATE_SEQUENCE_NUM
         if (field.type == TType.BOOL) {
           this.includeUpdateSequenceNum = iprot.readBool();
           setIncludeUpdateSequenceNumIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 11: // INCLUDE_NOTEBOOK_GUID
         if (field.type == TType.BOOL) {
           this.includeNotebookGuid = iprot.readBool();
           setIncludeNotebookGuidIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 12: // INCLUDE_TAG_GUIDS
         if (field.type == TType.BOOL) {
           this.includeTagGuids = iprot.readBool();
           setIncludeTagGuidsIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 14: // INCLUDE_ATTRIBUTES
         if (field.type == TType.BOOL) {
           this.includeAttributes = iprot.readBool();
           setIncludeAttributesIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 20: // INCLUDE_LARGEST_RESOURCE_MIME
         if (field.type == TType.BOOL) {
           this.includeLargestResourceMime = iprot.readBool();
           setIncludeLargestResourceMimeIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 21: // INCLUDE_LARGEST_RESOURCE_SIZE
         if (field.type == TType.BOOL) {
           this.includeLargestResourceSize = iprot.readBool();
           setIncludeLargestResourceSizeIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // SUBJECT_DATE
         if (field.type == TType.I64) {
           this.subjectDate = iprot.readI64();
           setSubjectDateIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 10: // LATITUDE
         if (field.type == TType.DOUBLE) {
           this.latitude = iprot.readDouble();
           setLatitudeIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 11: // LONGITUDE
         if (field.type == TType.DOUBLE) {
           this.longitude = iprot.readDouble();
           setLongitudeIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 12: // ALTITUDE
         if (field.type == TType.DOUBLE) {
           this.altitude = iprot.readDouble();
           setAltitudeIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 13: // AUTHOR
         if (field.type == TType.STRING) {
           this.author = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 14: // SOURCE
         if (field.type == TType.STRING) {
           this.source = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 15: // SOURCE_URL
         if (field.type == TType.STRING) {
           this.sourceURL = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 16: // SOURCE_APPLICATION
         if (field.type == TType.STRING) {
           this.sourceApplication = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 17: // SHARE_DATE
         if (field.type == TType.I64) {
           this.shareDate = iprot.readI64();
           setShareDateIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 21: // PLACE_NAME
         if (field.type == TType.STRING) {
           this.placeName = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 22: // CONTENT_CLASS
         if (field.type == TType.STRING) {
           this.contentClass = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 23: // APPLICATION_DATA
         if (field.type == TType.STRUCT) {
           this.applicationData = new LazyMap();
           this.applicationData.read(iprot);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 24: // LAST_EDITED_BY
         if (field.type == TType.STRING) {
           this.lastEditedBy = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 26: // CLASSIFICATIONS
         if (field.type == TType.MAP) {
           {
             TMap _map17 = iprot.readMapBegin();
             this.classifications = new HashMap<String, String>(2 * _map17.size);
             for (int _i18 = 0; _i18 < _map17.size; ++_i18) {
               String _key19;
               String _val20;
               _key19 = iprot.readString();
               _val20 = iprot.readString();
               this.classifications.put(_key19, _val20);
             }
             iprot.readMapEnd();
           }
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // OBJECT_TYPE
         if (field.type == TType.I32) {
           this.objectType = HiveObjectType.findByValue(iprot.readI32());
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // DB_NAME
         if (field.type == TType.STRING) {
           this.dbName = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // OBJECT_NAME
         if (field.type == TType.STRING) {
           this.objectName = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 4: // PART_VALUES
         if (field.type == TType.LIST) {
           {
             TList _list4 = iprot.readListBegin();
             this.partValues = new ArrayList<String>(_list4.size);
             for (int _i5 = 0; _i5 < _list4.size; ++_i5) {
               String _elem6;
               _elem6 = iprot.readString();
               this.partValues.add(_elem6);
             }
             iprot.readListEnd();
           }
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // COLUMN_NAME
         if (field.type == TType.STRING) {
           this.columnName = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      switch (field.id) {
        case TABLE:
          if (field.type == TType.STRING) {
            this.table = iprot.readString();
            this.__isset.table = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case KEY:
          if (field.type == TType.STRING) {
            this.key = iprot.readString();
            this.__isset.key = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case CFMAP:
          if (field.type == TType.MAP) {
            {
              TMap _map22 = iprot.readMapBegin();
              this.cfmap = new HashMap<String, List<superColumn_t>>(2 * _map22.size);
              for (int _i23 = 0; _i23 < _map22.size; ++_i23) {
                String _key24;
                List<superColumn_t> _val25;
                _key24 = iprot.readString();
                {
                  TList _list26 = iprot.readListBegin();
                  _val25 = new ArrayList<superColumn_t>(_list26.size);
                  for (int _i27 = 0; _i27 < _list26.size; ++_i27) {
                    superColumn_t _elem28;
                    _elem28 = new superColumn_t();
                    _elem28.read(iprot);
                    _val25.add(_elem28);
                  }
                  iprot.readListEnd();
                }
                this.cfmap.put(_key24, _val25);
              }
              iprot.readMapEnd();
            }
            this.__isset.cfmap = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        case CFMAPDEL:
          if (field.type == TType.MAP) {
            {
              TMap _map29 = iprot.readMapBegin();
              this.cfmapdel = new HashMap<String, List<superColumn_t>>(2 * _map29.size);
              for (int _i30 = 0; _i30 < _map29.size; ++_i30) {
                String _key31;
                List<superColumn_t> _val32;
                _key31 = iprot.readString();
                {
                  TList _list33 = iprot.readListBegin();
                  _val32 = new ArrayList<superColumn_t>(_list33.size);
                  for (int _i34 = 0; _i34 < _list33.size; ++_i34) {
                    superColumn_t _elem35;
                    _elem35 = new superColumn_t();
                    _elem35.read(iprot);
                    _val32.add(_elem35);
                  }
                  iprot.readListEnd();
                }
                this.cfmapdel.put(_key31, _val32);
              }
              iprot.readMapEnd();
            }
            this.__isset.cfmapdel = true;
          } else {
            TProtocolUtil.skip(iprot, field.type);
          }
          break;
        default:
          TProtocolUtil.skip(iprot, field.type);
          break;
      }
      iprot.readFieldEnd();
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
Exemple #23
0
  public void read(TProtocol iprot) throws TException {
    TField field;
    iprot.readStructBegin();
    while (true) {
      field = iprot.readFieldBegin();
      if (field.type == TType.STOP) {
        break;
      }
      _Fields fieldId = _Fields.findByThriftId(field.id);
      if (fieldId == null) {
        TProtocolUtil.skip(iprot, field.type);
      } else {
        switch (fieldId) {
          case BYTES_TOTAL:
            if (field.type == TType.I64) {
              this.bytesTotal = iprot.readI64();
              setBytesTotalIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BYTES_USED:
            if (field.type == TType.I64) {
              this.bytesUsed = iprot.readI64();
              setBytesUsedIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BYTES_REMAINING:
            if (field.type == TType.I64) {
              this.bytesRemaining = iprot.readI64();
              setBytesRemainingIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case BYTES_NON_DFS:
            if (field.type == TType.I64) {
              this.bytesNonDfs = iprot.readI64();
              setBytesNonDfsIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case NUM_LIVE_DATA_NODES:
            if (field.type == TType.I32) {
              this.numLiveDataNodes = iprot.readI32();
              setNumLiveDataNodesIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case NUM_DEAD_DATA_NODES:
            if (field.type == TType.I32) {
              this.numDeadDataNodes = iprot.readI32();
              setNumDeadDataNodesIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case UPGRADE_STATUS:
            if (field.type == TType.STRUCT) {
              this.upgradeStatus = new UpgradeStatusReport();
              this.upgradeStatus.read(iprot);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case HTTP_PORT:
            if (field.type == TType.I32) {
              this.httpPort = iprot.readI32();
              setHttpPortIsSet(true);
            } else {
              TProtocolUtil.skip(iprot, field.type);
            }
            break;
        }
        iprot.readFieldEnd();
      }
    }
    iprot.readStructEnd();

    // check for required fields of primitive type, which can't be checked in the validate method
    validate();
  }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // START_INDEX
         if (field.type == TType.I32) {
           this.startIndex = iprot.readI32();
           setStartIndexIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // TOTAL_NOTES
         if (field.type == TType.I32) {
           this.totalNotes = iprot.readI32();
           setTotalNotesIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // NOTES
         if (field.type == TType.LIST) {
           {
             TList _list48 = iprot.readListBegin();
             this.notes = new ArrayList<com.evernote.edam.type.Note>(_list48.size);
             for (int _i49 = 0; _i49 < _list48.size; ++_i49) {
               com.evernote.edam.type.Note _elem50;
               _elem50 = new com.evernote.edam.type.Note();
               _elem50.read(iprot);
               this.notes.add(_elem50);
             }
             iprot.readListEnd();
           }
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 4: // STOPPED_WORDS
         if (field.type == TType.LIST) {
           {
             TList _list51 = iprot.readListBegin();
             this.stoppedWords = new ArrayList<String>(_list51.size);
             for (int _i52 = 0; _i52 < _list51.size; ++_i52) {
               String _elem53;
               _elem53 = iprot.readString();
               this.stoppedWords.add(_elem53);
             }
             iprot.readListEnd();
           }
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // SEARCHED_WORDS
         if (field.type == TType.LIST) {
           {
             TList _list54 = iprot.readListBegin();
             this.searchedWords = new ArrayList<String>(_list54.size);
             for (int _i55 = 0; _i55 < _list54.size; ++_i55) {
               String _elem56;
               _elem56 = iprot.readString();
               this.searchedWords.add(_elem56);
             }
             iprot.readListEnd();
           }
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 6: // UPDATE_COUNT
         if (field.type == TType.I32) {
           this.updateCount = iprot.readI32();
           setUpdateCountIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }
Exemple #25
0
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case BOOLEANFIELD:
         if (field.type == TType.BOOL) {
           this.booleanField = iprot.readBool();
           this.__isset.booleanField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case BYTEFIELD:
         if (field.type == TType.BYTE) {
           this.byteField = iprot.readByte();
           this.__isset.byteField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case SHORTFIELD:
         if (field.type == TType.I16) {
           this.shortField = iprot.readI16();
           this.__isset.shortField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case INTFIELD:
         if (field.type == TType.I32) {
           this.intField = iprot.readI32();
           this.__isset.intField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case LONGFIELD:
         if (field.type == TType.I64) {
           this.longField = iprot.readI64();
           this.__isset.longField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case DOUBLEFIELD:
         if (field.type == TType.DOUBLE) {
           this.doubleField = iprot.readDouble();
           this.__isset.doubleField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case STRINGFIELD:
         if (field.type == TType.STRING) {
           this.stringField = iprot.readString();
           this.__isset.stringField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case BINARYFIELD:
         if (field.type == TType.STRING) {
           this.binaryField = iprot.readBinary();
           this.__isset.binaryField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case LISTOFINTSFIELD:
         if (field.type == TType.LIST) {
           {
             TList _list0 = iprot.readListBegin();
             this.listOfIntsField = new ArrayList<Integer>(_list0.size);
             for (int _i1 = 0; _i1 < _list0.size; ++_i1) {
               int _elem2 = 0;
               _elem2 = iprot.readI32();
               this.listOfIntsField.add(_elem2);
             }
             iprot.readListEnd();
           }
           this.__isset.listOfIntsField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case SETOFINTSFIELD:
         if (field.type == TType.SET) {
           {
             TSet _set3 = iprot.readSetBegin();
             this.setOfIntsField = new HashSet<Integer>(2 * _set3.size);
             for (int _i4 = 0; _i4 < _set3.size; ++_i4) {
               int _elem5;
               _elem5 = iprot.readI32();
               this.setOfIntsField.add(_elem5);
             }
             iprot.readSetEnd();
           }
           this.__isset.setOfIntsField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case MAPOFINTSINTSFIELD:
         if (field.type == TType.MAP) {
           {
             TMap _map6 = iprot.readMapBegin();
             this.mapOfIntsIntsField = new HashMap<Integer, Integer>(2 * _map6.size);
             for (int _i7 = 0; _i7 < _map6.size; ++_i7) {
               int _key8;
               int _val9;
               _key8 = iprot.readI32();
               _val9 = iprot.readI32();
               this.mapOfIntsIntsField.put(_key8, _val9);
             }
             iprot.readMapEnd();
           }
           this.__isset.mapOfIntsIntsField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case STRUCTFIELD:
         if (field.type == TType.STRUCT) {
           this.structField = new TNestedStruct();
           this.structField.read(iprot);
           this.__isset.structField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case NESTEDLISTOFINTSFIELD:
         if (field.type == TType.LIST) {
           {
             TList _list10 = iprot.readListBegin();
             this.nestedListOfIntsField = new ArrayList<List<Integer>>(_list10.size);
             for (int _i11 = 0; _i11 < _list10.size; ++_i11) {
               List<Integer> _elem12 = new ArrayList<Integer>();
               {
                 TList _list13 = iprot.readListBegin();
                 _elem12 = new ArrayList<Integer>(_list13.size);
                 for (int _i14 = 0; _i14 < _list13.size; ++_i14) {
                   int _elem15 = 0;
                   _elem15 = iprot.readI32();
                   _elem12.add(_elem15);
                 }
                 iprot.readListEnd();
               }
               this.nestedListOfIntsField.add(_elem12);
             }
             iprot.readListEnd();
           }
           this.__isset.nestedListOfIntsField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case MAPOFINTSSTRINGSFIELD:
         if (field.type == TType.MAP) {
           {
             TMap _map16 = iprot.readMapBegin();
             this.mapOfIntsStringsField = new HashMap<Integer, String>(2 * _map16.size);
             for (int _i17 = 0; _i17 < _map16.size; ++_i17) {
               int _key18;
               String _val19;
               _key18 = iprot.readI32();
               _val19 = iprot.readString();
               this.mapOfIntsStringsField.put(_key18, _val19);
             }
             iprot.readMapEnd();
           }
           this.__isset.mapOfIntsStringsField = true;
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
         break;
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
 }
 public void read(TProtocol iprot) throws TException {
   TField field;
   iprot.readStructBegin();
   while (true) {
     field = iprot.readFieldBegin();
     if (field.type == TType.STOP) {
       break;
     }
     switch (field.id) {
       case 1: // GUID
         if (field.type == TType.STRING) {
           this.guid = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 2: // NAME
         if (field.type == TType.STRING) {
           this.name = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 3: // QUERY
         if (field.type == TType.STRING) {
           this.query = iprot.readString();
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 4: // FORMAT
         if (field.type == TType.I32) {
           this.format = QueryFormat.findByValue(iprot.readI32());
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 5: // UPDATE_SEQUENCE_NUM
         if (field.type == TType.I32) {
           this.updateSequenceNum = iprot.readI32();
           setUpdateSequenceNumIsSet(true);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       case 6: // SCOPE
         if (field.type == TType.STRUCT) {
           this.scope = new SavedSearchScope();
           this.scope.read(iprot);
         } else {
           TProtocolUtil.skip(iprot, field.type);
         }
         break;
       default:
         TProtocolUtil.skip(iprot, field.type);
     }
     iprot.readFieldEnd();
   }
   iprot.readStructEnd();
   validate();
 }