Package org.apache.druid.sql
Class HttpStatement
java.lang.Object
org.apache.druid.sql.AbstractStatement
org.apache.druid.sql.DirectStatement
org.apache.druid.sql.HttpStatement
- All Implemented Interfaces:
Closeable,AutoCloseable,SqlLifecycleManager.Cancelable
SQL statement lifecycle for the HTTP endpoint. The request thread
creates the object and calls
DirectStatement.execute(). The response thread
reads results and inspects the statement contents to emit logs and
metrics. The object is transferred between threads, with no overlapping
access.
The key extension of an HTTP statement is the use of the HTTP request for authorization.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.druid.sql.DirectStatement
DirectStatement.ResultSet -
Field Summary
Fields inherited from class org.apache.druid.sql.DirectStatement
prepareResult, resultSetFields inherited from class org.apache.druid.sql.AbstractStatement
authContextKeys, authResult, hook, plannerContext, queryContext, queryPlus, reporter, sqlToolbox -
Constructor Summary
ConstructorsConstructorDescriptionHttpStatement(SqlToolbox lifecycleToolbox, SqlQueryPlus sqlQueryPlus, javax.servlet.http.HttpServletRequest req) -
Method Summary
Modifier and TypeMethodDescriptionprotected Function<Set<ResourceAction>,AuthorizationResult> Returns an authorizer that can provide authorization result given a set of required resource actions and authentication result.protected DruidPlannerMethods inherited from class org.apache.druid.sql.DirectStatement
cancel, close, closeQuietly, closeWithError, createPlan, createResultSet, execute, plan, prepareResultMethods inherited from class org.apache.druid.sql.AbstractStatement
allResources, authorize, context, query, reporter, resources, setHook, sqlQueryId, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.druid.sql.SqlLifecycleManager.Cancelable
resources
-
Constructor Details
-
HttpStatement
public HttpStatement(SqlToolbox lifecycleToolbox, SqlQueryPlus sqlQueryPlus, javax.servlet.http.HttpServletRequest req)
-
-
Method Details
-
createPlanner
- Overrides:
createPlannerin classDirectStatement
-
authorizer
Description copied from class:AbstractStatementReturns an authorizer that can provide authorization result given a set of required resource actions and authentication result.- Overrides:
authorizerin classAbstractStatement
-