/** This one is for the spout */
  @SuppressWarnings("unchecked")
  public static Fields registerMetaParticleFieldsFromMetaParticleClass(
      Config conf, Class<? extends MetaParticle> metaParticleClass) {
    Fields metaParticleFields = null;
    if (conf.containsKey(METADATA_FIELDS)) {
      metaParticleFields = new Fields((List<String>) conf.get(METADATA_FIELDS));
    }
    Fields fields =
        ParticleMapper.mergeFields(metaParticleFields, ParticleMapper.getFields(metaParticleClass));
    conf.put(METADATA_FIELDS, fields.toList());

    return fields;
  }
 public static Fields getMetaParticleOutputFieldsFromOperationClass(
     Class<? extends Operation> operationClass) {
   List<Class<? extends MetaParticle>> outputMetaParticles =
       OperationManager.getOutputMetaParticles(operationClass);
   Fields fields = null;
   for (Class<? extends MetaParticle> p : outputMetaParticles) {
     Fields newfields = ParticleMapper.getFields(p);
     if (fields == null) {
       fields = newfields;
     } else {
       fields = ParticleMapper.mergeFields(fields, newfields);
     }
   }
   return fields;
 }