Skip to content
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

Pinot and JDBC Connection #14743

Open
dbschema-pro opened this issue Jan 2, 2025 · 1 comment
Open

Pinot and JDBC Connection #14743

dbschema-pro opened this issue Jan 2, 2025 · 1 comment

Comments

@dbschema-pro
Copy link

I want to test Pinot. I created a container using:
docker run --name apachepinot -p 2123:2123 -p 9000:9000 -p 8000:8000 -p 7050:7050 -p 6000:6000 apachepinot/pinot:latest QuickStart -type batch

Then I tried to connect using JAR and URL
pinot-java-client-1.2.0-sharded.jar
jdbc:pinot://localhost:9000

but I got null connection. What is wrong?

@dbschema-pro
Copy link
Author

I tried again with no success.
The JDBC URL is: jdbc:pinot://localhost:9000
user admin and no password.
The docker does open the port 9000. Here are the logs and the command:

docker run --name apachepinot -p 2123:2123 -p 9000:9000 -p 8099:8099 -p 8000:8000 -p 7050:7050 -p 6000:6000 apachepinot/pinot:latest QuickStart -type batch
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/opt/pinot/lib/pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
***** Starting Zookeeper, controller, broker, server and minion *****
2025/01/09 10:24:31.268 INFO [QuickstartRunner] [main] Registered PinotFS for scheme: s3
2025/01/09 10:24:31.276 INFO [StartZookeeperCommand] [main] Executing command: StartZookeeper -zkPort 2123 -dataDir /tmp/1736418269393/quickstart/PinotZkDir
2025/01/09 10:24:32.507 ERROR [ZkAsyncCallbacks] [ZkClient-EventThread-77-localhost:2123] Interrupted waiting for success
java.lang.InterruptedException: null
        at java.base/java.lang.Object.wait(Native Method) ~[?:?]
        at java.base/java.lang.Object.wait(Object.java:328) ~[?:?]
        at org.apache.helix.zookeeper.zkclient.callback.ZkAsyncCallbacks$DefaultCallback.waitForSuccess(ZkAsyncCallbacks.java:265) [pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar:1.3.0-SNAPSHOT-9b9606898872105341b5a218c81a61f8d60d76e4]
        at org.apache.helix.zookeeper.zkclient.ZkClient.issueSync(ZkClient.java:1692) [pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar:1.3.0-SNAPSHOT-9b9606898872105341b5a218c81a61f8d60d76e4]
        at org.apache.helix.zookeeper.zkclient.ZkClient$4.run(ZkClient.java:1718) [pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar:1.3.0-SNAPSHOT-9b9606898872105341b5a218c81a61f8d60d76e4]
        at org.apache.helix.zookeeper.zkclient.ZkEventThread.run(ZkEventThread.java:97) [pinot-all-1.3.0-SNAPSHOT-jar-with-dependencies.jar:1.3.0-SNAPSHOT-9b9606898872105341b5a218c81a61f8d60d76e4]
