Github user phrocker commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi-cpp/pull/261#discussion_r166711961
  
    --- Diff: libminifi/src/core/ConfigurableComponent.cpp ---
    @@ -160,6 +161,78 @@ bool 
ConfigurableComponent::setSupportedProperties(std::set<Property> properties
       return true;
     }
     
    +bool ConfigurableComponent::getDynamicProperty(const std::string name, 
std::string &value) {
    +  std::lock_guard<std::mutex> lock(configuration_mutex_);
    +
    +  auto &&it = dynamic_properties_.find(name);
    +  if (it != dynamic_properties_.end()) {
    +    Property item = it->second;
    +    value = item.getValue();
    +    logger_->log_debug("Component %s dynamic property name %s value %s", 
name, item.getName(), value);
    +    return true;
    +  } else {
    +    return false;
    +  }
    +}
    +
    +bool ConfigurableComponent::createDynamicProperty(const std::string &name, 
const std::string &value) {
    +  if (!supportsDynamicProperties()) {
    +    logger_->log_debug("Attempted to create dynamic property %s, but this 
component does not support creation."
    +                           "of dynamic properties.", name);
    +    return false;
    +  }
    +
    +  Property dyn(name, DEFAULT_DYNAMIC_PROPERTY_DESC, value);
    +  logger_->log_info("Processor %s dynamic property '%s' value '%s'",
    +                    name.c_str(),
    --- End diff --
    
    nit: not a big deal but you used c_str() here and then name above. if you 
happen to make other changes and remember this feel free to change it, but 
otherwise it's not important enough to change on its own imo. 


---

Reply via email to