I'd like to know how filenames are generated in NiFi.
The concern behind this is whether there is a chance that two flowfiles will have the same name?
For example, what if we have a NiFi Cluster in which a processor fetching data is running with Execution set to "all nodes"; we have observed that the same data can come in each node -- in a situation like this, is there a chance that the same filenames could be generated?
Each flow file has a "filename" attribute which is created when the flow file is created, so it is dependent on the processor that creates the flow file. By default the filename attribute will be set to the system time in nanoseconds of when the flow file was created, but some processors that interact with file systems like GetFile, FetchFile, GetHDFS, etc.. will set the filename to the file they retrieved.
If all the nodes in the cluster fetch the same file using one of the filesystem processors, then each node will have a flow file with the same filename, but if it came from somewhere else it would be different system times per node.