cloudera/crunch — pull request #5 by gabrielreid (2012-03-05 11:41:30+00:00)
Title: Fix for writing multiple PCollections at the same depth in the same pipeline

Writing to multiple targets (with multiple PCollections at the same depth) in the same pipeline currently doesn't work.

Due to the comparator used for adding all outputs into a TreeMap in the MSCRPlanner class, multiple PCollections at the same depth are reduced to a single PCollection, meaning the other PCollections and their output target are discarded, and never written to.

This fix adds a unit test that demonstrates the issue, as well as resolving the issue in the Comparator.