所以,我在我的集群上安装了Hadoop 2.3.0-cdh5.1.0 ......我通过以下命令编译了giraph .. mvn clean package -DskipTests -Dhadoop=non_secure -Phadoop_2.0.0
所以,编译工作得很好,然后pagerank基准测试也成功了..
所以,我猜测giraph编译得很好..
现在,我正在尝试运行我的代码..
hadoop jar graphAnalytics-0.0.1-SNAPSHOT-jar-with-dependencies.jar org.apache.giraph.GiraphRunner -Dgiraph.zkList=srv-110-07:2181,srv-110-08:2181,srv-210-08:2181 org.examples.graphAnalytics.PageRankVertex -w 1 -vif org.examples.graphAnalytics.PageRankInputFormat
And I am getting this error:
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.JobContext, but class was expected
at org.apache.giraph.bsp.BspOutputFormat.checkOutputSpecs(BspOutputFormat.java:43)
at org.apache.hadoop.mapreduce.JobSubmitter.checkSpecs(JobSubmitter.java:458)
at org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:343)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1295)
at org.apache.hadoop.mapreduce.Job$10.run(Job.java:1292)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:415)
at....
我知道,这是一个不完整的命令,但它已经在抱怨......: - /
我的POM文件如下:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.rdio.graphanalytics</groupId>
<artifactId>graphAnalytics</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Graph Analytics Algorithms</name>
<description>Package for Graph Analytics Algorithms
</description>
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.apache.giraph</groupId>
<artifactId>giraph-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
<version>4.8.2</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.3.0-cdh5.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assemble-all</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我如何解决这个问题? 感谢
答案 0 :(得分:0)
我不认为Giraph支持Hadoop 2.2及更高版本:http://giraph.apache.org/build.html
CDH 5.1是Hadoop 2.3 +补丁。
您可能已成功修改并重建Giraph,以便稍后验证Hadoop。但是你看到的错误是针对后来的Hadoop版本运行的典型症状,而不是编译它。