抛出java.lang.ClassNotFoundException:org.openx.data.jsonserde.JsonSerDe [英] java.lang.ClassNotFoundException: org.openx.data.jsonserde.JsonSerDe

查看:2145
本文介绍了抛出java.lang.ClassNotFoundException:org.openx.data.jsonserde.JsonSerDe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用查询从IPython的蜂巢表。下面是我的code样子。

I am trying to query a table from Hive using iPython. Below is what my code looks like.

sqlc = HiveContext(sc)
sqlc.sql("ADD JAR s3://x/y/z/jsonserde.jar")

我首先创建一个新的蜂巢环境和第二个尝试添加上面的罐子。以下是错误消息我得到的。

I first create a new hive context and second try to add the jar above. Below is the error message I get.

Py4JJavaError: An error occurred while calling o63.sql:
java.lang.ClassNotFoundException: org.openx.data.jsonserde.JsonSerDe

不然怎么我添加这个罐子星火类路径?

How else do I add this jar to Spark classpath?

推荐答案

您得到这个错误,因为你没有在你的SparkContext添加库时,你开始IPython的。

You get that error because you haven't add your library in your SparkContext when you started iPython.

要做到这一点,你需要运行你的shell执行以下操作:

To do so you'll need to run your shell doing the following :

PYSPARK_DRIVER_PYTHON=ipython bin/pyspark --master local[1] --jars [path/to/jar].jar --driver-class-path [path/to/jar].jar 

NB - ://问题指定罐子不会为现在考虑的 SPARK-5185

NB: Specifying the --jars won't be enough for now considering the SPARK-5185.

这篇关于抛出java.lang.ClassNotFoundException:org.openx.data.jsonserde.JsonSerDe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