public class PartiallyFetchedInMemoryResultSet extends InMemoryResultSet
getPreFetchedRows() can be used for streaming
while the persistence logic can iterate over complete result set using hasNext() and next().
Note
Streaming and persistence can occur concurrently irrespective of the underlying InMemoryResultSet
implementation.
Streaming of partial results is not supported at server level as of now.| Constructor and Description |
|---|
PartiallyFetchedInMemoryResultSet(InMemoryResultSet inMemoryRS,
int reqPreFetchSize)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canBePurged() |
LensResultSetMetadata |
getMetadata()
Get the result set metadata
|
List<ResultRow> |
getPreFetchedRows() |
boolean |
hasNext()
Whether there is another result row available.
|
boolean |
isComplteleyFetched()
Indicates whether the underlying in-memory result has been completely pre-fetched and kept in memory.
|
ResultRow |
next()
Read the next result row.
|
void |
setFetchSize(int size)
Set number of rows to be fetched at time
|
void |
setFullyAccessed(boolean fullyAccessed) |
Integer |
size()
Get the size of the result set.
|
getCreationTime, getOutputPath, isHttpResultAvailable, toQueryResultpublic PartiallyFetchedInMemoryResultSet(InMemoryResultSet inMemoryRS, int reqPreFetchSize) throws LensException
inMemoryRS - : Underlying in-memory result setreqPreFetchSize - : requested number of rows to be pre-fetched and cached.LensExceptionpublic boolean hasNext()
throws LensException
InMemoryResultSethasNext in class InMemoryResultSetLensException - the lens exceptionpublic ResultRow next() throws LensException
InMemoryResultSetnext in class InMemoryResultSetLensException - the lens exceptionpublic void setFetchSize(int size)
throws LensException
InMemoryResultSetsetFetchSize in class InMemoryResultSetLensExceptionpublic Integer size() throws LensException
LensResultSetsize in class LensResultSetLensException - the lens exceptionpublic LensResultSetMetadata getMetadata() throws LensException
LensResultSetgetMetadata in class LensResultSetLensResultSetMetadataLensExceptionpublic boolean canBePurged()
canBePurged in class InMemoryResultSetpublic void setFullyAccessed(boolean fullyAccessed)
setFullyAccessed in class InMemoryResultSet@Generated(value="lombok") public boolean isComplteleyFetched()
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.