Ethan Rose created HDDS-12133: --------------------------------- Summary: Define replication metrics task names and descriptions as constants to reuse in CommandHandler Key: HDDS-12133 URL: https://issues.apache.org/jira/browse/HDDS-12133 Project: Apache Ozone Issue Type: Improvement Components: Ozone Datanode Reporter: Ethan Rose
All command handlers for commands that go through the replication supervisor need to get metrics like invocation count and run time from the replication supervisor. Currently they are getting the name of the metrics to retrieve from the supervisor from the task, and this may be null if no task has been submitted yet. This results in many null checks in the code. The metrics name and description can be defined as static constants by the task so they can be retrieved directly without null checks. [Example|https://github.com/apache/ozone/blob/a0f0872fc88a6eb360c5460830e5ded21a17d8bb/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/ReconstructECContainersCommandHandler.java#L75] -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org