Member since
01-27-2023
229
Posts
73
Kudos Received
45
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1282 | 02-23-2024 01:14 AM | |
1589 | 01-26-2024 01:31 AM | |
1098 | 11-22-2023 12:28 AM | |
2674 | 11-22-2023 12:10 AM | |
2704 | 11-06-2023 12:44 AM |
04-24-2023
02:26 AM
here is the documentation for EnforceOrder: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.20.0/org.apache.nifi.processors.standard.EnforceOrder/index.html Have a look here and you will understand what each queue represents. Based on your screenshot, you have configured EnforceOrder incorrectly. I just tested the same behavior I wrote you a couple of messages ago and it works just fine. All the messages go into success (which in your case should be Extract Text). If you do not want to process them one after the other, I assume you would need to implement a Wait-Notify --> an example of what you might try can be found here: https://pierrevillard.com/2018/06/27/nifi-workflow-monitoring-wait-notify-pattern-with-split-and-merge/
... View more
04-24-2023
01:46 AM
try updating nifi.remote.input.secure from false to true. I just downloaded NiFi again and used your nifi.properties file (of course the keystore and truststore are different) and the only thing I changed to have my instance started was nifi.remote.input.secure=true
... View more
04-24-2023
01:25 AM
yea, sorry, I do not understand your question, nor your problem right now. With what I have described, from your original flowfile, you will get 12 flowfiles, each of them containing a single unique value from your array. Using EnforceOrder, you force NiFi in a matter to processes the flowfiles based on how they have been generated. This means that the first flowfile will have the first value from your array, the second flowfile will have the second value from your array and so on. Now, these flowfile are sent down the stream in your next processor and they get processed in that order. So after processing 6100(with the first flowfile), you will process 6101(with the second flowfile) and so on.
... View more
04-24-2023
01:04 AM
I see that you have deleted your nifi.properties so I assume that you solved your problem? From what I was able to see before you removed it, I saw that you left both your HTTP and HTTPS properties available. I suggest you to comment the HTTP if you go with HTTPS.
... View more
04-24-2023
12:38 AM
hi @ushasri, The file you are looking for is called flow.xml.gz and can be found on each NiFi node, within the conf folder. More information can be found here: https://nifi.apache.org/docs/nifi-docs/html/user-guide.html flow.xml.gz: Everything the DFM puts onto the NiFi User Interface canvas is written, in real time, to one file called the flow.xml.gz. This file is located in the nifi/conf directory by default. Any change made on the canvas is automatically saved to this file, without the user needing to click a "Save" button. In addition, NiFi automatically creates a backup copy of this file in the archive directory when it is updated. You can use these archived files to rollback flow configuration. To do so, stop NiFi, replace flow.xml.gz with a desired backup copy, then restart NiFi. In a clustered environment, stop the entire NiFi cluster, replace the flow.xml.gz of one of nodes, and restart the node. Remove flow.xml.gz from other nodes. Once you confirmed the node starts up as a one-node cluster, start the other nodes. The replaced flow configuration will be synchronized across the cluster. The name and location of flow.xml.gz, and auto archive behavior are configurable. See the System Administrator’s Guide for further details.
... View more
04-23-2023
08:20 AM
As you described both of your posts, they seem to be totally different. I suggest you to keep only a single post if both posts are for the same problem, as you will have better chances of receiving a proper answer. I will respond, for now, only to the one reported here and not the other one. Now, as for the problem reported here, If you want to sequentially process your FlowFiles, you might try introducing a EnforceOrder Processor, in which you define the Group Identifier = ${filename} (after SplitContent, all your resulting FlowFiles will have the same filename) and Order Attribute = fragment.index. In addition, you can set the Initial Order to 1. The queue entering the EnforceOrder I would recommend to be set as Load Balance Strategy = Single Node, to make sure that everything is on the same node and you process them in your desired order. From EnforceOrder, you can go afterwards in whatever processor you would like, with the condition to have everything on the same node, otherwise, each node from your cluster will execute a different flowfile ( I do not know if that is what you want or not ). Otherwise, you could create an endless list of RouteOnAttribute processors, but this will require you to know exactly how many items you have in your array. --> not really recommended though, but it is an option on the table. Another solution would be to write yourself a custom script and execute it within NiFi. You have some processors like ExecuteStreamCommand or ExecuteScript/ExecuteGroovyScript.
... View more
04-23-2023
03:07 AM
hi @anony, Is this the content of your FlowFile coming from the API as a response? If yes, you could split your array into several FlowFiles and process them in whatever order you would like. I assume that you do not need your square brackets and your double quotes for your processing so you could use a ReplaceText to remove all of them. In your ReplaceText Processor, you need to define a java regex which will perform this remove of double quotes and square brackets. If you do not succeed in writing that java regex, you can try a combination of 4 ReplaceText processors: - the first one defined as Search Value = " and Replacement Value set to empty string. Make sure you use Replacement Strategy = Literal Replace. - the second one defined as Search Value = (empty space here) and Replacement Value set to empty string. Make sure you use Replacement Strategy = Literal Replace. - the third one defined as Search Value = [ and Replacement Value set to empty string. Make sure you use Replacement Strategy = Literal Replace. - the forth one defined as Search Value = ] and Replacement Value set to empty string. Make sure you use Replacement Strategy = Literal Replace. Once you removed all those, proceed with using a SplitContent, defined as follows: - Byte Sequence Format = Text - Byte Sequence = , This will send forward in your stream a flowfile containing each value from your initial Array. Basically you will have 12 flowfiles, each with one value from your initial array. PS: as you did not provide any information regarding the scope of your iteration, I have somehow ignored it as I did not fully understand what you meant.
... View more
04-23-2023
02:21 AM
@davehkd, to be honest, there is no right or wrong answer to your question. From my point of view, based on my experience with NiFi so far, your answer depends on your use case and what you are trying to achieve. The question would be what is the purpose of the load balancer in front of nifi? Are you going to use NiFi for something special like having some users call the rest api to trigger some jobs or? Otherwise, the load balancer will only work when you open the GUI. Or are you considering to use that AWS load balancer as part of NiFi as well (see nifi.properties for cluster load balancing properties), not just in front of your NiFi cluster? In this case, it could make sens but you have to see how you can configure this connection. Have a look here: https://everymansravings.wordpress.com/2018/07/27/apache-nifi-behind-an-aws-load-balancer-w-minifi/ That being said, based on my use cases, I would say that it does not make sense to do what you are trying to do .... but this answer could easily be a YES IT MAKES SENSE --> again it depends on what you are trying achieve.
... View more
04-23-2023
02:11 AM
1 Kudo
hi @ari279, based on your error, I might assume that it has something to do with how you have configured your nifi.properties file. It could be that you have messed up the HTTP and HTTPS properties or maybe you are trying to use an IP and a PORT which are already used by another application on your laptop. It could further help if you could paste your nifi.properties here and check on your machine if the combination of host name and port are already in use by another app.
... View more
04-21-2023
08:08 AM
hi @janvit04, Your request is not 100% clear for me. Maybe you could provide some additional information maybe? The output should be a JSON as well or how do you want your output? Are we going to talk about a maximum length of 10 characters all the time? What happens if you encounter 11 characters? All these questions are relevant to fully understand your use case and provide you with some guidance on what to do next in order to achieve what you are trying to achieve. Without any further information, I can tell you that what you are trying is possible but it is not easy at all: you would have to split your json, evaluate each value and add it as an attribute to your flowfile, measure the length of those attributes, route them based on side, modify them and save them afterwards in your desired format. Another solution would be a script (python for example), executed in ExecuteStreamCommand, which reads the content of this file and applies all your necessary rules. Once the processing is done, the file gets sent downstream to the next processor, whatever it would be.
... View more