Member since
06-04-2020
9
Posts
1
Kudos Received
2
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5277 | 08-06-2020 01:01 AM | |
2793 | 07-09-2020 10:03 AM |
08-07-2020
09:28 AM
I'm trying to set up a Load Balancing Demo.
I have a GetFile processor that watcches a directory for incoming files and then a flow that processes them.
To try to understand LoadBalancing, I have created a second NiFi instance on the same host (my dev machine), but on a different port 8090 to the first 8080. I have then checked out the flow from the Registry so that it is identical on both instances.
Next, I have set the Load Balancing Strategy on the output queue from both nodes first processsor, (the GetFile proc) in order to see if I can get data going through both instances.
I can then drop files into the watch dir and see them hit my flow. However, all the files are going into the same node, even if I wait 10 minutes between dropping them into the dir. But, when I run again it switches to the other node and all the files go through there.
Is there a timeout somewhere that I can set to speed up the switch from one node to the other? Or better to switch files to alternate between the nodes.
I have assumed the use of the embedded Zookeepr and not made any specific cluster based config as yet...
Any help greatly appreciated. Note that this is all runnig on the same localhost, ports 8080 and 8090...
... View more
Labels:
- Labels:
-
Apache NiFi
-
Apache Zookeeper
08-06-2020
01:01 AM
Those are great suggestions, I'll give them a try. I found out what was causing my <title>Error 404 Not Found</title> It was the url parameter value I used http://localhost:8090/nifi .. when it should have been http://localhost:8090 The webapp name of "nifi" is not appropriate for a call via the CLI. My mistake..!
... View more
08-05-2020
09:07 AM
The NiFi Toolkit CLI has a neat option for setting variables in a deployed NiFi flow. This is very useful for deploying a flow to different environments and then changing a few necessary variables. The commands are nifi pg-get-vars and nifi pg-set-var and would be used as follows; #> nifi pg-get-vars -pgid 34x015f8-0284-1000-5488-a7c6511e5656 -u http://nifi-prod:8080 #> nifi pg-set-var -pgid 34x015f8-0284-1000-5488-a7c6511e5656 -var ListFilesInputDir -val /prod/temp -u http://nifi-prod:8080 However, using Parameters in Parameter Contexts seems to be the new and better way of doing things and can be used among different groups in a flow, I have implemented many in my 140 processor project! So my question is this: How do I now set different values for these Parameters for different environments when I deploy my flow. My deployment will be automated using the CLI in the NiFi toolkit, so I'm looking for a solution that is automated/scripted. There appears to be ListParamContexts, GetParamContext and SetParam, but when I run; nifi list-param-contexts -u http://localhost:8090/nifi I get <title>Error 404 Not Found</title> I am running NiFi-Toolkit version 1.11.4.
... View more
Labels:
- Labels:
-
Apache NiFi
07-09-2020
10:03 AM
1 Kudo
Actually I just put it into the mail as it was. Then when the mail arrives, all the newlines are there..! Its just that the attribute doesn't render the newlines... Problem solved.
... View more
07-09-2020
06:31 AM
I have a line by line list in my flowfile, which records the result of some file processing, somthing like the following; C:\Data\client1\order100.txt - SUCCESS C:\Data\client1\order122.txt - ERROR C:\Data\client1\order323.txt - SUCCESS I can't see a way to add this flowfile content to the e-mail MessageBody. I have therefore tried an ExtractText processor with message.body as an attribute and (.*) as the regex. This gets me close, but all the filenames are on the same line, so I end up with this; C:\Data\client1\order100.txt - SUCCESS C:\Data\client1\order122.txt - ERROR C:\Data\client1\order323.txt - SUCCESS Which is not quite the e-mail I'm looking for. Any sensible suggestions welcome.
... View more
Labels:
- Labels:
-
Apache NiFi
06-17-2020
02:05 AM
I fixed this by changing the @Grab in the first line of the script to the following; @Grab(group='org.apache.nifi', module='nifi-expression-language', version='1.11.4')
... View more
06-17-2020
01:56 AM
Me too. Similar error. java.lang.RuntimeException: Error grabbing Grapes -- [download failed: org.apache.commons#commons-lang3;3.5!commons-lang3.jar]
... View more
06-04-2020
07:16 AM
I ran my flow and found the path attribute, but it is set to simply / so that is not a 100% solution. My flow is based on the reply to this question https://community.cloudera.com/t5/Support-Questions/Hi-Everyone-Is-there-any-processor-available-in-NiFi-to-read/m-p/219993?childToView=186970#answer-186970 However, subtly, I have a GetFile watching for a file dropped into a directory that kicks off the flow!. The name of the file is the same as that of the directory with .done, so I strip off the .done and then pass the directory name as the flowfile and continue as answer-186970...
... View more
06-04-2020
03:35 AM
I have few files as follows. /source/abc.txt /source/xyz.txt /source/subdir/abc-sub.txt /source/subdir/xyz-sub.txt Currently, all the files are copied to the output dir /output/abc.txt /output/xyz.txt /output/abc-sub.txt /output/xyz-sub.txt Is it possible to re-create/maintain the original file hierarchy, as follows; /output/abc.txt /output/xyz.txt /output/subdir/abc-sub.txt /output/subdir/xyz-sub.txt
... View more
Labels:
- Labels:
-
Apache NiFi