You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Maria Stylianou <ma...@gmail.com> on 2013/03/21 13:49:24 UTC
Giving a parameter into initialize() of masterCompute
When using the masterCompute into a program, we have the initialize()
method, which does not get any parameters.
Is it possible to give a parameter into the initialize(), in order to
register different aggregators (depending on this parameter) ??
--
Maria Stylianou
Intern at Telefonica, Barcelona, Spain
Master Student of European Master in Distributed
Computing<http://www.kth.se/en/studies/programmes/master/em/emdc>
Universitat Politècnica de Catalunya - BarcelonaTech, Barcelona, Spain
KTH Royal Institute of Technology, Stockholm, Sweden
Phone: +34 622 211 885
Re: Giving a parameter into initialize() of masterCompute
Posted by Eli Reisman <ap...@gmail.com>.
I think you can use -D with the bin/giraph run script to pass configuration
keys and values. If you call "hadoop jar" directly and use it to run the
o.a.g.GiraphRunner class, then the same types of key and value args are
passed via -ca arguments.
The very oldest way to run Giraph code is demonstrated in the benchmark/
dirs where you see benchmarks implementing Tool from Hadoop and running
directly via hadoop jar command (as shown on the website.) For new
application code, either of the two ways listed above are preferred.
On Fri, Mar 22, 2013 at 4:49 AM, Claudio Martella <
claudio.martella@gmail.com> wrote:
> Yes, for example with -ca. It depends on how you're running your jobs,
> whether directly from hadoop or through GiraphRunner.
>
>
> On Fri, Mar 22, 2013 at 12:32 PM, Maria Stylianou <ma...@gmail.com>wrote:
>
>>
>> On Thu, Mar 21, 2013 at 3:23 PM, Claudio Martella <
>> claudio.martella@gmail.com> wrote:
>>
>>> pass your parameters as job parameters through -D
>>
>>
>> do you mean in the execution command line? when we write -ca
>> parameter=value ? I don't know/remember the -D
>>
>>
>>
>> --
>> Maria Stylianou
>> Intern at Telefonica, Barcelona, Spain
>> Master Student of European Master in Distributed Computing<http://www.kth.se/en/studies/programmes/master/em/emdc>
>> Universitat Politècnica de Catalunya - BarcelonaTech, Barcelona, Spain
>> KTH Royal Institute of Technology, Stockholm, Sweden
>> Phone: +34 622 211 885
>>
>>
>
>
> --
> Claudio Martella
> claudio.martella@gmail.com
>
Re: Giving a parameter into initialize() of masterCompute
Posted by Claudio Martella <cl...@gmail.com>.
Yes, for example with -ca. It depends on how you're running your jobs,
whether directly from hadoop or through GiraphRunner.
On Fri, Mar 22, 2013 at 12:32 PM, Maria Stylianou <ma...@gmail.com> wrote:
>
> On Thu, Mar 21, 2013 at 3:23 PM, Claudio Martella <
> claudio.martella@gmail.com> wrote:
>
>> pass your parameters as job parameters through -D
>
>
> do you mean in the execution command line? when we write -ca
> parameter=value ? I don't know/remember the -D
>
>
>
> --
> Maria Stylianou
> Intern at Telefonica, Barcelona, Spain
> Master Student of European Master in Distributed Computing<http://www.kth.se/en/studies/programmes/master/em/emdc>
> Universitat Politècnica de Catalunya - BarcelonaTech, Barcelona, Spain
> KTH Royal Institute of Technology, Stockholm, Sweden
> Phone: +34 622 211 885
>
>
--
Claudio Martella
claudio.martella@gmail.com
Re: Giving a parameter into initialize() of masterCompute
Posted by Maria Stylianou <ma...@gmail.com>.
On Thu, Mar 21, 2013 at 3:23 PM, Claudio Martella <
claudio.martella@gmail.com> wrote:
> pass your parameters as job parameters through -D
do you mean in the execution command line? when we write -ca
parameter=value ? I don't know/remember the -D
--
Maria Stylianou
Intern at Telefonica, Barcelona, Spain
Master Student of European Master in Distributed
Computing<http://www.kth.se/en/studies/programmes/master/em/emdc>
Universitat Politècnica de Catalunya - BarcelonaTech, Barcelona, Spain
KTH Royal Institute of Technology, Stockholm, Sweden
Phone: +34 622 211 885
Re: Giving a parameter into initialize() of masterCompute
Posted by Claudio Martella <cl...@gmail.com>.
You could try to pass your parameters as job parameters through -D (think
for example to the number of supersteps parameter for PR). This would not
require any change in the infrastructure code.
On Thu, Mar 21, 2013 at 1:49 PM, Maria Stylianou <ma...@gmail.com> wrote:
> When using the masterCompute into a program, we have the initialize()
> method, which does not get any parameters.
>
> Is it possible to give a parameter into the initialize(), in order to
> register different aggregators (depending on this parameter) ??
>
> --
> Maria Stylianou
> Intern at Telefonica, Barcelona, Spain
> Master Student of European Master in Distributed Computing<http://www.kth.se/en/studies/programmes/master/em/emdc>
> Universitat Politècnica de Catalunya - BarcelonaTech, Barcelona, Spain
> KTH Royal Institute of Technology, Stockholm, Sweden
> Phone: +34 622 211 885
>
>
--
Claudio Martella
claudio.martella@gmail.com