Пример #1
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  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: // 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();
  }
Пример #4
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.property != null) {
      oprot.writeFieldBegin(PROPERTY_FIELD_DESC);
      this.property.write(oprot);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  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();
  }
Пример #6
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();
  }
Пример #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: // 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: // 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();
  }
Пример #9
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: // 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();
  }
Пример #10
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.key != null) {
      oprot.writeFieldBegin(KEY_FIELD_DESC);
      oprot.writeBinary(this.key);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(COUNT_FIELD_DESC);
    oprot.writeI32(this.count);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
Пример #11
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 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();
  }
Пример #12
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.name != null) {
      oprot.writeFieldBegin(NAME_FIELD_DESC);
      oprot.writeBinary(this.name);
      oprot.writeFieldEnd();
    }
    if (this.columns != null) {
      oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.STRUCT, this.columns.size()));
        for (Column _iter3 : this.columns) {
          _iter3.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
 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 write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.message != null) {
      oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
      oprot.writeString(this.message);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.values != null) {
      if (isSetValues()) {
        oprot.writeFieldBegin(VALUES_FIELD_DESC);
        {
          oprot.writeListBegin(new TList(TType.STRING, this.values.size()));
          for (ByteBuffer _iter3 : this.values) {
            oprot.writeBinary(_iter3);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
Пример #16
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.trackers != null) {
      oprot.writeFieldBegin(TRACKERS_FIELD_DESC);
      {
        oprot.writeListBegin(new TList(TType.STRUCT, this.trackers.size()));
        for (ThriftTaskTrackerStatus _iter42 : this.trackers) {
          _iter42.write(oprot);
        }
        oprot.writeListEnd();
      }
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
Пример #17
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: // 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: // 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();
  }
Пример #19
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: // 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();
  }
Пример #20
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();
  }
Пример #21
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();
 }
Пример #22
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();
  }
Пример #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 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();
  }
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.table != null) {
      oprot.writeFieldBegin(TABLE_FIELD_DESC);
      oprot.writeString(this.table);
      oprot.writeFieldEnd();
    }
    if (this.key != null) {
      oprot.writeFieldBegin(KEY_FIELD_DESC);
      oprot.writeString(this.key);
      oprot.writeFieldEnd();
    }
    if (this.cfmap != null) {
      oprot.writeFieldBegin(CFMAP_FIELD_DESC);
      {
        oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.cfmap.size()));
        for (Map.Entry<String, List<superColumn_t>> _iter36 : this.cfmap.entrySet()) {
          oprot.writeString(_iter36.getKey());
          {
            oprot.writeListBegin(new TList(TType.STRUCT, _iter36.getValue().size()));
            for (superColumn_t _iter37 : _iter36.getValue()) {
              _iter37.write(oprot);
            }
            oprot.writeListEnd();
          }
        }
        oprot.writeMapEnd();
      }
      oprot.writeFieldEnd();
    }
    if (this.cfmapdel != null) {
      oprot.writeFieldBegin(CFMAPDEL_FIELD_DESC);
      {
        oprot.writeMapBegin(new TMap(TType.STRING, TType.LIST, this.cfmapdel.size()));
        for (Map.Entry<String, List<superColumn_t>> _iter38 : this.cfmapdel.entrySet()) {
          oprot.writeString(_iter38.getKey());
          {
            oprot.writeListBegin(new TList(TType.STRUCT, _iter38.getValue().size()));
            for (superColumn_t _iter39 : _iter38.getValue()) {
              _iter39.write(oprot);
            }
            oprot.writeListEnd();
          }
        }
        oprot.writeMapEnd();
      }
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  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();
  }
Пример #26
0
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (this.start != null) {
      oprot.writeFieldBegin(START_FIELD_DESC);
      oprot.writeBinary(this.start);
      oprot.writeFieldEnd();
    }
    if (this.finish != null) {
      oprot.writeFieldBegin(FINISH_FIELD_DESC);
      oprot.writeBinary(this.finish);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldBegin(REVERSED_FIELD_DESC);
    oprot.writeBool(this.reversed);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(COUNT_FIELD_DESC);
    oprot.writeI32(this.count);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  public void write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    oprot.writeFieldBegin(TASK_TRACKERS_FIELD_DESC);
    oprot.writeI32(this.taskTrackers);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAP_TASKS_FIELD_DESC);
    oprot.writeI32(this.mapTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(REDUCE_TASKS_FIELD_DESC);
    oprot.writeI32(this.reduceTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAX_MAP_TASKS_FIELD_DESC);
    oprot.writeI32(this.maxMapTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(MAX_REDUCE_TASKS_FIELD_DESC);
    oprot.writeI32(this.maxReduceTasks);
    oprot.writeFieldEnd();
    oprot.writeFieldBegin(STATE_FIELD_DESC);
    oprot.writeI32(this.state);
    oprot.writeFieldEnd();
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
  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 write(TProtocol oprot) throws TException {
    validate();

    oprot.writeStructBegin(STRUCT_DESC);
    if (isSetIncludeTitle()) {
      oprot.writeFieldBegin(INCLUDE_TITLE_FIELD_DESC);
      oprot.writeBool(this.includeTitle);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeContentLength()) {
      oprot.writeFieldBegin(INCLUDE_CONTENT_LENGTH_FIELD_DESC);
      oprot.writeBool(this.includeContentLength);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeCreated()) {
      oprot.writeFieldBegin(INCLUDE_CREATED_FIELD_DESC);
      oprot.writeBool(this.includeCreated);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeUpdated()) {
      oprot.writeFieldBegin(INCLUDE_UPDATED_FIELD_DESC);
      oprot.writeBool(this.includeUpdated);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeUpdateSequenceNum()) {
      oprot.writeFieldBegin(INCLUDE_UPDATE_SEQUENCE_NUM_FIELD_DESC);
      oprot.writeBool(this.includeUpdateSequenceNum);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeNotebookGuid()) {
      oprot.writeFieldBegin(INCLUDE_NOTEBOOK_GUID_FIELD_DESC);
      oprot.writeBool(this.includeNotebookGuid);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeTagGuids()) {
      oprot.writeFieldBegin(INCLUDE_TAG_GUIDS_FIELD_DESC);
      oprot.writeBool(this.includeTagGuids);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeAttributes()) {
      oprot.writeFieldBegin(INCLUDE_ATTRIBUTES_FIELD_DESC);
      oprot.writeBool(this.includeAttributes);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeLargestResourceMime()) {
      oprot.writeFieldBegin(INCLUDE_LARGEST_RESOURCE_MIME_FIELD_DESC);
      oprot.writeBool(this.includeLargestResourceMime);
      oprot.writeFieldEnd();
    }
    if (isSetIncludeLargestResourceSize()) {
      oprot.writeFieldBegin(INCLUDE_LARGEST_RESOURCE_SIZE_FIELD_DESC);
      oprot.writeBool(this.includeLargestResourceSize);
      oprot.writeFieldEnd();
    }
    oprot.writeFieldStop();
    oprot.writeStructEnd();
  }
 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();
 }