Gargi-jais11 commented on code in PR #9789:
URL: https://github.com/apache/ozone/pull/9789#discussion_r2825748007
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/io/ScmGeneratedMessageCodec.java:
##########
@@ -26,7 +26,7 @@
/**
* {@link ScmCodec} for {@link Message} objects.
*/
-public class ScmGeneratedMessageCodec implements ScmCodec {
+public class ScmGeneratedMessageCodec implements ScmCodec<Object> {
Review Comment:
@Russole Why we are using Object here? I think it's better to use
`ScmCodec<Message>` because the PR is intedented that subclass implementations
does not have to cast the objects in serialize or deserialize.
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/io/ScmEnumCodec.java:
##########
@@ -28,7 +28,7 @@
/**
* {@link ScmCodec} for {@link ProtocolMessageEnum} objects.
*/
-public class ScmEnumCodec implements ScmCodec {
+public class ScmEnumCodec implements ScmCodec<Object> {
Review Comment:
Why not ScmCodec<ProtocolMessageEnum> ?so need not to cast during serialize
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/io/ScmNonShadedGeneratedMessageCodec.java:
##########
@@ -28,7 +28,7 @@
* {@link ScmCodec} implementation for non-shaded
* {@link com.google.protobuf.Message} objects.
*/
-public class ScmNonShadedGeneratedMessageCodec implements ScmCodec {
+public class ScmNonShadedGeneratedMessageCodec implements ScmCodec<Object> {
Review Comment:
Similar question over here as well, why not to use ScmCodec<Message>?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]