Lars, thank you so much. I was fixated on getting the host information from the flowFile itself and overlooked the obvious. Your suggestion will be ideal. Thank you once again! Jim
On Sun, Jul 18, 2021 at 12:59 AM Lars Winderling <[email protected]> wrote: > James, > > maybe just use? > Import socket > socket.gethostname() > It will give you rather the hostname, but that should also help for > distinguishing between nodes. > > Best, Lars > > On 17 July 2021 22:25:47 CEST, James McMahon <[email protected]> wrote: >> >> Looking closely at the flowFiles I am creating,in the subsequent output >> queue, I see they have a Node Address listed in FlowFile Details. It is not >> listed in the flowfile attributes. >> That is what I need to get at programmatically in my python script. How >> can I access Node Address? >> >> On Sat, Jul 17, 2021 at 2:59 PM James McMahon <[email protected]> >> wrote: >> >>> I have a single flowfile I generate on a periodic basis using a cron >>> scheduled GenerateFlowFile. This then flows into an ExecuteScript, where I >>> have a python script that will create multiple flowfiles from the one. >>> >>> My ExecuteScript is configured to run on all my cluster nodes. For each >>> instance of flowfile I am creating, I need to determine which cluster node >>> it associates with. There’s an expression language function called ip(). >>> Can anyone tell me how to employ ${ip()} in my python to determine the >>> cluster node the newly created flowFile is associated with? >>> >>> I’d be using this after I execute >>> flowfile = session.create() >>> >>> Thanks in advance for your help. >>> >>
