public class RehydratedComponents
extends java.lang.Object
RunnerApi.Components
collection.
This ensures maximum memoization of rehydrated components, which is semantically necessary for
PCollection
and nice-to-have for other objects.
Modifier and Type | Method and Description |
---|---|
static RehydratedComponents |
forComponents(org.apache.beam.model.pipeline.v1.RunnerApi.Components components)
Create a new
RehydratedComponents from a Runner API RunnerApi.Components . |
Coder<?> |
getCoder(java.lang.String coderId)
Returns a
Coder rehydrated from the Runner API component with the given ID. |
org.apache.beam.model.pipeline.v1.RunnerApi.Components |
getComponents() |
org.apache.beam.model.pipeline.v1.RunnerApi.Environment |
getEnvironment(java.lang.String environmentId)
Returns the
RunnerApi.Environment associated with the given ID. |
PCollection<?> |
getPCollection(java.lang.String pCollectionId)
Returns a
PCollection rehydrated from the Runner API component with the given ID. |
SdkComponents |
getSdkComponents(java.util.Collection<java.lang.String> requirements) |
WindowingStrategy<?,?> |
getWindowingStrategy(java.lang.String windowingStrategyId)
Returns a
WindowingStrategy rehydrated from the Runner API component with the given ID. |
RehydratedComponents |
withPipeline(Pipeline pipeline)
Create a new
RehydratedComponents with a pipeline attached. |
public static RehydratedComponents forComponents(org.apache.beam.model.pipeline.v1.RunnerApi.Components components)
RehydratedComponents
from a Runner API RunnerApi.Components
.public RehydratedComponents withPipeline(Pipeline pipeline)
RehydratedComponents
with a pipeline attached.public PCollection<?> getPCollection(java.lang.String pCollectionId) throws java.io.IOException
PCollection
rehydrated from the Runner API component with the given ID.
For a single instance of RehydratedComponents
, this always returns the same instance
for a particular id.
java.io.IOException
public WindowingStrategy<?,?> getWindowingStrategy(java.lang.String windowingStrategyId) throws java.io.IOException
WindowingStrategy
rehydrated from the Runner API component with the given ID.
For a single instance of RehydratedComponents
, this always returns the same instance
for a particular id.
java.io.IOException
public Coder<?> getCoder(java.lang.String coderId) throws java.io.IOException
Coder
rehydrated from the Runner API component with the given ID.
For a single instance of RehydratedComponents
, this always returns the same instance
for a particular id.
java.io.IOException
public org.apache.beam.model.pipeline.v1.RunnerApi.Environment getEnvironment(java.lang.String environmentId)
RunnerApi.Environment
associated with the given ID.public org.apache.beam.model.pipeline.v1.RunnerApi.Components getComponents()
public SdkComponents getSdkComponents(java.util.Collection<java.lang.String> requirements)