Class SourceConfigFragment
java.lang.Object
io.aiven.commons.kafka.config.fragment.ConfigFragment
io.aiven.commons.kafka.connector.source.config.SourceConfigFragment
- All Implemented Interfaces:
io.aiven.commons.kafka.config.fragment.FragmentDataAccess
public final class SourceConfigFragment
extends io.aiven.commons.kafka.config.fragment.ConfigFragment
Defines properties that are shared across all Source implementations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe SourceConfigFragment setter. -
Field Summary
FieldsFields inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment
dataAccess -
Constructor Summary
ConstructorsConstructorDescriptionSourceConfigFragment(io.aiven.commons.kafka.config.fragment.FragmentDataAccess dataAccess) Construct the SourceConfigFragment. -
Method Summary
Modifier and TypeMethodDescriptionGets the list of header for the CSV input.Gets the distribution typeorg.apache.kafka.connect.runtime.errors.ToleranceTypeGets the error tolerance.getExtractor(SourceCommonConfig config) Gets the Extractor instance for this source.intGets the size, in bytes, of the extractor buffer in bytes.intGets the size, in bytes, of the extractor cache size in bytes.intGets the maximum number of records to poll at one time.Gets the nativeStartKey.intGets the ring buffer size.Gets the target topic.Gets the CSV extractor header enable flag.static SourceConfigFragment.SetterCreates a Setter for this fragment.static voidupdate(org.apache.kafka.common.config.ConfigDef configDef) Update the configuration definition with the properties for the source configuration.Methods inherited from class io.aiven.commons.kafka.config.fragment.ConfigFragment
getBoolean, getConfiguredInstance, getInt, getList, getLong, getPassword, getString, has, logDeprecated, logDeprecated, logDeprecated, registerIssue, validate, validate, validationMessage, values
-
Field Details
-
NATIVE_START_KEY
The name of the native start key property. Visible for use in logging- See Also:
-
-
Constructor Details
-
SourceConfigFragment
public SourceConfigFragment(io.aiven.commons.kafka.config.fragment.FragmentDataAccess dataAccess) Construct the SourceConfigFragment.- Parameters:
dataAccess- the FragmentDataAccess that this fragment is associated with.
-
-
Method Details
-
setter
Creates a Setter for this fragment.- Parameters:
data- the data map to modify.- Returns:
- the Setter
-
update
public static void update(org.apache.kafka.common.config.ConfigDef configDef) Update the configuration definition with the properties for the source configuration.- Parameters:
configDef- the configuration to update.
-
getTargetTopic
Gets the target topic.- Returns:
- the target topic.
-
getMaxPollRecords
public int getMaxPollRecords()Gets the maximum number of records to poll at one time.- Returns:
- The maximum number of records to poll at one time.
-
getErrorsTolerance
public org.apache.kafka.connect.runtime.errors.ToleranceType getErrorsTolerance()Gets the error tolerance.- Returns:
- the error tolerance.
-
getDistributionType
Gets the distribution type- Returns:
- the distribution type.
-
getRingBufferSize
public int getRingBufferSize()Gets the ring buffer size.- Returns:
- the ring buffer size.
-
getExtractor
Gets the Extractor instance for this source.- Parameters:
config- the configuration for this source.- Returns:
- the Extractor instance for this source.
-
getExtractorBufferSize
public int getExtractorBufferSize()Gets the size, in bytes, of the extractor buffer in bytes. Only applies to extractors that create buffered input streams.- Returns:
- the size in bytes of the extractor buffer.
-
getExtractorCacheSize
public int getExtractorCacheSize()Gets the size, in bytes, of the extractor cache size in bytes. Only applies to extractors that utilize caches like Avro or Parquet.- Returns:
- the size in bytes of the extractor buffer.
-
getNativeStartKey
Gets the nativeStartKey.- Returns:
- the key to start consuming records from.
-
isCsvExtractorHeaderEnabled
Gets the CSV extractor header enable flag.- Returns:
trueif headers should be parsed from CSV input,falseotherwise.
-
getCsvExtractorHeader
Gets the list of header for the CSV input. Will override any parsed from the CSV input itself.- Returns:
- the list of headers for the CSV input.
-