We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfa1b1f commit a401560Copy full SHA for a401560
hbase-server/src/main/java/org/apache/hadoop/hbase/io/util/MemorySizeUtil.java
@@ -243,7 +243,10 @@ public static long getOnHeapCacheSize(final Configuration conf) {
243
}
244
245
final MemoryUsage usage = safeGetHeapMemoryUsage();
246
- final long heapMax = usage != null ? usage.getMax() : -1;
+ if (usage == null) {
247
+ return -1;
248
+ }
249
+ final long heapMax = usage.getMax();
250
float onHeapCacheFixedSize =
251
(float) conf.getLong(HConstants.HFILE_ONHEAP_BLOCK_CACHE_FIXED_SIZE_KEY,
252
HConstants.HFILE_ONHEAP_BLOCK_CACHE_FIXED_SIZE_DEFAULT) / heapMax;
0 commit comments