Class SplunkIO.Write

All Implemented Interfaces:
Serializable, HasDisplayData
Enclosing class:
SplunkIO

public abstract static class SplunkIO.Write extends PTransform<PCollection<SplunkEvent>,PCollection<SplunkWriteError>>
Class SplunkIO.Write provides a PTransform that allows writing SplunkEvent records into a Splunk HTTP Event Collector end-point using HTTP POST requests.

In the event of an error, a PCollection<SplunkWriteError> is returned for further processing or storing into a dead-letter sink.

See Also:
  • Constructor Details

    • Write

      public Write()
  • Method Details

    • expand

      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<SplunkEvent>,PCollection<SplunkWriteError>>
    • withBatchCount

      public SplunkIO.Write withBatchCount(ValueProvider<Integer> batchCount)
      Parameters:
      batchCount - for batching requests
    • withBatchCount

      public SplunkIO.Write withBatchCount(Integer batchCount)
      Sets batchCount for sending multiple events in a single request to the HEC.
      Parameters:
      batchCount - for batching requests
    • withParallelism

      public SplunkIO.Write withParallelism(ValueProvider<Integer> parallelism)
      Parameters:
      parallelism - for controlling the number of concurrent http client connections
    • withParallelism

      public SplunkIO.Write withParallelism(Integer parallelism)
      Sets the number of parallel http client connections to the HEC.
      Parameters:
      parallelism - controlling the number of http client connections
      Returns:
      SplunkIO.Write.Builder
    • withDisableCertificateValidation

      public SplunkIO.Write withDisableCertificateValidation(ValueProvider<Boolean> disableCertificateValidation)
      Parameters:
      disableCertificateValidation - for disabling certificate validation
      Returns:
      SplunkIO.Write.Builder
    • withDisableCertificateValidation

      public SplunkIO.Write withDisableCertificateValidation(Boolean disableCertificateValidation)
      Disables ssl certificate validation.
      Parameters:
      disableCertificateValidation - for disabling certificate validation
    • withRootCaCertificatePath

      public SplunkIO.Write withRootCaCertificatePath(ValueProvider<String> rootCaCertificatePath)
      Parameters:
      rootCaCertificatePath - Path to root CA certificate
      Returns:
      SplunkIO.Write.Builder
    • withRootCaCertificatePath

      public SplunkIO.Write withRootCaCertificatePath(String rootCaCertificatePath)
      Method to set the root CA certificate.
      Parameters:
      rootCaCertificatePath - Path to root CA certificate
      Returns:
      SplunkIO.Write.Builder
    • withEnableBatchLogs

      public SplunkIO.Write withEnableBatchLogs(ValueProvider<Boolean> enableBatchLogs)
      Parameters:
      enableBatchLogs - whether to enable Gzip encoding.
      Returns:
      SplunkIO.Write.Builder
    • withEnableBatchLogs

      public SplunkIO.Write withEnableBatchLogs(Boolean enableBatchLogs)
      Method to enable batch logs.
      Parameters:
      enableBatchLogs - whether to enable Gzip encoding.
      Returns:
      SplunkIO.Write.Builder
    • withEnableGzipHttpCompression

      public SplunkIO.Write withEnableGzipHttpCompression(ValueProvider<Boolean> enableGzipHttpCompression)
      Parameters:
      enableGzipHttpCompression - whether to enable Gzip encoding.
      Returns:
      SplunkIO.Write.Builder
    • withEnableGzipHttpCompression

      public SplunkIO.Write withEnableGzipHttpCompression(Boolean enableGzipHttpCompression)
      Method to specify if HTTP requests sent to Splunk should be GZIP encoded.
      Parameters:
      enableGzipHttpCompression - whether to enable Gzip encoding.
      Returns:
      SplunkIO.Write.Builder