2025/01/09 10:24:34.619 INFO [StartZookeeperCommand] [main] Start zookeeper at localhost:2123 in thread main
2025/01/09 10:24:34.630 INFO [StartControllerCommand] [main] Executing command: StartController -clusterName QuickStartCluster -controllerHost null -controllerPort 9000 -dataDir /tmp/1736418269393/quickstart/PinotControllerDir0 -zkAddress localhost:2123
2025/01/09 10:24:34.644 INFO [StartServiceManagerCommand] [main] Executing command: StartServiceManager -clusterName QuickStartCluster -zkAddress localhost:2123 -port -1 -bootstrapServices []
2025/01/09 10:24:34.645 INFO [StartServiceManagerCommand] [main] Starting a Pinot [SERVICE_MANAGER] at 6.386s since launch
2025/01/09 10:24:34.648 INFO [StartServiceManagerCommand] [main] Started Pinot [SERVICE_MANAGER] instance [ServiceManager_116f76a7dd2f_-1] at 6.388s since launch
2025/01/09 10:24:34.648 INFO [StartServiceManagerCommand] [main] Starting a Pinot [CONTROLLER] at 6.389s since launch
2025/01/09 10:24:38.296 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(880be604_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:38.340 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(b60a8c1d_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:38.361 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(87e01465_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.040 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(1db7ca46_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.162 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(13bfbe76_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.206 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(82c8e288_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.240 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(fc13f663_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.265 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(d78bd709_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
2025/01/09 10:24:39.291 ERROR [DelayedAutoRebalancer] [HelixController-pipeline-default-QuickStartCluster-(06989a44_DEFAULT)] No instances or active instances available for resource leadControllerResource, allInstances: [], liveInstances: [], activeInstances: []
Jan 09, 2025 10:24:46 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:9000]
Jan 09, 2025 10:24:46 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer] Started.
2025/01/09 10:24:52.655 INFO [StartServiceManagerCommand] [main] Started Pinot [CONTROLLER] instance [Controller_172.17.0.4_9000] at 24.395s since launch
2025/01/09 10:24:52.657 INFO [StartBrokerCommand] [main] Executing command: StartBroker -brokerHost null -brokerPort 8000 -zkAddress localhost:2123
2025/01/09 10:24:52.658 INFO [StartServiceManagerCommand] [main] Executing command: StartServiceManager -clusterName QuickStartCluster -zkAddress localhost:2123 -port -1 -bootstrapServices []
2025/01/09 10:24:52.658 INFO [StartServiceManagerCommand] [main] Starting a Pinot [SERVICE_MANAGER] at 24.398s since launch
2025/01/09 10:24:52.659 INFO [StartServiceManagerCommand] [main] Started Pinot [SERVICE_MANAGER] instance [ServiceManager_116f76a7dd2f_-1] at 24.399s since launch
2025/01/09 10:24:52.660 INFO [StartServiceManagerCommand] [Start a Pinot [BROKER]] Starting a Pinot [BROKER] at 24.4s since launch
Jan 09, 2025 10:24:57 AM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: The (sub)resource method getResults in org.apache.pinot.broker.api.resources.ResponseStoreResource contains empty path annotation.
WARNING: Return type, java.util.Collection<? extends org.apache.pinot.spi.accounting.QueryResourceTracker>, of method, public java.util.Collection<? extends org.apache.pinot.spi.accounting.QueryResourceTracker> org.apache.pinot.broker.api.resources.PinotBrokerDebug.getQueryUsage(), is not resolvable to a concrete type.
WARNING: Return type, java.util.Collection<? extends org.apache.pinot.spi.accounting.ThreadResourceTracker>, of method, public java.util.Collection<? extends org.apache.pinot.spi.accounting.ThreadResourceTracker> org.apache.pinot.broker.api.resources.PinotBrokerDebug.getThreadResourceUsage(), is not resolvable to a concrete type.

Jan 09, 2025 10:24:57 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:8000]
Jan 09, 2025 10:24:57 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer-1] Started.
2025/01/09 10:25:03.803 INFO [StartServiceManagerCommand] [Start a Pinot [BROKER]] Started Pinot [BROKER] instance [Broker_172.17.0.4_8000] at 35.543s since launch
2025/01/09 10:25:03.825 INFO [StartServerCommand] [main] Executing command: StartServer -clusterName QuickStartCluster -serverHost null -serverPort 7050 -serverAdminPort 7500 -serverGrpcPort 7100 -serverMultistageServerPort 0 -serverMultistageRunnerPort 0 -dataDir /tmp/1736418269393/quickstart/PinotServerDataDir0 -segmentDir /tmp/1736418269393/quickstart/PinotServerSegmentDir0 -zkAddress localhost:2123
2025/01/09 10:25:03.828 INFO [StartServiceManagerCommand] [main] Executing command: StartServiceManager -clusterName QuickStartCluster -zkAddress localhost:2123 -port -1 -bootstrapServices []
2025/01/09 10:25:03.828 INFO [StartServiceManagerCommand] [main] Starting a Pinot [SERVICE_MANAGER] at 35.568s since launch
2025/01/09 10:25:03.828 INFO [StartServiceManagerCommand] [main] Started Pinot [SERVICE_MANAGER] instance [ServiceManager_116f76a7dd2f_-1] at 35.568s since launch
2025/01/09 10:25:03.829 INFO [StartServiceManagerCommand] [Start a Pinot [SERVER]] Starting a Pinot [SERVER] at 35.569s since launch
Jan 09, 2025 10:25:08 AM org.glassfish.jersey.internal.Errors logErrors
WARNING: The following warnings have been detected: WARNING: Return type, java.util.Collection<? extends org.apache.pinot.spi.accounting.QueryResourceTracker>, of method, public java.util.Collection<? extends org.apache.pinot.spi.accounting.QueryResourceTracker> org.apache.pinot.server.api.resources.DebugResource.getQueryUsage(), is not resolvable to a concrete type.
WARNING: Return type, java.util.Collection<? extends org.apache.pinot.spi.accounting.ThreadResourceTracker>, of method, public java.util.Collection<? extends org.apache.pinot.spi.accounting.ThreadResourceTracker> org.apache.pinot.server.api.resources.DebugResource.getThreadUsage(), is not resolvable to a concrete type.

Jan 09, 2025 10:25:08 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:7500]
Jan 09, 2025 10:25:08 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer-2] Started.
2025/01/09 10:25:13.995 INFO [StartServiceManagerCommand] [Start a Pinot [SERVER]] Started Pinot [SERVER] instance [Server_172.17.0.4_7050] at 45.735s since launch
2025/01/09 10:25:13.998 INFO [StartMinionCommand] [main] Executing command: StartMinion -minionHost null -minionPort 6000 -zkAddress localhost:2123
2025/01/09 10:25:13.999 INFO [StartServiceManagerCommand] [main] Executing command: StartServiceManager -clusterName QuickStartCluster -zkAddress localhost:2123 -port -1 -bootstrapServices []
2025/01/09 10:25:13.999 INFO [StartServiceManagerCommand] [main] Starting a Pinot [SERVICE_MANAGER] at 45.739s since launch
2025/01/09 10:25:13.999 INFO [StartServiceManagerCommand] [main] Started Pinot [SERVICE_MANAGER] instance [ServiceManager_116f76a7dd2f_-1] at 45.739s since launch
2025/01/09 10:25:14.000 INFO [StartServiceManagerCommand] [Start a Pinot [MINION]] Starting a Pinot [MINION] at 45.74s since launch
Jan 09, 2025 10:25:18 AM org.glassfish.grizzly.http.server.NetworkListener start
INFO: Started listener bound to [0.0.0.0:6000]
Jan 09, 2025 10:25:18 AM org.glassfish.grizzly.http.server.HttpServer start
INFO: [HttpServer-3] Started.
2025/01/09 10:25:24.099 INFO [StartServiceManagerCommand] [Start a Pinot [MINION]] Started Pinot [MINION] instance [Minion_172.17.0.4_6000] at 55.839s since launch
***** Bootstrap tables *****
2025/01/09 10:25:24.206 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418324105/clickstreamFunnel_1736418324184.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/clickstreamFunnel/clickstreamFunnel_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:25:24.674 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs clickstreamFunnel successfully added"}
2025/01/09 10:25:25.683 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418325669/airlineStats_1736418325671.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/airlineStats/airlineStats_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:25:25.983 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs airlineStats successfully added"}
2025/01/09 10:25:42.123 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418342114/baseballStats_1736418342118.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/baseballStats/baseballStats_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:25:42.244 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs baseballStats successfully added"}
2025/01/09 10:26:12.899 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418372898/dimBaseballTeams_1736418372898.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/dimBaseballTeams/dimBaseballTeams_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:12.958 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs dimBaseballTeams successfully added"}
2025/01/09 10:26:13.117 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418373115/starbucksStores_1736418373116.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/starbucksStores/starbucksStores_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:13.186 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs starbucksStores successfully added"}
2025/01/09 10:26:13.811 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418373809/githubEvents_1736418373810.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/githubEvents/githubEvents_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:13.877 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs githubEvents successfully added"}
2025/01/09 10:26:17.509 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418377506/githubComplexTypeEvents_1736418377507.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/githubComplexTypeEvents/githubComplexTypeEvents_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:17.581 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs githubComplexTypeEvents successfully added"}
2025/01/09 10:26:29.119 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418389119/billing_1736418389119.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/billing/billing_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:29.186 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs billing successfully added"}
2025/01/09 10:26:29.576 INFO [AddTableCommand] [main] Executing command: AddTable -tableConfigFile /tmp/1736418389575/fineFoodReviews_1736418389575.config -offlineTableConfigFile null -realtimeTableConfigFile null -schemaFile /tmp/1736418269393/fineFoodReviews/fineFoodReviews_schema.json -controllerProtocol http -controllerHost localhost -controllerPort 9000 -controllerProtocol http -database null -user null -password [hidden] -exec
2025/01/09 10:26:29.668 INFO [AddTableCommand] [main] {"unrecognizedProperties":{},"status":"TableConfigs fineFoodReviews successfully added"}
***** Waiting for 5 seconds for the server to fetch the assigned segment *****
***** Offline quickstart setup complete *****
Total number of documents in the table
Query : select count(*) from baseballStats limit 1
2025/01/09 10:26:40.127 INFO [PostQueryCommand] [main] Executing command: PostQuery -brokerProtocol http -brokerHost 172.17.0.4 -brokerPort 8000 -query select count(*) from baseballStats limit 1
count(*)
97889

***************************************************
Top 5 run scorers of all time
Query : select playerName, sum(runs) from baseballStats group by playerName order by sum(runs) desc limit 5
2025/01/09 10:26:40.455 INFO [PostQueryCommand] [main] Executing command: PostQuery -brokerProtocol http -brokerHost 172.17.0.4 -brokerPort 8000 -query select playerName, sum(runs) from baseballStats group by playerName order by sum(runs) desc limit 5
playerName              sum(runs)
John Joseph             11581.0
Michael Joseph          7981.0
James Edward            6083.0
William Henry           5933.0
William Joseph          5547.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants