[
https://issues.apache.org/jira/browse/HBASE-30541?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
guluo resolved HBASE-30541.
---------------------------
Fix Version/s: 4.0.0-alpha-1
2.7.0
3.1.0
3.0.1
2.6.8
2.5.17
Resolution: Fixed
> [hbtop] NPE when the first getClusterMetrics() call fails
> ---------------------------------------------------------
>
> Key: HBASE-30541
> URL: https://issues.apache.org/jira/browse/HBASE-30541
> Project: HBase
> Issue Type: Bug
> Components: hbtop
> Reporter: Arvind Kandpal
> Assignee: Arvind Kandpal
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1, 2.7.0, 3.1.0, 3.0.1, 2.6.8, 2.5.17
>
>
> When the first call to Admin#getClusterMetrics() fails,
> TopScreenModel#refreshMetricsData logs the error and returns, so records and
> summary stay null. TopScreenPresenter#refresh then calls getRecords().size()
> and throws a NullPointerException. The first refresh runs outside the
> try/catch in Screen#run, so hbtop exits with:
> {code}
> java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because
> the return value of
> "org.apache.hadoop.hbase.hbtop.screen.top.TopScreenModel.getRecords()" is
> null at
> org.apache.hadoop.hbase.hbtop.screen.top.TopScreenPresenter.refresh(TopScreenPresenter.java:108)
> {code}
> This happens when the connection succeeds but the cluster metrics call fails,
> for example while the master is initializing or on an RPC timeout.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)