You cannot run the vertex class directly. Instead you can use GiraphRunner, e.g.
hadoop jar giraph-jar-with-dependencies.jar org.apache.giraph.GiraphRunner org.apache.giraph.examples.ConnectedComponentsVertex --inputFormat org.apache.giraph.examples.IntIntNullIntTextInputFormat --inputPath hdfs:///path/to/input --outputFormat org.apache.giraph.examples.VertexWithComponentTextOutputFormat --outputPath hdfs:///path/to/output --workers numWorkers --combiner org.apache.giraph.examples.MinimumIntCombiner --sebastian 2012/8/6 Vishal Patel <write2vis...@gmail.com>: > Hi, I am trying to run the connected-components example. I have giraph > installed, all the test pass on a 3 node cluster running hadoop-1.0.3/ > > The main method is missing in the ConnectedComponentsVertex class > > cd target/classes > hadoop jar ../giraph-0.1-jar-with-dependencies.jar > org.apache.giraph.examples.ConnectedComponentsVertex > > Exception in thread "main" java.lang.NoSuchMethodException: > org.apache.giraph.examples.ConnectedComponentsVertex.main([Ljava.lang.String;) > at java.lang.Class.getMethod(Class.java:1622) > at org.apache.hadoop.util.RunJar.main(RunJar.java:150) > > Can someone please help me with running this example? > > Vishal >