HBASE-26340 TableSplit returns false size under 1MB (#3872)
Signed-off-by: Peter Somogyi <psomogyi@apache.org Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
29e37439f7
commit
471e398df0
|
@ -1748,6 +1748,7 @@ public class HRegionServer extends Thread implements
|
|||
int maxCompactedStoreFileRefCount = 0;
|
||||
int storeUncompressedSizeMB = 0;
|
||||
int storefileSizeMB = 0;
|
||||
long storefileSizeByte = 0L;
|
||||
int memstoreSizeMB = (int) (r.getMemStoreDataSize() / 1024 / 1024);
|
||||
long storefileIndexSizeKB = 0;
|
||||
int rootLevelIndexSizeKB = 0;
|
||||
|
@ -1765,7 +1766,7 @@ public class HRegionServer extends Thread implements
|
|||
maxCompactedStoreFileRefCount = Math.max(maxCompactedStoreFileRefCount,
|
||||
currentMaxCompactedStoreFileRefCount);
|
||||
storeUncompressedSizeMB += (int) (store.getStoreSizeUncompressed() / 1024 / 1024);
|
||||
storefileSizeMB += (int) (store.getStorefilesSize() / 1024 / 1024);
|
||||
storefileSizeByte += store.getStorefilesSize();
|
||||
//TODO: storefileIndexSizeKB is same with rootLevelIndexSizeKB?
|
||||
storefileIndexSizeKB += store.getStorefilesRootLevelIndexSize() / 1024;
|
||||
CompactionProgress progress = store.getCompactionProgress();
|
||||
|
@ -1777,6 +1778,9 @@ public class HRegionServer extends Thread implements
|
|||
totalStaticIndexSizeKB += (int) (store.getTotalStaticIndexSize() / 1024);
|
||||
totalStaticBloomSizeKB += (int) (store.getTotalStaticBloomSize() / 1024);
|
||||
}
|
||||
//HBASE-26340 Fix false "0" size under 1MB
|
||||
storefileSizeMB = storefileSizeByte > 0 && storefileSizeByte <= 1024 * 1024
|
||||
? 1 : (int) storefileSizeByte / 1024 / 1024;
|
||||
|
||||
HDFSBlocksDistribution hdfsBd = r.getHDFSBlocksDistribution();
|
||||
float dataLocality = hdfsBd.getBlockLocalityIndex(serverName.getHostname());
|
||||
|
|
Loading…
Reference in New Issue