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.
|
TableSchema |
getTableSchema(SessionContext session,
String name)
Returns the schema of a table.
|
List<String> |
listTables(SessionContext session)
Lists all tables known to the executor.
|
List<String> |
listUserDefinedFunctions(SessionContext session)
Lists all user-defined functions known to the executor.
|
TypedResult<List<Tuple2<Boolean,Row>>> |
retrieveResultChanges(SessionContext session,
String resultId)
Asks for the next changelog results (non-blocking).
|
List<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 |
validateSession(SessionContext session)
Validates the current session.
|
void start() throws SqlExecutionException
SqlExecutionException
Map<String,String> getSessionProperties(SessionContext session) throws SqlExecutionException
SqlExecutionException
List<String> listTables(SessionContext session) throws SqlExecutionException
SqlExecutionException
List<String> listUserDefinedFunctions(SessionContext session) throws SqlExecutionException
SqlExecutionException
TableSchema getTableSchema(SessionContext session, String name) throws SqlExecutionException
SqlExecutionException
String explainStatement(SessionContext session, String statement) throws SqlExecutionException
SqlExecutionException
List<String> completeStatement(SessionContext session, String statement, int position)
ResultDescriptor executeQuery(SessionContext session, String query) throws SqlExecutionException
SqlExecutionException
TypedResult<List<Tuple2<Boolean,Row>>> retrieveResultChanges(SessionContext session, String resultId) throws SqlExecutionException
SqlExecutionException
TypedResult<Integer> snapshotResult(SessionContext session, String resultId, int pageSize) throws SqlExecutionException
SqlExecutionException
List<Row> retrieveResultPage(String resultId, int page) throws SqlExecutionException
SqlExecutionException
void cancelQuery(SessionContext session, String resultId) throws SqlExecutionException
SqlExecutionException
ProgramTargetDescriptor executeUpdate(SessionContext session, String statement) throws SqlExecutionException
session
- context in with the statement is executedstatement
- SQL update statement (currently only INSERT INTO is supported)SqlExecutionException
void validateSession(SessionContext session) throws SqlExecutionException
SqlExecutionException
void stop(SessionContext session)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.