Class DatastoreV1.DeleteKey

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    DatastoreV1

    public static class DatastoreV1.DeleteKey
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.google.datastore.v1.Key>,​org.apache.beam.sdk.values.PDone>
    A PTransform that deletes Entities associated with the given Keys from Cloud Datastore.
    See Also:
    DatastoreIO, Serialized Form
    • Method Detail

      • withLocalhost

        public DatastoreV1.DeleteKey withLocalhost​(java.lang.String localhost)
        Returns a new DatastoreV1.DeleteKey that deletes entities from the Cloud Datastore Emulator running locally on the specified host port.
      • withHintNumWorkers

        public DatastoreV1.DeleteKey withHintNumWorkers​(int hintNumWorkers)
        Returns a new DatastoreV1.DeleteKey with a different worker count hint for ramp-up throttling. Value is ignored if ramp-up throttling is disabled.
      • withResults

        public DatastoreV1.DeleteKeyWithSummary withResults()
        Returns DatastoreV1.DeleteKeyWithSummary transform which can be used in Wait.on(PCollection[]) to wait until all data is deleted.

        Example: delete a PCollection of Key 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.

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.google.datastore.v1.Key>,​org.apache.beam.sdk.values.PDone>
      • populateDisplayData

        public void populateDisplayData​(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
        Specified by:
        populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayData
        Overrides:
        populateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.google.datastore.v1.Key>,​org.apache.beam.sdk.values.PDone>
      • getProjectId

        public java.lang.String getProjectId()
      • getDatabaseId

        public java.lang.String getDatabaseId()
      • expand

        public org.apache.beam.sdk.values.PDone expand​(org.apache.beam.sdk.values.PCollection<com.google.datastore.v1.Key> input)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.google.datastore.v1.Key>,​org.apache.beam.sdk.values.PDone>