Class SqlExecutionReporter

java.lang.Object
org.apache.druid.sql.SqlExecutionReporter

public class SqlExecutionReporter extends Object
Side-car class which reports logs and metrics for an HttpStatement. This separate class cleanly separates the logic for running a query from the logic for reporting on that run. A query can end either with a success or error. This object is created in the request thread, with the remaining method called either from the request or response thread, but not both.
  • Constructor Details

  • Method Details

    • failed

      public void failed(Throwable e)
      Report a query failure with an unknown number of byte written. The sqlQuery/bytes metric will not be emitted.
    • failed

      public void failed(Throwable e, long bytesWritten)
      Report a query failure with a known number of byte written. It will be emitted as sqlQuery/bytes.
    • succeeded

      public void succeeded(long bytesWritten)
    • planningTimeNanos

      public void planningTimeNanos(long planningTimeNanos)
    • emit

      public void emit()