public class OneToManyJoin extends Object
| Constructor and Description | 
|---|
| OneToManyJoin() | 
| Modifier and Type | Method and Description | 
|---|---|
| static <K,U,V,T> PCollection<T> | oneToManyJoin(PTable<K,U> left,
             PTable<K,V> right,
             DoFn<Pair<U,Iterable<V>>,T> postProcessFn,
             PType<T> ptype)Performs a join on two tables, where the left table only contains a single
 value per key. | 
| static <K,U,V,T> PCollection<T> | oneToManyJoin(PTable<K,U> left,
             PTable<K,V> right,
             DoFn<Pair<U,Iterable<V>>,T> postProcessFn,
             PType<T> ptype,
             int numReducers)Supports a user-specified number of reducers for the one-to-many join. | 
public static <K,U,V,T> PCollection<T> oneToManyJoin(PTable<K,U> left, PTable<K,V> right, DoFn<Pair<U,Iterable<V>>,T> postProcessFn, PType<T> ptype)
This method accepts a DoFn, which is responsible for converting the single left-side value and the iterable of right-side values into output values.
This method of joining is useful when there is a single context value that contains a large number of related values, and all related values must be brought together, with the quantity of the right-side values being too big to fit in memory.
If there are multiple values for the same key in the left-side table, only a single one will be used.
left - left-side table to joinright - right-side table to joinpostProcessFn - DoFn to process the results of the joinptype - type of the output of the postProcessFnpublic static <K,U,V,T> PCollection<T> oneToManyJoin(PTable<K,U> left, PTable<K,V> right, DoFn<Pair<U,Iterable<V>>,T> postProcessFn, PType<T> ptype, int numReducers)
left - left-side table to joinright - right-side table to joinpostProcessFn - DoFn to process the results of the joinptype - type of the output of the postProcessFnnumReducers - The number of reducers to useCopyright © 2017 The Apache Software Foundation. All rights reserved.