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.
  • Field Details

    • NATIVE_START_KEY

      public static final String 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

      public static SourceConfigFragment.Setter setter(Map<String,String> data)
      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

      public String 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

      public DistributionType getDistributionType()
      Gets the distribution type
      Returns:
      the distribution type.
    • getRingBufferSize

      public int getRingBufferSize()
      Gets the ring buffer size.
      Returns:
      the ring buffer size.
    • getExtractor

      public Extractor getExtractor(SourceCommonConfig config)
      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

      public String getNativeStartKey()
      Gets the nativeStartKey.
      Returns:
      the key to start consuming records from.
    • isCsvExtractorHeaderEnabled

      public Boolean isCsvExtractorHeaderEnabled()
      Gets the CSV extractor header enable flag.
      Returns:
      true if headers should be parsed from CSV input, false otherwise.
    • getCsvExtractorHeader

      public List<String> 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.