Class FirestoreV1.BatchWriteWithSummary
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<InT,OutT>
-
- org.apache.beam.sdk.io.gcp.firestore.FirestoreV1.BatchWriteWithSummary
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- FirestoreV1
public static final class FirestoreV1.BatchWriteWithSummary extends org.apache.beam.sdk.transforms.PTransform<InT,OutT>Concrete class representing aPTransform<PCollection<Write>,PDone>which will write to Firestore.If an error is encountered while trying to write to Cloud Firestore a
FirestoreV1.FailedWritesExceptionwill be thrown. If you would like a failed write to not result in aFirestoreV1.FailedWritesException, you can instead useFirestoreV1.BatchWriteWithDeadLetterQueuewhich will instead output any failed write.FirestoreV1.BatchWriteWithDeadLetterQueuecan be used by includingFirestoreV1.BatchWriteWithSummary.Builder.withDeadLetterQueue()when constructing the write handler.This class is part of the Firestore Connector DSL, it has a type safe builder accessible via
FirestoreIO.v1().write().batchWrite().All request quality-of-service for an instance of this PTransform is scoped to the worker and configured via
FirestoreV1.Transform.Builder.withRpcQosOptions(RpcQosOptions).Writes performed against Firestore will be ordered and grouped to maximize throughput while maintaining a high request success rate. Batch sizes will be determined by the QOS layer.
- See Also:
FirestoreIO.v1(),FirestoreV1.write(),FirestoreV1.Write.batchWrite(),FirestoreV1.BatchWriteWithSummary.Builder,FirestoreV1.BatchWriteWithDeadLetterQueue,BatchWriteRequest,BatchWriteResponse, google.firestore.v1.Firestore.BatchWrite, google.firestore.v1.BatchWriteRequest, google.firestore.v1.BatchWriteResponse, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFirestoreV1.BatchWriteWithSummary.BuilderA type safe builder forFirestoreV1.BatchWriteWithSummaryallowing configuration and instantiation.
-
Constructor Summary
Constructors Constructor Description BatchWriteWithSummary(org.apache.beam.sdk.io.gcp.firestore.JodaClock clock, org.apache.beam.sdk.io.gcp.firestore.FirestoreStatefulComponentFactory firestoreStatefulComponentFactory, RpcQosOptions rpcQosOptions, @Nullable java.lang.String projectId, @Nullable java.lang.String databaseId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<FirestoreV1.WriteSuccessSummary>expand(org.apache.beam.sdk.values.PCollection<com.google.firestore.v1.Write> input)FirestoreV1.BatchWriteWithSummary.BuildertoBuilder()Create a newBuilderfrom the current instance.-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Constructor Detail
-
BatchWriteWithSummary
public BatchWriteWithSummary(org.apache.beam.sdk.io.gcp.firestore.JodaClock clock, org.apache.beam.sdk.io.gcp.firestore.FirestoreStatefulComponentFactory firestoreStatefulComponentFactory, RpcQosOptions rpcQosOptions, @Nullable java.lang.String projectId, @Nullable java.lang.String databaseId)
-
-
Method Detail
-
expand
public org.apache.beam.sdk.values.PCollection<FirestoreV1.WriteSuccessSummary> expand(org.apache.beam.sdk.values.PCollection<com.google.firestore.v1.Write> input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<com.google.firestore.v1.Write>,org.apache.beam.sdk.values.PCollection<FirestoreV1.WriteSuccessSummary>>
-
toBuilder
public FirestoreV1.BatchWriteWithSummary.Builder toBuilder()
Create a newBuilderfrom the current instance.- Returns:
- a new instance of a
Builderinitialized to the current state of this instance
-
-