public interface Executor
| Modifier and Type | Method and Description |
|---|---|
void |
cancelQuery(SessionContext session,
String resultId)
Cancels a table program and stops the result retrieval.
|
List<String> |
completeStatement(SessionContext session,
String statement,
int position)
Returns a list of completion hints for the given statement at the given position.
|
ResultDescriptor |
executeQuery(SessionContext session,
String query)
Submits a Flink SQL query job (detached) and returns the result descriptor.
|
ProgramTargetDescriptor |
executeUpdate(SessionContext session,
String statement)
Submits a Flink SQL update statement such as INSERT INTO.
|
String |
explainStatement(SessionContext session,
String statement)
Returns a string-based explanation about AST and execution plan of the given statement.
|
Map<String,String> |
getSessionProperties(SessionContext session)
Lists all session properties that are defined by the executor and the session.
|
org.apache.flink.table.api.TableSchema |
getTableSchema(SessionContext session,
String name)
Returns the schema of a table.
|
List<String> |
listCatalogs(SessionContext session)
Lists all registered catalogs.
|
List<String> |
listDatabases(SessionContext session)
Lists all databases in the current catalog.
|
List<String> |
listTables(SessionContext session)
Lists all tables in the current database of the current catalog.
|
List<String> |
listUserDefinedFunctions(SessionContext session)
Lists all user-defined functions known to the executor.
|
TypedResult<List<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>>> |
retrieveResultChanges(SessionContext session,
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.
|
TypedResult<Integer> |
snapshotResult(SessionContext session,
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 |
stop(SessionContext session)
Stops the executor.
|
void |
useCatalog(SessionContext session,
String catalogName)
Sets a catalog with given name as the current catalog.
|
void |
useDatabase(SessionContext session,
String databaseName)
Sets a database with given name as the current database of the current catalog.
|
void |
validateSession(SessionContext session)
Validates the current session.
|
void start()
throws SqlExecutionException
SqlExecutionExceptionMap<String,String> getSessionProperties(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionList<String> listCatalogs(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionList<String> listDatabases(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionList<String> listTables(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionList<String> listUserDefinedFunctions(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionvoid useCatalog(SessionContext session, String catalogName) throws SqlExecutionException
SqlExecutionExceptionvoid useDatabase(SessionContext session, String databaseName) throws SqlExecutionException
SqlExecutionExceptionorg.apache.flink.table.api.TableSchema getTableSchema(SessionContext session, String name) throws SqlExecutionException
SqlExecutionExceptionString explainStatement(SessionContext session, String statement) throws SqlExecutionException
SqlExecutionExceptionList<String> completeStatement(SessionContext session, String statement, int position)
ResultDescriptor executeQuery(SessionContext session, String query) throws SqlExecutionException
SqlExecutionExceptionTypedResult<List<org.apache.flink.api.java.tuple.Tuple2<Boolean,org.apache.flink.types.Row>>> retrieveResultChanges(SessionContext session, String resultId) throws SqlExecutionException
SqlExecutionExceptionTypedResult<Integer> snapshotResult(SessionContext session, String resultId, int pageSize) throws SqlExecutionException
SqlExecutionExceptionList<org.apache.flink.types.Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException
SqlExecutionExceptionvoid cancelQuery(SessionContext session, String resultId) throws SqlExecutionException
SqlExecutionExceptionProgramTargetDescriptor executeUpdate(SessionContext session, String statement) throws SqlExecutionException
session - context in with the statement is executedstatement - SQL update statement (currently only INSERT INTO is supported)SqlExecutionExceptionvoid validateSession(SessionContext session) throws SqlExecutionException
SqlExecutionExceptionvoid stop(SessionContext session)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.