|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.lib.PTables
public class PTables
Methods for performing common operations on PTables.
Constructor Summary | |
---|---|
PTables()
|
Method Summary | ||
---|---|---|
static
|
asPTable(PCollection<Pair<K,V>> pcollect)
Convert the given PCollection<Pair<K, V>> to a PTable<K, V> . |
|
static
|
getDetachedValue(PTableType<K,V> tableType,
Pair<K,V> value)
Create a detached value for a table Pair . |
|
static
|
getGroupedDetachedValue(PGroupedTableType<K,V> groupedTableType,
Pair<K,Iterable<V>> value)
Created a detached value for a PGroupedTable value. |
|
static
|
keys(PTable<K,V> ptable)
Extract the keys from the given PTable<K, V> as a PCollection<K> . |
|
static
|
values(PTable<K,V> ptable)
Extract the values from the given PTable<K, V> as a PCollection<V> . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PTables()
Method Detail |
---|
public static <K,V> PTable<K,V> asPTable(PCollection<Pair<K,V>> pcollect)
PCollection<Pair<K, V>>
to a PTable<K, V>
.
pcollect
- The PCollection
to convert
PTable
that contains the same data as the input PCollection
public static <K,V> PCollection<K> keys(PTable<K,V> ptable)
PTable<K, V>
as a PCollection<K>
.
ptable
- The PTable
PCollection<K>
public static <K,V> PCollection<V> values(PTable<K,V> ptable)
PTable<K, V>
as a PCollection<V>
.
ptable
- The PTable
PCollection<V>
public static <K,V> Pair<K,V> getDetachedValue(PTableType<K,V> tableType, Pair<K,V> value)
Pair
.
tableType
- The table typevalue
- The value from which a detached value is to be created
PType.getDetachedValue(Object)
public static <K,V> Pair<K,Iterable<V>> getGroupedDetachedValue(PGroupedTableType<K,V> groupedTableType, Pair<K,Iterable<V>> value)
PGroupedTable
value.
groupedTableType
- The grouped table typevalue
- The value from which a detached value is to be created
PType.getDetachedValue(Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |