public class ResultFetcher extends Object
The fetcher uses the Iterator
model. It means every time fetch the result with the
current token, the fetcher will move forward and retire the old data.
After closes, the fetcher will not fetch the results from the remote but is able to return all data in the local cache.
Modifier and Type | Method and Description |
---|---|
void |
close() |
ResultSet |
fetchResults(FetchOrientation orientation,
int maxFetchSize) |
ResultSet |
fetchResults(long token,
int maxFetchSize)
Fetch results from the result store.
|
static ResultFetcher |
fromResults(OperationHandle operationHandle,
ResolvedSchema resultSchema,
List<RowData> results) |
static ResultFetcher |
fromResults(OperationHandle operationHandle,
ResolvedSchema resultSchema,
List<RowData> results,
JobID jobID,
ResultKind resultKind) |
static ResultFetcher |
fromTableResult(OperationHandle operationHandle,
TableResultInternal tableResult,
boolean isQueryResult) |
ResolvedSchema |
getResultSchema() |
ResultStore |
getResultStore() |
public static ResultFetcher fromTableResult(OperationHandle operationHandle, TableResultInternal tableResult, boolean isQueryResult)
public static ResultFetcher fromResults(OperationHandle operationHandle, ResolvedSchema resultSchema, List<RowData> results)
public static ResultFetcher fromResults(OperationHandle operationHandle, ResolvedSchema resultSchema, List<RowData> results, @Nullable JobID jobID, ResultKind resultKind)
public void close()
public ResolvedSchema getResultSchema()
public ResultSet fetchResults(FetchOrientation orientation, int maxFetchSize)
public ResultSet fetchResults(long token, int maxFetchSize)
ResultStore
. It's possible
multiple threads try to fetch results in parallel. To keep the data integration, use the
synchronized to allow only one thread can fetch the result at any time.@VisibleForTesting public ResultStore getResultStore()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.