This project has retired. For details please refer to its
Attic page.
Aggregate (Apache Crunch 0.3.0-incubating API)
org.apache.crunch.lib
Class Aggregate
java.lang.Object
org.apache.crunch.lib.Aggregate
public class Aggregate
- extends Object
Methods for performing various types of aggregations over PCollection
instances.
Method Summary |
static
|
collectValues(PTable<K,V> collect)
|
static
|
count(PCollection<S> collect)
Returns a PTable that contains the unique elements of this
collection mapped to a count of their occurrences. |
static
|
max(PCollection<S> collect)
Returns the largest numerical element from the input collection. |
static
|
min(PCollection<S> collect)
Returns the smallest numerical element from the input collection. |
static
|
top(PTable<K,V> ptable,
int limit,
boolean maximize)
|
Aggregate
public Aggregate()
count
public static <S> PTable<S,Long> count(PCollection<S> collect)
- Returns a
PTable
that contains the unique elements of this
collection mapped to a count of their occurrences.
top
public static <K,V> PTable<K,V> top(PTable<K,V> ptable,
int limit,
boolean maximize)
max
public static <S> PCollection<S> max(PCollection<S> collect)
- Returns the largest numerical element from the input collection.
min
public static <S> PCollection<S> min(PCollection<S> collect)
- Returns the smallest numerical element from the input collection.
collectValues
public static <K,V> PTable<K,Collection<V>> collectValues(PTable<K,V> collect)
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.