Github user minifirocks commented on the issue:

    https://github.com/apache/nifi-minifi-cpp/pull/295
  
    @phrocker so if that's the case, we can remove the below meta info when the 
meta info container was constructed and just provide the framework, if user 
want to use that, they can create their own meta info and add this to the meta 
info container. **we provide a framework to let them add their own meta info 
into the flow file for mutable meta info.** 
    
     : config_(configure) {
     +    // add version, serial number as default meta info
     +    std::unique_ptr<core::MetaInfo> version = std::unique_ptr < 
core::MetaInfo > (new VersionMetaInfo());
     +    addMetaInfo(std::move(version));
     +    std::string serial_number;
     +    config_->get("device.id", serial_number);
     +    state::metrics::Device device;
     +    if (serial_number.empty()) {
     +      // we did not config serial number, use the mac address
     +      serial_number = device.device_id_;
     +    }
     +    std::unique_ptr<core::MetaInfo> serial_number_meta_info = 
std::unique_ptr < core::MetaInfo >(new MetaInfo("device.id", serial_number));
     +    addMetaInfo(std::move(serial_number_meta_info));
     +    std::unique_ptr<core::MetaInfo> hostname_meta_info = std::unique_ptr 
< core::MetaInfo >(new MetaInfo("hostname", device.canonical_hostname_));
     +    addMetaInfo(std::move(hostname_meta_info));


---

Reply via email to