Google Cloud Dataflow SDK for Java, version 1.9.1
Class DatastoreIO.Sink
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.io.Sink<DatastoreV1.Entity>
-
- com.google.cloud.dataflow.sdk.io.DatastoreIO.Sink
-
- All Implemented Interfaces:
- HasDisplayData, Serializable
- Enclosing class:
- DatastoreIO
public static class DatastoreIO.Sink extends Sink<DatastoreV1.Entity>
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.cloud.dataflow.sdk.io.Sink
Sink.WriteOperation<T,WriteT>, Sink.Writer<T,WriteT>
-
-
Constructor Summary
Constructors Modifier Constructor and Description protected
Sink(String host, String datasetId)
Constructs a Sink with given host and dataset.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description com.google.cloud.dataflow.sdk.io.DatastoreIO.DatastoreWriteOperation
createWriteOperation(PipelineOptions options)
Returns an instance of aSink.WriteOperation
that can write to this Sink.void
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.void
validate(PipelineOptions options)
Ensures the host and dataset are set.DatastoreIO.Sink
withDataset(String datasetId)
Returns aSink
that is like this one, but will write to the specified dataset.DatastoreIO.Sink
withHost(String host)
Returns aSink
that is like this one, but will use the given host.
-
-
-
Method Detail
-
withDataset
public DatastoreIO.Sink withDataset(String datasetId)
Returns aSink
that is like this one, but will write to the specified dataset.
-
withHost
public DatastoreIO.Sink withHost(String host)
Returns aSink
that is like this one, but will use the given host. If not specified, thedefault host
will be used.
-
validate
public void validate(PipelineOptions options)
Ensures the host and dataset are set.- Specified by:
validate
in classSink<DatastoreV1.Entity>
-
createWriteOperation
public com.google.cloud.dataflow.sdk.io.DatastoreIO.DatastoreWriteOperation createWriteOperation(PipelineOptions options)
Description copied from class:Sink
Returns an instance of aSink.WriteOperation
that can write to this Sink.- Specified by:
createWriteOperation
in classSink<DatastoreV1.Entity>
-
populateDisplayData
public void populateDisplayData(DisplayData.Builder builder)
Description copied from class:Sink
Register display data for the given transform or component.populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect display data viaDisplayData.from(HasDisplayData)
. Implementations may callsuper.populateDisplayData(builder)
in order to register display data in the current namespace, but should otherwise usesubcomponent.populateDisplayData(builder)
to use the namespace of the subcomponent.By default, does not register any display data. Implementors may override this method to provide their own display data.
- Specified by:
populateDisplayData
in interfaceHasDisplayData
- Overrides:
populateDisplayData
in classSink<DatastoreV1.Entity>
- Parameters:
builder
- The builder to populate with display data.- See Also:
HasDisplayData
-
-