Class InfluxDbIO.Write

java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<String>,PDone>
org.apache.beam.sdk.io.influxdb.InfluxDbIO.Write
All Implemented Interfaces:
Serializable, HasDisplayData
Enclosing class:
InfluxDbIO

public abstract static class InfluxDbIO.Write extends PTransform<PCollection<String>,PDone>
A PTransform to write to a InfluxDB datasource.
See Also:
  • Constructor Details

    • Write

      public Write()
  • Method Details

    • expand

      public PDone expand(PCollection<String> input)
      Description copied from class: PTransform
      Override this method to specify how this 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).

      Specified by:
      expand in class PTransform<PCollection<String>,PDone>
    • populateDisplayData

      public void populateDisplayData(DisplayData.Builder builder)
      Description copied from class: PTransform
      Register display data for the given transform or component.

      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.

      Specified by:
      populateDisplayData in interface HasDisplayData
      Overrides:
      populateDisplayData in class PTransform<PCollection<String>,PDone>
      Parameters:
      builder - The builder to populate with display data.
      See Also:
    • withBatchSize

      public InfluxDbIO.Write withBatchSize(int batchSize)
      Number of elements to batch. *
    • withDisableCertificateValidation

      public InfluxDbIO.Write withDisableCertificateValidation(boolean disableCertificateValidation)
      Disable SSL certification validation. *
    • withRetentionPolicy

      public InfluxDbIO.Write withRetentionPolicy(String rp)
      Sets the retention policy to use. *
    • withConsistencyLevel

      public InfluxDbIO.Write withConsistencyLevel(InfluxDB.ConsistencyLevel consistencyLevel)
      Sets the consistency level to use. ALL("all") Write succeeds only if write reached all cluster members. ANY("any") Write succeeds if write reached at least one cluster members. ONE("one") Write succeeds if write reached at least one cluster members. QUORUM("quorum") Write succeeds only if write reached a quorum of cluster members.
    • withDataSourceConfiguration

      public InfluxDbIO.Write withDataSourceConfiguration(InfluxDbIO.DataSourceConfiguration configuration)
      Writes to the InfluxDB instance indicated by the given configuration.
    • withDatabase

      public InfluxDbIO.Write withDatabase(String database)
      Writes to the specified database.