ipython - Zeppelin: Constructor org.apache.spark.api.python.PythonRDD does not exist -
ipython notebook
started per docs (pyspark_driver_python=ipython pyspark_driver_python_opts="notebook" ./bin/pyspark
), filled in with:
from os import path tempfile import gettempdir #from pyspark import sparkfiles filename = path.join(gettempdir(), 'somefile.txt') open(filename, 'w') f: f.writelines(['foo\n'*500]) #sc = sparkcontext(appname="pythonsort") sc.addfile(filename) print 'sc.textfile(filename).count() =', sc.textfile(filename).count() sc.stop()
output: sc.textfile(filename).count() = 500
apache zeppelin notebook
%pyspark # same "ipython notebook"
output: (<class 'py4j.protocol.py4jerror'>, py4jerror(u'an error occurred while calling none.org.apache.spark.api.python.pythonrdd. trace:\npy4j.py4jexception: constructor org.apache.spark.api.python.pythonrdd([class org.apache.spark.rdd.mappartitionsrdd, class [b, class java.util.hashmap, class java.util.arraylist, class java.lang.boolean, class java.lang.string, class java.lang.string, class java.util.arraylist, class org.apache.spark.accumulator]) not exist\n\tat py4j.reflection.reflectionengine.getconstructor(reflectionengine.java:184)\n\tat py4j.reflection.reflectionengine.getconstructor(reflectionengine.java:202)\n\tat py4j.gateway.invoke(gateway.java:213)\n\tat py4j.commands.constructorcommand.invokeconstructor(constructorcommand.java:79)\n\tat py4j.commands.constructorcommand.execute(constructorcommand.java:68)\n\tat py4j.gatewayconnection.run(gatewayconnection.java:207)\n\tat java.lang.thread.run(thread.java:745)\n\n',), <traceback object @ 0x7f3f79e24440>)
Comments
Post a Comment