Terminating Iteration based on a counter value

35 views
Skip to first unread message

alien01

unread,
Jul 5, 2012, 4:38:18 PM7/5/12
to haloop-user
Hi

I have Hadoop based iterative BFS program. I would like to migrate it
to Haloop (r408). The iteration stopping condition is a value of a
counter. As such:

long counter = 0;
while (counter !=0) {
//Job config and execution
....

Counters counters = runningJob.getCounters();
counter = counters.getCounter(BFSJob.Node.VISITED);
}

Simply put when all nodes are visited the counter is equal to 0
(counter is incremented only when a new node is visited), thus
terminate execution. How I can achieve this behaviour under Haloop, is
it possible at all?
Reply all
Reply to author
Forward
0 new messages