Re: [Py4j-users] Using Py4J with parallel programming
Status: Beta
Brought to you by:
barthe
From: Alex G. <ale...@ne...> - 2012-03-09 16:09:25
|
09.03.2012 03:23, Barthelemy Dagenais kirjoitti: > Hi Stephen, > > Py4J cannot handle the starting of a JVM, but there are many workarounds. If the JVM is on the same machine, you could use Python to start the JVM (with subprocess or popen2 module… or better yet, the envoy library). Is there a reason why it can't just open a subprocess and communicate through pipes? Why is a TCP connection necessary? > > Otherwise, if your JVM lives on another machine, you could just create a small java program accepting py4j requests that starts other JVMs. I use the example application for this so I don't have to write any Java code. > > This is a feature requested by many users so I may try to implement something that ease this task in the future, but the way to start a JVM is so different in each case that I'm not sure how to make it generic enough… > > Barthélémy |