public static class ElasticsearchIO.Write extends PTransform<PCollection<java.lang.String>,PDone>
PTransform
writing data to Elasticsearch.
This PTransform
acts as a convenience wrapper for doing both document to bulk API
serialization as well as batching those Bulk API entities and writing them to an Elasticsearch
cluster. This class is effectively a thin proxy for DocToBulk->BulkIO all-in-one for
convenience and backward compatibility.
Modifier and Type | Class and Description |
---|---|
static interface |
ElasticsearchIO.Write.BooleanFieldValueExtractFn |
static interface |
ElasticsearchIO.Write.FieldValueExtractFn |
name, resourceHints
Constructor and Description |
---|
Write() |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate
public ElasticsearchIO.DocToBulk getDocToBulk()
public ElasticsearchIO.BulkIO getBulkIO()
public ElasticsearchIO.Write withIdFn(ElasticsearchIO.Write.FieldValueExtractFn idFn)
public ElasticsearchIO.Write withIndexFn(ElasticsearchIO.Write.FieldValueExtractFn indexFn)
public ElasticsearchIO.Write withRoutingFn(ElasticsearchIO.Write.FieldValueExtractFn routingFn)
public ElasticsearchIO.Write withTypeFn(ElasticsearchIO.Write.FieldValueExtractFn typeFn)
public ElasticsearchIO.Write withDocVersionFn(ElasticsearchIO.Write.FieldValueExtractFn docVersionFn)
public ElasticsearchIO.Write withDocVersionType(java.lang.String docVersionType)
public ElasticsearchIO.Write withUsePartialUpdate(boolean usePartialUpdate)
public ElasticsearchIO.Write withUpsertScript(java.lang.String source)
public ElasticsearchIO.Write withBackendVersion(int backendVersion)
public ElasticsearchIO.Write withIsDeleteFn(ElasticsearchIO.Write.BooleanFieldValueExtractFn isDeleteFn)
public ElasticsearchIO.Write withConnectionConfiguration(ElasticsearchIO.ConnectionConfiguration connectionConfiguration)
public ElasticsearchIO.Write withMaxBatchSize(long batchSize)
public ElasticsearchIO.Write withMaxBatchSizeBytes(long batchSizeBytes)
public ElasticsearchIO.Write withRetryConfiguration(ElasticsearchIO.RetryConfiguration retryConfiguration)
public ElasticsearchIO.Write withIgnoreVersionConflicts(boolean ignoreVersionConflicts)
public ElasticsearchIO.Write withUseStatefulBatches(boolean useStatefulBatches)
public ElasticsearchIO.Write withMaxBufferingDuration(Duration maxBufferingDuration)
public ElasticsearchIO.Write withMaxParallelRequestsPerWindow(int maxParallelRequestsPerWindow)
public ElasticsearchIO.Write withAllowableResponseErrors(@Nullable java.util.Set<java.lang.String> allowableResponseErrors)
public PDone expand(PCollection<java.lang.String> 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<java.lang.String>,PDone>