Member since
07-30-2019
3469
Posts
1641
Kudos Received
1018
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 154 | 05-06-2026 09:16 AM | |
| 247 | 05-04-2026 05:20 AM | |
| 236 | 05-01-2026 10:15 AM | |
| 467 | 03-23-2026 05:44 AM | |
| 352 | 02-18-2026 09:59 AM |
08-13-2021
07:33 AM
1 Kudo
@smartraman You can use a ReplaceText processor to remove these special characters from your json. Using your example, I could produce yoru desired output using the following java regular expression: (\\")|[\Q[\E]|[\Q]\E] Source: My ReplaceText processor was configured as follows: result: If you found this response addressed your query, please take a moment to login and click on "Accept as Solution". Thank you, Matt
... View more
08-09-2021
05:37 AM
@midee The condition NEL statement and resulting actions NEL statements will be unique for each rule you create. For example: Rule 1: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(1)} Actions: ${attr1:substring(0,1)} Rule2: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(2)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)} Rule3: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(3)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)}${attr1:getDelimitedField(3,' '):substring(0,1)} Rule4: Conditions: ${attr1:trim():length():minus(${attr1:trim():replaceAll(' ',''):length()}):plus(1):equals(4)} Actions: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)}${attr1:getDelimitedField(3,' '):substring(0,1)}${attr1:getDelimitedField(4,' '):substring(0,1)} You will notice in the Conditions NEL statement, the last number is incrementing for each rule and in the Actions NEL statement the statement gets a bit longer with each additional string If you found these answers to your query were useful, please take a moment to login and click "Accept as Solution" on all answers that helped. Hope this helps, Matt
... View more
08-05-2021
11:16 AM
@zrbear It would be difficult to assist here without you sharing the following: - contents of nifi.properties file - verbose listing of yoru keystore and truststore using keytool Also make sure if using Java JDK 8 that you have installed the unlimited strength JCE policies: https://www.oracle.com/java/technologies/javase-jce8-downloads.html Hope this helps, Matt
... View more
08-05-2021
11:04 AM
@HariAllstate What is the use case for wanting these to be dynamic? The MergeContent processor allocates FlowFiles located in the inbound connection(s) to bins based on the configuration of these properties: Merge Strategy - Bin-Packing Algorithm - Keeps allocating FlowFiles to bin until both configured mins (Minimum Number of Entries and Minimum Group Size) are met. Bins can also be restricted to FlowFiles all having same value set in that attribute specified in the Correlation Attribute Name property - Defragment - FlowFile are allocated to bins based on fragment Attributes set on the inbound queued FlowFiles. The purpose of the Max Bin Age is to prevent bins from getting stuck forever because they do not meet the criteria necessary to be merged. Assume the scenario where the max num entries has been reached preventing any new FlowFiles from being allocated to a bin and those binned FlowFiles did not total enough size to meet the min group size. Since both mons must be satisfied for a bin to be merged, that bin could potentially sit forever. Max bin age when reached would force that bin to merge. In the case of Defragment the FlowFiles would rout to failure if max bin age is reached before all fragments are allocated to a bin. So Max Bin Age should be set to max latency you want to allow on a bin. Not clear on why you would want that to be dynamic and if it was, where would you pull that value from since many FlowFiles are allocated to a bin and they could end up having a variety of values. Since only the "mins" must be satisfied to merge a bin, not clear why you would want a dynamic capability here as well. Plus same applies here in that many FlowFiles are allocated to bins and may have different values. Also note that the processor does not use Max when considering if a bin is ready to be merged. When the MergeContent processor executes, it looks at only the FlowFiles queued on an inbound connection at that exact moment in time and allocates them to 1 or more bins. At the end of that allocation, each bin is evaluated to see if the mins were satisfied or all the fragments are in the bin and if so, it is merged. If you found this addressed your query, please take a moment to login and click "Accept as Solution" Thank you, Matt
... View more
08-05-2021
10:37 AM
@midee Assuming you know how many space delimited strings you have, you could use the following NiFi Expression Language (NEL) statement to extract the first character from each string: ${attr1:substring(0,1)}${attr1:getDelimitedField(2,' '):substring(0,1)}${attr1:getDelimitedField(3,' '):substring(0,1)} Above would take your example "Nifi Test Project" and produce "NTP". If this was not a static number of strings, you would need to count the number of strings and then use the Advanced UI of the updateAttribute processor to execute the appropriate NEL statement depending on calculated number of strings in your source attribute Here is an example UpdateAttribute processor configuration to accomplish this. Select "Configure" on the UpdateAttribute processor: In the lower left you will see button to enter the "ADVANCED" UI. Within that UI you will create a new RULE for each string count: You then create a "Conditions" which must resolve to "TRUE" before the "Actions" are applied. above image handles when the subject attribute value contains a single string. Below is example of more complicated Action when string count is equal to 4. Adding more rules is as simple as copying the last rule and editing the Condition to increment equals value and add and additional "${attr1:getDelimitedField(5,' '):substring(0,1)}" to the end with the next incremented field count. If you found this addressed your query, please take a moment to login and click "Accept as Solution". Thank you, Matt
... View more
07-28-2021
11:09 AM
1 Kudo
@jg6 There is no direct relationship between the DistributedMapCacheServer and the DistributedMapCacheClientService. Meaning that the client is simply configured with a hostname and a port. This hostname and port could be a DistributedMapCacheServer running on an entirely different NiFi cluster somewhere. Additionally there is no component that registers a dependency on the DistributedMapCacheServer controller service. They only have a dependency on the DistributedMapCacheClientService. So when constructing a template only the interconnected and dependent pieces are included. That being said, using the DistributedMapCache is not the cache I would recommend using anyway. IT offers no high Availability (HA). While a DistributedMapCacheServer is being started on every node in a NiFi cluster, they do not talk to one another and the DistributedMapCacheClientService can only be configured to point at one of them. So if you lose the NiFi node were your clients point, you lost all your cache. There are better options for external cache services that do offer HA. Hope this is helpful, Matt
... View more
07-28-2021
10:57 AM
@Aiiyer What ERROR? All I see are a bunch of normal INFO log lines form the nifi-app.log snippet you shared. Please share the ERROR log line and stack trace if present. Or share screenshots of what you are doing and observing. Thank you, Matt
... View more
07-28-2021
10:53 AM
1 Kudo
@midee @janis-ax is correct that this is not possible. "ONLY" sensitive attributes can be encrypted/masked. Only component properties coded to as a sensitive property field would be able to decrypt an encrypted/masked value. If setting policies to block specific users from being able to view the data on these components, you may want to look at other options for performing these endpoint authentication/authorization actions. For example, with the NiFi endpoints you could use mutual TLS via certificates instead of token based authentication for accessing the endpoints. This does not mean you need to stop using or un-configure the token based authentication methods for access to your secured NiFi. If the endpoint you are trying to reach is not NiFi, you may want to see what other options it may offer for authentication that are not token based. Hope this helped, Matt
... View more
07-28-2021
10:40 AM
@midee You are using an InvokeHTTP processor to hit the rest-api endpoint of some authentication service to obtain a JWT Token, correct? The invokeHTTP processor gives you only two options for handling the response from the endpoint. Placed it in the content of the FlowFile or in to an attribute of the FlowFile. This means that any user who has been granted authorization to view the data of any component that this FlowFile will traverse can see the attributes and content of this FlowFile. There is no capability for the invokeHTTP to encrypt/mask the endpoint response in either options. Even if there was, this now masked/encrypted data would no longer be usable by downstream components. I suspect your plan is to then use this token to make additional requests to other endpoints later in your flow? Also keep in mind that a token generally has a limited lifespan. You should also have the ability to invalidate the token via another endpoint when you are done with it. So your options here are: 1. Limit user's access so they can not view the data in the dataflows that utilize this token so that they can't see the token in the content or attributes. If you are building the flow, then you know how to get the token so does not matter that you can see the token via the attributes or content. 2. Invalidate the token once done with it. Token can't be used anymore even if a user gained access to it later via looking at the content or attributes of a FlowFile. So you may consider building yoru flow to get a token --> use that token for other actions --> invalidate token (Using NiFi login authentication as a JWT token example, you hit the logout endpoint to invalidate the token on the server side. This means the client token will no longer work even if you have it still). Of course this means you flow needs to obtain a new token every time it runs. Issue here is if your flow utilizes same token for multiple FlowFiles. First FlowFile that hist logout will invalidate token other FlowFiles may try to still use. Note that the default life of a token issued by NiFi is 12 hours. After that the client token can't be used anymore and a new token would need to be obtained anyway (of course this age can be adjusted via the NiFi login provider configuration) If you found this answered your query, please take a moment to login and click "Accept" on the solutions that assisted you. Thank you, Matt
... View more
07-28-2021
10:18 AM
1 Kudo
@pritster5 The screenshot shared does tell us some the following: We can see on the AzureBlobStorage "0(2)" displayed in the upper right corner. This tells us that this processor still has two active threads that have been "terminated" manually by a user (Meaning user tried to stop processor but it failed to stop so the user selected terminate). Terminating threads simply tells NiFi to release the FlowFile associated to that thread back to the inbound connection queue it belongs to and set processor to send anything returned by those still running threads that are marked as terminated to null. So since we can tell you still have running threads, the question becomes... "What are these threads doing?" "Are these thread hung?" "Are thee threads just very long running?" I would suggest using executing following several times (1 - 3 minutes apart) to get a series o thread dumps: ./nifi.sh dump <filename fo dump> Then you should inspect those threads to see perhaps what they are waiting on or if they are making any progress (stack changes) between each thread dump. This will answer your questions above. Maybe connection to AzureBlob Storage is very slow? Maybe Host resources are high and your threads are waiting on CPU? etc... If you found this assisted with your query, please take a moment to login and click "Accept" on solutions that helped you. Thank you, Matt
... View more