This project has retired. For details please refer to its Attic page.
PTables (Apache Crunch 0.4.0-incubating API)

org.apache.crunch.lib
Class PTables

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

public class PTables
extends Object

Methods for performing common operations on PTables.


Constructor Summary
PTables()
           
 
Method Summary
static
<K,V> Pair<K,V>
getDetachedValue(PTableType<K,V> tableType, Pair<K,V> value)
          Create a detached value for a table Pair.
static
<K,V> Pair<K,Iterable<V>>
getGroupedDetachedValue(PGroupedTableType<K,V> groupedTableType, Pair<K,Iterable<V>> value)
          Created a detached value for a PGroupedTable value.
static
<K,V> PCollection<K>
keys(PTable<K,V> ptable)
           
static
<K,V> PCollection<V>
values(PTable<K,V> ptable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTables

public PTables()
Method Detail

keys

public static <K,V> PCollection<K> keys(PTable<K,V> ptable)

values

public static <K,V> PCollection<V> values(PTable<K,V> ptable)

getDetachedValue

public static <K,V> Pair<K,V> getDetachedValue(PTableType<K,V> tableType,
                                               Pair<K,V> value)
Create a detached value for a table Pair.

Parameters:
tableType - The table type
value - The value from which a detached value is to be created
Returns:
The detached value
See Also:
PType.getDetachedValue(Object)

getGroupedDetachedValue

public static <K,V> Pair<K,Iterable<V>> getGroupedDetachedValue(PGroupedTableType<K,V> groupedTableType,
                                                                Pair<K,Iterable<V>> value)
Created a detached value for a PGroupedTable value.

Parameters:
groupedTableType - The grouped table type
value - The value from which a detached value is to be created
Returns:
The detached value
See Also:
PType.getDetachedValue(Object)


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