Class InMemorySideInputReader
- java.lang.Object
-
- org.apache.nemo.compiler.frontend.beam.InMemorySideInputReader
-
- All Implemented Interfaces:
org.apache.beam.runners.core.ReadyCheckingSideInputReader
,org.apache.beam.runners.core.SideInputReader
public final class InMemorySideInputReader extends java.lang.Object implements org.apache.beam.runners.core.ReadyCheckingSideInputReader
Accumulates and provides side inputs in memory.
-
-
Constructor Summary
Constructors Constructor Description InMemorySideInputReader(java.util.Collection<org.apache.beam.sdk.values.PCollectionView<?>> sideInputsToRead)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSideInputElement(org.apache.beam.sdk.values.PCollectionView<?> view, org.apache.beam.sdk.util.WindowedValue<SideInputElement<?>> sideInputElement)
Stores the side input in memory to be used with main inputs.<T> boolean
contains(org.apache.beam.sdk.values.PCollectionView<T> view)
<T> T
get(org.apache.beam.sdk.values.PCollectionView<T> view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)
boolean
isEmpty()
boolean
isReady(org.apache.beam.sdk.values.PCollectionView view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)
void
setCurrentWatermarkOfAllMainAndSideInputs(long newWatermark)
Say a DoFn of this reader has 3 main inputs and 4 side inputs.
-
-
-
Method Detail
-
isReady
public boolean isReady(org.apache.beam.sdk.values.PCollectionView view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)
- Specified by:
isReady
in interfaceorg.apache.beam.runners.core.ReadyCheckingSideInputReader
-
get
@Nullable public <T> T get(org.apache.beam.sdk.values.PCollectionView<T> view, org.apache.beam.sdk.transforms.windowing.BoundedWindow window)
- Specified by:
get
in interfaceorg.apache.beam.runners.core.SideInputReader
-
contains
public <T> boolean contains(org.apache.beam.sdk.values.PCollectionView<T> view)
- Specified by:
contains
in interfaceorg.apache.beam.runners.core.SideInputReader
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceorg.apache.beam.runners.core.SideInputReader
-
addSideInputElement
public void addSideInputElement(org.apache.beam.sdk.values.PCollectionView<?> view, org.apache.beam.sdk.util.WindowedValue<SideInputElement<?>> sideInputElement)
Stores the side input in memory to be used with main inputs.- Parameters:
view
- of the side input.sideInputElement
- to add.
-
setCurrentWatermarkOfAllMainAndSideInputs
public void setCurrentWatermarkOfAllMainAndSideInputs(long newWatermark)
Say a DoFn of this reader has 3 main inputs and 4 side inputs. Nemo runtime guarantees that the watermark here is the minimum of the all 7 input streams.- Parameters:
newWatermark
- to set.
-
-