You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@giraph.apache.org by Saliya Ekanayake <es...@gmail.com> on 2017/02/04 17:21:47 UTC
Return a value from Giraph master superstep
Hi,
I am developing a graph algorithm where I need to do N invocations of
giraph. Each invocation will run some M number of supersteps. I need to
return a value from the last super step back to the main method before
invoking giraph. How can I do this?
For example, I have,
main(){
for (int i = 0; i < N; ++i){
// Create giraph conf
// Create new Giraph runner
ToolRunner.run(runner, ...)
// I need to return a value here from this invocation.
}
--
Saliya Ekanayake, Ph.D
Applied Computer Scientist
Network Dynamics and Simulation Science Laboratory (NDSSL)
Virginia Tech, Blacksburg
Re: Return a value from Giraph master superstep
Posted by José Luis Larroque <la...@gmail.com>.
Hi Saliya,
GiraphRunner.run gives you an *int* result, and that result it's different
depending of your last superstep execution. It will give 0 in a
successfully execution and a error value otherwise. Those values can't be
changed but maybe you should save your last superstep custom result in hdfs
for example, and try to keep things simple instead of changing Giraph code.
Just a idea.
Bye!
--
*José Luis Larroque*
Analista Programador Universitario - Facultad de Informática - UNLP
Desarrollador Java en LIFIA
2017-02-04 14:21 GMT-03:00 Saliya Ekanayake <es...@gmail.com>:
> Hi,
>
> I am developing a graph algorithm where I need to do N invocations of
> giraph. Each invocation will run some M number of supersteps. I need to
> return a value from the last super step back to the main method before
> invoking giraph. How can I do this?
>
> For example, I have,
>
> main(){
>
> for (int i = 0; i < N; ++i){
> // Create giraph conf
> // Create new Giraph runner
> ToolRunner.run(runner, ...)
>
> // I need to return a value here from this invocation.
> }
>
> --
> Saliya Ekanayake, Ph.D
> Applied Computer Scientist
> Network Dynamics and Simulation Science Laboratory (NDSSL)
> Virginia Tech, Blacksburg
>
>