-
Notifications
You must be signed in to change notification settings - Fork 250
feat(connector): add iggy-pinot external connector #2499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chiradip
wants to merge
28
commits into
apache:master
Choose a base branch
from
chiradip:iggy-pinot
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
c6be00d
feat(pinot): add initial Pinot connector structure and configuration
chiradip 2aa190b
feat(pinot): implement core consumer and metadata provider classes
chiradip 77b6bbf
feat(pinot): add JSON decoder, documentation, and examples
chiradip 4434954
fix(pinot): resolve all compilation errors
chiradip c74474c
docs(pinot): add comprehensive quick start guide
chiradip 7b6a559
test(pinot): add comprehensive test suite with performance benchmarks
chiradip 9eb8a94
docs(pinot): add comprehensive test report with performance analysis
chiradip 96e1d8c
test(pinot): add Docker-based integration testing infrastructure
chiradip d7f1134
docs(pinot): add comprehensive design document
chiradip 391967f
style(pinot): fix checkstyle and spotless violations
chiradip 9ed36e5
docs(pinot): fix javadoc errors
chiradip 58483cd
fix(pinot): make integration tests predictable and reliable
chiradip 32342c1
refactoring
chiradip 2c3e448
Merge branch 'apache:master' into iggy-pinot
chiradip c1ebfb5
refactoring -2
chiradip 665dcf6
refactoring -2
chiradip 7e7938e
refactoring -2
chiradip 72160fb
Merge branch 'master' into iggy-pinot
chiradip 6edac68
Merge branch 'master' into iggy-pinot
chiradip 0ab78f4
chore: remove markdown documentation from git tracking
chiradip f2492a6
chore: PR cpmments resoved
chiradip e6c81b4
chore: PR cpmments resoved
chiradip 5039879
PR comments addressed
chiradip b9626e1
PR comments addressed
chiradip 672c85f
PR comments addressed
chiradip 85abd45
Merge branch 'master' into iggy-pinot
chiradip 8f1bae3
PR comments addressed
chiradip b017781
PR issues addressed
chiradip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
3 changes: 3 additions & 0 deletions
3
foreign/java/external-processors/iggy-connector-pinot/.gitignore
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Documentation files (kept locally, not in git) | ||
| *.md | ||
| *.md.tmp |
71 changes: 71 additions & 0 deletions
71
foreign/java/external-processors/iggy-connector-pinot/build.gradle.kts
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you under the Apache License, Version 2.0 (the | ||
| * "License"); you may not use this file except in compliance | ||
| * with the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, | ||
| * software distributed under the License is distributed on an | ||
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| * KIND, either express or implied. See the License for the | ||
| * specific language governing permissions and limitations | ||
| * under the License. | ||
| */ | ||
|
|
||
| plugins { | ||
| id("iggy.java-library-conventions") | ||
| } | ||
|
|
||
| dependencies { | ||
| // Iggy SDK - use local project when building within Iggy repository | ||
| api(project(":iggy")) | ||
|
|
||
| // Apache Pinot dependencies (provided - not bundled with connector) | ||
| compileOnly(libs.pinot.spi) | ||
|
|
||
| // Serialization support - use Jackson 2.x for Pinot compatibility | ||
| implementation(libs.jackson2.databind) { | ||
| exclude(group = "tools.jackson.core") | ||
| } | ||
|
|
||
| // Apache Commons | ||
| implementation(libs.commons.lang3) | ||
|
|
||
| // Logging | ||
| compileOnly(libs.slf4j.api) | ||
|
|
||
| // Testing | ||
| testImplementation(platform(libs.junit.bom)) | ||
| testImplementation(libs.bundles.testing) | ||
| testImplementation(libs.pinot.spi) // Need Pinot SPI for tests | ||
| testRuntimeOnly(libs.slf4j.simple) | ||
| } | ||
|
|
||
| // Task to copy runtime dependencies for Docker deployment (flattened into libs directory) | ||
| tasks.register<Copy>("copyDependencies") { | ||
| from(configurations.runtimeClasspath) | ||
| into(layout.buildDirectory.dir("libs")) | ||
| } | ||
|
|
||
| // Make jar task depend on copyDependencies | ||
| tasks.named("jar") { | ||
| finalizedBy("copyDependencies") | ||
| } | ||
|
|
||
| publishing { | ||
| publications { | ||
| named<MavenPublication>("maven") { | ||
| artifactId = "pinot-connector" | ||
|
|
||
| pom { | ||
| name = "Apache Iggy - Pinot Connector" | ||
| description = "Apache Iggy connector plugin for Apache Pinot stream ingestion" | ||
| } | ||
| } | ||
| } | ||
| } |
31 changes: 31 additions & 0 deletions
31
foreign/java/external-processors/iggy-connector-pinot/deployment/schema.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| { | ||
| "schemaName": "test_events", | ||
| "dimensionFieldSpecs": [ | ||
| { | ||
| "name": "userId", | ||
| "dataType": "STRING" | ||
| }, | ||
| { | ||
| "name": "eventType", | ||
| "dataType": "STRING" | ||
| }, | ||
| { | ||
| "name": "deviceType", | ||
| "dataType": "STRING" | ||
| } | ||
| ], | ||
| "metricFieldSpecs": [ | ||
| { | ||
| "name": "duration", | ||
| "dataType": "LONG" | ||
| } | ||
| ], | ||
| "dateTimeFieldSpecs": [ | ||
| { | ||
| "name": "timestamp", | ||
| "dataType": "LONG", | ||
| "format": "1:MILLISECONDS:EPOCH", | ||
| "granularity": "1:MILLISECONDS" | ||
| } | ||
| ] | ||
| } |
42 changes: 42 additions & 0 deletions
42
foreign/java/external-processors/iggy-connector-pinot/deployment/table.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| { | ||
| "tableName": "test_events", | ||
| "tableType": "REALTIME", | ||
| "segmentsConfig": { | ||
| "timeColumnName": "timestamp", | ||
| "timeType": "MILLISECONDS", | ||
| "replication": "1", | ||
| "schemaName": "test_events" | ||
| }, | ||
| "tenants": { | ||
| "broker": "DefaultTenant", | ||
| "server": "DefaultTenant" | ||
| }, | ||
| "tableIndexConfig": { | ||
| "loadMode": "MMAP", | ||
| "streamConfigs": { | ||
| "streamType": "iggy", | ||
| "stream.iggy.topic.name": "test-events", | ||
| "stream.iggy.consumer.type": "lowlevel", | ||
| "stream.iggy.consumer.factory.class.name": "org.apache.iggy.connector.pinot.consumer.IggyConsumerFactory", | ||
| "realtime.segment.consumer.factory.class.name": "org.apache.iggy.connector.pinot.consumer.IggyConsumerFactory", | ||
| "stream.iggy.decoder.class.name": "org.apache.iggy.connector.pinot.decoder.IggyJsonMessageDecoder", | ||
|
|
||
| "stream.iggy.host": "iggy", | ||
| "stream.iggy.port": "8090", | ||
| "stream.iggy.username": "iggy", | ||
| "stream.iggy.password": "iggy", | ||
|
|
||
| "stream.iggy.stream.id": "test-stream", | ||
| "stream.iggy.topic.id": "test-events", | ||
| "stream.iggy.consumer.group": "pinot-integration-test", | ||
|
|
||
| "stream.iggy.poll.batch.size": "100", | ||
| "stream.iggy.connection.pool.size": "4", | ||
| "stream.iggy.consumer.prop.auto.offset.reset": "smallest", | ||
|
|
||
| "realtime.segment.flush.threshold.rows": "1000", | ||
| "realtime.segment.flush.threshold.time": "600000" | ||
| } | ||
| }, | ||
| "metadata": {} | ||
| } |
135 changes: 135 additions & 0 deletions
135
foreign/java/external-processors/iggy-connector-pinot/docker-compose.yml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| services: | ||
| # Apache Iggy Server (from official Apache repo) | ||
| iggy: | ||
| image: apache/iggy:latest | ||
| container_name: iggy-server | ||
| ports: | ||
| - "8090:8090" # TCP | ||
| - "3000:3000" # HTTP | ||
| - "8080:8080" # QUIC | ||
| environment: | ||
| - IGGY_SYSTEM_LOGGING_LEVEL=info | ||
| - IGGY_TCP_ADDRESS=0.0.0.0:8090 | ||
| - IGGY_HTTP_ENABLED=true | ||
| - IGGY_HTTP_ADDRESS=0.0.0.0:3000 | ||
| - IGGY_QUIC_ADDRESS=0.0.0.0:8080 | ||
| - IGGY_ROOT_USERNAME=iggy | ||
| - IGGY_ROOT_PASSWORD=iggy | ||
| cap_add: | ||
| - SYS_NICE | ||
| security_opt: | ||
| - seccomp:unconfined | ||
| ulimits: | ||
| memlock: | ||
| soft: -1 | ||
| hard: -1 | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:3000/"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 5 | ||
| start_period: 10s | ||
| networks: | ||
| - iggy-pinot-network | ||
|
|
||
| # Zookeeper (required by Pinot) | ||
| zookeeper: | ||
| image: zookeeper:3.9 | ||
| container_name: pinot-zookeeper | ||
| ports: | ||
| - "2181:2181" | ||
| environment: | ||
| ZOOKEEPER_CLIENT_PORT: 2181 | ||
| ZOOKEEPER_TICK_TIME: 2000 | ||
| networks: | ||
| - iggy-pinot-network | ||
|
|
||
| # Apache Pinot Controller | ||
| pinot-controller: | ||
| image: apachepinot/pinot:latest | ||
| container_name: pinot-controller | ||
| command: "StartController -zkAddress zookeeper:2181" | ||
| ports: | ||
| - "9000:9000" | ||
| environment: | ||
| JAVA_OPTS: "-Xms1G -Xmx2G -XX:+UseG1GC" | ||
| depends_on: | ||
| - zookeeper | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:9000/health"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 10 | ||
| start_period: 30s | ||
| volumes: | ||
| - ./build/libs:/opt/pinot/plugins/pinot-stream-ingestion/iggy-connector | ||
| - ../../java-sdk/build/libs/iggy-0.6.0.jar:/opt/pinot/plugins/pinot-stream-ingestion/iggy-connector/iggy-0.6.0.jar | ||
| - ./deployment:/opt/pinot/deployment | ||
| networks: | ||
| - iggy-pinot-network | ||
|
|
||
| # Apache Pinot Broker | ||
| pinot-broker: | ||
| image: apachepinot/pinot:latest | ||
| container_name: pinot-broker | ||
| command: "StartBroker -zkAddress zookeeper:2181" | ||
| ports: | ||
| - "8099:8099" | ||
| environment: | ||
| JAVA_OPTS: "-Xms512M -Xmx1G -XX:+UseG1GC" | ||
| depends_on: | ||
| - pinot-controller | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:8099/health"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 10 | ||
| start_period: 30s | ||
| networks: | ||
| - iggy-pinot-network | ||
|
|
||
| # Apache Pinot Server | ||
| pinot-server: | ||
| image: apachepinot/pinot:latest | ||
| container_name: pinot-server | ||
| command: "StartServer -zkAddress zookeeper:2181" | ||
| ports: | ||
| - "8098:8098" | ||
| - "8097:8097" | ||
| environment: | ||
| JAVA_OPTS: "-Xms1G -Xmx2G -XX:+UseG1GC -Dplugins.include=iggy-connector" | ||
| depends_on: | ||
| - pinot-broker | ||
| healthcheck: | ||
| test: ["CMD", "curl", "-f", "http://localhost:8097/health"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 10 | ||
| start_period: 30s | ||
| volumes: | ||
| - ./build/libs:/opt/pinot/plugins/pinot-stream-ingestion/iggy-connector | ||
| - ../../java-sdk/build/libs/iggy-0.6.0.jar:/opt/pinot/plugins/pinot-stream-ingestion/iggy-connector/iggy-0.6.0.jar | ||
| - ./deployment:/opt/pinot/deployment | ||
| networks: | ||
| - iggy-pinot-network | ||
|
|
||
| networks: | ||
| iggy-pinot-network: | ||
| driver: bridge |
47 changes: 47 additions & 0 deletions
47
foreign/java/external-processors/iggy-connector-pinot/examples/sample-messages.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| { | ||
| "description": "Sample messages to send to Iggy for testing Pinot ingestion", | ||
| "messages": [ | ||
| { | ||
| "userId": "user_12345", | ||
| "sessionId": "session_abc123", | ||
| "eventType": "page_view", | ||
| "pageUrl": "/products/laptop", | ||
| "deviceType": "desktop", | ||
| "browser": "Chrome", | ||
| "country": "USA", | ||
| "city": "San Francisco", | ||
| "duration": 45000, | ||
| "pageLoadTime": 1200, | ||
| "scrollDepth": 75, | ||
| "eventTimestamp": 1701234567890 | ||
| }, | ||
| { | ||
| "userId": "user_67890", | ||
| "sessionId": "session_def456", | ||
| "eventType": "click", | ||
| "pageUrl": "/checkout", | ||
| "deviceType": "mobile", | ||
| "browser": "Safari", | ||
| "country": "UK", | ||
| "city": "London", | ||
| "duration": 2000, | ||
| "pageLoadTime": 800, | ||
| "scrollDepth": 100, | ||
| "eventTimestamp": 1701234570000 | ||
| }, | ||
| { | ||
| "userId": "user_12345", | ||
| "sessionId": "session_abc123", | ||
| "eventType": "purchase", | ||
| "pageUrl": "/confirmation", | ||
| "deviceType": "desktop", | ||
| "browser": "Chrome", | ||
| "country": "USA", | ||
| "city": "San Francisco", | ||
| "duration": 10000, | ||
| "pageLoadTime": 950, | ||
| "scrollDepth": 50, | ||
| "eventTimestamp": 1701234580000 | ||
| } | ||
| ] | ||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.