Coverage Report - datafu.pig.stats.StreamingMedian
 
Classes in this File Line Coverage Branch Coverage Complexity
StreamingMedian
100%
2/2
N/A
1
 
 1  
 package datafu.pig.stats;
 2  
 
 3  
 /**
 4  
  * Computes the approximate {@link <a href="http://en.wikipedia.org/wiki/Median" target="_blank">median</a>} 
 5  
  * for a (not necessarily sorted) input bag, using the Munro-Paterson algorithm.  
 6  
  * This is a convenience wrapper around StreamingQuantile.
 7  
  *
 8  
  * <p>
 9  
  * N.B., all the data is pushed to a single reducer per key, so make sure some partitioning is 
 10  
  * done (e.g., group by 'day') if the data is too large.  That is, this isn't distributed median.
 11  
  * </p>
 12  
  * 
 13  
  * @see StreamingQuantile
 14  
  */
 15  
 public class StreamingMedian extends StreamingQuantile
 16  
 {
 17  
   public StreamingMedian()
 18  
   {
 19  567
     super("0.5");
 20  567
   }
 21  
 }