Hi folks, quick question: using the pinot-java-cli...
# troubleshooting
a
Hi folks, quick question: using the pinot-java-client with broker-list
JsonAsyncHttpPinotClientTransport
am I supposed to reuse a single
Connection
across all query requests, or create a new
Connection
from the
ConnectionFactory
for each query? Or in other words, is the http connection pool held by the
Connection
instance, or the
ConnectionFactory
?
I see the transport holds the pool. Still, is a
Connection
to be used concurrently, and is it thread safe? Or am I supposed to create a new one for every query and/or every thread?
s
Connection
should be thread safe to use and share. Although, even if you create > 1
Connection
objects, they'll share a singleton
JsonAsyncHttpPinotClientTransport
instance, hence your application will only ever create 1 http client. Although reusing
Connection
should work too. cc: @Kartik Khare for more