hama-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward J. Yoon" <edward.y...@samsung.com>
Subject RE: BSPClass with parameters
Date Thu, 09 Jul 2015 01:14:57 GMT
Hi Behroz,

You should specify the job parameters using BSPJob's get/set methods like 

BSPJob admm = new BSPJob();

admm.set("param1", "value");


public class ExchangeADMMSolver extends BSP {

String param1;

    public void setup(BSPPeer peer) {
      this.param1 = peer.getConfiguration().get("param1");



Best Regards, Edward J. Yoon

-----Original Message-----
From: Behroz Sikander [mailto:behroz89@gmail.com]
Sent: Thursday, July 09, 2015 9:02 AM
To: dev@hama.apache.org
Subject: BSPClass with parameters

I was recently working on something and need your suggestion. I am building
a small framework on top of Hama. Using my framework, users will submit a
job to my framework and my framework will internally run the Hama job. Here
is a sample code of what user might submit to my framework.

//Extra Hama related Params here like JobName, output Path etc
IFunction f = new MasterFunction(<inputPath>, <extra params>);
IFunction g = new SlaveFunction(<inputPath>, <extra params>);
ExchangeADMMSolver admm = new ExchangeADMMSolver(f, g); //Problem here

Here ExchangeADMMSolver will be a BSP class (this is what I am hoping to
acheive) and *"solve" *method will internally create a HamaJob and will
submit it to Hama.

I am a little confused here that how will I pass all the parameters to the
BSP class (e.g f,g) ? because in Hama if I want to set the bsp class I do
the following

HamaJob. setBspClass(ExchangeADMMSolver.class);

So, Instead of this I am looking for something like


I might need to override some Hama classes but before doing that I need
some suggestions that what can be the best solution.

Behroz Sikander

View raw message