Hi! I’m using the pinot jdbc client and I’m gettin...
# pinot-dev
g
Hi! I’m using the pinot jdbc client and I’m getting a timeout:
Copy code
java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.TimeoutException: Request timed out to {broker url} of 60000 ms
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:173) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:152) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport$BrokerResponseFuture.get(JsonAsyncHttpPinotClientTransport.java:123) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.JsonAsyncHttpPinotClientTransport.executeQuery(JsonAsyncHttpPinotClientTransport.java:102) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.Connection.execute(Connection.java:127) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.Connection.execute(Connection.java:96) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PreparedStatement.execute(PreparedStatement.java:72) ~[pinot-java-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PinotPreparedStatement.executeQuery(PinotPreparedStatement.java:193) ~[pinot-jdbc-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
	at org.apache.pinot.client.PinotPreparedStatement.execute(PinotPreparedStatement.java:160) ~[pinot-jdbc-client-0.7.1.jar:0.7.1-e22be7c3a39e840321d3658e7505f21768b228d6]
Where is the
60000
ms being set? Can I increase it? Thanks!
x
I think this is set at broker/server side. pinot.broker.timeoutMs https://docs.pinot.apache.org/configuration-reference/broker pinot.server.query.executor.timeout https://docs.pinot.apache.org/configuration-reference/server
g
Gotcha, thanks!
when i run the same query directly against the databse via the pinot ui, it runs and takes more than 60000ms. if its set at the broker level, wouldn’t it timeout there too?
k
Hi @User - isn’t this error coming from the
AsyncHttpClient
, which is being used by
JsonAsyncHttpPinotClientTransport
? If so, then the only way I see of changing the connection timeout is via system properties, e.g.
-Dcom.ning.http.client.AsyncHttpClientConfig.defaultConnectionTimeoutInMS=120000
, but I haven’t tried that. (also defaultRequestTimeoutInMS, I think)
x
ui side timeout parameter is carried with the query it self, so both broker and server side will override it for that query
hmmm
ah, you mean it’s http timeout
not the query timeout
k
I think so, based on the stack trace
x
hmmm
message has been deleted
from code, client side set 1000 days as timeout
in
JsonAsyncHttpPinotClientTransport.java
k
I think that’s the timeout for how long the
BrokerResponseFuture
will wait for the HTTP client to return a result (essentially unbounded). But I think the HTTP client is throwing the timeout exception here.
g
Is there any way I can up it?
k
See my earlier comment about changing via system properties. You’d need these set when starting whatever Java process is using the jdbc client
g
I see. Thanks!
Neither of the options above worked. I’m still getting the 60000 timeout when I set it to 120000 in my system properties
k
Hi @User - for a next step, I would try building your own version of the jdbc client jar, with a higher timeout, to confirm that solves the problem.
g
Ok I’ll try that!
Whats the main class in the JDBC? I need to pick one when I package it as a jar
k
I don’t think it has a main class… I just did a git clone of pinot, then
Copy code
cd pinot-clients/pinot-jdbc-client/
mvn package
and it built the
target/pinot-jdbc-client-0.8.0-SNAPSHOT.jar
file as expected.
So then if that jar is on your application’s class path (or you have it as a dependency for your project, and you build an uber jar) you’ll be able to use the client classes the same as before.
g
Ohhh ok cool!