Exemplo n.º 1
0
 @Override
 protected Object tupleSchemeReadValue(org.apache.thrift.protocol.TProtocol iprot, short fieldID)
     throws org.apache.thrift.TException {
   _Fields setField = _Fields.findByThriftId(fieldID);
   if (setField != null) {
     switch (setField) {
       case BOLT:
         BoltStats bolt;
         bolt = new BoltStats();
         bolt.read(iprot);
         return bolt;
       case SPOUT:
         SpoutStats spout;
         spout = new SpoutStats();
         spout.read(iprot);
         return spout;
       default:
         throw new IllegalStateException(
             "setField wasn't null, but didn't match any of the case statements!");
     }
   } else {
     throw new TProtocolException("Couldn't find a field with field id " + fieldID);
   }
 }
Exemplo n.º 2
0
 @Override
 protected Object standardSchemeReadValue(
     org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TField field)
     throws org.apache.thrift.TException {
   _Fields setField = _Fields.findByThriftId(field.id);
   if (setField != null) {
     switch (setField) {
       case BOLT:
         if (field.type == BOLT_FIELD_DESC.type) {
           BoltStats bolt;
           bolt = new BoltStats();
           bolt.read(iprot);
           return bolt;
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           return null;
         }
       case SPOUT:
         if (field.type == SPOUT_FIELD_DESC.type) {
           SpoutStats spout;
           spout = new SpoutStats();
           spout.read(iprot);
           return spout;
         } else {
           org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
           return null;
         }
       default:
         throw new IllegalStateException(
             "setField wasn't null, but didn't match any of the case statements!");
     }
   } else {
     org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
     return null;
   }
 }