T - Output tuple type@InterfaceStability.Evolving public interface WindowedStream<T> extends ApexStream<T>
A stream with windowed transformation
Transformation types:
Features supported with windowed transformation
| Modifier and Type | Method and Description |
|---|---|
<O,ACCU,STREAM extends WindowedStream<Tuple.WindowedTuple<O>>> |
accumulate(Accumulation<T,ACCU,O> accumulation,
Option... opts)
Add
WindowedOperatorImpl with specified Accumulation Accumulate tuples by some key within the window definition in this stream Also give a name to the accumulation |
<K,V,O,ACCU,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,O>>>> |
accumulateByKey(Accumulation<V,ACCU,O> accumulation,
Function.ToKeyValue<T,K,V> convertToKeyVal,
Option... opts)
Add
KeyedWindowedOperatorImpl with specified Accumulation Accumulate tuples by some key within the window definition in this stream Also give a name to the accumulation |
<STREAM extends WindowedStream<Tuple.WindowedTuple<Long>>> |
count(Option... opts)
Count of all tuples
|
<K,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,Long>>>> |
countByKey(Function.ToKeyValue<T,K,Long> convertToKeyValue,
Option... opts)
Count tuples by the key
|
<O,STREAM extends WindowedStream<Tuple.WindowedTuple<O>>> |
fold(FoldFn<T,O> fold,
Option... opts)
|
<K,V,O,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,O>>>> |
foldByKey(FoldFn<V,O> fold,
Function.ToKeyValue<T,K,V> convertToKeyVal,
Option... opts)
|
<STREAM extends WindowedStream<Iterable<T>>> |
group()
Return tuples for each window
|
<O,K,STREAM extends WindowedStream<KeyValPair<K,Iterable<O>>>> |
groupByKey(Function.ToKeyValue<T,K,O> convertToKeyVal,
Option... opts)
Return tuples for each key for each window
|
<STREAM extends WindowedStream<Tuple.WindowedTuple<T>>> |
reduce(ReduceFn<T> reduce,
Option... opts)
|
<K,V,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,V>>>> |
reduceByKey(ReduceFn<V> reduce,
Function.ToKeyValue<T,K,V> convertToKeyVal,
Option... opts)
Add
KeyedWindowedOperatorImpl with specified ReduceFn Reduce transformation by selected key Add an operator to the DAG which merge tuple t1, t2 to new tuple by key |
<STREAM extends WindowedStream<T>> |
resetAllowedLateness(org.joda.time.Duration allowedLateness)
Reset the allowedLateness settings for next transforms
|
<STREAM extends WindowedStream<T>> |
resetTrigger(TriggerOption triggerOption)
Reset the trigger settings for next transforms
|
<STREAM extends WindowedStream<Tuple.WindowedTuple<List<T>>>> |
top(int N,
Option... opts)
Return top N tuples of all tuples in the window
|
<K,V,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,List<V>>>>> |
topByKey(int N,
Function.ToKeyValue<T,K,V> convertToKeyVal,
Option... opts)
Return top N tuples by the selected key
|
addCompositeStreams, addOperator, createDag, endWith, filter, flatMap, map, populateDag, print, print, printErr, run, runEmbedded, setGlobalAttribute, union, window, window, window, with, with, with<STREAM extends WindowedStream<Tuple.WindowedTuple<Long>>> STREAM count(Option... opts)
<K,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,Long>>>> STREAM countByKey(Function.ToKeyValue<T,K,Long> convertToKeyValue, Option... opts)
convertToKeyValue - The function convert plain tuple to k,v pair<K,V,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,List<V>>>>> STREAM topByKey(int N, Function.ToKeyValue<T,K,V> convertToKeyVal, Option... opts)
N - how many tuples you want to keepconvertToKeyVal - The function convert plain tuple to k,v pair<STREAM extends WindowedStream<Tuple.WindowedTuple<List<T>>>> STREAM top(int N, Option... opts)
N - <K,V,O,ACCU,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,O>>>> STREAM accumulateByKey(Accumulation<V,ACCU,O> accumulation, Function.ToKeyValue<T,K,V> convertToKeyVal, Option... opts)
KeyedWindowedOperatorImpl with specified Accumulation K - The type of the key used to group tuplesV - The type of value you want to do accumulation onO - The output type for each given key that you want to accumulate the value toACCU - The type of accumulation you want to keep (it can be in memory or on disk)STREAM - return typeaccumulation - Accumulation function you want to doconvertToKeyVal - The function convert plain tuple to k,v pair<O,ACCU,STREAM extends WindowedStream<Tuple.WindowedTuple<O>>> STREAM accumulate(Accumulation<T,ACCU,O> accumulation, Option... opts)
WindowedOperatorImpl with specified Accumulation O - The output type that you want to accumulate the value toACCU - The type of accumulation you want to keep (it can be in memory or on disk)STREAM - return typeaccumulation - Accumulation function you want to do<STREAM extends WindowedStream<Tuple.WindowedTuple<T>>> STREAM reduce(ReduceFn<T> reduce, Option... opts)
STREAM - return typereduce - reduce function<K,V,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,V>>>> STREAM reduceByKey(ReduceFn<V> reduce, Function.ToKeyValue<T,K,V> convertToKeyVal, Option... opts)
KeyedWindowedOperatorImpl with specified ReduceFn K - The type of key you want to group tuples byV - The type of value extract from tuple TSTREAM - return typereduce - reduce functionconvertToKeyVal - The function convert plain tuple to k,v pair<O,STREAM extends WindowedStream<Tuple.WindowedTuple<O>>> STREAM fold(FoldFn<T,O> fold, Option... opts)
O - output type of fold functionSTREAM - return typefold - fold function<K,V,O,STREAM extends WindowedStream<Tuple.WindowedTuple<KeyValPair<K,O>>>> STREAM foldByKey(FoldFn<V,O> fold, Function.ToKeyValue<T,K,V> convertToKeyVal, Option... opts)
O - Result typefold - fold function<O,K,STREAM extends WindowedStream<KeyValPair<K,Iterable<O>>>> STREAM groupByKey(Function.ToKeyValue<T,K,O> convertToKeyVal, Option... opts)
O - K - STREAM - <STREAM extends WindowedStream<Iterable<T>>> STREAM group()
STREAM - <STREAM extends WindowedStream<T>> STREAM resetTrigger(TriggerOption triggerOption)
STREAM - triggerOption - <STREAM extends WindowedStream<T>> STREAM resetAllowedLateness(org.joda.time.Duration allowedLateness)
STREAM - allowedLateness - Copyright © 2015-2017 Apache Software Foundation. All Rights Reserved.