MRFramework/src/main/java/com/mr/io/Collector.java
/**
	 * Partitions the set of tuples into new collectors, each containing all
	 * tuples with the same key
	 * @return A map from keys to Collectors
	 */
Partitions the set of tuples into new collectors, each containing all
tuples with the same key
@return A map from keys to Collectors
Partitions the set of tuples into new collectors each containing all tuples with the same key @return A map from keys to Collectors
public Map<KEY,Collector<KEY,VALUE>> subCollectors() {
		Map<KEY,Collector<KEY,VALUE>> out = new HashMap<KEY,Collector<KEY,VALUE>>();
		synchronized (this) {
			for ( Tuple<KEY,VALUE> t : m_tuples)
			{
				KEY key = t.getKey();
				Collector<KEY,VALUE> c = out.get(key);
				if (c == null)
					c = new Collector<KEY,VALUE>();
				c.collect(t);
				out.put(key, c);
			}
		}
		return out;
	}
public Map < KEY , Collector < KEY , VALUE > > subCollectors ( ) { Map < KEY , Collector < KEY , VALUE > > out = new HashMap < KEY , Collector < KEY , VALUE > > ( ) ; synchronized ( this ) { for ( Tuple < KEY , VALUE > t : m_tuples ) { KEY key = t . getKey ( ) ; Collector < KEY , VALUE > c = out . get ( key ) ; if ( c == null ) c = new Collector < KEY , VALUE > ( ) ; c . collect ( t ) ; out . put ( key , c ) ; } } return out ; }
Partitions the set of tuples into new collectors, each containing all
 tuples with the same key
 @return A map from keys to Collectors
Partitions the set of tuples into new collectors each containing all tuples with the same key @return A map from keys to Collectors