Skip to content

HDDS-14709. Initialize AbstractReplicationTask metrics during start up.#9819

Open
aswinshakil wants to merge 1 commit intoapache:masterfrom
aswinshakil:HDDS-14709
Open

HDDS-14709. Initialize AbstractReplicationTask metrics during start up.#9819
aswinshakil wants to merge 1 commit intoapache:masterfrom
aswinshakil:HDDS-14709

Conversation

@aswinshakil
Copy link
Member

What changes were proposed in this pull request?

Right now the metrics for all AbstractReplicationTask is only created only when each Task is added to the queue.
All the metrics should be initialized to 0 during startup rather than only being added when each Task is added.

What is the link to the Apache JIRA

HDDS-14709

How was this patch tested?

Existing Tests.

Comment on lines +267 to +271
task.getClass().getSimpleName());
}

public void initCounters(String metricName, String metricDescriptionSegment,
String taskSimpleName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to pass the class itself instead of its name. This would retain previous behavior of not having to call getSimpleName() for each task in the common case that metrics are already initialized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants