@Internal public class OperationManager extends Object
OperationManager.Operation.| Modifier and Type | Class and Description |
|---|---|
class |
OperationManager.Operation
Operation to manage the execution, results and so on.
|
| Constructor and Description |
|---|
OperationManager(ExecutorService service) |
| Modifier and Type | Method and Description |
|---|---|
void |
awaitOperationTermination(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle) |
void |
cancelOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
Cancel the execution of the operation.
|
void |
close()
Closes the
OperationManager and all operations. |
void |
closeOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
Close the operation and release all resources used by the
OperationManager.Operation. |
org.apache.flink.table.gateway.api.results.ResultSet |
fetchResults(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle,
org.apache.flink.table.gateway.api.results.FetchOrientation orientation,
int maxRows) |
org.apache.flink.table.gateway.api.results.ResultSet |
fetchResults(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle,
long token,
int maxRows)
Get the results of the operation.
|
OperationManager.Operation |
getOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle) |
int |
getOperationCount() |
org.apache.flink.table.gateway.api.results.OperationInfo |
getOperationInfo(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
Get the
OperationInfo of the operation. |
org.apache.flink.table.catalog.ResolvedSchema |
getOperationResultSchema(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
Get the
ResolvedSchema of the operation. |
org.apache.flink.table.gateway.api.operation.OperationHandle |
submitOperation(Callable<org.apache.flink.table.gateway.api.results.ResultSet> executor)
Submit the operation to the
OperationManager. |
org.apache.flink.table.gateway.api.operation.OperationHandle |
submitOperation(java.util.function.Function<org.apache.flink.table.gateway.api.operation.OperationHandle,ResultFetcher> fetcherSupplier)
Submit the operation to the
OperationManager. |
public OperationManager(ExecutorService service)
public org.apache.flink.table.gateway.api.operation.OperationHandle submitOperation(Callable<org.apache.flink.table.gateway.api.results.ResultSet> executor)
OperationManager. The OperationManager manages
the lifecycle of the OperationManager.Operation, including register resources, fire the execution and
so on.executor - Worker to execute.public org.apache.flink.table.gateway.api.operation.OperationHandle submitOperation(java.util.function.Function<org.apache.flink.table.gateway.api.operation.OperationHandle,ResultFetcher> fetcherSupplier)
OperationManager. The OperationManager manges the
lifecycle of the OperationManager.Operation, including register resources, fire the execution and so
on.fetcherSupplier - offer the fetcher to get the results.public void cancelOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
operationHandle - identifies the OperationManager.Operation.public void closeOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
OperationManager.Operation.operationHandle - identifies the OperationManager.Operation.public void awaitOperationTermination(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
throws Exception
Exceptionpublic org.apache.flink.table.gateway.api.results.OperationInfo getOperationInfo(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
OperationInfo of the operation.operationHandle - identifies the OperationManager.Operation.public org.apache.flink.table.catalog.ResolvedSchema getOperationResultSchema(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
throws Exception
ResolvedSchema of the operation.operationHandle - identifies the OperationManager.Operation.Exceptionpublic org.apache.flink.table.gateway.api.results.ResultSet fetchResults(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle,
long token,
int maxRows)
operationHandle - identifies the OperationManager.Operation.token - identifies which batch of data to fetch.maxRows - the maximum number of rows to fetch.public org.apache.flink.table.gateway.api.results.ResultSet fetchResults(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle,
org.apache.flink.table.gateway.api.results.FetchOrientation orientation,
int maxRows)
public void close()
OperationManager and all operations.@VisibleForTesting public int getOperationCount()
@VisibleForTesting public OperationManager.Operation getOperation(org.apache.flink.table.gateway.api.operation.OperationHandle operationHandle)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.