Improve Presto support for dispatching queries (#10006)
* Follow HTTP 307 redirects when POSTing a query to Presto This is how the Presto team communicated on IRC to properly "dispatch" queries to Presto clusters, to enable replacing a cluster without impacting users of the cluster. * Ensure we talk to the correct Presto coordinator when cancelling a query The previous behaviour would build a cancellation URI from the query ID and the configured host (unless SSH tunneling is configured). This commit builds on that existing behaviour, replacing the host and port in the URI with ones extracted from the `infoUri` in the polling responses, but only if they match the ones configured in the datasource. This should not impact connections going over an SSH tunnel as sending the request over the SSH tunnel requires using a different host than the one configured.
Please register or sign in to comment