This processor polls the notification events provided by the HdfsAdmin API. Since this uses the HdfsAdmin APIs it is required to run as an HDFS super user. Currently there are six types of events (append, close, create, metadata, rename, and unlink). Please see org.apache.hadoop.hdfs.inotify.Event documentation for full explanations of each event. This processor will poll for new events based on a defined duration. For each event received a new flow file will be created with the expected attributes and the event itself serialized to JSON and written to the flow file’s content. For example, if event.type is APPEND then the content of the flow file will contain a JSON file containing the information about the append event. If successful the flow files are sent to the ‘success’ relationship. Be careful of where the generated flow files are stored. If the flow files are stored in one of processor’s watch directories there will be a never ending flow of events. It is also important to be aware that this processor must consume all events. The filtering must happen within the processor. This is because the HDFS admin’s event notifications API does not have filtering.


hadoop, events, inotify, notifications, filesystem


n the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name Default Value Allowable Values Description
Hadoop Configuration Resources A file or comma separated list of files which contains the Hadoop file system configuration. Without this, Hadoop will search the classpath for a 'core-site.xml' and 'hdfs-site.xml' file or will revert to a default configuration.
Kerberos Principal Kerberos principal to authenticate as. Requires nifi.kerberos.krb5.file to be set in your
Kerberos Keytab Kerberos keytab associated with the principal. Requires nifi.kerberos.krb5.file to be set in your
Kerberos Relogin Period 4 hours Period of time which should pass before attempting a kerberos relogin
Additional Classpath Resources will be added to the classpath. When specifying a directory, all files with in the directory will be added to the classpath, but further sub-directories will not be included.
Poll Duration 1 second The time before the polling method returns with the next batch of events if they exist. It may exceed this amount of time by up to the time required for an RPC to the NameNode.
HDFS Path to Watch 10000 The HDFS path to get event notifications for. This property accepts both expression language and regular expressions. This will be evaluated during the OnScheduled phase.
Supports Expression Language: true
Ignore Hidden Files false * true
* false
If true and the final component of the path associated with a given event starts with a '.' then that event will not be processed.
Event Types to Filter On append, close, create, metadata, rename, unlink A comma-separated list of event types to process. Valid event types are: append, close, create, metadata, rename, and unlink. Case does not matter.
IOException Retries During Event Polling 3 According to the HDFS admin API for event polling it is good to retry at least a few times. This number defines how many times the poll will be retried if it throws an IOException.


Name Description
success A flow file with updated information about a specific event will be sent to this relationship.

Reads Attributes:

None specified.

Writes Attributes:

Name Description
mime.type This is always application/json.
hdfs.inotify.event.type This will specify the specific HDFS notification event type. Currently there are six types of events (append, close, create, metadata, rename, and unlink).
hdfs.inotify.event.path The specific path that the event is tied to.

State management:

Scope Description
CLUSTER The last used transaction id is stored. This is used


This component is not restricted.