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

org.apache.crunch.lib
Class Join

java.lang.Object
  extended by org.apache.crunch.lib.Join

public class Join
extends Object

Utilities for joining multiple PTable instances based on a common lastKey.


Constructor Summary
Join()
           
 
Method Summary
static
<K,U,V> PTable<K,Pair<U,V>>
fullJoin(PTable<K,U> left, PTable<K,V> right)
          Performs a full outer join on the specified PTables.
static
<K,U,V> PTable<K,Pair<U,V>>
innerJoin(PTable<K,U> left, PTable<K,V> right)
          Performs an inner join on the specified PTables.
static
<K,U,V> PTable<K,Pair<U,V>>
join(PTable<K,U> left, PTable<K,V> right)
          Performs an inner join on the specified PTables.
static
<K,U,V> PTable<K,Pair<U,V>>
leftJoin(PTable<K,U> left, PTable<K,V> right)
          Performs a left outer join on the specified PTables.
static
<K,U,V> PTable<K,Pair<U,V>>
rightJoin(PTable<K,U> left, PTable<K,V> right)
          Performs a right outer join on the specified PTables.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Join

public Join()
Method Detail

join

public static <K,U,V> PTable<K,Pair<U,V>> join(PTable<K,U> left,
                                               PTable<K,V> right)
Performs an inner join on the specified PTables.

Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
Parameters:
left - A PTable to perform an inner join on.
right - A PTable to perform an inner join on.
Returns:
The joined result.
See Also:
Inner Join

innerJoin

public static <K,U,V> PTable<K,Pair<U,V>> innerJoin(PTable<K,U> left,
                                                    PTable<K,V> right)
Performs an inner join on the specified PTables.

Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
Parameters:
left - A PTable to perform an inner join on.
right - A PTable to perform an inner join on.
Returns:
The joined result.
See Also:
Inner Join

leftJoin

public static <K,U,V> PTable<K,Pair<U,V>> leftJoin(PTable<K,U> left,
                                                   PTable<K,V> right)
Performs a left outer join on the specified PTables.

Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
Parameters:
left - A PTable to perform an left join on. All of this PTable's entries will appear in the resulting PTable.
right - A PTable to perform an left join on.
Returns:
The joined result.
See Also:
Left Join

rightJoin

public static <K,U,V> PTable<K,Pair<U,V>> rightJoin(PTable<K,U> left,
                                                    PTable<K,V> right)
Performs a right outer join on the specified PTables.

Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
Parameters:
left - A PTable to perform an right join on.
right - A PTable to perform an right join on. All of this PTable's entries will appear in the resulting PTable.
Returns:
The joined result.
See Also:
Right Join

fullJoin

public static <K,U,V> PTable<K,Pair<U,V>> fullJoin(PTable<K,U> left,
                                                   PTable<K,V> right)
Performs a full outer join on the specified PTables.

Type Parameters:
K - Type of the keys.
U - Type of the first PTable's values
V - Type of the second PTable's values
Parameters:
left - A PTable to perform an full join on.
right - A PTable to perform an full join on.
Returns:
The joined result.
See Also:
Full Join


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