Class RowStatisticsImpl
java.lang.Object
org.apache.hadoop.hbase.coprocessor.example.row.stats.RowStatisticsImpl
- All Implemented Interfaces:
RowStatistics
Holder for accumulating row statistics in
RowStatisticsCompactionObserver Creates various
cell, row, and total stats.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longprivate intprivate intprivate final Stringprivate static final org.apache.hbase.thirdparty.com.google.gson.Gsonprivate final booleanprivate Cellprivate longprivate Cellprivate byte[]private intprivate longprivate Cellprivate static final org.slf4j.Loggerprivate final longprivate final Stringprivate longprivate intprivate final SizeBucketTrackerprivate intprivate final Stringprivate longprivate intprivate intprivate intprivate final SizeBucketTracker -
Constructor Summary
ConstructorsConstructorDescriptionRowStatisticsImpl(String table, String encodedRegion, String columnFamily, long blockSize, long maxCacheSize, boolean isMajor) -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hbase.thirdparty.com.google.gson.JsonObjectvoidconsumeCell(Cell cell) intintlongbyte[]intlongintgetTable()longintintintvoidhandleRowChanged(Cell lastCell) booleanisMajor()voidshipped(RawCellBuilder cellBuilder) Clone the cell refs so they can be cleaned up byShipper.shipped().toString()
-
Field Details
-
LOG
-
GSON
-
blockSize
-
maxCacheSize
-
rowCells
-
rowBytes
-
largestRow
-
largestCell
-
isMajor
-
rowSizeBuckets
-
valueSizeBuckets
-
largestRowRef
-
largestCellRef
-
table
-
region
-
columnFamily
-
largestRowNumBytes
-
largestRowCellsCount
-
largestCellNumBytes
-
cellsLargerThanOneBlockCount
-
rowsLargerThanOneBlockCount
-
cellsLargerThanMaxCacheSizeCount
-
totalDeletesCount
-
totalCellsCount
-
totalRowsCount
-
totalBytesCount
-
-
Constructor Details
-
RowStatisticsImpl
RowStatisticsImpl(String table, String encodedRegion, String columnFamily, long blockSize, long maxCacheSize, boolean isMajor)
-
-
Method Details
-
handleRowChanged
-
consumeCell
-
shipped
Clone the cell refs so they can be cleaned up byShipper.shipped(). Doing this lazily here, rather than eagerly in the above two methods can save us on some allocations. We might change the largestCell/largestRow multiple times between shipped() calls. -
getTable
- Specified by:
getTablein interfaceRowStatistics
-
getRegion
- Specified by:
getRegionin interfaceRowStatistics
-
getColumnFamily
- Specified by:
getColumnFamilyin interfaceRowStatistics
-
isMajor
- Specified by:
isMajorin interfaceRowStatistics
-
getLargestRow
-
getLargestRowAsString
- Specified by:
getLargestRowAsStringin interfaceRowStatistics
-
getLargestRowNumBytes
- Specified by:
getLargestRowNumBytesin interfaceRowStatistics
-
getLargestRowCellsCount
- Specified by:
getLargestRowCellsCountin interfaceRowStatistics
-
getLargestCell
-
getLargestCellAsString
- Specified by:
getLargestCellAsStringin interfaceRowStatistics
-
getLargestCellNumBytes
- Specified by:
getLargestCellNumBytesin interfaceRowStatistics
-
getCellsLargerThanOneBlockCount
- Specified by:
getCellsLargerThanOneBlockCountin interfaceRowStatistics
-
getRowsLargerThanOneBlockCount
- Specified by:
getRowsLargerThanOneBlockCountin interfaceRowStatistics
-
getCellsLargerThanMaxCacheSizeCount
- Specified by:
getCellsLargerThanMaxCacheSizeCountin interfaceRowStatistics
-
getTotalDeletesCount
- Specified by:
getTotalDeletesCountin interfaceRowStatistics
-
getTotalCellsCount
- Specified by:
getTotalCellsCountin interfaceRowStatistics
-
getTotalRowsCount
- Specified by:
getTotalRowsCountin interfaceRowStatistics
-
getTotalBytes
- Specified by:
getTotalBytesin interfaceRowStatistics
-
getRowSizeBuckets
- Specified by:
getRowSizeBucketsin interfaceRowStatistics
-
getValueSizeBuckets
- Specified by:
getValueSizeBucketsin interfaceRowStatistics
-
toString
-
getJsonString
- Specified by:
getJsonStringin interfaceRowStatistics
-
buildLargestCellPartsJson
-