|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.lib.join.MapsideJoinStrategy<K,U,V>
public class MapsideJoinStrategy<K,U,V>
Utility for doing map side joins on a common key between two PTable
s.
A map side join is an optimized join which doesn't use a reducer; instead, the right side of the join is loaded into memory and the join is performed in a mapper. This style of join has the important implication that the output of the join is not sorted, which is the case with a conventional (reducer-based) join.
Constructor Summary | |
---|---|
MapsideJoinStrategy()
Constructs a new instance of the MapsideJoinStratey , materializing the right-side
join table to disk before the join is performed. |
|
MapsideJoinStrategy(boolean materialize)
Constructs a new instance of the MapsideJoinStrategy . |
Method Summary | |
---|---|
PTable<K,Pair<U,V>> |
join(PTable<K,U> left,
PTable<K,V> right,
JoinType joinType)
Join two tables with the given join type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapsideJoinStrategy()
MapsideJoinStratey
, materializing the right-side
join table to disk before the join is performed.
public MapsideJoinStrategy(boolean materialize)
MapsideJoinStrategy
. If the
materialize}
argument is true, then the right-side join PTable
will be materialized to disk
before the in-memory join is performed. If it is false, then Crunch can optionally read
and process the data from the right-side table without having to run a job to materialize
the data to disk first.
materialize
- Whether or not to materialize the right-side table before the joinMethod Detail |
---|
public PTable<K,Pair<U,V>> join(PTable<K,U> left, PTable<K,V> right, JoinType joinType)
JoinStrategy
join
in interface JoinStrategy<K,U,V>
left
- left table to be joinedright
- right table to be joinedjoinType
- type of join to perform
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |