This project has retired. For details please refer to its Attic page.
RightOuterJoinFn (Apache Crunch 0.11.0 API)

org.apache.crunch.lib.join
Class RightOuterJoinFn<K,U,V>

java.lang.Object
  extended by org.apache.crunch.DoFn<Pair<Pair<K,Integer>,Iterable<Pair<U,V>>>,Pair<K,Pair<U,V>>>
      extended by org.apache.crunch.lib.join.JoinFn<K,U,V>
          extended by org.apache.crunch.lib.join.RightOuterJoinFn<K,U,V>
Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
All Implemented Interfaces:
Serializable

public class RightOuterJoinFn<K,U,V>
extends JoinFn<K,U,V>

Used to perform the last step of an right outer join.

See Also:
Serialized Form

Constructor Summary
RightOuterJoinFn(PType<K> keyType, PType<U> leftValueType)
           
 
Method Summary
 String getJoinType()
          
 void initialize()
          Initialize this DoFn.
 void join(K key, int id, Iterable<Pair<U,V>> pairs, Emitter<Pair<K,Pair<U,V>>> emitter)
          Performs the actual joining.
 
Methods inherited from class org.apache.crunch.lib.join.JoinFn
process
 
Methods inherited from class org.apache.crunch.DoFn
cleanup, configure, disableDeepCopy, scaleFactor, setConfiguration, setContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RightOuterJoinFn

public RightOuterJoinFn(PType<K> keyType,
                        PType<U> leftValueType)
Method Detail

initialize

public void initialize()
Initialize this DoFn. This initialization will happen before the actual DoFn.process(Object, Emitter) is triggered. Subclasses may override this method to do appropriate initialization.

Called during the setup of the job instance this DoFn is associated with.

Overrides:
initialize in class JoinFn<K,U,V>

join

public void join(K key,
                 int id,
                 Iterable<Pair<U,V>> pairs,
                 Emitter<Pair<K,Pair<U,V>>> emitter)
Performs the actual joining.

Specified by:
join in class JoinFn<K,U,V>
Parameters:
key - The key for this grouping of values.
id - The side that this group of values is from (0 -> left, 1 -> right).
pairs - The group of values associated with this key and id pair.
emitter - The emitter to send the output to.

getJoinType

public String getJoinType()

Specified by:
getJoinType in class JoinFn<K,U,V>
Returns:
The name of this join type (e.g. innerJoin, leftOuterJoin).


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.