You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by "Michael D. Coon" <md...@yahoo.com.INVALID> on 2015/10/20 14:55:23 UTC

Configuration Driven Property Updates

All,
   I'm building a set of NiFi processors that allow data flow managers to dynamically configure reusable data processing modules wrapped inside NiFi processors. Imagine that we might want to use NiFi in some cases and Storm or Spark in others. The business logic in the processing modules would be the same regardless of what framework was feeding the data to the modules...it allows us to reuse capability in different data flow environments. 

   I have this working to some extent using ServiceLoader to discover the plugin modules and making those "allowableValues" of a PropertyDescriptor. Now it gets tricky. When the user selects one of the modules, the module itself specifies its own set of configuration properties that I'd like to expose to the data flow manager on the UI. That too works as I can grab the properties from the module and expose them as NiFi PropertyDescriptors. So far, so good. But when I change my mind and choose a different module from the allowableValues set I created, the old properties remain set with an error that they are not supported properties. 

   So how do I get rid of the old properties once a new module has been selected? Also, is there any way that the UI can dynamically update the required properties once I make a selection of which module I want to use? As it stands, I have to close the settings window and reopen to get the new properties list.
   Thanks for any advice!
Mike


Configuration Driven Property Updates

Posted by "Michael D. Coon" <md...@yahoo.com.INVALID>.
All,
   I'm building a set of NiFi processors that allow data flow managers to dynamically configure reusable data processing modules wrapped inside NiFi processors. Imagine that we might want to use NiFi in some cases and Storm or Spark in others. The business logic in the processing modules would be the same regardless of what framework was feeding the data to the modules...it allows us to reuse capability in different data flow environments. 

   I have this working to some extent using ServiceLoader to discover the plugin modules and making those "allowableValues" of a PropertyDescriptor. Now it gets tricky. When the user selects one of the modules, the module itself specifies its own set of configuration properties that I'd like to expose to the data flow manager on the UI. That too works as I can grab the properties from the module and expose them as NiFi PropertyDescriptors. So far, so good. But when I change my mind and choose a different module from the allowableValues set I created, the old properties remain set with an error that they are not supported properties. 

   So how do I get rid of the old properties once a new module has been selected? Also, is there any way that the UI can dynamically update the required properties once I make a selection of which module I want to use? As it stands, I have to close the settings window and reopen to get the new properties list.
   Thanks for any advice!
Mike