i trying query table hive using ipython. below code looks like.
sqlc = hivecontext(sc) sqlc.sql("add jar s3://x/y/z/jsonserde.jar") i first create new hive context , second try add jar above. below error message get.
py4jjavaerror: error occurred while calling o63.sql: java.lang.classnotfoundexception: org.openx.data.jsonserde.jsonserde how else add jar spark classpath?
you error because haven't add library in sparkcontext when started ipython.
to you'll need run shell doing following :
pyspark_driver_python=ipython bin/pyspark --master local[1] --jars [path/to/jar].jar --driver-class-path [path/to/jar].jar nb: specifying --jars won't enough considering spark-5185.
Comments
Post a Comment