Package org.apache.beam.sdk.io.splunk
Class SplunkIO.Write
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<SplunkEvent>,PCollection<SplunkWriteError>>
org.apache.beam.sdk.io.splunk.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:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexpand
(PCollection<SplunkEvent> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.withBatchCount
(Integer batchCount) Sets batchCount for sending multiple events in a single request to the HEC.withBatchCount
(ValueProvider<Integer> batchCount) Same aswithBatchCount(Integer)
but withValueProvider
.withDisableCertificateValidation
(Boolean disableCertificateValidation) Disables ssl certificate validation.withDisableCertificateValidation
(ValueProvider<Boolean> disableCertificateValidation) Same aswithDisableCertificateValidation(Boolean)
but withValueProvider
.withEnableBatchLogs
(Boolean enableBatchLogs) Method to enable batch logs.withEnableBatchLogs
(ValueProvider<Boolean> enableBatchLogs) Same aswithEnableBatchLogs(ValueProvider)
but without aValueProvider
.withEnableGzipHttpCompression
(Boolean enableGzipHttpCompression) Method to specify if HTTP requests sent to Splunk should be GZIP encoded.withEnableGzipHttpCompression
(ValueProvider<Boolean> enableGzipHttpCompression) Same aswithEnableGzipHttpCompression(ValueProvider)
but without aValueProvider
.withParallelism
(Integer parallelism) Sets the number of parallel http client connections to the HEC.withParallelism
(ValueProvider<Integer> parallelism) Same aswithBatchCount(Integer)
but withValueProvider
.withRootCaCertificatePath
(String rootCaCertificatePath) Method to set the root CA certificate.withRootCaCertificatePath
(ValueProvider<String> rootCaCertificatePath) Same aswithRootCaCertificatePath(ValueProvider)
but without aValueProvider
.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Constructor Details
-
Write
public Write()
-
-
Method Details
-
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
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 classPTransform<PCollection<SplunkEvent>,
PCollection<SplunkWriteError>>
-
withBatchCount
Same aswithBatchCount(Integer)
but withValueProvider
.- Parameters:
batchCount
- for batching requests
-
withBatchCount
Sets batchCount for sending multiple events in a single request to the HEC.- Parameters:
batchCount
- for batching requests
-
withParallelism
Same aswithBatchCount(Integer)
but withValueProvider
.- Parameters:
parallelism
- for controlling the number of concurrent http client connections
-
withParallelism
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) Same aswithDisableCertificateValidation(Boolean)
but withValueProvider
.- Parameters:
disableCertificateValidation
- for disabling certificate validation- Returns:
SplunkIO.Write.Builder
-
withDisableCertificateValidation
Disables ssl certificate validation.- Parameters:
disableCertificateValidation
- for disabling certificate validation
-
withRootCaCertificatePath
Same aswithRootCaCertificatePath(ValueProvider)
but without aValueProvider
.- Parameters:
rootCaCertificatePath
- Path to root CA certificate- Returns:
SplunkIO.Write.Builder
-
withRootCaCertificatePath
Method to set the root CA certificate.- Parameters:
rootCaCertificatePath
- Path to root CA certificate- Returns:
SplunkIO.Write.Builder
-
withEnableBatchLogs
Same aswithEnableBatchLogs(ValueProvider)
but without aValueProvider
.- Parameters:
enableBatchLogs
- whether to enable Gzip encoding.- Returns:
SplunkIO.Write.Builder
-
withEnableBatchLogs
Method to enable batch logs.- Parameters:
enableBatchLogs
- whether to enable Gzip encoding.- Returns:
SplunkIO.Write.Builder
-
withEnableGzipHttpCompression
public SplunkIO.Write withEnableGzipHttpCompression(ValueProvider<Boolean> enableGzipHttpCompression) Same aswithEnableGzipHttpCompression(ValueProvider)
but without aValueProvider
.- Parameters:
enableGzipHttpCompression
- whether to enable Gzip encoding.- Returns:
SplunkIO.Write.Builder
-
withEnableGzipHttpCompression
Method to specify if HTTP requests sent to Splunk should be GZIP encoded.- Parameters:
enableGzipHttpCompression
- whether to enable Gzip encoding.- Returns:
SplunkIO.Write.Builder
-