Hi, 

Adding some information to the thread:

I tried to run application Map reduce mode by doing the following steps. 
(Java version 1.7.0_71)

1) Build giraph: $mvn -Phadoop_2 -fae -DskipTests clean install

2) Run the map reduce job: $HADOOP_HOME/bin/hadoop jar ~/giraph-examples-1.1.0-SNAPSHOT-for-hadoop-2.5.1-jar-with-dependencies.jar org.apache.giraph.GiraphRunner org.apache.giraph.examples.SimpleShortestPathsComputation -vif org.apache.giraph.io.formats.JsonLongDoubleFloatDoubleVertexInputFormat -vip /user/charith/input/tiny_graph.txt -vof org.apache.giraph.io.formats.IdWithValueTextOutputFormat -op /user/charith/output -ca mapred.job.tracker=10.0.0.1:54311 -ca mapred.job.tracker=10.0.0.1:54311 -w 2

I am getting following Exception

INFO mapreduce.Job: Job job_1415138324209_0007 failed with state FAILED due to: Application application_1415138324209_0007 failed 2 times due to AM Container for appattempt_1415138324209_0007_000002 exited with  exitCode: 1 due to: Exception from container-launch: 
org.apache.hadoop.util.Shell$ExitCodeException: 
at org.apache.hadoop.util.Shell.runCommand(Shell.java:464)



And the logs give following exception. 
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/service/CompositeService
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
	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:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:480)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.service.CompositeService
	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:423)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	... 13 more



It will be great if someone could assist me in this matter. 

Thanks,
Charith







 

On Tue, Nov 4, 2014 at 2:19 PM, Charith Wickramarachchi <charith.dhanushka@gmail.com> wrote:
Hi, 

I have a trouble when trying to run giraph trunk on Hadoop 2.2.0 

Job terminated, giving the exception 

ERROR yarn.GiraphYarnClient: Giraph: org.apache.giraph.examples.SimpleShortestPathsComputation reports FAILED state, diagnostics show: Application application_1415138324209_0002 failed 2 times due to AM Container for appattempt_1415138324209_0002_000002 exited with  exitCode: 1 due to: Exception from container-launch: 
org.apache.hadoop.util.Shell$ExitCodeException: 
at org.apache.hadoop.util.Shell.runCommand(Shell.java:464)

stderror logs have following error:
Error: Could not find or load main class org.apache.giraph.yarn.GiraphApplicationMaster

I build the project using following command 

mvn -Phadoop_yarn -fae -DskipTests -Dhadoop.version=2.2.0 clean install

I could see the class org.apache.giraph.yarn.GiraphApplicationMaster in the jar. 


Please let me know how to resolve this issue? Also is there a way to run giraph as Mapreduce application instead of yarn with hadoop 2.2.0? 

Thanks,
Charith 



--
Charith Dhanushka Wickramaarachchi

This communication may contain privileged or other confidential information and is intended exclusively for the addressee/s. If you are not the intended recipient/s, or believe that you may have
received this communication in error, please reply to the sender indicating that fact and delete the copy you received and in addition, you should not print, copy, retransmit, disseminate, or otherwise use the information contained in this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions



--
Charith Dhanushka Wickramaarachchi

Tel  +1 213 447 4253
Web  http://apache.org/~charith
Blog  http://charith.wickramaarachchi.org/
Twitter  @charithwiki

This communication may contain privileged or other confidential information and is intended exclusively for the addressee/s. If you are not the intended recipient/s, or believe that you may have
received this communication in error, please reply to the sender indicating that fact and delete the copy you received and in addition, you should not print, copy, retransmit, disseminate, or otherwise use the information contained in this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions