You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2026/02/28 18:50:00 UTC

[jira] [Resolved] (HDDS-14673) Implement ScmEnumCodec without reflection.

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

Tsz-wo Sze resolved HDDS-14673.
-------------------------------
    Fix Version/s: 2.2.0
       Resolution: Fixed

The pull request is now merged.  Thanks, [~russole]!

> Implement ScmEnumCodec without reflection.
> ------------------------------------------
>
>                 Key: HDDS-14673
>                 URL: https://issues.apache.org/jira/browse/HDDS-14673
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: SCM HA
>            Reporter: Tsz-wo Sze
>            Assignee: Chen-Jheng Sing
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.2.0
>
>         Attachments: 9843_review.patch, 9843_review2.patch
>
>
> Since we don't need a similar codec for org.apache.ratis.thirdparty.com.google.protobuf.ProtocolMessageEnum,
> I suspect that ScmEnumCodec is not used at all.  We should try removing it from ScmCodecFactory.
> {code}
> +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/io/ScmCodecFactory.java
> @@ -40,7 +40,6 @@ public final class ScmCodecFactory {
>    static {
>      codecs.put(com.google.protobuf.Message.class, new ScmNonShadedGeneratedMessageCodec());
>      codecs.put(Message.class, new ScmGeneratedMessageCodec());
> -    codecs.put(ProtocolMessageEnum.class, new ScmEnumCodec());
>      codecs.put(List.class, new ScmListCodec());
> {code}
> If it is not used, just remove the entire ScmEnumCodec class.  Otherwise, we may discuss how to avoid reflection.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org