Skip to content

HDDS-14018. Avoid repeated operations in SCMNodeManager#getNodeStatistics - #11292

Open
sarvekshayr wants to merge 3 commits into
apache:masterfrom
sarvekshayr:HDDS-14018
Open

sarvekshayr wants to merge 3 commits into
apache:masterfrom
sarvekshayr:HDDS-14018

Conversation

@sarvekshayr

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Improvements done for SCMNodeManager#getNodeStatistics:

  • avoid repeated getAllNodes() calls, store and reuse the list
  • avoid repeated iteration of nodes for nodeStateStatistics (by each get...NodeCount() method)
  • nodeUsageStatistics may base its calculations on values aggregated by nodeSpaceStatistics instead of iterating storage reports itself

What is the link to the Apache JIRA

HDDS-14018

How was this patch tested?

All the tests in TestSCMNodeManager passed.

…tics

HDDS-14018. Avoid repeated operations in SCMNodeManager#getNodeStatistics

Usie etAllNodes() in the remaining call sites
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant