You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Sumanth Chinthagunta <xm...@gmail.com> on 2016/05/17 00:05:17 UTC

Feature Request: NodeID of NiFi cluster nodes as FlowFile common attribute.

In my NiFi cluster environment,  for a given flow, each node in the cluster is producing afinal FlowFile that is written to HDFS.
I needed to append NodeID to filename attribute (e.g., node1_filename1.tar) so that files written to HDFS has unique name and I can easily identify which node produced those files.
it would be if NiFi has build in support to add  NodeID as common attribute for each FlowFile that can be used by any processors. 
Thanks
Sumanth 

    

Re: Feature Request: NodeID of NiFi cluster nodes as FlowFile common attribute.

Posted by Bryan Bende <bb...@gmail.com>.
Hi Sumanth,

Sorry no one got back to you on this.

I don't know that much about how the framework gets access to the node id,
so maybe Mark, Joe, or others could chime in about whether the node id
could be made accessible from expression language.

I know that expression language currently has a hostname() function [1],
I'm wondering if that could be used somehow to tie back to the host that
produced the file?

-Bryan

[1]
https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html#hostname


On Mon, May 16, 2016 at 8:05 PM, Sumanth Chinthagunta <xm...@gmail.com>
wrote:

> In my NiFi cluster environment,  for a given flow, each node in the
> cluster is producing afinal FlowFile that is written to HDFS.
> I needed to append NodeID to filename attribute (e.g.,
> node1_filename1.tar) so that files written to HDFS has unique name and I
> can easily identify which node produced those files.
> it would be if NiFi has build in support to add  NodeID as common
> attribute for each FlowFile that can be used by any processors.
> Thanks
> Sumanth
>
>