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
Modifier and TypeFieldDescriptionprivate final long
private int
private int
private final String
private static final org.apache.hbase.thirdparty.com.google.gson.Gson
private final boolean
private Cell
private long
private Cell
private byte[]
private int
private long
private Cell
private static final org.slf4j.Logger
private final long
private final String
private long
private int
private final SizeBucketTracker
private int
private final String
private long
private int
private int
private int
private final SizeBucketTracker
-
Constructor Summary
ConstructorDescriptionRowStatisticsImpl
(String table, String encodedRegion, String columnFamily, long blockSize, long maxCacheSize, boolean isMajor) -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hbase.thirdparty.com.google.gson.JsonObject
void
consumeCell
(Cell cell) int
int
long
byte[]
int
long
int
getTable()
long
int
int
int
void
handleRowChanged
(Cell lastCell) boolean
isMajor()
void
shipped
(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:
getTable
in interfaceRowStatistics
-
getRegion
- Specified by:
getRegion
in interfaceRowStatistics
-
getColumnFamily
- Specified by:
getColumnFamily
in interfaceRowStatistics
-
isMajor
- Specified by:
isMajor
in interfaceRowStatistics
-
getLargestRow
-
getLargestRowAsString
- Specified by:
getLargestRowAsString
in interfaceRowStatistics
-
getLargestRowNumBytes
- Specified by:
getLargestRowNumBytes
in interfaceRowStatistics
-
getLargestRowCellsCount
- Specified by:
getLargestRowCellsCount
in interfaceRowStatistics
-
getLargestCell
-
getLargestCellAsString
- Specified by:
getLargestCellAsString
in interfaceRowStatistics
-
getLargestCellNumBytes
- Specified by:
getLargestCellNumBytes
in interfaceRowStatistics
-
getCellsLargerThanOneBlockCount
- Specified by:
getCellsLargerThanOneBlockCount
in interfaceRowStatistics
-
getRowsLargerThanOneBlockCount
- Specified by:
getRowsLargerThanOneBlockCount
in interfaceRowStatistics
-
getCellsLargerThanMaxCacheSizeCount
- Specified by:
getCellsLargerThanMaxCacheSizeCount
in interfaceRowStatistics
-
getTotalDeletesCount
- Specified by:
getTotalDeletesCount
in interfaceRowStatistics
-
getTotalCellsCount
- Specified by:
getTotalCellsCount
in interfaceRowStatistics
-
getTotalRowsCount
- Specified by:
getTotalRowsCount
in interfaceRowStatistics
-
getTotalBytes
- Specified by:
getTotalBytes
in interfaceRowStatistics
-
getRowSizeBuckets
- Specified by:
getRowSizeBuckets
in interfaceRowStatistics
-
getValueSizeBuckets
- Specified by:
getValueSizeBuckets
in interfaceRowStatistics
-
toString
-
getJsonString
- Specified by:
getJsonString
in interfaceRowStatistics
-
buildLargestCellPartsJson
-