Class DelegatingInternalScanner
java.lang.Object
org.apache.hadoop.hbase.coprocessor.example.DelegatingInternalScanner
- All Implemented Interfaces:
Closeable
,AutoCloseable
,InternalScanner
A simple delegation for doing filtering on
InternalScanner
.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes the scanner and releases any resources it has allocatedboolean
next
(List<? super ExtendedCell> result, ScannerContext scannerContext) Grab the next row's worth of values.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.regionserver.InternalScanner
next
-
Field Details
-
scanner
-
-
Constructor Details
-
DelegatingInternalScanner
-
-
Method Details
-
next
public boolean next(List<? super ExtendedCell> result, ScannerContext scannerContext) throws IOException Description copied from interface:InternalScanner
Grab the next row's worth of values.The generic type for the output list
result
means we will only addExtendedCell
to it. This is useful for the code in HBase as we can pass List<ExtendedCell> here to avoid casting, but may cause some troubles for coprocessors which implement this method. In general, all cells created via theCellBuilder
are actuallyExtendedCell
s, so if you want to add something to theresult
list, you can just cast it toExtendedCell
, although it is marked as IA.Private.- Specified by:
next
in interfaceInternalScanner
- Parameters:
result
- return output array. We will only add ExtendedCell to this list, but for CP users, you'd better just useRawCell
asExtendedCell
is IA.Private.- Returns:
- true if more rows exist after this one, false if scanner is done
- Throws:
IOException
-
close
Description copied from interface:InternalScanner
Closes the scanner and releases any resources it has allocated- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceInternalScanner
- Throws:
IOException
-