gpt4 book ai didi

apache-spark - java.lang.ClassNotFoundException : org. apache.hadoop.util.StopWatch

转载 作者:行者123 更新时间:2023-12-04 04:22:41 26 4
gpt4 key购买 nike

当我运行 linear support vector machines svms 的代码时,并导致错误:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/util/StopWatch
at org.apache.hadoop.mapred.FileInputFormat.getSplits(FileInputFormat.java:314)
at org.apache.spark.rdd.HadoopRDD.getPartitions(HadoopRDD.scala:207)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:239)
at org.apache.spark.rdd.RDD$$anonfun$partitions$2.apply(RDD.scala:237)
at scala.Option.getOrElse(Option.scala:120)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.StopWatch
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

你能告诉我包含 org.apache.hadoop.util.StopWatch 的 maven 依赖项吗?

最佳答案

<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>2.7.2</version>
</dependency>

关于apache-spark - java.lang.ClassNotFoundException : org. apache.hadoop.util.StopWatch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35664910/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com