@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)
Deprecated.
|
S |
addColumnRangePredicatesRaw(byte[] predicateBytes)
Deprecated.
|
S |
addPredicate(KuduPredicate predicate)
Adds a predicate to the scan.
|
S |
batchSizeBytes(int batchSizeBytes)
Sets the maximum number of bytes returned by the scanner, on each batch.
|
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 |
prefetching(boolean prefetching)
Enables prefetching of rows for the scanner, i.e.
|
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 |
setProjectedColumnIndexes(List<Integer> columnIndexes)
Set which columns will be read by the Scanner.
|
S |
setProjectedColumnNames(List<String> columnNames)
Set which columns will be read by the Scanner.
|
S |
snapshotTimestampMicros(long timestamp)
Sets the timestamp the scan must be executed at, in microseconds since the Unix epoch.
|
public S readMode(AsyncKuduScanner.ReadMode readMode)
readMode
- a read mode for the scanner@Deprecated public S addColumnRangePredicate(ColumnRangePredicate predicate)
addPredicate(KuduPredicate)
predicate
- predicate for a column to add@Deprecated public S addColumnRangePredicatesRaw(byte[] predicateBytes)
addPredicate(org.apache.kudu.client.KuduPredicate)
ColumnRangePredicate.toByteArray(List)
.predicateBytes
- predicates to addIllegalArgumentException
- thrown when the passed bytes aren't validpublic S addPredicate(KuduPredicate predicate)
predicate
- predicate to addpublic S setProjectedColumnNames(List<String> columnNames)
setProjectedColumnIndexes(List)
will reset the projected
columns to those specified in columnNames
.columnNames
- the names of columns to read, or 'null' to read all columns
(the default)public S setProjectedColumnIndexes(List<Integer> columnIndexes)
setProjectedColumnNames(List)
will reset the projected
columns to those specified in columnIndexes
.columnIndexes
- the indexes of columns to read, or 'null' to read all columns
(the default)public S batchSizeBytes(int batchSizeBytes)
Kudu may actually return more than this many bytes because it will not truncate a rowResult in the middle.
batchSizeBytes
- a strictly positive number of bytespublic S limit(long limit)
limit
- a positive longpublic S prefetching(boolean prefetching)
nextRows()
). Disabled by default.
NOTE: This is risky until KUDU-1260 is resolved.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 snapshotTimestampMicros(long timestamp)
timestamp
- a long representing an instant in microseconds since the unix epoch.IllegalArgumentException
- on build(), if the timestamp is less than 0 or if the
read mode was not set to READ_AT_SNAPSHOTpublic 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 © 2016 The Apache Software Foundation. All rights reserved.