Package org.apache.druid.client.broker
Interface BrokerClient
- All Known Implementing Classes:
BrokerClientImpl
public interface BrokerClient
High-level Broker client.
All methods return futures, enabling asynchronous logic. If you want a synchronous response, use
FutureUtils.get or FutureUtils.getUnchecked.
Futures resolve to exceptions in the manner described by ServiceClient.asyncRequest(org.apache.druid.rpc.RequestBuilder, org.apache.druid.java.util.http.client.response.HttpResponseHandler<IntermediateType, FinalType>).
ServiceClientModule.-
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.util.concurrent.ListenableFuture<List<ExplainPlan>>fetchExplainPlan(ClientSqlQuery sqlQuery) Fetches the explain plan for the givensqlQueryfrom the Broker's SQL task endpoint.com.google.common.util.concurrent.ListenableFuture<String>submitSqlQuery(ClientSqlQuery sqlQuery) Submit the givensqlQueryto the Broker's SQL query endpoint,/druid/v2/sql/.com.google.common.util.concurrent.ListenableFuture<SqlTaskStatus>submitSqlTask(ClientSqlQuery sqlQuery) Submit the givensqlQueryto the Broker's SQL task endpoint,/druid/v2/sql/task/.com.google.common.util.concurrent.ListenableFuture<Boolean>Updates the broker with the givenCoordinatorDynamicConfig.
-
Method Details
-
submitSqlQuery
Submit the givensqlQueryto the Broker's SQL query endpoint,/druid/v2/sql/. -
submitSqlTask
com.google.common.util.concurrent.ListenableFuture<SqlTaskStatus> submitSqlTask(ClientSqlQuery sqlQuery) Submit the givensqlQueryto the Broker's SQL task endpoint,/druid/v2/sql/task/. -
fetchExplainPlan
com.google.common.util.concurrent.ListenableFuture<List<ExplainPlan>> fetchExplainPlan(ClientSqlQuery sqlQuery) Fetches the explain plan for the givensqlQueryfrom the Broker's SQL task endpoint.- Parameters:
sqlQuery- the SQL query for which theEXPLAIN PLAN FORinformation is to be fetched
-
updateCoordinatorDynamicConfig
com.google.common.util.concurrent.ListenableFuture<Boolean> updateCoordinatorDynamicConfig(CoordinatorDynamicConfig config) Updates the broker with the givenCoordinatorDynamicConfig.
-