common-2.6.0-cdh5.9.0.jar'

eagi6jfj  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(293)

我正在尝试实现spark应用程序wordcount,但在添加hadoop公共依赖项时出错:

'Maven Dependencies' references non existing library '/root/.m2/repository/org/apache/hadoop/hadoop-common/2.6.0-cdh5.9.0/hadoop-common-2.6.0-cdh5.9.0.jar'

下面是my pom.xml:

<dependencies>
<!-- https://mvnrepository.com/artifact/org.scala-lang/scala-library -->
<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-library</artifactId>
    <version>2.10.6</version>
</dependency>
<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-common</artifactId>
    <version>2.6.0-cdh5.9.0</version>
</dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

我的haddop版本是2.6.0-cdh5.9.0。
请帮忙!!

iibxawm4

iibxawm41#

替换

<dependency>
    <groupId>org.apache.hadoop</groupId>
    <artifactId>hadoop-common</artifactId>
    <version>2.6.0-cdh5.9.0</version>
</dependency>

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

或者使用外部jar并添加http://repo.spring.io/libs-milestone/org/apache/hadoop/hadoop-common/2.6.0-cdh5.9.0/hadoop-common-2.6.0-cdh5.9.0.jar
希望这有帮助

相关问题