本文介绍了火花提交找不到类 - htrace的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用运行命令行星火例如code HBaseTest火花,而不是提交运行的例子,在这种情况下,我可以学到更多如何运行一般的火花code。

I am trying to run the Spark example code HBaseTest from command line using spark-submit instead run-example, in that case, I can learn more how to run spark code in general.

不过,因为我使用CDH5.4告诉我关于htrace CLASS_NOT_FOUND。我成功地位于htrace jar文件,但我有一个很难将其添加到路径。

However, it told me CLASS_NOT_FOUND about htrace since I am using CDH5.4. I successfully located the htrace jar file but I am having a hard time adding it to path.

这是最后的火花提交命令我有,但仍然有类未找到错误。谁能帮助我?

This is the final spark-submit command I have but still have the class not found error. Can anyone help me with this?

#!/bin/bash
export SPARK_HOME=/opt/cloudera/parcels/CDH/lib/spark

/bin/bash $SPARK_HOME/bin/spark-submit \
--master yarn-client \
--class org.apache.spark.examples.HBaseTest \
--driver-class-path /etc/hbase/conf:$SPARK_HOME/examples/lib/*.jar:/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2.p0.2/lib/hbase/lib/*.jar \
--jars $SPARK_HOME/examples/lib/*.jar:/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2.p0.2/lib/hbase/lib/*.jar \
$SPARK_HOME/examples/lib/*.jar \
myhbasetablename

请注意:
htrace核心-3.0.4.jar,htrace核-3.1.0-incubating.jar,htrace-core.jar添加都设下/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2 .p0.2 / lib目录/ HBase的/ lib目录/'。

Note: htrace-core-3.0.4.jar, htrace-core-3.1.0-incubating.jar, htrace-core.jar are all located under '/opt/cloudera/parcels/CDH-5.4.2-1.cdh5.4.2.p0.2/lib/hbase/lib/'.

推荐答案

我打开了 $ SPARK_HOME / conf目录/ classpath.txt 和刚添加的 /opt/cloudera/parcels/CDH/lib/hbase/lib/htrace-core-3.1.0-incubating.jar 到文件的末尾。

I opened up the $SPARK_HOME/conf/classpath.txt and just added the /opt/cloudera/parcels/CDH/lib/hbase/lib/htrace-core-3.1.0-incubating.jar to the end of the file.

https://community.cloudera.com/t5/Advanced-Analytics-Apache-Spark/ClassNotFoundException-org-apache-htrace-Trace-exception-in/m-p/29253/highlight/true#M915

这篇关于火花提交找不到类 - htrace的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 05:23