@InterfaceAudience.Public @InterfaceStability.Evolving public abstract class AbstractKuduScannerBuilder<S extends AbstractKuduScannerBuilder<? super S,T>,T> extends Object
Modifier and Type | Method and Description |
---|---|
S |
addColumnRangePredicate(ColumnRangePredicate predicate)
Adds a predicate for a column.
|
S |
addColumnRangePredicatesRaw(byte[] predicateBytes)
Adds a list of predicates in their raw format,
as given by
ColumnRangePredicate.toByteArray(List) . |
abstract T |
build() |
S |
cacheBlocks(boolean cacheBlocks)
Sets the block caching policy for the scanner.
|
S |
exclusiveUpperBound(PartialRow partialRow)
Add an upper bound (exclusive) primary key for the scan.
|
S |
exclusiveUpperBoundRaw(byte[] endPrimaryKey)
Deprecated.
|
S |
limit(long limit)
Sets a limit on the number of rows that will be returned by the scanner.
|
S |
lowerBound(PartialRow partialRow)
Add a lower bound (inclusive) primary key for the scan.
|
S |
lowerBoundRaw(byte[] startPrimaryKey)
Deprecated.
|
S |
maxNumBytes(int maxNumBytes)
Sets the maximum number of bytes returned at once by the scanner.
|
S |
prefetching(boolean prefetching)
Enables prefetching of rows for the scanner, disabled by default.
|
S |
readMode(AsyncKuduScanner.ReadMode readMode)
Sets the read mode, the default is to read the latest values.
|
S |
scanRequestTimeout(long scanRequestTimeout)
Sets how long each scan request to a server can last.
|
S |
setProjectedColumnNames(List<String> columnNames)
Set which columns will be read by the Scanner.
|
public S readMode(AsyncKuduScanner.ReadMode readMode)
readMode
- a read mode for the scannerpublic S addColumnRangePredicate(ColumnRangePredicate predicate)
predicate
- predicate for a column to addpublic S addColumnRangePredicatesRaw(byte[] predicateBytes)
ColumnRangePredicate.toByteArray(List)
.predicateBytes
- predicates to addIllegalArgumentException
- thrown when the passed bytes aren't validpublic S setProjectedColumnNames(List<String> columnNames)
columnNames
- the names of columns to read, or 'null' to read all columns
(the default)public S maxNumBytes(int maxNumBytes)
Kudu may actually return more than this many bytes because it will not truncate a rowResult in the middle.
maxNumBytes
- a strictly positive number of bytespublic S limit(long limit)
limit
- a positive longpublic S prefetching(boolean prefetching)
prefetching
- a boolean that indicates if the scanner should prefetch rowspublic S cacheBlocks(boolean cacheBlocks)
cacheBlocks
- a boolean that indicates if data blocks should be cached or notpublic S scanRequestTimeout(long scanRequestTimeout)
KuduClient.getDefaultOperationTimeoutMs()
.scanRequestTimeout
- a long representing time in millisecondspublic S lowerBound(PartialRow partialRow)
partialRow
- a partial row with specified key columns@Deprecated public S lowerBoundRaw(byte[] startPrimaryKey)
lowerBound(PartialRow)
startPrimaryKey
- bytes containing an encoded start keypublic S exclusiveUpperBound(PartialRow partialRow)
partialRow
- a partial row with specified key columns@Deprecated public S exclusiveUpperBoundRaw(byte[] endPrimaryKey)
exclusiveUpperBound(PartialRow)
endPrimaryKey
- bytes containing an encoded end keypublic abstract T build()
Copyright © 2015. All rights reserved.