public static final class FirestoreV1.BatchWriteWithSummary extends PTransform<InT,OutT>
PTransform
<
PCollection
<
Write
>,
PDone
>
which will write to Firestore.
If an error is encountered while trying to write to Cloud Firestore a FirestoreV1.FailedWritesException
will be thrown. If you would like a failed write to not result in a
FirestoreV1.FailedWritesException
, you can instead use FirestoreV1.BatchWriteWithDeadLetterQueue
which
will instead output any failed write. FirestoreV1.BatchWriteWithDeadLetterQueue
can be used by
including FirestoreV1.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.
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 FormModifier and Type | Class and Description |
---|---|
static class |
FirestoreV1.BatchWriteWithSummary.Builder
A type safe builder for
FirestoreV1.BatchWriteWithSummary allowing configuration and
instantiation. |
name, resourceHints
Modifier and Type | Method and Description |
---|---|
PCollection<FirestoreV1.WriteSuccessSummary> |
expand(PCollection<com.google.firestore.v1.Write> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT . |
FirestoreV1.BatchWriteWithSummary.Builder |
toBuilder()
Create a new
Builder from the current instance. |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, setResourceHints, toString, validate, validate
public PCollection<FirestoreV1.WriteSuccessSummary> expand(PCollection<com.google.firestore.v1.Write> 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.firestore.v1.Write>,PCollection<FirestoreV1.WriteSuccessSummary>>
public FirestoreV1.BatchWriteWithSummary.Builder toBuilder()
Builder
from the current instance.Builder
initialized to the current state of this
instance