Package | Description |
---|---|
org.apache.crunch.lambda |
Alternative Crunch API using Java 8 features to allow construction of pipelines using lambda functions and method
references.
|
Modifier and Type | Method and Description |
---|---|
default <K> LTable<K,S> |
LCollection.by(SFunction<S,K> extractFn,
PType<K> pType)
Key this LCollection by a key extracted from the element to yield a
LTable mapping the key to the whole
element. |
default <U> LTable<K,Pair<Collection<V>,Collection<U>>> |
LTable.cogroup(LTable<K,U> other)
Cogroup this table with another
LTable with the same key type, collecting the set of values from
each side. |
default LTable<K,Collection<V>> |
LGroupedTable.collectAllValues()
Collect all values for each key into a
Collection |
default LTable<K,Collection<V>> |
LGroupedTable.collectUniqueValues()
Collect all unique values for each key into a
Collection (note that the value type must have a correctly-
defined equals() and hashcode(). |
default <C> LTable<K,C> |
LGroupedTable.collectValues(SSupplier<C> emptySupplier,
SBiConsumer<C,V> addFn,
PType<C> pType)
Collect the values into an aggregate type.
|
default LTable<K,V> |
LGroupedTable.combineValues(Aggregator<V> aggregator)
Combine the value part of the table using the provided Crunch
Aggregator . |
default <A> LTable<K,V> |
LGroupedTable.combineValues(SSupplier<A> initialSupplier,
SBiFunction<A,V,A> combineFn,
SFunction<A,Iterable<V>> outputFn)
Combine the value part of the table using the given functions.
|
default LTable<S,Long> |
LCollection.count()
Count distict values in this LCollection, yielding an
LTable mapping each value to the number
of occurrences in the collection. |
default LTable<K,V> |
LTable.filter(SPredicate<Pair<K,V>> predicate)
Filter the rows of the table using the supplied predicate.
|
default LTable<K,V> |
LTable.filterByKey(SPredicate<K> predicate)
Filter the rows of the table using the supplied predicate applied to the key part of each record.
|
default LTable<K,V> |
LTable.filterByValue(SPredicate<V> predicate)
Filter the rows of the table using the supplied predicate applied to the value part of each record.
|
default <K,V> LTable<K,V> |
LCollection.filterMap(SFunction<S,Optional<Pair<K,V>>> fn,
PTableType<K,V> pType)
Combination of a filter and map operation by using a function with
Optional return type. |
default <K,V> LTable<K,V> |
LCollection.flatMap(SFunction<S,java.util.stream.Stream<Pair<K,V>>> fn,
PTableType<K,V> pType)
Map each element to zero or more output elements using the provided stream-returning function to yield an
LTable |
default LTable<K,V> |
LTable.increment(Enum<?> counter)
Increment a counter for every element in the collection
|
default LTable<K,V> |
LTable.increment(String counterGroup,
String counterName)
Increment a counter for every element in the collection
|
default LTable<K,V> |
LTable.incrementIf(Enum<?> counter,
SPredicate<Pair<K,V>> condition)
Increment a counter for every element satisfying the conditional predicate supplied.
|
default LTable<K,V> |
LTable.incrementIf(String counterGroup,
String counterName,
SPredicate<Pair<K,V>> condition)
Increment a counter for every element satisfying the conditional predicate supplied.
|
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other)
Inner join this table to another
LTable which has the same key type using a reduce-side join |
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other,
JoinType joinType)
Join this table to another
LTable which has the same key type using the provide JoinType and
the DefaultJoinStrategy (reduce-side join). |
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other,
JoinType joinType,
JoinStrategy<K,V,U> joinStrategy)
Join this table to another
LTable which has the same key type using the provided JoinType and
JoinStrategy |
default <K,V> LTable<K,V> |
LCollection.map(SFunction<S,Pair<K,V>> fn,
PTableType<K,V> pType)
Map the elements of this collection 1-1 through the supplied function to yield an
LTable |
default <T> LTable<T,V> |
LTable.mapKeys(SFunction<K,T> fn,
PType<T> pType)
Transform the keys of this table using the given function
|
default <T> LTable<K,T> |
LGroupedTable.mapValues(SFunction<java.util.stream.Stream<V>,T> fn,
PType<T> pType)
Map the values in this LGroupedTable using a custom function.
|
default <T> LTable<K,T> |
LTable.mapValues(SFunction<V,T> fn,
PType<T> pType)
Transform the values of this table using the given function
|
default <K,V> LTable<K,V> |
LCollection.parallelDo(DoFn<S,Pair<K,V>> fn,
PTableType<K,V> pType)
|
default <K,V> LTable<K,V> |
LCollection.parallelDo(LDoFn<S,Pair<K,V>> fn,
PTableType<K,V> pType)
Transform this LCollection using a Lambda-friendly
LDoFn . |
default LTable<K,V> |
LGroupedTable.reduceValues(SBinaryOperator<V> operator)
Reduce the values for each key using the an associative binary operator.
|
default LTable<K,V> |
LGroupedTable.ungroup()
Ungroup this LGroupedTable back into an
LTable . |
<K,V> LTable<K,V> |
LCollectionFactory.wrap(PTable<K,V> collection)
Wrap a PTable into an LTable
|
static <K,V> LTable<K,V> |
Lambda.wrap(PTable<K,V> collection) |
default LTable<K,V> |
LTable.write(Target target)
Write this table to the
Target supplied. |
default LTable<K,V> |
LTable.write(Target target,
Target.WriteMode writeMode)
Write this table to the
Target supplied. |
Modifier and Type | Method and Description |
---|---|
default <U> LTable<K,Pair<Collection<V>,Collection<U>>> |
LTable.cogroup(LTable<K,U> other)
Cogroup this table with another
LTable with the same key type, collecting the set of values from
each side. |
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other)
Inner join this table to another
LTable which has the same key type using a reduce-side join |
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other,
JoinType joinType)
Join this table to another
LTable which has the same key type using the provide JoinType and
the DefaultJoinStrategy (reduce-side join). |
default <U> LTable<K,Pair<V,U>> |
LTable.join(LTable<K,U> other,
JoinType joinType,
JoinStrategy<K,V,U> joinStrategy)
Join this table to another
LTable which has the same key type using the provided JoinType and
JoinStrategy |
Copyright © 2016 The Apache Software Foundation. All rights reserved.