giraph-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Heitmann <>
Subject Problem deploying Giraph job to hadoop cluster: onlineZooKeeperServers connection failure
Date Tue, 20 Mar 2012 20:14:55 GMT

after getting my feet wet with the InternalVertexRunner, I tried packaging a Giraph job as
a jar for the first time. 

I am getting the following error: 

12/03/20 17:21:04 INFO mapred.JobClient: Task Id : attempt_201203201422_0009_m_000000_2, Status
java.lang.IllegalStateException: onlineZooKeeperServers: Failed to connect in 10 tries!
	at org.apache.giraph.zk.ZooKeeperManager.onlineZooKeeperServers(
	at org.apache.giraph.graph.GraphMapper.setup(
	at org.apache.hadoop.mapred.MapTask.runNewMapper(
	at org.apache.hadoop.mapred.Child$
	at Method)
	at org.apache.hadoop.mapred.Child.main(

attempt_201203201422_0009_m_000000_2: log4j:WARN No appenders could be found for logger (org.apache.giraph.zk.ZooKeeperManager).
attempt_201203201422_0009_m_000000_2: log4j:WARN Please initialize the log4j system properly.

Here is some more information, which hopefully might give this mailing list some insight into
what is happening, 
because I cant figure it out...

* I am using Hadoop 1.0.1 and giraph svn revision 1293545 (the last one from February) 
* If I run the same Vertex class and Input/OutputFormat using InternalVertexRunner, then everything
works fine. (using again Hadoop 1.0.1 and giraph rev 1293545) 
* I package the giraph job as a selfcontaining jar, and it contains the giraph jar, as well
as the zookeeper jar in its lib dir
(I mostly used the recipe from here
* there was an error in which hadoop could not find a class. And I had to fix that error with:

* My Vertex class extends HashMapVertex<Text, Text, Text, NullWritable>
* I followed the code example from SimpleShortestPathVertex regarding the run() method and
using the main method to call

Here is the code for my run() method: 

	public int run(String[] args) throws Exception {
		// takes 3 args: inputDir outputDir numberOfWorkers
	    GiraphJob job = new GiraphJob(getConf(), getClass().getName());
	    FileInputFormat.addInputPath(job, new Path(args[0]));
	    FileOutputFormat.setOutputPath(job, new Path(args[1]));
	    job.setWorkerConfiguration(Integer.parseInt(args[2]), Integer.parseInt(args[2]), 100.0f);

	    return ? 0 : -1;

Am I constructing the GiraphJob in the wrong way ? 

I saw the GiraphRunner class, but the giraph source tree currently does not seem to contain
an example of how to use that class. 
Is it safer to use that class for starting a GiraphJob ? 
If yes, how should the job jar be assembled in order to use GiraphRunner ? 

sincerely, Benjamin Heitmann. 

View raw message