Class SplunkIO.Write

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.beam.sdk.transforms.display.HasDisplayData
    Enclosing class:
    SplunkIO

    public abstract static class SplunkIO.Write
    extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<SplunkEvent>,​org.apache.beam.sdk.values.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:
    Serialized Form
    • Constructor Detail

      • Write

        public Write()
    • Method Detail

      • expand

        public org.apache.beam.sdk.values.PCollection<SplunkWriteError> expand​(org.apache.beam.sdk.values.PCollection<SplunkEvent> input)
        Specified by:
        expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<SplunkEvent>,​org.apache.beam.sdk.values.PCollection<SplunkWriteError>>
      • withBatchCount

        public SplunkIO.Write withBatchCount​(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> batchCount)
        Same as withBatchCount(Integer) but with ValueProvider.
        Parameters:
        batchCount - for batching requests
      • withBatchCount

        public SplunkIO.Write withBatchCount​(java.lang.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​(org.apache.beam.sdk.options.ValueProvider<java.lang.Integer> parallelism)
        Same as withBatchCount(Integer) but with ValueProvider.
        Parameters:
        parallelism - for controlling the number of concurrent http client connections
      • withParallelism

        public SplunkIO.Write withParallelism​(java.lang.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​(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> disableCertificateValidation)
        Same as withDisableCertificateValidation(Boolean) but with ValueProvider.
        Parameters:
        disableCertificateValidation - for disabling certificate validation
        Returns:
        SplunkIO.Write.Builder
      • withDisableCertificateValidation

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

        public SplunkIO.Write withRootCaCertificatePath​(org.apache.beam.sdk.options.ValueProvider<java.lang.String> rootCaCertificatePath)
        Same as withRootCaCertificatePath(ValueProvider) but without a ValueProvider.
        Parameters:
        rootCaCertificatePath - Path to root CA certificate
        Returns:
        SplunkIO.Write.Builder
      • withRootCaCertificatePath

        public SplunkIO.Write withRootCaCertificatePath​(java.lang.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​(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> enableBatchLogs)
        Same as withEnableBatchLogs(ValueProvider) but without a ValueProvider.
        Parameters:
        enableBatchLogs - whether to enable Gzip encoding.
        Returns:
        SplunkIO.Write.Builder
      • withEnableBatchLogs

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

        public SplunkIO.Write withEnableGzipHttpCompression​(org.apache.beam.sdk.options.ValueProvider<java.lang.Boolean> enableGzipHttpCompression)
        Same as withEnableGzipHttpCompression(ValueProvider) but without a ValueProvider.
        Parameters:
        enableGzipHttpCompression - whether to enable Gzip encoding.
        Returns:
        SplunkIO.Write.Builder
      • withEnableGzipHttpCompression

        public SplunkIO.Write withEnableGzipHttpCompression​(java.lang.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