public interface Executor
| Modifier and Type | Method and Description |
|---|---|
void |
cancelQuery(String sessionId,
String resultId)
Cancels a table program and stops the result retrieval.
|
void |
closeSession(String sessionId)
Close the resources of session for given session id.
|
List<String> |
completeStatement(String sessionId,
String statement,
int position)
Returns a list of completion hints for the given statement at the given position.
|
ResultDescriptor |
executeQuery(String sessionId,
String query)
Submits a Flink SQL query job (detached) and returns the result descriptor.
|
org.apache.flink.table.api.TableResult |
executeSql(String sessionId,
String statement)
Executes a SQL statement, and return
TableResult as execution result. |
ProgramTargetDescriptor |
executeUpdate(String sessionId,
String statement)
Submits a Flink SQL update statement such as INSERT INTO.
|
Map<String,String> |
getSessionProperties(String sessionId)
Lists all session properties that are defined by the executor and the session.
|
org.apache.flink.table.delegation.Parser |
getSqlParser(String sessionId)
Returns a sql parser instance.
|
List<String> |
listModules(String sessionId)
Lists all modules known to the executor in their loaded order.
|
String |
openSession(SessionContext session)
Open a new session by using the given
SessionContext. |
void |
resetSessionProperties(String sessionId)
Reset all the properties for the given session identifier.
|
TypedResult<List<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>>> |
retrieveResultChanges(String sessionId,
String resultId)
Asks for the next changelog results (non-blocking).
|
List<org.apache.flink.types.Row> |
retrieveResultPage(String resultId,
int page)
Returns the rows that are part of the current page or throws an exception if the snapshot has
been expired.
|
void |
setSessionProperty(String sessionId,
String key,
String value)
Set given key's session property to the specific value.
|
TypedResult<Integer> |
snapshotResult(String sessionId,
String resultId,
int pageSize)
Creates an immutable result snapshot of the running Flink job.
|
void |
start()
Starts the executor and ensures that its is ready for commands to be executed.
|
void start()
throws SqlExecutionException
SqlExecutionExceptionString openSession(SessionContext session) throws SqlExecutionException
SessionContext.session - context to create new session.SqlExecutionException - if any error happenvoid closeSession(String sessionId) throws SqlExecutionException
sessionId - session identifierSqlExecutionException - if any error happenMap<String,String> getSessionProperties(String sessionId) throws SqlExecutionException
SqlExecutionExceptionvoid resetSessionProperties(String sessionId) throws SqlExecutionException
sessionId - to identifier the sessionSqlExecutionException - if any error happen.void setSessionProperty(String sessionId, String key, String value) throws SqlExecutionException
key - of the session propertyvalue - of the session propertySqlExecutionException - if any error happen.org.apache.flink.table.api.TableResult executeSql(String sessionId, String statement) throws SqlExecutionException
TableResult as execution result.SqlExecutionExceptionList<String> listModules(String sessionId) throws SqlExecutionException
SqlExecutionExceptionorg.apache.flink.table.delegation.Parser getSqlParser(String sessionId)
List<String> completeStatement(String sessionId, String statement, int position)
ResultDescriptor executeQuery(String sessionId, String query) throws SqlExecutionException
SqlExecutionExceptionTypedResult<List<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>>> retrieveResultChanges(String sessionId, String resultId) throws SqlExecutionException
SqlExecutionExceptionTypedResult<Integer> snapshotResult(String sessionId, String resultId, int pageSize) throws SqlExecutionException
SqlExecutionExceptionList<org.apache.flink.types.Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException
SqlExecutionExceptionvoid cancelQuery(String sessionId, String resultId) throws SqlExecutionException
SqlExecutionExceptionProgramTargetDescriptor executeUpdate(String sessionId, String statement) throws SqlExecutionException
sessionId - to identify the user session.statement - SQL update statement (currently only INSERT INTO is supported)SqlExecutionExceptionCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.