feat: add Apache Pinot OFFLINE segment sink connector#328
Draft
deeppatel710 wants to merge 1 commit intoDataSQRL:mainfrom
Draft
feat: add Apache Pinot OFFLINE segment sink connector#328deeppatel710 wants to merge 1 commit intoDataSQRL:mainfrom
deeppatel710 wants to merge 1 commit intoDataSQRL:mainfrom
Conversation
Implements a Flink 2.x DynamicTableSink that writes RowData records into Apache Pinot OFFLINE segments via FlinkSegmentWriter + SegmentUploaderDefault, without requiring Pinot 1.6.0+ SNAPSHOT artifacts. - PinotDynamicTableFactory: registers 'pinot' connector with controller.url, table.name, and segment.flush.rows options - PinotRowDataSink: at-least-once Sink<RowData> with async segment upload; flushes on checkpoint (flush()) and when segmentFlushRows threshold is reached - PinotRowDataConverter: maps Flink RowData fields to Pinot GenericRow, converting TIMESTAMP_LTZ → epoch millis and DECIMAL → double - Integration test (PinotSinkFlinkTest): Flink minicluster + 4 Testcontainers (ZK + Controller + Broker + Server); verifies end-to-end segment upload Dependency notes in pom.xml: - Excludes org.apache.calcite:* from pinot-flink-connector (avoids SqlTypeName.VARIANT conflict with Flink 2.2's newer Calcite) - Pins jackson-core 2.18.2 (helix-core pulls in 2.12.6 which lacks StreamReadConstraints needed by jackson-databind 2.18.2) - Adds --add-opens for Chronicle Core's JDK-internal reflection on JDK 17+ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Deep Patel <deeppatel710@gmail.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pinotFlink SQL connector that writesRowDatainto Apache Pinot OFFLINE segments usingFlinkSegmentWriter+SegmentUploaderDefaultfrompinot-flink-connector 1.3.0(no SNAPSHOT required)segment.flush.rowsthreshold is reached; async upload via a small executor poolTIMESTAMP_LTZ(→ epoch millis), andDECIMAL(→ double)New files
PinotDynamicTableFactory'connector' = 'pinot'; options:controller.url,table.name,segment.flush.rowsPinotDynamicTableSinkDynamicTableSink→PinotRowDataSinkPinotRowDataSinkSink<RowData>with async segment uploadPinotRowDataConverterRowDatafields to PinotGenericRowPinotOptionsExample DDL
Dependency fixes (pom.xml)
org.apache.calcite:*frompinot-flink-connectorso Flink 2.2's newer Calcite (which addsSqlTypeName.VARIANT) winsjackson-core 2.18.2—helix-core 1.3.1otherwise pulls in2.12.6, which is missingStreamReadConstraintsneeded byjackson-databind 2.18.2--add-opensargLine to Surefire fornet.openhft:chronicle-corereflective JDK-internal accessTest plan
PinotRowDataConverterTest— 5 unit tests covering primitives, TIMESTAMP_LTZ, DECIMAL, nulls, and post-deserialization behaviourPinotSinkFlinkTest.writesRowsToOfflineTable— end-to-end integration test: Flink minicluster + 4 Testcontainers (ZooKeeper + Controller + Broker + Server); generates 20 rows viadatagen, inserts into Pinot OFFLINE table, asserts segment appears in controller REST API🤖 Generated with Claude Code