Interface Executor
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ExecutorImpl
A gateway for communicating with Flink and other external systems.
-
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.static Executorcreate(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress address, String sessionId) Create anExecutorto execute commands.static Executorcreate(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress address, String sessionId, org.apache.flink.table.gateway.rest.util.RowFormat rowFormat) static Executorcreate(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, URL address, String sessionId) 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.
-
Method Details
-
create
static Executor create(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress address, String sessionId) Create anExecutorto execute commands. -
create
static Executor create(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, InetSocketAddress address, String sessionId, org.apache.flink.table.gateway.rest.util.RowFormat rowFormat) -
create
-
configureSession
Configures session with statement.- Parameters:
statement- to initialize the session
-
getSessionConfig
org.apache.flink.configuration.ReadableConfig getSessionConfig()Get the configuration of the session.- Returns:
- the session configuration.
-
getSessionConfigMap
Get the map configuration of the session.- Returns:
- the map session configuration.
-
executeStatement
Execute statement.- Parameters:
statement- to execute- Returns:
- Iterable results of the statement
-
completeStatement
Returns a list of completion hints for the given statement at the given position.- Parameters:
statement- Partial or slightly incorrect SQL statementposition- cursor position- Returns:
- completion hints that fit at the current cursor position
-
deployScript
Deploy script in application mode.- Parameters:
script- content to run in application modeuri- uri to the script- Returns:
- the cluster id
-
close
void close()Close theExecutorand process all exceptions.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-