我编写了自己的Computation(MergeComputation)。当我在单个节点上运行我的项目时,我收到错误java.lang.ClassNotFoundException。
我正在加载:
GiraphConfiguration conf = new GiraphConfiguration();
conf.setComputationClass(MergeComputation.class);
我尝试了所有可能的事情:
bin/hadoop jar contrail-1.0-SNAPSHOT-job.jar contrail.GraphMerge giraphIn giraphout 2 -libjars myproject.jar,giraph-1.1.0-SNAPSHOT-for-hadoop-1.0.2-jar-with-dependencies.jar
我的HADOOP_CLASSPATH:
/Users/vidyasagar/Documents/hadoop-1.1.2/libexec/../giraph-1.1.0-SNAPSHOT-for-hadoop-1.0.2-jar-with-dependencies.jar:/Users/vidyasagar/Documents/hadoop-1.1.2/libexec/../myProject.jar
我收到以下错误
java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: contrail.MergeComputation
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:881)
at org.apache.giraph.conf.ClassConfOption.get(ClassConfOption.java:108)
at org.apache.giraph.utils.ConfigurationUtils.getTypesHolderClass(ConfigurationUtils.java:144)
at org.apache.giraph.conf.GiraphTypes.readFrom(GiraphTypes.java:97)
at org.apache.giraph.conf.GiraphClasses.<init>(GiraphClasses.java:155)
at org.apache.giraph.conf.ImmutableClassesGiraphConfiguration.<init>(ImmutableClassesGiraphConfiguration.java:99)
at org.apache.giraph.bsp.BspOutputFormat.getOutputCommitter(BspOutputFormat.java:56)
at org.apache.hadoop.mapred.Task.initialize(Task.java:515)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:353)
at org.apache.hadoop.mapred.Child$4.run(Child.java:255)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1149)
at org.apache.hadoop.mapred.Child.main(Child.java:249)
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: contrail.MergeComputation
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:849)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:873)
... 13 more
Caused by: java.lang.ClassNotFoundException: contrail.MergeComputation
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:802)
at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:847)
... 14 more
有人可以帮帮我。