[
https://issues.apache.org/jira/browse/HDDS-14846?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved HDDS-14846.
-------------------------------
Fix Version/s: 2.2.0
Resolution: Fixed
The pull request is now merged. Thanks, [~russole]!
> Implement ScmCodecFactory without reflection.
> ---------------------------------------------
>
> Key: HDDS-14846
> URL: https://issues.apache.org/jira/browse/HDDS-14846
> 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: 9952_review.patch, 9952_review2.patch
>
>
> - The getCodec(Class) method in ScmCodecFactory uses reflection to get all
> super classes/interfaces.
> - It also forces the callers to use reflection in order get the class.
> We should change the method to take a String and then use the
> ClassResolver to resolve the Class.
> BTW, we should also change ScmCodecFactory to singleton, i.e. change
> the codecs map to non-static and add a static field (similar to Java
> [Runtime|https://github.com/openjdk/jdk8u/blob/cb212803aa1132023e18935cbebec818fecb607f/jdk/src/share/classes/java/lang/Runtime.java#L47]).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]