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

Hudson commented on HBASE-16855:
--------------------------------

FAILURE: Integrated in Jenkins build HBase-1.4 #475 (See 
[https://builds.apache.org/job/HBase-1.4/475/])
HBASE-16855 Avoid NPE in MetricsConnection’s construction (ChiaPing (tedyu: rev 
6df7554d299ce72e6d8dca35c5de119a47f5594d)
* (edit) 
hbase-client/src/main/java/org/apache/hadoop/hbase/client/MetricsConnection.java
* (edit) 
hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestMetricsConnection.java


> Avoid NPE in MetricsConnection’s construction
> ---------------------------------------------
>
>                 Key: HBASE-16855
>                 URL: https://issues.apache.org/jira/browse/HBASE-16855
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0
>            Reporter: ChiaPing Tsai
>            Assignee: ChiaPing Tsai
>            Priority: Minor
>             Fix For: 2.0.0, 1.4.0
>
>         Attachments: HBASE-16855.branch-1.v0.patch, HBASE-16855.v0.patch, 
> HBASE-16855.v1.patch
>
>
> a) The batch pool may not be assigned a value in the ConnectionImpl’s 
> construction.
> b) The meta pool always be null in the ConnectionImpl’s construction.
> For reasons outlined above, the NPE may happen in MetricsConnection’s 
> construction
> {noformat}
>     final ThreadPoolExecutor batchPool = (ThreadPoolExecutor) 
> conn.getCurrentBatchPool();
>     final ThreadPoolExecutor metaPool = (ThreadPoolExecutor) 
> conn.getCurrentMetaLookupPool();
>     this.registry.register(name(this.getClass(), "executorPoolActiveThreads", 
> scope),
>         new RatioGauge() {
>           @Override
>           protected Ratio getRatio() {
>             return Ratio.of(batchPool.getActiveCount(), 
> batchPool.getMaximumPoolSize());
>           }
>         });
>     this.registry.register(name(this.getClass(), "metaPoolActiveThreads", 
> scope),
>         new RatioGauge() {
>           @Override
>           protected Ratio getRatio() {
>             return Ratio.of(metaPool.getActiveCount(), 
> metaPool.getMaximumPoolSize());
>           }
>         });
> {noformat}



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

Reply via email to