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.
Constructor and Description |
---|
ResultFetcher(OperationHandle operationHandle,
ResolvedSchema resultSchema,
CloseableIterator<RowData> resultRows) |
ResultFetcher(OperationHandle operationHandle,
ResolvedSchema resultSchema,
List<RowData> rows) |
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.
|
ResolvedSchema |
getResultSchema() |
ResultStore |
getResultStore() |
public ResultFetcher(OperationHandle operationHandle, ResolvedSchema resultSchema, CloseableIterator<RowData> resultRows)
public ResultFetcher(OperationHandle operationHandle, ResolvedSchema resultSchema, List<RowData> rows)
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.