Member since
07-30-2019
3406
Posts
1622
Kudos Received
1008
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 110 | 12-17-2025 05:55 AM | |
| 171 | 12-15-2025 01:29 PM | |
| 115 | 12-15-2025 06:50 AM | |
| 243 | 12-05-2025 08:25 AM | |
| 405 | 12-03-2025 10:21 AM |
07-19-2018
06:44 PM
@Prachi Sharma - Sorry to hear those possible solutions did not work. That really just leave one option. Standing up a one node cluster. - I encourage you to open and Apache NiFi Jira requesting this capability be supported. - Once again, I am sorry that those suggestions did not work. - Thanks, Matt
... View more
07-19-2018
05:24 PM
@Prachi Sharma - *** Forum tip: Please try to avoid responding to an Answer by starting a new answer. Instead use the "add comment" tp respond to en existing answer. There is no guaranteed order to different answers which can make following a response thread difficult especially when multiple people are trying to assist you. - Please try creating a new "local-provider" rather then pointing at the "cluster-provider". Comment out the following:
<!--
<local-provider>
<id>local-provider</id>
<class>org.apache.nifi.controller.state.providers.local.WriteAheadLocalStateProvider</class>
<property name="Directory">/var/lib/nifi/state/local</property>
<property name="Always Sync">false</property>
<property name="Partitions">16</property>
<property name="Checkpoint Interval">2 mins</property>
</local-provider>
--> Then add the following new "local-provider": <local-provider>
<id>zk-provider</id>
<class>org.apache.nifi.controller.state.providers.zookeeper.ZooKeeperStateProvider</class>
<propertyname="Connect String">myhostname:myport</property>
<propertyname="Root Node">/nifi</property>
<propertyname="Session Timeout">10 seconds</property>
<propertyname="Access Control">Open</property>
</local-provider>
- Then change nifi.state.management.provider.local= in the nifi.properties file so it points back at "local-provider" - Thank you, Matt
... View more
07-19-2018
04:36 PM
1 Kudo
@D D - The NiFi Split type processor will produce multiple FlowFiles from a single source FlowFile. Each of those split FlowFiles produced will have the same filename assigned to them. NiFi references/keeps track of FlowFiles by a unique UUID assigned to each of them, so the fact that each has the same filename is not an issue for NiFi itself. That being said, destination systems will likely have an issue with duplicate files with the same filename. - Using the update attribute processor to change the filename on these splits is the best option here. Creating a dynamic new property that will update the filename using the FlowFiles unique uuid is the common solution: - Thanks, Matt - If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.
... View more
07-19-2018
03:19 PM
@Shailendra Lohia - *** Forum tip: Please try to avoid responding to an Answer by starting a new answer. Instead use the "add comment" tp respond to en existing answer. There is no guaranteed order to different answers which can make following a response thread difficult especially when multiple people are trying to assist you. - When you start the HandleHTTPRequest processor it spins off an imbedded Jetty web-server. It is less a matter of determining how many stacked up requests you have and more of a "Am I reading off that internal queue fast enough to keep form hitting max container size" - How many unique source systems may be hitting this handleHTTPRequest end-point concurrently? I would suggest setting the "Container Queue Size" to at least that value or double that value to start with. Then monitor for issues and adjust processor setting from there. - I am not familiar with a way to get a value for current queue size. Even if that was possible, it is highly likely the value would have changed by the time just got the result. - Thank you, Matt
... View more
07-18-2018
02:35 PM
1 Kudo
@aman mittal - What the actual curl command will look like depends on whether your NiFi target is secured or not and how it has been secured. I am not completely clear on what you mean by "executing the process group". - Here is an example curl command that can be used to create or update a key/value variable on an existing process group. This example assumes the NiFi has been secured and authorization is via LDAP. - # Obtain a user authentication token: token=$(curl -k 'https://<hostname>:<port>/nifi-api/access/token' --data 'username=<username>&password=<password>’) - #Get current process group variable-registry details: curl -k 'https://<hostname>:<port>/nifi-api/process-groups/<process group uuid>/variable-registry' -H "Authorization: Bearer $token" - #create or update a variable on a specific process group: curl -k 'https://<hostname>:<port>/nifi-api/process-groups/<process group uuid>/variable-registry/update-requests' -H "Authorization: Bearer $token" -H 'Content-Type: application/json' --data-binary '{"processGroupRevision":{"clientId":"<client id from above response>","version":2},"variableRegistry":{"processGroupId":"<process group uuid>","variables":[{"variable":{"name":"new-pg-var","value":"testing1234"}}]}}' --compressed - Note: If you Target Nifi is unsecured you will not need to worry about authentication or authorization. So above command would not require "-k" or "-H "Authorization: Bearer $token". The URL in that case would also be http instead of https. - Thank you, Matt - If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.
... View more
07-18-2018
01:58 PM
1 Kudo
@Semih Gurbuz - Since the ListSFTP processor does not accept incoming connection, NiFi Expression Language (EL) variables cannot be provided dynamically. This properties that support EL expect to get those variable values from one of the following: 1. Process group variables (can change these manually or through rest-api calls) 2. NiFi registry-file (defined in nifi.properties. Edits to this file require NiFi restart) 3. NiFi JVM properties (defined in nifi bootstrap.conf. Edits to this file require NiFi restart) 4. NiFI service user environment variables (Edits to NiFi service user env variables requires Nifi restart to be read) - This leaves you with Process group variables as the only viable possible solution here. Here is an example curl commands that can be used to create or update a key/value variable on an existing process group. This example assumes the NiFi has been secured and authorization is via LDAP. - # Obtain a user authentication token: token=$(curl -k 'https://<hostname>:<port>/nifi-api/access/token' --data 'username=<username>&password=<password>’) - #Get current process group variable-registry details: curl -k 'https://<hostname>:<port>/nifi-api/process-groups/<process group uuid>/variable-registry' -H "Authorization: Bearer $token" - #create or update a variable on a specific process group: curl -k 'https://<hostname>:<port>/nifi-api/process-groups/<process group uuid>/variable-registry/update-requests' -H "Authorization: Bearer $token" -H 'Content-Type: application/json' --data-binary '{"processGroupRevision":{"clientId":"<client id from above response>","version":2},"variableRegistry":{"processGroupId":"<process group uuid>","variables":[{"variable":{"name":"listsftp-server","value":"Server-xyz"}}]}}' --compressed - Note: If you Target Nifi is unsecured you will not need to worry about authentication or authorization. So above command would not require "-k" or "-H "Authorization: Bearer $token". The URL in that case would also be http instead of https. - So you should be able to retrieve your values from the DB and use a series of invokeHTTP processors to edit the Process group variables. The challenge comes when you need to make sure the listSFTP has executed using the new variables before making another update to the process group variables. - Hope this gets you started in the right direction. Thank you, Matt - If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.
... View more
07-18-2018
01:37 PM
@Rinki Please start a new forum question. I am probably not best resource for SQL statements. Starting a new question will get you faster response. - Thank you, Matt
... View more
07-17-2018
08:49 PM
@Shailendra Lohia - The internal queue of which the size is determined by what is configured for "Container Queue Size" does exist within NiFi's java heap space. Each incoming HTTP request is placed here and NiFi generates a FlowFile for each request based on the run schedule of the HandleHTTPRequest processor. If NiFi is is not creating these FlowFiles fast enough, that queue can grow all the way to 30K. The amount of impact that will have on your java heap really depends on the size of those individual requests. - The purpose of this queue is to provide a way to pass the request coming form the embedded jetty server that is started when you start the HandleHTTPRequest processor and NiFi. So 10k or 20k or 30k will not matter much if the HandleHTTPRequest processor can't create FlowFIles fast enough from that internal queue. The Concurrent Tasks setting on the HandleHTTPRequest processor equates the max number of possible concurrent executions/threads reading from that internal queue and creating FlowFiles. - I tend to look at that internal container queue as a way to buffer incoming surges of requests. If the rate of request coming in is steady, you need to make sure NiFi can keep up or the request will eventually start getting service unavailable responses if the internal queue fills. - The Bug you mentioned while fixed in Apache NiFi 1.6.0, it was included as a fix in HDF 3.1.2 which has been released. The only alternative to the HandleHTTPRequest processor is the ListenHTTP processor. It is not going to provide you same robust set of capabilities. Refer here https://nifi.apache.org/docs/nifi-docs/ for latest processor documentation or look at the embedded docs in the release you are currently running for more details. - Thank you, Matt - If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.
... View more
07-17-2018
06:29 PM
@Saikrishna Tarapareddy - The only NiFi configuration file you can edit that will take affect without requiring a NiFi restart is the logback.xml file. - As far as what is an acceptable search base, best to test your search base command on command line using ldapsearch. If it doesn't work there, it will not work in NiFi either. - Thank you, Matt - If you found this Answer addressed your original question, please take a moment to login and click "Accept" below the answer.
... View more
07-17-2018
06:24 PM
1 Kudo
@Gulshan Agivetova - There is no NiFi processor that will produce a single NiFi FlowFile that contains a complete listing of all files in a specific target directory, but you can build a flow to do this. The ListSFTP processor will produces one 0 byte FlowFile with the following attributes generated on each: You could pass these 0 byte FlowFiles to a ReplaceText processor that could replace the 0 byte content with new content based off the values assigned to ${path}/${filename} for example. You could then feed all those FlowFiles to a MergeContent processor to merge them in to a single FlowFile with one path/filename per line. Then you can pass that merged file to the ExecuteStream Command processor. - Thanks, Matt
... View more