importing pysparkling in Zeppelin fails on SW for 3.26.3

Description

---------------------------------------------------------------------------
Py4JError Traceback (most recent call last)
<ipython-input-18-28ad745c0cdd> in <module>()
1 import os.path
----> 2 from pysparkling import *
3 import h2o
4 #sc.setCheckpointDir('/user/' + user_name + '/checkpoints3/')
5

/opt/cloudera/parcels/Anaconda3/lib/python3.6/site-packages/pysparkling/_init_.py in <module>()
49 _all_ = ["H2OContext", "H2OConf"]
50
---> 51 Initializer.load_sparkling_jar()

/opt/cloudera/parcels/Anaconda3/lib/python3.6/site-packages/ai/h2o/sparkling/Initializer.py in load_sparkling_jar()
47 if stream is None:
48 sys.path.append(".")
---> 49 Initializer.__add_sparkling_jar_to_spark(sc)
50 else:
51 otherVersion = jvm.scala.io.Source.fromInputStream(stream, "UTF-8").mkString()

/opt/cloudera/parcels/Anaconda3/lib/python3.6/site-packages/ai/h2o/sparkling/Initializer.py in __add_sparkling_jar_to_spark(sc)
71 url = jvm.java.net.URL("file://{0}".format(sw_jar_file))
72
---> 73 Initializer.__add_url_to_classloader(jvm, url)
74
75 # Add Sparkling Water Assembly JAR to Spark's file server so executors can fetch it

/opt/cloudera/parcels/Anaconda3/lib/python3.6/site-packages/ai/h2o/sparkling/Initializer.py in __add_url_to_classloader(jvm, url)
145 methods = [m.getName() for m in cl.getClass().getDeclaredMethods()]
146 if "addURL" in methods:
--> 147 cl.addURL(url)
148 logger.debug("Adding {} to classloader '{}'".format(url.toString(), cl.toString()))
149 else:

/opt/cloudera/parcels/SPARK2-2.3.0.cloudera4-1.cdh5.13.3.p0.611179/lib/spark2/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in _call_(self, *args)
1255 answer = self.gateway_client.send_command(command)
1256 return_value = get_return_value(
-> 1257 answer, self.gateway_client, self.target_id, self.name)
1258
1259 for temp_arg in temp_args:

/opt/cloudera/parcels/SPARK2-2.3.0.cloudera4-1.cdh5.13.3.p0.611179/lib/spark2/python/lib/pyspark.zip/pyspark/sql/utils.py in deco(*a, **kw)
61 def deco(*a, **kw):
62 try:
---> 63 return f(*a, **kw)
64 except py4j.protocol.Py4JJavaError as e:
65 s = e.java_exception.toString()

/opt/cloudera/parcels/SPARK2-2.3.0.cloudera4-1.cdh5.13.3.p0.611179/lib/spark2/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name)
330 raise Py4JError(
331 "An error occurred while calling {0}{1}{2}. Trace:\n{3}\n".
--> 332 format(target_id, ".", name, value))
333 else:
334 raise Py4JError(

Py4JError: An error occurred while calling o129.addURL. Trace:
org.apache.zeppelin.py4j.Py4JException: Method addURL([class java.net.URL]) does not exist
at org.apache.zeppelin.py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:335)
at org.apache.zeppelin.py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:344)
at org.apache.zeppelin.py4j.Gateway.invoke(Gateway.java:279)
at org.apache.zeppelin.py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133)
at org.apache.zeppelin.py4j.commands.CallCommand.execute(CallCommand.java:79)
at org.apache.zeppelin.py4j.GatewayConnection.run(GatewayConnection.java:209)
at java.lang.Thread.run(Thread.java:748)

Status

Assignee

Jakub Hava

Reporter

Nidhi Mehta

Labels

None

CustomerVisible

No

testcase 1

None

testcase 2

None

testcase 3

None

h2ostream link

None

Affected Spark version

None

AffectedContact

None

AffectedCustomers

None

AffectedPilots

None

AffectedOpenSource

None

Support Assessment

None

Customer Request Type

None

Support ticket URL

End date

None

Baseline start date

None

Baseline end date

None

Task progress

None

Task mode

None

Fix versions

Priority

Major
Configure