Interface Executor
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ExecutorImpl
public interface Executor extends Closeable
A gateway for communicating with Flink and other external systems.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close theExecutorand process all exceptions.List<String>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)StringdeployScript(String script, URI uri)Deploy script in application mode.StatementResultexecuteStatement(String statement)Execute statement.org.apache.flink.configuration.ReadableConfiggetSessionConfig()Get the configuration of the session.Map<String,String>getSessionConfigMap()Get the map configuration of the session.
-
-
-
Method Detail
-
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
static Executor create(org.apache.flink.table.gateway.service.context.DefaultContext defaultContext, URL address, String sessionId)
-
configureSession
void configureSession(String statement)
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
Map<String,String> getSessionConfigMap()
Get the map configuration of the session.- Returns:
- the map session configuration.
-
executeStatement
StatementResult executeStatement(String statement)
Execute statement.- Parameters:
statement- to execute- Returns:
- Iterable results of the statement
-
completeStatement
List<String> completeStatement(String statement, int position)
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
String deployScript(@Nullable String script, @Nullable URI uri)
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
-
-