I tried locally to execute query via broker throug...
# general
a
I tried locally to execute query via broker through the command below. curl -H “Content-Type: application/json” -X POST -d ‘{“sql”:“select * from action limit 1”}’ http://pinot.broker.eks0.auw:80/query/sql This pinot cluster is deployed in K8s cluster and we have 4 brokers in this pinot cluster. http://pinot.broker.eks0.auw:80 is the exposed broker gateway address. This table named action here is configured to tenant named tenanta which has only one broker. When I run the above command, I can get the right results sometimes. But most of the time, the following error returned. org.apache.pinot.client.PinotClientException: Query had processing exceptions: [{“message”“BrokerResourceMissingError”,“errorCode”410}] at org.apache.pinot.client.Connection.execute(Connection.java:127) at com.bigdata.PinotJava.main(PinotJava.java:53) Is there some configuration I’m missing here for this issue? Any idea how to fix it?
x
hi, for your case, you need to create a new service e.g.
pinot-broker-tenanta
with different node selector to pick the right pinot broker. Then you can query the exposed service or loadbalancer for that pinot broker. Current k8s setup is for pure shared tenant.
👌 1
a
Hi, since sometimes this command could return the right result, is it because the table tenant is matched that time? I mean, in my test, I got one time right, and three times ‘BrokerResourceMissingError’, and it followed this pattern when I tried more times. So, is there a possibility to set tenant as a command parameter?
x
yes, in your case, you have 4 brokers, out of them, 1 is tenantA. Since you loadbalancer is on top of all broker instances, it’s 25% possibility that you will reach tenantA when calling the load balancer, .
if you check k8s, you will find that there is a service like pinot-broker and it matches all the 4 brokers behind
so, you can create a new k8s service and in that, you configure the pod name matching to tenantA
then you can expose that service out
a
👍Thank you so much.
x
Meanwhile I think the inter-cluster broker routing will be a good feature to add, I will create a github issue to track as well
a
Wonderful.👍