eskabetxe opened a new pull request, #209: URL: https://github.com/apache/flink-connector-jdbc/pull/209
This pull request introduces a new connection management layer for the Flink JDBC connector, adding support for pluggable connection providers and improved connection configuration. The changes include new classes for connection options, a builder for those options, a minimal `DataSource` implementation for integration with connection pools, and interfaces for connection and statement handling. Additionally, HikariCP is added as a dependency (with SLF4J excluded), and a new async enumerator is provided for snapshot splitting. **Connection Management and Configuration:** * Added `ConnectionOptions` and `ConnectionOptionsBuilder` classes to encapsulate and build JDBC connection configuration, including timeouts and properties. [[1]](diffhunk://#diff-f001332fa66e39c36c0cc30834dda90a0fa41810bd7cd8bae6530ee856fede0fR1-R52) [[2]](diffhunk://#diff-b839c5096307f402ada2ccd9a7a55bcae8d79a27238b19ede6116d971769ee72R1-R91) * Introduced `ConnectionDataSource`, a minimal `DataSource` implementation that delegates driver resolution, enabling proper classloader handling with connection pools like HikariCP. * Added `ConnectionException` for consistent error handling around connection issues. * Added `ConnectionProvider` interface, extending the base JDBC connection provider with methods for table/column metadata discovery and query building for snapshot splitters. **Statement and Result Handling:** * Introduced `ResultSetMapper` and `StatementPreparer` functional interfaces for mapping JDBC results and preparing statements, respectively. [[1]](diffhunk://#diff-eefcfd1c56b12cd6ab7d02efcdbd1ae004f7b609f6a820b95aafd8ea2c05d514R1-R33) [[2]](diffhunk://#diff-8507c8062c472a991cb94c4588edcac8fc52f3727db77c494dfb2cc586fcfb5bR1-R29) **Async Snapshot Splitting:** * Added `AsyncSnapshotSplitterEnumerator`, a background-threaded enumerator for computing and emitting snapshot splits asynchronously, improving scalability and responsiveness during snapshotting. **Dependency Management:** * Added HikariCP as a dependency in `pom.xml`, with SLF4J excluded to avoid conflicts. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
