Re: Error in Jython environment

2018-04-16 Thread James McMahon
Thank you all for your insights. I opted to drop back and take a slightly different approach, since statvfs was problematic.I created a pyt... a jython function that employs subprocess.Popen against an argument I pass in for deviceToCheck. My NiFi jython environment seems to allow the

Re: Error in Jython environment

2018-04-16 Thread Mike Thomsen
James, The reason you can't use "Python" is because the scripting bundle only works with JVM-based scripting languages like JRuby, Jython and Groovy. Java 6 introduced javax.script which is a package that adds a standard API for calling JVM scripting languages from a Java app. >From from

Re: Error in Jython environment

2018-04-15 Thread Boris Tyukin
Hi James, Another new nifi user and Python fan here. Nifi runs in a single jvm instance and it has limited options talking to other languages like Python. Apache Spark took another road, using py4j, which I think is a better idea, rather than using jython. But in the end of the day, jython is

Re: Error in Jython environment

2018-04-15 Thread James McMahon
I'm not sure I understand. The ExecuteScript processor forces me into a Jython environment - despite selecting Python as the scripting language in the processor configuration. I'll never understand why that route was opted for in the first place. Why overcomplicate this, introducing yet another

Re: Error in Jython environment

2018-04-14 Thread Mike Thomsen
>From a lot of your posts, it seems like you're running into the same sort of problem that some of my colleagues ran into with Jython. The fact is that Jython is just not well supported by the Python community, and it's going to keep getting worse as Python 2.X EOL deadline in 2020 (IIRC) gets

Re: Error in Jython environment

2018-04-13 Thread James McMahon
No sir. When I run from the command line - I encapsulate script-specific command sequences in code triggered by SCRIPT var value, and NiFi sequences encapsulated within NIFI var values - it runs in a Python environment. I attempted jython -V at the command line, and it was unable to find an

Re: Error in Jython environment

2018-04-13 Thread Matt Burgess
Jim, Just to confirm Joe's comments, we were using 2.7.0 but then bumped it up to 2.7.1 as there was at least one method os.getpid() that hadn't been implemented [1]. However, 2.7.1 apparently has multithreading issues [2] that are causing some folks headaches as well. Regards, Matt [1]

Re: Error in Jython environment

2018-04-13 Thread Joe Witt
Independent of NiFi have you successfully used any version of Jython to make that call? With the NiFi 1.x line that processor has been updated a little bit and in particular i think we have Jython 2.7.1 (off memory so could be totally nonsense) where as before we had 2.7.0 or something older...

Error in Jython environment

2018-04-13 Thread James McMahon
Good afternoon. I am running a python script from an ExecuteScript processor in NiFi 0.7.1.c. I'm assuming this is actually running in a Jython environment under the hood of the processor. General question: How can I tell what version of Jython i am employing? Specific problem: I employ an