arvindKandpal-ksolves opened a new pull request, #8885:
URL: https://github.com/apache/hbase/pull/8885

   Backport to branch-2.5.
   
   ### Problem
   
   When the first `Admin#getClusterMetrics()` call fails, `TopScreenModel` 
keeps `records` and `summary` as `null`, and `TopScreenPresenter#refresh` 
throws a `NullPointerException` on `getRecords().size()`. hbtop exits with this 
NPE.
   
   ### Changes
   
   - `TopScreenModel`: initialize `records` to an empty list.
   - `TopScreenView`: skip the summary while no metrics have been fetched yet.
   - `TestTopScreenModel`: add a test where the first `getClusterMetrics()` 
call fails.
   
   With this change, hbtop logs the error and retries on the next refresh.
   
   ### Testing
   
   - Clean cherry-pick from master.
   - All hbtop tests pass on branch-2.5, including the new test; spotless 
passes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to