Example #1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, BatchQueue struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.queueName = iprot.readString();
   struct.setQueueNameIsSet(true);
   BitSet incoming = iprot.readBitSet(6);
   if (incoming.get(0)) {
     struct.queueDescription = iprot.readString();
     struct.setQueueDescriptionIsSet(true);
   }
   if (incoming.get(1)) {
     struct.maxRunTime = iprot.readI32();
     struct.setMaxRunTimeIsSet(true);
   }
   if (incoming.get(2)) {
     struct.maxNodes = iprot.readI32();
     struct.setMaxNodesIsSet(true);
   }
   if (incoming.get(3)) {
     struct.maxProcessors = iprot.readI32();
     struct.setMaxProcessorsIsSet(true);
   }
   if (incoming.get(4)) {
     struct.maxJobsInQueue = iprot.readI32();
     struct.setMaxJobsInQueueIsSet(true);
   }
   if (incoming.get(5)) {
     struct.maxMemory = iprot.readI32();
     struct.setMaxMemoryIsSet(true);
   }
 }
Example #2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, BatchQueue 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: // QUEUE_NAME
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.queueName = iprot.readString();
           struct.setQueueNameIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // QUEUE_DESCRIPTION
         if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
           struct.queueDescription = iprot.readString();
           struct.setQueueDescriptionIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 3: // MAX_RUN_TIME
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.maxRunTime = iprot.readI32();
           struct.setMaxRunTimeIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 4: // MAX_NODES
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.maxNodes = iprot.readI32();
           struct.setMaxNodesIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 5: // MAX_PROCESSORS
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.maxProcessors = iprot.readI32();
           struct.setMaxProcessorsIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 6: // MAX_JOBS_IN_QUEUE
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.maxJobsInQueue = iprot.readI32();
           struct.setMaxJobsInQueueIsSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 7: // MAX_MEMORY
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.maxMemory = iprot.readI32();
           struct.setMaxMemoryIsSet(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();
 }