Class RowStatisticsCompactionObserver.RowStatisticsScanner
- All Implemented Interfaces:
Closeable,AutoCloseable,InternalScanner,Shipper
- Enclosing class:
- RowStatisticsCompactionObserver
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RawCellBuilderprivate final RowStatisticsRecorderprivate Cellprivate final RegionCoprocessorEnvironmentprivate final RowStatisticsImplprivate final Counterprivate final Counterprivate final InternalScannerprivate final Shipper -
Constructor Summary
ConstructorsConstructorDescriptionRowStatisticsScanner(InternalScanner scanner, RowStatisticsImpl rowStatistics, RegionCoprocessorEnvironment regionEnv, RowStatisticsRecorder customRecorder) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the scanner and releases any resources it has allocatedprivate voidconsumeCells(List<? super ExtendedCell> result) booleannext(List<? super ExtendedCell> result) Grab the next row's worth of values.booleannext(List<? super ExtendedCell> result, ScannerContext scannerContext) Grab the next row's worth of values.private voidrecord()private booleanrowChanged(Cell cell) voidshipped()Called after a batch of rows scanned and set to be returned to client.
-
Field Details
-
scanner
-
shipper
-
rowStatistics
-
regionEnv
-
rowStatisticsDropped
-
rowStatisticsPutFailed
-
customRecorder
-
cellBuilder
-
lastCell
-
-
Constructor Details
-
RowStatisticsScanner
public RowStatisticsScanner(InternalScanner scanner, RowStatisticsImpl rowStatistics, RegionCoprocessorEnvironment regionEnv, RowStatisticsRecorder customRecorder)
-
-
Method Details
-
next
public boolean next(List<? super ExtendedCell> result, ScannerContext scannerContext) throws IOException Description copied from interface:InternalScannerGrab the next row's worth of values.The generic type for the output list
resultmeans we will only addExtendedCellto 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 theCellBuilderare actuallyExtendedCells, so if you want to add something to theresultlist, you can just cast it toExtendedCell, although it is marked as IA.Private.- Specified by:
nextin interfaceInternalScanner- Parameters:
result- return output array. We will only add ExtendedCell to this list, but for CP users, you'd better just useRawCellasExtendedCellis IA.Private.- Returns:
- true if more rows exist after this one, false if scanner is done
- Throws:
IOException
-
next
Description copied from interface:InternalScannerGrab the next row's worth of values.The generic type for the output list
resultmeans we will only addExtendedCellto 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 theCellBuilderare actuallyExtendedCells, so if you want to add something to theresultlist, you can just cast it toExtendedCell, although it is marked as IA.Private.- Specified by:
nextin interfaceInternalScanner- Parameters:
result- return output array. We will only add ExtendedCell to this list, but for CP users, you'd better just useRawCellasExtendedCellis IA.Private.- Returns:
- true if more rows exist after this one, false if scanner is done
- Throws:
IOException
-
close
Description copied from interface:InternalScannerCloses the scanner and releases any resources it has allocated- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceInternalScanner- Throws:
IOException
-
shipped
Description copied from interface:ShipperCalled after a batch of rows scanned and set to be returned to client. Any in between cleanup can be done here.- Specified by:
shippedin interfaceShipper- Throws:
IOException
-
consumeCells
-
rowChanged
-
record
-