public interface TupleMapFactory<Config> extends CascadingFactory<Config,Map<Tuple,Collection<Tuple>>>
Mapclasses returned must take a
Tupleas a key, and a
Collectionof Tuples as a value. Further,
Map.get(Object)must never return
null, but on the first call to get() on the map an empty Collection must be created and stored. That is,
Map.put(Object, Object)is never called on the map instance internally, only
map.get(groupTuple).add(valuesTuple). Using the
TupleCollectionFactoryto create the underlying Tuple Collections would allow that aspect to be pluggable as well. If the Map implementation implements the
Spillableinterface, it will receive a
Spillable.SpillListenerinstance that calls back to the appropriate logging mechanism for the platform. This instance should be passed down to any child Spillable types, namely an implementation of
SpillableTupleList. The default implementation for the Hadoop platform is the
HadoopTupleMapFactorywhich created a
HadoopSpillableTupleMapinstance. The class
SpillableTupleMapmay be used as a base class.
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.