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>).

Typically acquired via Guice, where it is registered using ServiceClientModule.
  • Method Details

    • submitSqlQuery

      com.google.common.util.concurrent.ListenableFuture<String> submitSqlQuery(ClientSqlQuery sqlQuery)
      Submit the given sqlQuery to the Broker's SQL query endpoint, /druid/v2/sql/.
    • submitSqlTask

      com.google.common.util.concurrent.ListenableFuture<SqlTaskStatus> submitSqlTask(ClientSqlQuery sqlQuery)
      Submit the given sqlQuery to 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 given sqlQuery from the Broker's SQL task endpoint.
      Parameters:
      sqlQuery - the SQL query for which the EXPLAIN PLAN FOR information is to be fetched
    • updateCoordinatorDynamicConfig

      com.google.common.util.concurrent.ListenableFuture<Boolean> updateCoordinatorDynamicConfig(CoordinatorDynamicConfig config)
      Updates the broker with the given CoordinatorDynamicConfig.