执行run_MicroBenchmarks.sh的时候报错:
java.lang.ClassNotFoundException: cn.ac.ict.bigdatabench.Sort
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.apache.spark.util.Utils$.classForName(Utils.scala:174)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:689)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
conf.properties内容如下:
algorithm=( Sort Grep Wordcount)
if [ -n "$1" ]; then
choice=$1
else
echo "Please select a number to choose the corresponding Workload algorithm"
echo "1. ${algorithm[0]} Workload"
echo "2. ${algorithm[1]} Workload"
echo "3. ${algorithm[2]} Workload"
read -p "Enter your choice : " choice
fi
echo "ok. You chose $choice and we'll use ${algorithm[$choice-1]} Workload"
Workloadtype=${algorithm[$choice-1]}
if [ "x$Workloadtype" == "xSort" ]; then
/usr/local/hadoop/bin/hadoop fs -rmr /spark-sort-result
/usr/local/spark/bin/spark-submit --class cn.ac.ict.bigdatabench.Sort $JAR_FILE /data-MicroBenchmarks /spark-sort-result
elif [ "x$Workloadtype" == "xGrep" ]; then
echo "the keyword to filter the text K:"
read K
/usr/local/hadoop/bin/hadoop fs -rmr /spark-grep-result
/usr/local/spark/bin/spark-submit --class cn.ac.ict.bigdatabench.Grep $JAR_FILE /data-MicroBenchmarks ${K} /spark-grep-result