public class JoinProcessor<K,R,V1,V2> extends Object implements BatchProcessor
Modifier and Type | Class and Description |
---|---|
static class |
JoinProcessor.JoinType |
Modifier and Type | Field and Description |
---|---|
protected ProcessorContext |
context |
Constructor and Description |
---|
JoinProcessor(String leftStream,
String rightStream,
ValueJoiner<V1,V2,R> valueJoiner) |
JoinProcessor(String leftStream,
String rightStream,
ValueJoiner<V1,V2,R> valueJoiner,
JoinProcessor.JoinType leftType,
JoinProcessor.JoinType rightType) |
Modifier and Type | Method and Description |
---|---|
void |
execute(Pair<K,?> input,
String sourceStream)
Executes some operations on the input and possibly emits some results.
|
protected void |
execute(T input)
Execute some operation on the input value.
|
void |
finish()
This is triggered to signal the end of the current batch of values.
|
String |
getLeftStream() |
String |
getRightStream() |
void |
init(ProcessorContext context)
Initializes the processor.
|
protected <R> void |
mayBeForwardAggUpdate(Supplier<R> result)
Forwards the result update to downstream processors.
|
void |
punctuate(String stream)
Punctuation marks end of a batch which can be used to compute and pass the results of one stage in the pipeline to the next.
|
protected ProcessorContext context
public JoinProcessor(String leftStream, String rightStream, ValueJoiner<V1,V2,R> valueJoiner)
public JoinProcessor(String leftStream, String rightStream, ValueJoiner<V1,V2,R> valueJoiner, JoinProcessor.JoinType leftType, JoinProcessor.JoinType rightType)
public void execute(Pair<K,?> input, String sourceStream)
BaseProcessor.execute(Object)
instead.public void finish()
public String getLeftStream()
public String getRightStream()
public void init(ProcessorContext context)
protected void execute(T input)
input
- the inputpublic void punctuate(String stream)
protected final <R> void mayBeForwardAggUpdate(Supplier<R> result)
R
- the result typeresult
- the result functionCopyright © 2023 The Apache Software Foundation. All rights reserved.