arvindKandpal-ksolves opened a new pull request, #8882: URL: https://github.com/apache/hbase/pull/8882
### 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 - New test fails without the fix (NPE) and passes with it. - All hbtop tests pass; spotless passes. - Manual check on a local standalone cluster: forced the metrics call to fail with `-Dhbase.client.operation.timeout=1`. Before the fix, hbtop exited with the NPE. After the fix, it logged the error and showed data on the next refresh. -- 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]
