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 void
close()
Close theExecutor
and process all exceptions.List<String>
completeStatement(String statement, int position)
Returns a list of completion hints for the given statement at the given position.void
configureSession(String statement)
Configures session with statement.static Executor
create(DefaultContext defaultContext, InetSocketAddress address, String sessionId)
Create anExecutor
to execute commands.static Executor
create(DefaultContext defaultContext, InetSocketAddress address, String sessionId, RowFormat rowFormat)
static Executor
create(DefaultContext defaultContext, URL address, String sessionId)
StatementResult
executeStatement(String statement)
Execute statement.ReadableConfig
getSessionConfig()
Get the configuration of the session.Map<String,String>
getSessionConfigMap()
Get the map configuration of the session.
-
-
-
Method Detail
-
create
static Executor create(DefaultContext defaultContext, InetSocketAddress address, String sessionId)
Create anExecutor
to execute commands.
-
create
static Executor create(DefaultContext defaultContext, InetSocketAddress address, String sessionId, RowFormat rowFormat)
-
create
static Executor create(DefaultContext defaultContext, URL address, String sessionId)
-
configureSession
void configureSession(String statement)
Configures session with statement.- Parameters:
statement
- to initialize the session
-
getSessionConfig
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
-
close
void close()
Close theExecutor
and process all exceptions.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-