@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) |
public OperationManager(ExecutorService service)
public OperationHandle submitOperation(Callable<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 OperationHandle submitOperation(java.util.function.Function<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(OperationHandle operationHandle)
operationHandle
- identifies the OperationManager.Operation
.public void closeOperation(OperationHandle operationHandle)
OperationManager.Operation
.operationHandle
- identifies the OperationManager.Operation
.public void awaitOperationTermination(OperationHandle operationHandle) throws Exception
Exception
public OperationInfo getOperationInfo(OperationHandle operationHandle)
OperationInfo
of the operation.operationHandle
- identifies the OperationManager.Operation
.public ResolvedSchema getOperationResultSchema(OperationHandle operationHandle) throws Exception
ResolvedSchema
of the operation.operationHandle
- identifies the OperationManager.Operation
.Exception
public ResultSet fetchResults(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 ResultSet fetchResults(OperationHandle operationHandle, FetchOrientation orientation, int maxRows)
public void close()
OperationManager
and all operations.@VisibleForTesting public int getOperationCount()
@VisibleForTesting public OperationManager.Operation getOperation(OperationHandle operationHandle)
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.