Package | Description |
---|---|
com.hazelcast.jet |
The Pipeline API is Jet's high-level API to build and execute
distributed computation jobs.
|
com.hazelcast.jet.aggregate |
Contains
AggregateOperation and several its variants, as well
as a builder object for the aggregate operations. |
com.hazelcast.jet.core.processor |
Apache Kafka reader/writer support for Hazelcast Jet.
|
Modifier and Type | Method and Description |
---|---|
<K,A,R> ComputeStage<Map.Entry<K,R>> |
ComputeStage.groupBy(DistributedFunction<? super E,? extends K> keyFn,
AggregateOperation1<? super E,A,R> aggrOp)
Attaches to this stage a group-by-key stage, one which will group all
received items by the key returned from the provided key-extracting
function.
|
Modifier and Type | Method and Description |
---|---|
static <T> AggregateOperation1<T,List<Object>,List<Object>> |
AggregateOperations.allOf(AggregateOperation1<? super T,?,?>... operations)
Returns an operation, that calculates multiple aggregations and returns their value in
List<Object> . |
<R> AggregateOperation1<T0,A,R> |
AggregateOperationBuilder.Arity1.andFinish(DistributedFunction<? super A,R> finishFn)
Constructs and returns an
AggregateOperation1 from the
current state of the builder and the supplied finish primitive. |
AggregateOperation1<T0,A,A> |
AggregateOperationBuilder.Arity1.andIdentityFinish()
Constructs and returns an
AggregateOperation1 from the current
state of the builder, with the identity function as the finish
primitive. |
static <T> AggregateOperation1<T,LongDoubleAccumulator,Double> |
AggregateOperations.averagingDouble(DistributedToDoubleFunction<T> getDoubleValueFn)
Returns an operation that calculates the arithmetic mean of
double
values returned by the getDoubleValueFn function. |
static <T> AggregateOperation1<T,LongLongAccumulator,Double> |
AggregateOperations.averagingLong(DistributedToLongFunction<T> getLongValueFn)
Returns an operation that calculates the arithmetic mean of
long
values returned by the getLongValueFn function. |
static <T> AggregateOperation1<T,LongAccumulator,Long> |
AggregateOperations.counting()
Returns an operation that tracks the count of items in the window.
|
static <T> AggregateOperation1<T,LinTrendAccumulator,Double> |
AggregateOperations.linearTrend(DistributedToLongFunction<T> getXFn,
DistributedToLongFunction<T> getYFn)
Returns an operation that computes a linear trend on the items in the
window.
|
static <T,U,A,R> AggregateOperation1<T,?,R> |
AggregateOperations.mapping(DistributedFunction<? super T,? extends U> mapFn,
AggregateOperation1<? super U,A,R> downstream)
Adapts an
AggregateOperation1 accepting elements of type U to one accepting elements of type T by applying a mapping
function to each input element before accumulation. |
static <T> AggregateOperation1<T,MutableReference<T>,T> |
AggregateOperations.maxBy(DistributedComparator<? super T> comparator)
Returns an operation that returns the maximum item, according the given
comparator . |
static <T> AggregateOperation1<T,MutableReference<T>,T> |
AggregateOperations.minBy(DistributedComparator<? super T> comparator)
Returns an operation that returns the minimum item, according the given
comparator . |
static <T,A> AggregateOperation1<T,MutableReference<A>,A> |
AggregateOperations.reducing(A emptyAccValue,
DistributedFunction<? super T,? extends A> toAccValueFn,
DistributedBinaryOperator<A> combineAccValuesFn,
DistributedBinaryOperator<A> deductAccValueFn)
A reducing operation maintains an accumulated value that starts out as
emptyAccValue and is being iteratively transformed by applying
the combine primitive to it and each stream item's accumulated
value, as returned from toAccValueFn . |
static <T> AggregateOperation1<T,DoubleAccumulator,Double> |
AggregateOperations.summingDouble(DistributedToDoubleFunction<T> getDoubleValueFn)
Returns an operation that tracks the sum of the quantity returned by
getDoubleValueFn applied to each item in the window. |
static <T> AggregateOperation1<T,LongAccumulator,Long> |
AggregateOperations.summingLong(DistributedToLongFunction<T> getLongValueFn)
Returns an operation that tracks the sum of the quantity returned by
getLongValueFn applied to each item in the window. |
static <T,C extends Collection<T>> |
AggregateOperations.toCollection(DistributedSupplier<C> createCollectionFn)
Returns an
AggregateOperation1 that accumulates the input
elements into a new Collection . |
static <T> AggregateOperation1<T,List<T>,List<T>> |
AggregateOperations.toList()
Returns an
AggregateOperation1 that accumulates the input
elements into a new ArrayList . |
static <T,K,U> AggregateOperation1<T,Map<K,U>,Map<K,U>> |
AggregateOperations.toMap(DistributedFunction<? super T,? extends K> getKeyFn,
DistributedFunction<? super T,? extends U> getValueFn)
Returns an
AggregateOperation1 that accumulates elements
into a HashMap whose keys and values are the result of applying
the provided mapping functions to the input elements. |
static <T,K,U> AggregateOperation1<T,Map<K,U>,Map<K,U>> |
AggregateOperations.toMap(DistributedFunction<? super T,? extends K> getKeyFn,
DistributedFunction<? super T,? extends U> getValueFn,
DistributedBinaryOperator<U> mergeFn)
Returns an
AggregateOperation1 that accumulates elements
into a HashMap whose keys and values are the result of applying
the provided mapping functions to the input elements. |
static <T,K,U,M extends Map<K,U>> |
AggregateOperations.toMap(DistributedFunction<? super T,? extends K> getKeyFn,
DistributedFunction<? super T,? extends U> getValueFn,
DistributedBinaryOperator<U> mergeFn,
DistributedSupplier<M> createMapFn)
Returns an
AggregateOperation1 that accumulates elements
into a Map whose keys and values are the result of applying the
provided mapping functions to the input elements. |
static <T> AggregateOperation1<T,?,Set<T>> |
AggregateOperations.toSet()
Returns an
AggregateOperation1 that accumulates the input
elements into a new HashSet . |
default <T> AggregateOperation1<T,A,R> |
AggregateOperation.withCombiningAccumulateFn(DistributedFunction<T,A> getAccFn)
Returns a copy of this aggregate operation, but with the
accumulate primitive replaced with one that expects to find
accumulator objects in the input and will combine them all into
a single accumulator of the same type. |
<R_NEW> AggregateOperation1<T,A,R_NEW> |
AggregateOperation1.withFinishFn(DistributedFunction<? super A,R_NEW> finishFn) |
Modifier and Type | Method and Description |
---|---|
static <T> AggregateOperation1<T,List<Object>,List<Object>> |
AggregateOperations.allOf(AggregateOperation1<? super T,?,?>... operations)
Returns an operation, that calculates multiple aggregations and returns their value in
List<Object> . |
static <T,U,A,R> AggregateOperation1<T,?,R> |
AggregateOperations.mapping(DistributedFunction<? super T,? extends U> mapFn,
AggregateOperation1<? super U,A,R> downstream)
Adapts an
AggregateOperation1 accepting elements of type U to one accepting elements of type T by applying a mapping
function to each input element before accumulation. |
Modifier and Type | Method and Description |
---|---|
static <T,K,A> DistributedSupplier<Processor> |
Processors.accumulateByFrameP(DistributedFunction<? super T,K> getKeyFn,
DistributedToLongFunction<? super T> getTimestampFn,
TimestampKind timestampKind,
WindowDefinition windowDef,
AggregateOperation1<? super T,A,?> aggrOp)
Returns a supplier of processors for the first-stage vertex in a
two-stage sliding window aggregation setup (see the
class Javadoc for an explanation of aggregation stages). |
static <T,K,A> DistributedSupplier<Processor> |
Processors.accumulateByKeyP(DistributedFunction<? super T,K> getKeyFn,
AggregateOperation1<? super T,A,?> aggrOp)
Returns a supplier of processors for the first-stage vertex in a
two-stage group-and-aggregate setup.
|
static <T,A,R> DistributedSupplier<Processor> |
Processors.accumulateP(AggregateOperation1<T,A,R> aggrOp)
Returns a supplier of processors for a vertex that performs the provided
aggregate operation on all the items it receives.
|
static <T,K,A,R> DistributedSupplier<Processor> |
Processors.aggregateByKeyP(DistributedFunction<? super T,K> getKeyFn,
AggregateOperation1<? super T,A,R> aggrOp)
Returns a supplier of processors for a vertex that groups items by key
and performs the provided aggregate operation on each group.
|
static <T,A,R> DistributedSupplier<Processor> |
Processors.aggregateP(AggregateOperation1<T,A,R> aggrOp)
Returns a supplier of processors for a vertex that performs the provided
aggregate operation on all the items it receives.
|
static <T,K,A,R> DistributedSupplier<Processor> |
Processors.aggregateToSessionWindowP(long sessionTimeout,
DistributedToLongFunction<? super T> getTimestampFn,
DistributedFunction<? super T,K> getKeyFn,
AggregateOperation1<? super T,A,R> aggrOp)
Returns a supplier of processors for a vertex that aggregates events into
session windows.
|
static <T,K,A,R> DistributedSupplier<Processor> |
Processors.aggregateToSlidingWindowP(DistributedFunction<? super T,K> getKeyFn,
DistributedToLongFunction<? super T> getTimestampFn,
TimestampKind timestampKind,
WindowDefinition windowDef,
AggregateOperation1<? super T,A,R> aggrOp)
Returns a supplier of processors for a vertex that aggregates events
into a sliding window in a single stage (see the
class Javadoc for an explanation of aggregation stages). |
static <T,A,R> DistributedSupplier<Processor> |
Processors.combineP(AggregateOperation1<T,A,R> aggrOp)
Returns a supplier of processors for a vertex that performs the provided
aggregate operation on all the items it receives.
|
static <K,A,R> DistributedSupplier<Processor> |
Processors.combineToSlidingWindowP(WindowDefinition windowDef,
AggregateOperation1<?,A,R> aggrOp)
Returns a supplier of processors for the second-stage vertex in a
two-stage sliding window aggregation setup (see the
class Javadoc for an explanation of aggregation stages). |
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.