Esempio n. 1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, TExchangeNode struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   {
     org.apache.thrift.protocol.TList _list149 =
         new org.apache.thrift.protocol.TList(
             org.apache.thrift.protocol.TType.I32, iprot.readI32());
     struct.input_row_tuples = new ArrayList<Integer>(_list149.size);
     for (int _i150 = 0; _i150 < _list149.size; ++_i150) {
       int _elem151; // required
       _elem151 = iprot.readI32();
       struct.input_row_tuples.add(_elem151);
     }
   }
   struct.setInput_row_tuplesIsSet(true);
   BitSet incoming = iprot.readBitSet(2);
   if (incoming.get(0)) {
     struct.sort_info = new TSortInfo();
     struct.sort_info.read(iprot);
     struct.setSort_infoIsSet(true);
   }
   if (incoming.get(1)) {
     struct.offset = iprot.readI64();
     struct.setOffsetIsSet(true);
   }
 }
Esempio n. 2
0
    public void read(org.apache.thrift.protocol.TProtocol iprot, TExchangeNode struct)
        throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField schemeField;
      iprot.readStructBegin();
      while (true) {
        schemeField = iprot.readFieldBegin();
        if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
          break;
        }
        switch (schemeField.id) {
          case 1: // INPUT_ROW_TUPLES
            if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list144 = iprot.readListBegin();
                struct.input_row_tuples = new ArrayList<Integer>(_list144.size);
                for (int _i145 = 0; _i145 < _list144.size; ++_i145) {
                  int _elem146; // required
                  _elem146 = iprot.readI32();
                  struct.input_row_tuples.add(_elem146);
                }
                iprot.readListEnd();
              }
              struct.setInput_row_tuplesIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 2: // SORT_INFO
            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
              struct.sort_info = new TSortInfo();
              struct.sort_info.read(iprot);
              struct.setSort_infoIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          case 3: // OFFSET
            if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
              struct.offset = iprot.readI64();
              struct.setOffsetIsSet(true);
            } else {
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();

      // check for required fields of primitive type, which can't be checked in the validate method
      struct.validate();
    }