Beispiel #1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, SubmitOptions struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   struct.initial_status =
       backtype.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32());
   struct.set_initial_status_isSet(true);
   BitSet incoming = iprot.readBitSet(1);
   if (incoming.get(0)) {
     struct.creds = new Credentials();
     struct.creds.read(iprot);
     struct.set_creds_isSet(true);
   }
 }
Beispiel #2
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, SubmitOptions 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: // INITIAL_STATUS
         if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
           struct.initial_status =
               backtype.storm.generated.TopologyInitialStatus.findByValue(iprot.readI32());
           struct.set_initial_status_isSet(true);
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
         }
         break;
       case 2: // CREDS
         if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
           struct.creds = new Credentials();
           struct.creds.read(iprot);
           struct.set_creds_isSet(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();
 }