|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.impl.mr.collect.PCollectionImpl<Pair<K,V>> org.apache.crunch.impl.mr.collect.PTableBase<K,V>
public abstract class PTableBase<K,V>
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.crunch.impl.mr.collect.PCollectionImpl |
---|
PCollectionImpl.Visitor |
Constructor Summary | |
---|---|
PTableBase(String name)
|
Method Summary | ||
---|---|---|
PTable<K,V> |
bottom(int count)
Returns a PTable made up of the pairs in this PTable with the smallest value field. |
|
|
cogroup(PTable<K,U> other)
Co-group operation with the given table on common keys. |
|
PTable<K,Collection<V>> |
collectValues()
Aggregate all of the values with the same key into a single key-value pair in the returned PTable. |
|
PType<K> |
getKeyType()
Returns the PType of the key. |
|
PType<V> |
getValueType()
Returns the PType of the value. |
|
PGroupedTableImpl<K,V> |
groupByKey()
Performs a grouping operation on the keys of this table. |
|
PGroupedTableImpl<K,V> |
groupByKey(GroupingOptions groupingOptions)
Performs a grouping operation on the keys of this table, using the additional GroupingOptions to control how the grouping is executed. |
|
PGroupedTableImpl<K,V> |
groupByKey(int numReduceTasks)
Performs a grouping operation on the keys of this table, using the given number of partitions. |
|
|
join(PTable<K,U> other)
Perform an inner join on this table and the one passed in as an argument on their common keys. |
|
PCollection<K> |
keys()
Returns a PCollection made up of the keys in this PTable. |
|
Map<K,V> |
materializeToMap()
Returns a Map |
|
PTable<K,V> |
top(int count)
Returns a PTable made up of the pairs in this PTable with the largest value field. |
|
PTable<K,V> |
union(PTable<K,V>... others)
Returns a PTable instance that acts as the union of this
PTable and the input PTable s. |
|
PCollection<V> |
values()
Returns a PCollection made up of the values in this PTable. |
|
PTable<K,V> |
write(Target target)
Write the contents of this PCollection to the given Target ,
using the storage format specified by the target. |
Methods inherited from class org.apache.crunch.impl.mr.collect.PCollectionImpl |
---|
accept, by, by, count, createDoNode, filter, filter, getDepth, getMaterializedAt, getName, getOnlyParent, getParents, getPipeline, getSize, getTypeFamily, materialize, materializeAt, max, min, parallelDo, parallelDo, parallelDo, parallelDo, sample, sample, sort, toString, union |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.crunch.PTable |
---|
getPTableType |
Methods inherited from interface org.apache.crunch.PCollection |
---|
by, by, count, filter, filter, getName, getPipeline, getPType, getSize, getTypeFamily, materialize, max, min, parallelDo, parallelDo, parallelDo, parallelDo, sample, sample, sort, union |
Constructor Detail |
---|
public PTableBase(String name)
Method Detail |
---|
public PType<K> getKeyType()
PTable
PType
of the key.
getKeyType
in interface PTable<K,V>
public PType<V> getValueType()
PTable
PType
of the value.
getValueType
in interface PTable<K,V>
public PGroupedTableImpl<K,V> groupByKey()
PTable
groupByKey
in interface PTable<K,V>
PGroupedTable
instance that represents the groupingpublic PGroupedTableImpl<K,V> groupByKey(int numReduceTasks)
PTable
groupByKey
in interface PTable<K,V>
numReduceTasks
- The number of partitions for the data.
PGroupedTable
instance that represents this groupingpublic PGroupedTableImpl<K,V> groupByKey(GroupingOptions groupingOptions)
PTable
GroupingOptions
to control how the grouping is executed.
groupByKey
in interface PTable<K,V>
groupingOptions
- The grouping options to use
PGroupedTable
instance that represents the groupingpublic PTable<K,V> union(PTable<K,V>... others)
PTable
PTable
instance that acts as the union of this
PTable
and the input PTable
s.
union
in interface PTable<K,V>
public PTable<K,V> write(Target target)
PCollection
PCollection
to the given Target
,
using the storage format specified by the target.
write
in interface PCollection<Pair<K,V>>
write
in interface PTable<K,V>
write
in class PCollectionImpl<Pair<K,V>>
target
- The target to write topublic PTable<K,V> top(int count)
PTable
top
in interface PTable<K,V>
count
- The number of pairs to returnpublic PTable<K,V> bottom(int count)
PTable
bottom
in interface PTable<K,V>
count
- The number of pairs to returnpublic PTable<K,Collection<V>> collectValues()
PTable
collectValues
in interface PTable<K,V>
public <U> PTable<K,Pair<V,U>> join(PTable<K,U> other)
PTable
join
in interface PTable<K,V>
public <U> PTable<K,Pair<Collection<V>,Collection<U>>> cogroup(PTable<K,U> other)
PTable
cogroup
in interface PTable<K,V>
public PCollection<K> keys()
PTable
PCollection
made up of the keys in this PTable.
keys
in interface PTable<K,V>
public PCollection<V> values()
PTable
PCollection
made up of the values in this PTable.
values
in interface PTable<K,V>
public Map<K,V> materializeToMap()
materializeToMap
in interface PTable<K,V>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |