com.hazelcast.mapreduce.impl.task
Class MappingPhase<KeyIn,ValueIn,KeyOut,ValueOut>

java.lang.Object
  extended by com.hazelcast.mapreduce.impl.task.MappingPhase<KeyIn,ValueIn,KeyOut,ValueOut>
Type Parameters:
KeyIn - type of the input key
ValueIn - type of the input value
KeyOut - type of the emitted key
ValueOut - type of the emitted value
Direct Known Subclasses:
KeyValueSourceMappingPhase

public abstract class MappingPhase<KeyIn,ValueIn,KeyOut,ValueOut>
extends Object

This is the base of all mapping phase implementations. It's responsibility is to test keys prior to mapping the special value. This is used for preselected key-sets and given KeyPredicate implementations.


Constructor Summary
MappingPhase(Collection<KeyIn> keys, KeyPredicate<KeyIn> predicate)
           
 
Method Summary
 void cancel()
           
protected abstract  void executeMappingPhase(KeyValueSource<KeyIn,ValueIn> keyValueSource, Mapper<KeyIn,ValueIn,KeyOut,ValueOut> mapper, Context<KeyOut,ValueOut> context)
           
protected  boolean isCancelled()
           
protected  boolean matches(KeyIn key)
           
protected  boolean processingPartitionNecessary(int partitionId, InternalPartitionService partitionService)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingPhase

public MappingPhase(Collection<KeyIn> keys,
                    KeyPredicate<KeyIn> predicate)
Method Detail

cancel

public void cancel()

isCancelled

protected boolean isCancelled()

processingPartitionNecessary

protected boolean processingPartitionNecessary(int partitionId,
                                               InternalPartitionService partitionService)

matches

protected boolean matches(KeyIn key)

executeMappingPhase

protected abstract void executeMappingPhase(KeyValueSource<KeyIn,ValueIn> keyValueSource,
                                            Mapper<KeyIn,ValueIn,KeyOut,ValueOut> mapper,
                                            Context<KeyOut,ValueOut> context)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.