Configuring Flow Management clusters to hot load custom NARs

Hot loading custom NiFi archives (NARs) allows you to store NiFi custom processor NAR files in an external folder and load them dynamically from that location for use on the NiFi canvas. This makes it easy to add or update custom processors without having to restart your Flow Management cluster.

  • You can configure NiFi to hot load custom NARs in all supported cloud providers.
  • You can only access resources in the object store of the cloud provider in which your environment is running. But you can have a development and a production environment, for example, and configure both environments to access the same location to hot load custom NARs
  • It is possible to define multiple locations if desired by repeating the configuration properties with a different “[**custom-name**]” for each location. But all locations should be in the object store of the underlying cloud provider of where the NiFi cluster is located.

  • NiFi polls for new NARs in the configured location(s) every 5 minutes.

  1. In Cloudera Management Console, select Data Hub Clusters, then go to the Flow Management cluster, then NiFi Service.
  2. Click Configuration.
  3. Search for Safety Valve and locate NiFi Node Advanced Configuration Snippet (Safety Valve) for staging/nifi.properties.xml.
  4. Add the following new properties:
    • nifi.nar.library.provider.[**custom-name**].implementation
      • Example: nifi.nar.library.provider.narstorage1.implementation
      • Value: org.apache.nifi.nar.hadoop.HDFSNarProvider
      • Purpose: Defines the Java class that implements the NAR provider.
    • nifi.nar.library.provider.[**custom-name**].resources
      • Example: nifi.nar.library.provider.narstorage1.resources
      • Value: /etc/hadoop/conf.cloudera.core_settings/core-site.xml
      • Purpose: Shows the path to the configuration files.
    • nifi.nar.library.provider.[**custom-name**].storage.location
      • Example: nifi.nar.library.provider.narstorage1.storage.location
      • Value: s3a://my-custom-nars-bucket
      • Purpose: Shows the storage location for the NARs (the bucket name in S3 for example).
    • nifi.nar.library.provider.[**custom-name**].source.directory
      • Example: nifi.nar.library.provider.narstorage1.source.directory
      • Value: /myNARs
      • Purpose: Shows the directory library with path to the NARs relative to the storage location.
    • nifi.nar.library.provider.[**custom-name**].kerberos.principal
      • Example: nifi.nar.library.provider.narstorage1.kerberos.principal
      • Value: srv_my_s3_nar_user
      • Purpose: Defines the workload username of the machine user to access the resources.
    • nifi.nar.library.provider.[**custom-name**].kerberos.password
      • Example: nifi.nar.library.provider.narstorage1.kerberos.password
      • Value: myPassword123
      • Purpose: Defines the workload password of the machine user to access the resources.
  5. Restart the NiFi service in Cloudera Manager.
  6. Refresh the NiFi UI.

You can now drag a new processor onto NiFi canvas and search for your custom processor.