Package | Description |
---|---|
org.apache.crunch |
Client-facing API and core abstractions.
|
org.apache.crunch.fn |
Commonly used functions for manipulating collections.
|
Modifier and Type | Method and Description |
---|---|
PTable<K,V> |
PGroupedTable.combineValues(Aggregator<V> aggregator)
Combine the values in each group using the given
Aggregator . |
Modifier and Type | Class and Description |
---|---|
static class |
Aggregators.SimpleAggregator<T>
Base class for aggregators that do not require any initialization.
|
Modifier and Type | Method and Description |
---|---|
static <V> Aggregator<V> |
Aggregators.FIRST_N(int n)
Return the first
n values (or fewer if there are fewer values than n ). |
static <V> Aggregator<V> |
Aggregators.LAST_N(int n)
Return the last
n values (or fewer if there are fewer values than n ). |
static Aggregator<BigInteger> |
Aggregators.MAX_BIGINTS()
Return the maximum of all given
BigInteger values. |
static Aggregator<BigInteger> |
Aggregators.MAX_BIGINTS(int n)
|
static Aggregator<Double> |
Aggregators.MAX_DOUBLES()
Return the maximum of all given
double values. |
static Aggregator<Double> |
Aggregators.MAX_DOUBLES(int n)
Return the
n largest double values (or fewer if there are fewer
values than n ). |
static Aggregator<Float> |
Aggregators.MAX_FLOATS()
Return the maximum of all given
float values. |
static Aggregator<Float> |
Aggregators.MAX_FLOATS(int n)
Return the
n largest float values (or fewer if there are fewer
values than n ). |
static Aggregator<Integer> |
Aggregators.MAX_INTS()
Return the maximum of all given
int values. |
static Aggregator<Integer> |
Aggregators.MAX_INTS(int n)
Return the
n largest int values (or fewer if there are fewer
values than n ). |
static Aggregator<Long> |
Aggregators.MAX_LONGS()
Return the maximum of all given
long values. |
static Aggregator<Long> |
Aggregators.MAX_LONGS(int n)
Return the
n largest long values (or fewer if there are fewer
values than n ). |
static <V extends Comparable<V>> |
Aggregators.MAX_N(int n,
Class<V> cls)
Return the
n largest values (or fewer if there are fewer
values than n ). |
static Aggregator<BigInteger> |
Aggregators.MIN_BIGINTS()
Return the minimum of all given
BigInteger values. |
static Aggregator<BigInteger> |
Aggregators.MIN_BIGINTS(int n)
|
static Aggregator<Double> |
Aggregators.MIN_DOUBLES()
Return the minimum of all given
double values. |
static Aggregator<Double> |
Aggregators.MIN_DOUBLES(int n)
Return the
n smallest double values (or fewer if there are fewer
values than n ). |
static Aggregator<Float> |
Aggregators.MIN_FLOATS()
Return the minimum of all given
float values. |
static Aggregator<Float> |
Aggregators.MIN_FLOATS(int n)
Return the
n smallest float values (or fewer if there are fewer
values than n ). |
static Aggregator<Integer> |
Aggregators.MIN_INTS()
Return the minimum of all given
int values. |
static Aggregator<Integer> |
Aggregators.MIN_INTS(int n)
Return the
n smallest int values (or fewer if there are fewer
values than n ). |
static Aggregator<Long> |
Aggregators.MIN_LONGS()
Return the minimum of all given
long values. |
static Aggregator<Long> |
Aggregators.MIN_LONGS(int n)
Return the
n smallest long values (or fewer if there are fewer
values than n ). |
static <V extends Comparable<V>> |
Aggregators.MIN_N(int n,
Class<V> cls)
Return the
n smallest values (or fewer if there are fewer
values than n ). |
static <V1,V2> Aggregator<Pair<V1,V2>> |
Aggregators.pairAggregator(Aggregator<V1> a1,
Aggregator<V2> a2)
Apply separate aggregators to each component of a
Pair . |
static <V1,V2,V3,V4> |
Aggregators.quadAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3,
Aggregator<V4> a4)
Apply separate aggregators to each component of a
Tuple4 . |
static <V> Aggregator<V> |
Aggregators.SAMPLE_UNIQUE_ELEMENTS(int maximumSampleSize)
Collect a sample of unique elements from the input, where 'unique' is defined by
the
equals method for the input objects. |
static Aggregator<String> |
Aggregators.STRING_CONCAT(String separator,
boolean skipNull)
Concatenate strings, with a separator between strings.
|
static Aggregator<String> |
Aggregators.STRING_CONCAT(String separator,
boolean skipNull,
long maxOutputLength,
long maxInputLength)
Concatenate strings, with a separator between strings.
|
static Aggregator<BigInteger> |
Aggregators.SUM_BIGINTS()
Sum up all
BigInteger values. |
static Aggregator<Double> |
Aggregators.SUM_DOUBLES()
Sum up all
double values. |
static Aggregator<Float> |
Aggregators.SUM_FLOATS()
Sum up all
float values. |
static Aggregator<Integer> |
Aggregators.SUM_INTS()
Sum up all
int values. |
static Aggregator<Long> |
Aggregators.SUM_LONGS()
Sum up all
long values. |
static <V1,V2,V3> Aggregator<Tuple3<V1,V2,V3>> |
Aggregators.tripAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3)
Apply separate aggregators to each component of a
Tuple3 . |
static Aggregator<TupleN> |
Aggregators.tupleAggregator(Aggregator<?>... aggregators)
Apply separate aggregators to each component of a
Tuple . |
static <V> Aggregator<V> |
Aggregators.UNIQUE_ELEMENTS()
Collect the unique elements of the input, as defined by the
equals method for
the input objects. |
Modifier and Type | Method and Description |
---|---|
static <V1,V2> Aggregator<Pair<V1,V2>> |
Aggregators.pairAggregator(Aggregator<V1> a1,
Aggregator<V2> a2)
Apply separate aggregators to each component of a
Pair . |
static <V1,V2> Aggregator<Pair<V1,V2>> |
Aggregators.pairAggregator(Aggregator<V1> a1,
Aggregator<V2> a2)
Apply separate aggregators to each component of a
Pair . |
static <V1,V2,V3,V4> |
Aggregators.quadAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3,
Aggregator<V4> a4)
Apply separate aggregators to each component of a
Tuple4 . |
static <V1,V2,V3,V4> |
Aggregators.quadAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3,
Aggregator<V4> a4)
Apply separate aggregators to each component of a
Tuple4 . |
static <V1,V2,V3,V4> |
Aggregators.quadAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3,
Aggregator<V4> a4)
Apply separate aggregators to each component of a
Tuple4 . |
static <V1,V2,V3,V4> |
Aggregators.quadAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3,
Aggregator<V4> a4)
Apply separate aggregators to each component of a
Tuple4 . |
static <K,V> CombineFn<K,V> |
Aggregators.toCombineFn(Aggregator<V> aggregator)
Wrap a
CombineFn adapter around the given aggregator. |
static <V1,V2,V3> Aggregator<Tuple3<V1,V2,V3>> |
Aggregators.tripAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3)
Apply separate aggregators to each component of a
Tuple3 . |
static <V1,V2,V3> Aggregator<Tuple3<V1,V2,V3>> |
Aggregators.tripAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3)
Apply separate aggregators to each component of a
Tuple3 . |
static <V1,V2,V3> Aggregator<Tuple3<V1,V2,V3>> |
Aggregators.tripAggregator(Aggregator<V1> a1,
Aggregator<V2> a2,
Aggregator<V3> a3)
Apply separate aggregators to each component of a
Tuple3 . |
static Aggregator<TupleN> |
Aggregators.tupleAggregator(Aggregator<?>... aggregators)
Apply separate aggregators to each component of a
Tuple . |
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.