예제 #1
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, PartitionListComposingSpec struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.partitions != null) {
        oprot.writeFieldBegin(PARTITIONS_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.partitions.size()));
          for (Partition _iter255 : struct.partitions) {
            _iter255.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
예제 #2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, PartitionListComposingSpec 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: // PARTITIONS
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list252 = iprot.readListBegin();
             struct.partitions = new ArrayList<Partition>(_list252.size);
             Partition _elem253;
             for (int _i254 = 0; _i254 < _list252.size; ++_i254) {
               _elem253 = new Partition();
               _elem253.read(iprot);
               struct.partitions.add(_elem253);
             }
             iprot.readListEnd();
           }
           struct.setPartitionsIsSet(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();
   struct.validate();
 }