Time for action – the fourth and last run

Let's perform the fourth execution to validate that the output has now reached its final stable state.

  1. Execute the MapReduce job:
    $ hadoop jar graph.jarGraphPathgraphout3graphout4
    
  2. Examine the output file:
    $ hadoop fs -cat /user/hadoop/graphout4/part-r-00000
    12,3,40D
    21,41D
    31,5,61D
    41,21D
    53,62D
    63,52D
    76-1P
    

What just happened?

The output is as expected; since node 7 is not reachable by node 1 or any of its neighbors, it will remain Pending and never be processed further. Consequently, our graph is unchanged as shown in the following figure:

What just happened?

The one thing we did not build into our algorithm was an understanding ...

Get Hadoop Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.