[ 
https://issues.apache.org/jira/browse/HDDS-12133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sadanand Shenoy resolved HDDS-12133.
------------------------------------
    Fix Version/s: 2.2.0
       Resolution: Fixed

> 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
>            Assignee: Sreeja
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 2.2.0
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to