Class ExecutorImpl
java.lang.Object
org.apache.flink.table.client.gateway.ExecutorImpl
- All Implemented Interfaces:
Closeable,AutoCloseable,Executor
Executor to connect to
SqlGateway and execute statements.-
Constructor Summary
ConstructorsConstructorDescriptionExecutorImpl(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId) ExecutorImpl(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId, org.apache.flink.table.gateway.rest.util.RowFormat rowFormat) ExecutorImpl(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, URL gatewayUrl, String sessionId) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close theExecutorand process all exceptions.completeStatement(String statement, int position) Returns a list of completion hints for the given statement at the given position.voidconfigureSession(String statement) Configures session with statement.deployScript(String script, URI uri) Deploy script in application mode.executeStatement(String statement) Execute statement.org.apache.flink.configuration.ReadableConfigGet the configuration of the session.Get the map configuration of the session.org.apache.flink.table.gateway.api.session.SessionHandle
-
Constructor Details
-
ExecutorImpl
public ExecutorImpl(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId) -
ExecutorImpl
public ExecutorImpl(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress gatewayAddress, String sessionId, org.apache.flink.table.gateway.rest.util.RowFormat rowFormat) -
ExecutorImpl
-
-
Method Details
-
configureSession
Description copied from interface:ExecutorConfigures session with statement.- Specified by:
configureSessionin interfaceExecutor- Parameters:
statement- to initialize the session
-
getSessionConfig
public org.apache.flink.configuration.ReadableConfig getSessionConfig()Description copied from interface:ExecutorGet the configuration of the session.- Specified by:
getSessionConfigin interfaceExecutor- Returns:
- the session configuration.
-
getSessionConfigMap
Description copied from interface:ExecutorGet the map configuration of the session.- Specified by:
getSessionConfigMapin interfaceExecutor- Returns:
- the map session configuration.
-
executeStatement
Description copied from interface:ExecutorExecute statement.- Specified by:
executeStatementin interfaceExecutor- Parameters:
statement- to execute- Returns:
- Iterable results of the statement
-
completeStatement
Description copied from interface:ExecutorReturns a list of completion hints for the given statement at the given position.- Specified by:
completeStatementin interfaceExecutor- Parameters:
statement- Partial or slightly incorrect SQL statementposition- cursor position- Returns:
- completion hints that fit at the current cursor position
-
deployScript
Description copied from interface:ExecutorDeploy script in application mode.- Specified by:
deployScriptin interfaceExecutor- Parameters:
script- content to run in application modeuri- uri to the script- Returns:
- the cluster id
-
close
public void close()Description copied from interface:ExecutorClose theExecutorand process all exceptions. -
getSessionHandle
@VisibleForTesting public org.apache.flink.table.gateway.api.session.SessionHandle getSessionHandle()
-