tag:blogger.com,1999:blog-42869383794183737.post2163670042708918005..comments2024-03-09T01:04:10.400-08:00Comments on Fun with Apache NiFi: InvokeScriptedProcessor template revisited (with Jython)MattyBhttp://www.blogger.com/profile/05049049725324531534noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-42869383794183737.post-22144328854503616332022-03-05T07:48:21.986-08:002022-03-05T07:48:21.986-08:00The Best VR Sports Games For The HTC Vive, Oculus,...The Best VR Sports Games For The HTC Vive, Oculus, and<br />Best <a href="https://www.titanium-arts.com/titanium-wedding-bands-for-men.html" rel="nofollow">nipple piercing jewelry titanium</a> VR Sports <a href="https://www.titanium-arts.com/sunscreen-with-zinc-oxide-and-titanium-dioxide.html" rel="nofollow">titanium joes</a> Games For The HTC Vive, Oculus, and Quest 2 The best <a href="https://www.titanium-arts.com/titanium-edc.html" rel="nofollow">titanium flat irons</a> VR sports <a href="https://www.titanium-arts.com/titanium-sponge.html" rel="nofollow">snow peak titanium</a> games <a href="https://www.titanium-arts.com/titanium-razor.html" rel="nofollow">titanium alloy nier replicant</a> for the HTC Vive, Oculus, and Quest 2.ragnartaddeohttps://www.blogger.com/profile/04667930965319313958noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-29916318858599682622019-07-31T03:22:37.387-07:002019-07-31T03:22:37.387-07:00I hope that this is the right place for my questio...I hope that this is the right place for my question, so here it goes:<br /><br />I want to consume data from a running process that exposes a soap service interface. The standard processors in NiFi do not support soap. Given the available skills in our organization, I was looking at Python and the module Zeep, that can act as a soap client.<br /><br />First question is if a soap client for NiFi exists. If this is the case, then I can use that.<br /><br />Second question is how to use a Python module in the ScriptedProcessor. I have not seen instructions on how to make modules available for import in Python, and I don't know if pure Python modules can be used in the ScriptedProcessor.<br /><br />Last question for now is about the difference between de InvokeScriptedProcessor and the ExecuteScript processor.Peter Zandbergenhttps://www.blogger.com/profile/07382871911751976690noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-66492236396689490422018-06-05T23:10:20.935-07:002018-06-05T23:10:20.935-07:00After making some research, I sorted the issue out...After making some research, I sorted the issue out this way:<br />context.getProperty('my_property').getValue() # calling from executeScript() section using passed context<br /><br />Anyway, I'd like to see how to handle properties in better way. Say if we add them with PropertyDescriptor.Builder() and want to make some validations against them.<br /><br />There is already a great post here (for Groovy users): http://funnifi.blogspot.com/2016/02/writing-reusable-scripted-processors-in.htmlAnonymoushttps://www.blogger.com/profile/08281033553460403791noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-15655420405479032252018-06-05T08:18:00.187-07:002018-06-05T08:18:00.187-07:00Hi Matt
I'm curious, is there a way to access ...Hi Matt<br />I'm curious, is there a way to access dynamic properties and their values from ISP just like you did in "ExecuteScript Cookbook part 3"?<br />I tried both, calling my_property.getValue() from executeScript method and outside it... and always failed.<br />I can't use ExecuteScript processor since I want to manage more than two relationships.<br /><br />Thank you for articles, I really love themAnonymoushttps://www.blogger.com/profile/08281033553460403791noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-5347863366463941582018-02-23T09:37:18.508-08:002018-02-23T09:37:18.508-08:00I don't think the script engine keeps track of...I don't think the script engine keeps track of global variables, so you would want it to be a member of the class that implements the Processor interface (i.e. the one with onTrigger). Note that when the script is reloaded (if any properties change on the main dialog, including the code itself), a new instance of the class will be created, so the member variable holding the count will be re-initialized. If you need to keep track of data in between runs of onTrigger, you can also use the processor's State Management capabilities, check out part 3 of my ExecuteScript Cookbook (the same technique applies to InvokeScriptedProcessor): https://community.hortonworks.com/content/kbentry/77739/executescript-cookbook-part-3.htmlMattyBhttps://www.blogger.com/profile/05049049725324531534noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-39462428643889568942018-02-21T08:06:05.257-08:002018-02-21T08:06:05.257-08:00Hi Matt, thanks for the helpful posts. I got a que...Hi Matt, thanks for the helpful posts. I got a question. I add a global variable to my python file which counts how many times the functions is used for specific method (simply let's say a counter). When the InvokeScriptedProcessor is stopped, I expect it to write the final value of the counter to a file for me. But it appears always to be empty outside of onTrigger method! when I print it inside onTrigger, it shows the counter, but outside of the class it's always empty. And the point is that I want only the final result that's why I want it when the processor is stopped.<br />I tried to add the counter as an attribute of the class, and update it each time by the global variable. but again it appears empty. I don't know what is the good way to return such data from onTrigger when the InvokeScriptedProcessor is stopped?Anonymoushttps://www.blogger.com/profile/14705201046250478528noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-2635768578625571442018-01-11T14:04:37.337-08:002018-01-11T14:04:37.337-08:00awesome, thanks Matt!awesome, thanks Matt!Boris Tyukinhttps://www.blogger.com/profile/15286991293900821710noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-1877410439958047822017-11-20T05:02:08.784-08:002017-11-20T05:02:08.784-08:00Hello good morning Matt. After several adaptations...Hello good morning Matt. After several adaptations were made to the Jython code, it was inserted into your template. As a result, data can be processed faster and bottlenecks avoided. Really thank you very much for your help, your template is clear and effective. GreetingsJavier Ordeneshttps://www.blogger.com/profile/04060061262560169755noreply@blogger.comtag:blogger.com,1999:blog-42869383794183737.post-30843923920842131242017-11-07T10:20:47.156-08:002017-11-07T10:20:47.156-08:00Hi Matt. Thank you very much for the code, I will ...Hi Matt. Thank you very much for the code, I will try it in different ways and I will give you good feedback. Thanks for your time.Javier Ordeneshttps://www.blogger.com/profile/04060061262560169755noreply@blogger.com