Package-level declarations

Types

Link copied to clipboard

A Resource used to manage concurrency.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed interface Feed

Feed identifies part of the data consumed during a READ operation.

Link copied to clipboard
sealed class FeedBootstrap<T : Feed>
Link copied to clipboard
class FeedReader(val root: RootReader, val feed: Feed, val resourceAcquirer: ResourceAcquirer, dataChannelFormat: DataChannelFormat, val dataChannelMedium: DataChannelMedium, bufferByteSizeThresholdForFlush: Int, val clock: Clock)

A FeedReader manages the publishing of RECORD, STATE and TRACE messages for a single feed.

Link copied to clipboard

This enum maps to AirbyteRecordMessageMetaChange.Change and AirbyteRecordMessageMetaChange.Reason enum value pairs.

Link copied to clipboard
data class Global(val streams: List<Stream>) : Feed

Acts as a key for Airbyte STATE messages of type GLOBAL.

Link copied to clipboard
class GlobalFeedBootstrap(outputConsumer: StandardOutputConsumer, metaFieldDecorator: MetaFieldDecorator, stateManager: StateManager, global: Global, dataChannelFormat: DataChannelFormat, dataChannelMedium: DataChannelMedium, bufferByteSizeThresholdForFlush: Int, clock: Clock) : FeedBootstrap<Global>

FeedBootstrap implementation for Global feeds.

Link copied to clipboard
data class PartitionReadCheckpoint(val opaqueStateValue: OpaqueStateValue, val numRecords: Long, val partitionId: String? = null)
Link copied to clipboard
interface PartitionReader

A PartitionReader, when executed via run, emits records within the corresponding partition, and completes by returning the value of the state checkpoint.

Link copied to clipboard

A PartitionsCreator breaks down a Feed (a stream, or some global data feed) into zero, one or more partitions. Each partition is defined and read by a PartitionReader instance. These execute concurrently, but are joined serially because the state checkpoints need to appear in sequence.

Link copied to clipboard

PartitionsCreatorFactory must be implemented by each source connector and serves as the entrypoint to how READ operations are executed for that connector, via the PartitionsCreator and PartitionReader instances which are ultimately created by it.

Link copied to clipboard

Interface to allow each toolkit to return the active PartitionsCreatorFactory class For ReadOperation to be able to iterator on active factories only.

Link copied to clipboard
@Singleton
@Requires(property = "airbyte.connector.operation", value = "read")
@Requires(env = ["source"])
class ReadOperation(val config: SourceConfiguration, val configuredCatalog: ConfiguredAirbyteCatalog, val inputState: InputState, val stateManagerFactory: StateManagerFactory, val outputConsumer: StandardOutputConsumer, val metaFieldDecorator: MetaFieldDecorator, val resourceAcquirer: ResourceAcquirer, val partitionsCreatorFactoriesSupplier: List<PartitionsCreatorFactorySupplier<PartitionsCreatorFactory>>, @Value(value = "${airbyte.connector.data-channel.format}") val dataChannelFormat: String, @Value(value = "${airbyte.connector.data-channel.medium}") val dataChannelMedium: String, @Value(value = "${airbyte.connector.output.buffer-byte-size-threshold-for-flush:4096}") val bufferByteSizeThresholdForFlush: Int, clock: Clock) : Operation
Link copied to clipboard

Resource models a shared resource which can be acquired and released.

Link copied to clipboard
@Singleton
class ResourceAcquirer(val acquierers: List<Resource<*>>)
Link copied to clipboard
Link copied to clipboard
class RootReader(val stateManager: StateManager, val resourceAcquisitionHeartbeat: Duration, val timeout: Duration, val outputConsumer: StandardOutputConsumer, val metaFieldDecorator: MetaFieldDecorator, val resourceAcquirer: ResourceAcquirer, val partitionsCreatorFactories: List<PartitionsCreatorFactory>, val dataChannelFormat: DataChannelFormat, val dataChannelMedium: DataChannelMedium, val bufferByteSizeThresholdForFlush: Int, clock: Clock)

RootReader is at the heart of the READ operation. A RootReader manages multiple FeedReader instances (one per Feed) and synchronizes them using coroutines.

Link copied to clipboard
@Singleton
class SocketResource(val socketDataChannelResourceHolder: SocketDataChannelResourceHolder?) : Resource<SocketResource.AcquiredSocket>

A Resource representing a socket data channel.

Link copied to clipboard
class StateManager(global: Global? = null, initialGlobalState: OpaqueStateValue? = null, initialStreamStates: Map<Stream, OpaqueStateValue?> = mapOf())

Singleton object which tracks the state of an ongoing READ operation.

Link copied to clipboard
@Singleton
class StateManagerFactory(val metadataQuerierFactory: MetadataQuerier.Factory<SourceConfiguration>, val metaFieldDecorator: MetaFieldDecorator, val outputConsumer: OutputConsumer, val handler: CatalogValidationFailureHandler, @Value(value = "${airbyte.connector.data-channel.medium}") val dataChannelMedium: String, @Value(value = "${airbyte.connector.data-channel.format}") val dataChannelFormat: String)

A factory for instantiating StateManager based on the inputs of a READ. These inputs are deliberately not injected here to make testing easier.

Link copied to clipboard
data class Stream(val id: StreamIdentifier, val schema: Set<FieldOrMetaField>, val configuredSyncMode: ConfiguredSyncMode, val configuredPrimaryKey: List<Field>?, val configuredCursor: FieldOrMetaField?) : Feed

Acts as a key for Airbyte STATE messages of type STREAM.

Link copied to clipboard
class StreamFeedBootstrap(outputConsumer: StandardOutputConsumer, metaFieldDecorator: MetaFieldDecorator, stateManager: StateManager, stream: Stream, dataChannelFormat: DataChannelFormat, dataChannelMedium: DataChannelMedium, bufferByteSizeThresholdForFlush: Int, clock: Clock) : FeedBootstrap<Stream>

FeedBootstrap implementation for Stream feeds.

Link copied to clipboard

Emits an Airbyte RECORD message for the Stream associated with this instance.

Link copied to clipboard
class StreamStatusManager(feeds: List<Feed>, emit: (AirbyteStreamStatusTraceMessage) -> Unit)

StreamStatusManager emits AirbyteStreamStatusTraceMessages in response to Feed activity events, via notifyStarting, notifyComplete and notifyFailure.

Link copied to clipboard

A PartitionReader with no time limit for its execution.

Properties

Link copied to clipboard

List of Streams this Feed emits records for.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard