Class BrokerClientImpl

java.lang.Object
org.apache.druid.client.broker.BrokerClientImpl
All Implemented Interfaces:
BrokerClient

public class BrokerClientImpl extends Object implements BrokerClient
  • Constructor Details

    • BrokerClientImpl

      public BrokerClientImpl(ServiceClient client, com.fasterxml.jackson.databind.ObjectMapper jsonMapper)
  • Method Details

    • submitNativeQuery

      public com.google.common.util.concurrent.ListenableFuture<String> submitNativeQuery(Query<?> query)
      Description copied from interface: BrokerClient
      Submits the given query to the /druid/v2 endpoint of a Broker.
      Specified by:
      submitNativeQuery in interface BrokerClient
    • submitSqlQuery

      public com.google.common.util.concurrent.ListenableFuture<String> submitSqlQuery(ClientSqlQuery sqlQuery)
      Description copied from interface: BrokerClient
      Submit the given sqlQuery to the Broker's SQL query endpoint, /druid/v2/sql/.
      Specified by:
      submitSqlQuery in interface BrokerClient
    • submitSqlTask

      public com.google.common.util.concurrent.ListenableFuture<SqlTaskStatus> submitSqlTask(ClientSqlQuery sqlQuery)
      Description copied from interface: BrokerClient
      Submit the given sqlQuery to the Broker's SQL task endpoint, /druid/v2/sql/task/.
      Specified by:
      submitSqlTask in interface BrokerClient
    • fetchExplainPlan

      public com.google.common.util.concurrent.ListenableFuture<List<ExplainPlan>> fetchExplainPlan(ClientSqlQuery sqlQuery)
      Description copied from interface: BrokerClient
      Fetches the explain plan for the given sqlQuery from the Broker's SQL task endpoint.
      Specified by:
      fetchExplainPlan in interface BrokerClient
      Parameters:
      sqlQuery - the SQL query for which the EXPLAIN PLAN FOR information is to be fetched
    • updateCoordinatorDynamicConfig

      public com.google.common.util.concurrent.ListenableFuture<Boolean> updateCoordinatorDynamicConfig(CoordinatorDynamicConfig config)
      Description copied from interface: BrokerClient
      Updates the broker with the given CoordinatorDynamicConfig.
      Specified by:
      updateCoordinatorDynamicConfig in interface BrokerClient
    • updateBrokerDynamicConfig

      public com.google.common.util.concurrent.ListenableFuture<Boolean> updateBrokerDynamicConfig(BrokerDynamicConfig config)
      Description copied from interface: BrokerClient
      Updates the broker with the given BrokerDynamicConfig.
      Specified by:
      updateBrokerDynamicConfig in interface BrokerClient
    • getQueryReport

      public com.google.common.util.concurrent.ListenableFuture<String> getQueryReport(String sqlQueryId, boolean selfOnly)
      Description copied from interface: BrokerClient
      Gets the report for a SQL query by its SQL query ID.
      Specified by:
      getQueryReport in interface BrokerClient
      Parameters:
      sqlQueryId - the SQL query ID
      selfOnly - if true, only check the local broker; if false, check all brokers
      Returns:
      JSON response from the report API
    • cancelSqlQuery

      public com.google.common.util.concurrent.ListenableFuture<Boolean> cancelSqlQuery(String sqlQueryId)
      Description copied from interface: BrokerClient
      Cancels a SQL query by its SQL query ID.
      Specified by:
      cancelSqlQuery in interface BrokerClient
      Parameters:
      sqlQueryId - the SQL query ID to cancel
      Returns:
      true if the cancellation was accepted