[ 
https://issues.apache.org/jira/browse/HBASE-17522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15843971#comment-15843971
 ] 

stack commented on HBASE-17522:
-------------------------------

Seems odd have MemorySizeUtil 'know' about LRU and Bucket Caches. Does it have 
to? (I do see this util class already had cache mentions going on).

nit: This could be a method?

207           long max = -1L;
208           try {
209             max = 
ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getMax();
210           } catch (RuntimeException exception) {
211             LOG.warn(JVM_HEAP_EXCEPTION, exception);
212           }

It is repeated four times in same class?

smaller nit: This is repeated too:

102       long usedHeap = -1L;
103       long maxHeap = -1L;
104       try {
105         final MemoryUsage heap = 
ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
106         maxHeap = heap.getMax();
107         usedHeap = heap.getUsed();
108       } catch (RuntimeException exception) {
109         final Log LOG = LogFactory.getLog(getClass());
110         LOG.warn(MemorySizeUtil.JVM_HEAP_EXCEPTION, exception);
111       }

Could return a pair?

Above is not important.

Otherwise patch is great [~busbey]

> RuntimeExceptions from MemoryMXBean should not take down server process
> -----------------------------------------------------------------------
>
>                 Key: HBASE-17522
>                 URL: https://issues.apache.org/jira/browse/HBASE-17522
>             Project: HBase
>          Issue Type: Bug
>          Components: regionserver
>         Environment: java version "1.8.0_92"
> Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
> Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)
> -XX:+UseG1GC -XX:+UseStringDeduplication -Xmx32768m
>            Reporter: Sean Busbey
>            Assignee: Sean Busbey
>             Fix For: 2.0.0, 1.4.0, 1.3.1, 1.2.5, 1.1.9
>
>         Attachments: HBASE-17522.0.patch
>
>
> RegionServer died after MemoryMXBean threw an IllegalArgumentException while 
> attempting to create a MemoryUsage object for the heap during construction of 
> the server load.
> We shouldn't allow failure to get load information to take down the RS.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to