public static class DatastoreV1.DeleteEntity extends PTransform<PCollection<com.google.datastore.v1.Entity>,PDone>
PTransform
that deletes Entities
from Cloud Datastore.DatastoreIO
,
Serialized Formannotations, displayData, name, resourceHints
Modifier and Type | Method and Description |
---|---|
PDone |
expand(PCollection<com.google.datastore.v1.Entity> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
java.lang.String |
getDatabaseId() |
java.lang.String |
getProjectId() |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
java.lang.String |
toString() |
DatastoreV1.DeleteEntity |
withDatabaseId(java.lang.String databaseId)
Returns a new
DatastoreV1.DeleteEntity that deletes entities from the Cloud Datastore for the
specified database. |
DatastoreV1.DeleteEntity |
withDatabaseId(ValueProvider<java.lang.String> databaseId)
Same as
withDatabaseId(String) but with a ValueProvider . |
DatastoreV1.DeleteEntity |
withHintNumWorkers(int hintNumWorkers)
Returns a new
DatastoreV1.DeleteEntity with a different worker count hint for ramp-up throttling. |
DatastoreV1.DeleteEntity |
withHintNumWorkers(ValueProvider<java.lang.Integer> hintNumWorkers)
Same as
withHintNumWorkers(int) but with a ValueProvider . |
DatastoreV1.DeleteEntity |
withLocalhost(java.lang.String localhost)
Returns a new
DatastoreV1.DeleteEntity that deletes entities from the Cloud Datastore Emulator
running locally on the specified host port. |
DatastoreV1.DeleteEntity |
withProjectId(java.lang.String projectId)
Returns a new
DatastoreV1.DeleteEntity that deletes entities from the Cloud Datastore for the
specified project. |
DatastoreV1.DeleteEntity |
withProjectId(ValueProvider<java.lang.String> projectId)
Same as
withProjectId(String) but with a ValueProvider . |
DatastoreV1.DeleteEntity |
withRampupThrottlingDisabled()
Returns a new
DatastoreV1.DeleteEntity that does not throttle during ramp-up. |
DatastoreV1.DeleteEntityWithSummary |
withResults()
Returns
DatastoreV1.DeleteEntityWithSummary transform which can be used in Wait.on(PCollection[]) to wait until all data is deleted. |
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, validate, validate
public DatastoreV1.DeleteEntity withProjectId(java.lang.String projectId)
DatastoreV1.DeleteEntity
that deletes entities from the Cloud Datastore for the
specified project.public DatastoreV1.DeleteEntity withDatabaseId(java.lang.String databaseId)
DatastoreV1.DeleteEntity
that deletes entities from the Cloud Datastore for the
specified database.public DatastoreV1.DeleteEntity withProjectId(ValueProvider<java.lang.String> projectId)
withProjectId(String)
but with a ValueProvider
.public DatastoreV1.DeleteEntity withDatabaseId(ValueProvider<java.lang.String> databaseId)
withDatabaseId(String)
but with a ValueProvider
.public DatastoreV1.DeleteEntity withLocalhost(java.lang.String localhost)
DatastoreV1.DeleteEntity
that deletes entities from the Cloud Datastore Emulator
running locally on the specified host port.public DatastoreV1.DeleteEntity withRampupThrottlingDisabled()
DatastoreV1.DeleteEntity
that does not throttle during ramp-up.public DatastoreV1.DeleteEntity withHintNumWorkers(int hintNumWorkers)
DatastoreV1.DeleteEntity
with a different worker count hint for ramp-up throttling.
Value is ignored if ramp-up throttling is disabled.public DatastoreV1.DeleteEntity withHintNumWorkers(ValueProvider<java.lang.Integer> hintNumWorkers)
withHintNumWorkers(int)
but with a ValueProvider
.public DatastoreV1.DeleteEntityWithSummary withResults()
DatastoreV1.DeleteEntityWithSummary
transform which can be used in Wait.on(PCollection[])
to wait until all data is deleted.
Example: delete a PCollection
from one database and then from another database,
making sure that deleting a window of data to the second database starts only after the
respective window has been fully deleted from the first database.
PCollection<Entity> entities = ... ;
PCollection<DatastoreV1.WriteSuccessSummary> deleteSummary =
entities.apply(DatastoreIO.v1().deleteEntity().withProjectId(project).withResults());
public java.lang.String toString()
toString
in class PTransform<PCollection<com.google.datastore.v1.Entity>,PDone>
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(DisplayData.Builder)
is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData)
. Implementations may call super.populateDisplayData(builder)
in order to register display data in the current namespace,
but should otherwise use subcomponent.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.
populateDisplayData
in interface HasDisplayData
populateDisplayData
in class PTransform<PCollection<com.google.datastore.v1.Entity>,PDone>
builder
- The builder to populate with display data.HasDisplayData
public java.lang.String getProjectId()
public java.lang.String getDatabaseId()
public PDone expand(PCollection<com.google.datastore.v1.Entity> input)
PTransform
PTransform
should be expanded on the given
InputT
.
NOTE: This method should not be called directly. Instead apply the PTransform
should
be applied to the InputT
using the apply
method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PCollection<com.google.datastore.v1.Entity>,PDone>