Class OracleConnectorConfig


public class OracleConnectorConfig extends HistorizedRelationalDatabaseConnectorConfig
Connector configuration for Oracle.
Author:
Gunnar Morling
  • Field Details

    • DEFAULT_PORT

      protected static final int DEFAULT_PORT
      See Also:
    • DEFAULT_LOG_FILE_QUERY_MAX_RETRIES

      protected static final int DEFAULT_LOG_FILE_QUERY_MAX_RETRIES
      See Also:
    • DEFAULT_BATCH_SIZE

      protected static final int DEFAULT_BATCH_SIZE
      See Also:
    • MIN_BATCH_SIZE

      protected static final int MIN_BATCH_SIZE
      See Also:
    • MAX_BATCH_SIZE

      protected static final int MAX_BATCH_SIZE
      See Also:
    • DEFAULT_SCN_GAP_SIZE

      protected static final int DEFAULT_SCN_GAP_SIZE
      See Also:
    • DEFAULT_SCN_GAP_TIME_INTERVAL

      protected static final int DEFAULT_SCN_GAP_TIME_INTERVAL
      See Also:
    • DEFAULT_TRANSACTION_EVENTS_THRESHOLD

      protected static final int DEFAULT_TRANSACTION_EVENTS_THRESHOLD
      See Also:
    • DEFAULT_QUERY_FETCH_SIZE

      protected static final int DEFAULT_QUERY_FETCH_SIZE
      See Also:
    • MAX_SLEEP_TIME

      protected static final Duration MAX_SLEEP_TIME
    • DEFAULT_SLEEP_TIME

      protected static final Duration DEFAULT_SLEEP_TIME
    • MIN_SLEEP_TIME

      protected static final Duration MIN_SLEEP_TIME
    • SLEEP_TIME_INCREMENT

      protected static final Duration SLEEP_TIME_INCREMENT
    • ARCHIVE_LOG_ONLY_POLL_TIME

      protected static final Duration ARCHIVE_LOG_ONLY_POLL_TIME
    • PORT

      public static final Field PORT
    • HOSTNAME

      public static final Field HOSTNAME
    • PDB_NAME

      public static final Field PDB_NAME
    • XSTREAM_SERVER_NAME

      public static final Field XSTREAM_SERVER_NAME
    • INTERVAL_HANDLING_MODE

      public static final Field INTERVAL_HANDLING_MODE
    • SNAPSHOT_MODE

      public static final Field SNAPSHOT_MODE
    • SNAPSHOT_LOCKING_MODE

      public static final Field SNAPSHOT_LOCKING_MODE
    • CONNECTOR_ADAPTER

      public static final Field CONNECTOR_ADAPTER
    • LOG_MINING_STRATEGY

      public static final Field LOG_MINING_STRATEGY
    • CONTINUOUS_MINE

      public static final Field CONTINUOUS_MINE
    • SNAPSHOT_ENHANCEMENT_TOKEN

      public static final Field SNAPSHOT_ENHANCEMENT_TOKEN
    • LOG_MINING_TRANSACTION_RETENTION

      @Deprecated public static final Field LOG_MINING_TRANSACTION_RETENTION
      Deprecated.
    • LOG_MINING_TRANSACTION_RETENTION_MS

      public static final Field LOG_MINING_TRANSACTION_RETENTION_MS
    • RAC_NODES

      public static final Field RAC_NODES
    • URL

      public static final Field URL
    • LOG_MINING_ARCHIVE_LOG_HOURS

      public static final Field LOG_MINING_ARCHIVE_LOG_HOURS
    • LOG_MINING_BATCH_SIZE_MIN

      public static final Field LOG_MINING_BATCH_SIZE_MIN
    • LOG_MINING_BATCH_SIZE_DEFAULT

      public static final Field LOG_MINING_BATCH_SIZE_DEFAULT
    • LOG_MINING_BATCH_SIZE_MAX

      public static final Field LOG_MINING_BATCH_SIZE_MAX
    • LOG_MINING_SLEEP_TIME_MIN_MS

      public static final Field LOG_MINING_SLEEP_TIME_MIN_MS
    • LOG_MINING_SLEEP_TIME_DEFAULT_MS

      public static final Field LOG_MINING_SLEEP_TIME_DEFAULT_MS
    • LOG_MINING_SLEEP_TIME_MAX_MS

      public static final Field LOG_MINING_SLEEP_TIME_MAX_MS
    • LOG_MINING_SLEEP_TIME_INCREMENT_MS

      public static final Field LOG_MINING_SLEEP_TIME_INCREMENT_MS
    • LOG_MINING_ARCHIVE_LOG_ONLY_MODE

      public static final Field LOG_MINING_ARCHIVE_LOG_ONLY_MODE
    • LOG_MINING_ARCHIVE_LOG_ONLY_SCN_POLL_INTERVAL_MS

      public static final Field LOG_MINING_ARCHIVE_LOG_ONLY_SCN_POLL_INTERVAL_MS
    • LOB_ENABLED

      public static final Field LOB_ENABLED
    • LOG_MINING_USERNAME_INCLUDE_LIST

      public static final Field LOG_MINING_USERNAME_INCLUDE_LIST
    • LOG_MINING_USERNAME_EXCLUDE_LIST

      public static final Field LOG_MINING_USERNAME_EXCLUDE_LIST
    • LOG_MINING_ARCHIVE_DESTINATION_NAME

      public static final Field LOG_MINING_ARCHIVE_DESTINATION_NAME
    • LOG_MINING_BUFFER_TYPE

      public static final Field LOG_MINING_BUFFER_TYPE
    • LOG_MINING_BUFFER_TRANSACTION_EVENTS_THRESHOLD

      public static final Field LOG_MINING_BUFFER_TRANSACTION_EVENTS_THRESHOLD
    • LOG_MINING_BUFFER_INFINISPAN_CACHE_TRANSACTIONS

      public static final Field LOG_MINING_BUFFER_INFINISPAN_CACHE_TRANSACTIONS
    • LOG_MINING_BUFFER_INFINISPAN_CACHE_PROCESSED_TRANSACTIONS

      public static final Field LOG_MINING_BUFFER_INFINISPAN_CACHE_PROCESSED_TRANSACTIONS
    • LOG_MINING_BUFFER_INFINISPAN_CACHE_EVENTS

      public static final Field LOG_MINING_BUFFER_INFINISPAN_CACHE_EVENTS
    • LOG_MINING_BUFFER_INFINISPAN_CACHE_SCHEMA_CHANGES

      public static final Field LOG_MINING_BUFFER_INFINISPAN_CACHE_SCHEMA_CHANGES
    • LOG_MINING_BUFFER_DROP_ON_STOP

      public static final Field LOG_MINING_BUFFER_DROP_ON_STOP
    • LOG_MINING_SCN_GAP_DETECTION_GAP_SIZE_MIN

      public static final Field LOG_MINING_SCN_GAP_DETECTION_GAP_SIZE_MIN
    • LOG_MINING_SCN_GAP_DETECTION_TIME_INTERVAL_MAX_MS

      public static final Field LOG_MINING_SCN_GAP_DETECTION_TIME_INTERVAL_MAX_MS
    • LOG_MINING_LOG_QUERY_MAX_RETRIES

      public static final Field LOG_MINING_LOG_QUERY_MAX_RETRIES
    • LOG_MINING_LOG_BACKOFF_INITIAL_DELAY_MS

      public static final Field LOG_MINING_LOG_BACKOFF_INITIAL_DELAY_MS
    • LOG_MINING_LOG_BACKOFF_MAX_DELAY_MS

      public static final Field LOG_MINING_LOG_BACKOFF_MAX_DELAY_MS
    • LOG_MINING_SESSION_MAX_MS

      public static final Field LOG_MINING_SESSION_MAX_MS
    • LOG_MINING_RESTART_CONNECTION

      public static final Field LOG_MINING_RESTART_CONNECTION
    • LOG_MINING_TRANSACTION_SNAPSHOT_BOUNDARY_MODE

      public static final Field LOG_MINING_TRANSACTION_SNAPSHOT_BOUNDARY_MODE
    • LOG_MINING_QUERY_FILTER_MODE

      public static final Field LOG_MINING_QUERY_FILTER_MODE
    • LOG_MINING_READ_ONLY

      public static final Field LOG_MINING_READ_ONLY
    • LOG_MINING_FLUSH_TABLE_NAME

      public static final Field LOG_MINING_FLUSH_TABLE_NAME
    • SOURCE_INFO_STRUCT_MAKER

      public static final Field SOURCE_INFO_STRUCT_MAKER
    • QUERY_FETCH_SIZE

      public static final Field QUERY_FETCH_SIZE
    • LOG_MINING_MAX_SCN_DEVIATION_MS

      public static final Field LOG_MINING_MAX_SCN_DEVIATION_MS
    • CONFIG_DEFINITION

      private static final ConfigDefinition CONFIG_DEFINITION
    • ALL_FIELDS

      public static Field.Set ALL_FIELDS
      The set of Fields defined as part of this configuration.
    • EXCLUDED_SCHEMAS

      public static final List<String> EXCLUDED_SCHEMAS
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • databaseName

      private final String databaseName
    • pdbName

      private final String pdbName
    • xoutServerName

      private final String xoutServerName
    • intervalHandlingMode

      private final OracleConnectorConfig.IntervalHandlingMode intervalHandlingMode
    • snapshotMode

      private final OracleConnectorConfig.SnapshotMode snapshotMode
    • connectorAdapter

      private OracleConnectorConfig.ConnectorAdapter connectorAdapter
    • streamingAdapter

      private final StreamingAdapter streamingAdapter
    • snapshotEnhancementToken

      private final String snapshotEnhancementToken
    • snapshotLockingMode

      private final OracleConnectorConfig.SnapshotLockingMode snapshotLockingMode
    • queryFetchSize

      private final int queryFetchSize
    • logMiningStrategy

      private final OracleConnectorConfig.LogMiningStrategy logMiningStrategy
    • racNodes

      private final Set<String> racNodes
    • logMiningContinuousMine

      private final boolean logMiningContinuousMine
    • logMiningArchiveLogRetention

      private final Duration logMiningArchiveLogRetention
    • logMiningBatchSizeMin

      private final int logMiningBatchSizeMin
    • logMiningBatchSizeMax

      private final int logMiningBatchSizeMax
    • logMiningBatchSizeDefault

      private final int logMiningBatchSizeDefault
    • logMiningSleepTimeMin

      private final Duration logMiningSleepTimeMin
    • logMiningSleepTimeMax

      private final Duration logMiningSleepTimeMax
    • logMiningSleepTimeDefault

      private final Duration logMiningSleepTimeDefault
    • logMiningSleepTimeIncrement

      private final Duration logMiningSleepTimeIncrement
    • logMiningTransactionRetention

      private final Duration logMiningTransactionRetention
    • archiveLogOnlyMode

      private final boolean archiveLogOnlyMode
    • archiveLogOnlyScnPollTime

      private final Duration archiveLogOnlyScnPollTime
    • lobEnabled

      private final boolean lobEnabled
    • logMiningUsernameIncludes

      private final Set<String> logMiningUsernameIncludes
    • logMiningUsernameExcludes

      private final Set<String> logMiningUsernameExcludes
    • logMiningArchiveDestinationName

      private final String logMiningArchiveDestinationName
    • logMiningBufferType

      private final OracleConnectorConfig.LogMiningBufferType logMiningBufferType
    • logMiningBufferTransactionEventsThreshold

      private final long logMiningBufferTransactionEventsThreshold
    • logMiningBufferDropOnStop

      private final boolean logMiningBufferDropOnStop
    • logMiningScnGapDetectionGapSizeMin

      private final int logMiningScnGapDetectionGapSizeMin
    • logMiningScnGapDetectionTimeIntervalMaxMs

      private final int logMiningScnGapDetectionTimeIntervalMaxMs
    • logMiningLogFileQueryMaxRetries

      private final int logMiningLogFileQueryMaxRetries
    • logMiningInitialDelay

      private final Duration logMiningInitialDelay
    • logMiningMaxDelay

      private final Duration logMiningMaxDelay
    • logMiningMaximumSession

      private final Duration logMiningMaximumSession
    • logMiningTransactionSnapshotBoundaryMode

      private final OracleConnectorConfig.TransactionSnapshotBoundaryMode logMiningTransactionSnapshotBoundaryMode
    • logMiningReadOnly

      private final Boolean logMiningReadOnly
    • logMiningFlushTableName

      private final String logMiningFlushTableName
    • logMiningQueryFilterMode

      private final OracleConnectorConfig.LogMiningQueryFilterMode logMiningQueryFilterMode
    • logMiningRestartConnection

      private final Boolean logMiningRestartConnection
    • logMiningMaxScnDeviation

      private final Duration logMiningMaxScnDeviation
  • Constructor Details

    • OracleConnectorConfig

      public OracleConnectorConfig(Configuration config)
  • Method Details

    • configDef

      public static org.apache.kafka.common.config.ConfigDef configDef()
    • toUpperCase

      private static String toUpperCase(String property)
    • getDatabaseName

      public String getDatabaseName()
    • getPdbName

      public String getPdbName()
    • getCatalogName

      public String getCatalogName()
    • getXoutServerName

      public String getXoutServerName()
    • getIntervalHandlingMode

      public OracleConnectorConfig.IntervalHandlingMode getIntervalHandlingMode()
    • getSnapshotMode

      public OracleConnectorConfig.SnapshotMode getSnapshotMode()
    • getSnapshotLockingMode

      public OracleConnectorConfig.SnapshotLockingMode getSnapshotLockingMode()
    • getQueryFetchSize

      public int getQueryFetchSize()
      Overrides:
      getQueryFetchSize in class CommonConnectorConfig
    • getHistoryRecordComparator

      protected HistoryRecordComparator getHistoryRecordComparator()
      Specified by:
      getHistoryRecordComparator in class HistorizedRelationalDatabaseConnectorConfig
    • getSourceInfoStructMaker

      protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(CommonConnectorConfig.Version version)
      Specified by:
      getSourceInfoStructMaker in class CommonConnectorConfig
    • getContextName

      public String getContextName()
      Specified by:
      getContextName in class CommonConnectorConfig
    • getAdapter

      public StreamingAdapter getAdapter()
      Returns:
      the streaming adapter implementation
    • getLogMiningStrategy

      public OracleConnectorConfig.LogMiningStrategy getLogMiningStrategy()
      Returns:
      Log Mining strategy
    • isRacSystem

      public Boolean isRacSystem()
      Returns:
      whether Oracle is using RAC
    • getRacNodes

      public Set<String> getRacNodes()
      Returns:
      set of node hosts or ip addresses used in Oracle RAC
    • getTokenToReplaceInSnapshotPredicate

      public String getTokenToReplaceInSnapshotPredicate()
      Returns:
      String token to replace
    • isContinuousMining

      public boolean isContinuousMining()
      Returns:
      whether continuous log mining is enabled
    • getLogMiningArchiveLogRetention

      public Duration getLogMiningArchiveLogRetention()
      Returns:
      the duration that archive logs are scanned for log mining
    • getLogMiningBatchSizeMin

      public int getLogMiningBatchSizeMin()
      Returns:
      int The minimum SCN interval used when mining redo/archive logs
    • getLogMiningBatchSizeMax

      public int getLogMiningBatchSizeMax()
      Returns:
      int The maximum SCN interval used when mining redo/archive logs
    • getLogMiningScnGapDetectionGapSizeMin

      public int getLogMiningScnGapDetectionGapSizeMin()
      Returns:
      int Scn gap size for SCN gap detection
    • getLogMiningScnGapDetectionTimeIntervalMaxMs

      public int getLogMiningScnGapDetectionTimeIntervalMaxMs()
      Returns:
      int Time interval for SCN gap detection
    • getLogMiningSleepTimeMin

      public Duration getLogMiningSleepTimeMin()
      Returns:
      int The minimum sleep time used when mining redo/archive logs
    • getLogMiningSleepTimeMax

      public Duration getLogMiningSleepTimeMax()
      Returns:
      int The maximum sleep time used when mining redo/archive logs
    • getLogMiningSleepTimeDefault

      public Duration getLogMiningSleepTimeDefault()
      Returns:
      int The default sleep time used when mining redo/archive logs
    • getLogMiningSleepTimeIncrement

      public Duration getLogMiningSleepTimeIncrement()
      Returns:
      int The increment in sleep time when doing auto-tuning while mining redo/archive logs
    • getLogMiningTransactionRetention

      public Duration getLogMiningTransactionRetention()
      Returns:
      the duration for which long running transactions are permitted in the transaction buffer between log switches
    • isArchiveLogOnlyMode

      public boolean isArchiveLogOnlyMode()
      Returns:
      true if the connector is to mine archive logs only, false to mine all logs.
    • getArchiveLogOnlyScnPollTime

      public Duration getArchiveLogOnlyScnPollTime()
      Returns:
      the duration that archive log only will use to wait between polling scn availability
    • isLobEnabled

      public boolean isLobEnabled()
      Returns:
      true if LOB fields are to be captured; false otherwise to not capture LOB fields.
    • getLogMiningUsernameIncludes

      public Set<String> getLogMiningUsernameIncludes()
      Returns:
      User names to include from the LogMiner query
    • getLogMiningUsernameExcludes

      public Set<String> getLogMiningUsernameExcludes()
      Returns:
      User names to exclude from the LogMiner query
    • getLogMiningArchiveDestinationName

      public String getLogMiningArchiveDestinationName()
      Returns:
      name of the archive destination configuration to use
    • getLogMiningBufferType

      public OracleConnectorConfig.LogMiningBufferType getLogMiningBufferType()
      Returns:
      the log mining buffer type implementation to be used
    • getLogMiningBufferTransactionEventsThreshold

      public long getLogMiningBufferTransactionEventsThreshold()
      Returns:
      the event count threshold for when a transaction should be discarded in the buffer.
    • isLogMiningBufferDropOnStop

      public boolean isLogMiningBufferDropOnStop()
      Returns:
      whether buffer cache should be dropped on connector stop.
    • getLogMiningBatchSizeDefault

      public int getLogMiningBatchSizeDefault()
      Returns:
      int The default SCN interval used when mining redo/archive logs
    • getMaximumNumberOfLogQueryRetries

      public int getMaximumNumberOfLogQueryRetries()
      Returns:
      the maximum number of retries that should be used to resolve log filenames for mining
    • getLogMiningInitialDelay

      public Duration getLogMiningInitialDelay()
      Returns:
      the initial delay for the log query delay strategy
    • getLogMiningMaxDelay

      public Duration getLogMiningMaxDelay()
      Returns:
      the maximum delay for the log query delay strategy
    • getLogMiningMaximumSession

      public Optional<Duration> getLogMiningMaximumSession()
      Returns:
      the maximum duration for a LogMiner session
    • getLogMiningTransactionSnapshotBoundaryMode

      public OracleConnectorConfig.TransactionSnapshotBoundaryMode getLogMiningTransactionSnapshotBoundaryMode()
      Returns:
      how in-progress transactions are the snapshot boundary are to be handled.
    • isLogMiningReadOnly

      public boolean isLogMiningReadOnly()
      Returns:
      true if log mining should operate in read-only mode.
    • getLogMiningFlushTableName

      public String getLogMiningFlushTableName()
      Returns:
      the log mining flush table name
    • getLogMiningQueryFilterMode

      public OracleConnectorConfig.LogMiningQueryFilterMode getLogMiningQueryFilterMode()
      Returns:
      how the LogMiner query include/exclude filters are applied to the query.
    • isLogMiningRestartConnection

      public boolean isLogMiningRestartConnection()
      Returns:
      whether the connector should restart the JDBC connection after log switches or maximum session windows.
    • getLogMiningMaxScnDeviation

      public Duration getLogMiningMaxScnDeviation()
      Returns the deviation in milliseconds that should be applied to the end SCN calculation. If this is 0, then there is no deviation applied.
      Returns:
      the deviation duration.
    • getConnectorName

      public String getConnectorName()
      Specified by:
      getConnectorName in class CommonConnectorConfig
    • resolveRacNodes

      private Set<String> resolveRacNodes(Configuration config)
    • resolveLogMiningTransactionRetentionDuration

      private Duration resolveLogMiningTransactionRetentionDuration(Configuration config)
    • validateOutServerName

      public static int validateOutServerName(Configuration config, Field field, Field.ValidationOutput problems)
    • requiredWhenNoUrl

      public static int requiredWhenNoUrl(Configuration config, Field field, Field.ValidationOutput problems)
    • requiredWhenNoHostname

      public static int requiredWhenNoHostname(Configuration config, Field field, Field.ValidationOutput problems)
    • validateRacNodes

      public static int validateRacNodes(Configuration config, Field field, Field.ValidationOutput problems)
    • validateLogMiningBufferType

      private static int validateLogMiningBufferType(Configuration config, Field field, Field.ValidationOutput problems)
    • validateLogMiningInfinispanCacheConfiguration

      public static int validateLogMiningInfinispanCacheConfiguration(Configuration config, Field field, Field.ValidationOutput problems)
    • validateLogMiningReadOnly

      public static int validateLogMiningReadOnly(Configuration config, Field field, Field.ValidationOutput problems)
    • validateLogMiningFlushTableName

      public static int validateLogMiningFlushTableName(Configuration config, Field field, Field.ValidationOutput problems)
    • validateUsernameExcludeList

      public static int validateUsernameExcludeList(Configuration config, Field field, Field.ValidationOutput problems)