public class BasicSerializableSourceFormat extends Object implements SourceFormat
Source.
Provides a bridge between the high-level Source API and the raw
API-level SourceFormat API, by encoding the serialized
Source in a parameter of the API Source message.
| Modifier and Type | Class and Description |
|---|---|
static class |
BasicSerializableSourceFormat.BoundedSourceSplit<T>
A
DynamicSplitResult specified explicitly by a pair of BoundedSource
objects describing the primary and residual sources. |
SourceFormat.OperationRequest, SourceFormat.OperationResponse, SourceFormat.SourceSpec| Modifier and Type | Field and Description |
|---|---|
static String |
TOO_MANY_SOURCE_SPLITS_ERROR |
| Constructor and Description |
|---|
BasicSerializableSourceFormat(PipelineOptions options) |
| Modifier and Type | Method and Description |
|---|---|
static <T> Reader<WindowedValue<T>> |
create(PipelineOptions options,
CloudObject spec,
Coder<WindowedValue<T>> coder,
ExecutionContext executionContext)
Factory method allowing this class to satisfy the implicit contract of
ReaderFactory. |
static Source<?> |
deserializeFromCloudSource(Map<String,Object> spec) |
static <T> void |
evaluateReadHelper(Read.Bounded<T> transform,
DirectPipelineRunner.EvaluationContext context) |
SourceFormat.OperationResponse |
performSourceOperation(SourceFormat.OperationRequest request)
Executes a protocol-level split
SourceOperationRequest for bounded sources
by deserializing its source to a BoundedSource, splitting it, and
serializing results back. |
static com.google.api.services.dataflow.model.Source |
serializeToCloudSource(Source<?> source,
PipelineOptions options) |
static com.google.api.services.dataflow.model.DynamicSourceSplit |
toSourceSplit(BasicSerializableSourceFormat.BoundedSourceSplit<?> sourceSplitResult,
PipelineOptions options) |
static <T> void |
translateReadHelper(Source<T> source,
PTransform<?,? extends PValue> transform,
DataflowPipelineTranslator.TranslationContext context) |
public static final String TOO_MANY_SOURCE_SPLITS_ERROR
public BasicSerializableSourceFormat(PipelineOptions options)
public static com.google.api.services.dataflow.model.DynamicSourceSplit toSourceSplit(BasicSerializableSourceFormat.BoundedSourceSplit<?> sourceSplitResult, PipelineOptions options)
public SourceFormat.OperationResponse performSourceOperation(SourceFormat.OperationRequest request) throws Exception
SourceOperationRequest for bounded sources
by deserializing its source to a BoundedSource, splitting it, and
serializing results back.performSourceOperation in interface SourceFormatExceptionpublic static <T> Reader<WindowedValue<T>> create(PipelineOptions options, CloudObject spec, Coder<WindowedValue<T>> coder, ExecutionContext executionContext) throws Exception
ReaderFactory.Exceptionpublic static Source<?> deserializeFromCloudSource(Map<String,Object> spec) throws Exception
Exceptionpublic static com.google.api.services.dataflow.model.Source serializeToCloudSource(Source<?> source, PipelineOptions options) throws Exception
Exceptionpublic static <T> void evaluateReadHelper(Read.Bounded<T> transform, DirectPipelineRunner.EvaluationContext context)
public static <T> void translateReadHelper(Source<T> source, PTransform<?,? extends PValue> transform, DataflowPipelineTranslator.TranslationContext context)