Hi Luis,
if you don't mind I'll CC this mail to our user list, because it can be
useful for other users facing the same problems as well.
So far I am able to run the examples in a single node, still can't figure
> out why the distributed mode doesn't work in spite of having Master, Grooms
> and Zookeepers running.
>
What did you configure in your "bsp.master.address"? If it is "local" (which
is default) it will run a multithreaded local version of our BSP Framework
on the master server. So it won't use the other servers.
This isn't documented, you're right.
how to run a single job?
You have actually two options:
* Use the hama/bin/hama jar <yourjar.jar> command.
This comannd is actually looking in the manifest of your jar for a
configured main class.
In eclipse for example, it is "Export->As runnable JAR file". This will then
run your main-method which should be in your PiEstimator class file.
* Start a Hama Job from an existing Java application. It should then look
like the main method in the PiEstimator example,
BUT you have to provide the configuration parameters, so the Job can find
the cluster you want to submit to.
A little code example could be the following:
HamaConfiguration conf = new HamaConfiguration();
conf.set("bsp.master.address","raynor.starcraft.com:40000"); // address
> of BSP Master
> conf.set("fs.default.name","hdfs://raynor.starcraft.com:9001"); //
> address of Hadoop Namenode
> conf.set("hama.zookeeper.quorum","raynor.starcraft.com"); // address
> of the Hama Zookeeper
>
BSPJob bsp = new BSPJob(conf, PiEstimator.class); // sets the
> configuration and jar file where the class resides
> bsp.setJobName("Pi Estimation Example");
> bsp.setBspClass(MyEstimator.class);
> bsp.setNumBspTask(5); // usually the number of your machines in your
> cluster
> bsp.waitForCompletion(true); // submits the job and waits for its
> completion, true is for log outputs
>
As you can see, now you can set your job name and classes as well as how
many tasks should run.
Hope you can help me, since there's still very few Hama documentation about
> such simple issues.
Yes we have a totally bad documentation in our wiki. Especially for our
0.3.0 release, but you can refer the 0.2.0 user-guide. [1]
It should cover everything about the submission and programming model.
Hope to help you :)
Best Regards,
Thomas
[1]
http://people.apache.org/~edwardyoon/documents/ApacheHama-0.2_UserGuide.pdf
2011/9/13 Luis Eduardo Pineda Morales <[email protected]>
> Hi Thomas,
>
> this is Luis Pineda, master student from the University of Trento, Italy.
>
> I am developing some applications for parallel graph analysis algorithms
> and I want to try Hama and saw you are quite active in the project at the
> moment.
>
> So far I am able to run the examples in a single node, still can't figure
> out why the distributed mode doesn't work in spite of having Master, Grooms
> and Zookeepers running.
>
> But that's another thing. Now I want to ask you the most basic question,
> namely: how to run a single job?
>
> I took the source of the PiEstimator (alone) as example, I compile it
> without problems and get 2 class files:
>
> PiEstimator.class
> PiEstimator$MyEstimator.class
>
> and put them together in a jar, I tried to submit them with
>
> $bin/hama job -submit PiEstimator.jar
>
> but it doesn't work.
>
> Which should be then the name of the job to submit? or do I need to use a
> ProgramDriver like in the example jar?
>
> Hope you can help me, since there's still very few Hama documentation about
> such simple issues.
>
> Thanks!
>
> Luis
--
Thomas Jungblut
Berlin
mobile: 0170-3081070
business: [email protected]
private: [email protected]