Hi Colleagues
We need to call a Scala Class from pySpark in Ipython notebook.
We tried something like below :
from py4j.java_gateway import java_import
java_import(sparkContext._jvm,'mynamespace')
myScalaClass = sparkContext._jvm.SimpleScalaClass ()
myScalaClass.sayHello(World) Works Fine
Yeah ... I am able to instantiate the simple scala class as explained below
which is from the same JAR
Regards
Santosh
On May 20, 2015, at 7:26 PM, Holden Karau
hol...@pigscanfly.camailto:hol...@pigscanfly.ca wrote:
Are your jars included in both the driver and worker class paths?
On
Ah sorry, I missed that part (I've been dealing with some py4j stuff today
as well and maybe skimmed it a bit too quickly). Do you have your code
somewhere I could take a look at? Also does your constructor expect a
JavaSparkContext or a regular SparkContext (if you look at how the
SQLContext is
Are your jars included in both the driver and worker class paths?
On Wednesday, May 20, 2015, Addanki, Santosh Kumar
santosh.kumar.adda...@sap.com wrote:
Hi Colleagues
We need to call a Scala Class from pySpark in Ipython notebook.
We tried something like below :
from