amaliujia commented on code in PR #11869:
URL: https://github.com/apache/ozone/pull/11869#discussion_r4440197910
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/client/ReplicationType.java:
##########
@@ -54,18 +63,6 @@ public static HddsProtos.ReplicationType toProto(
if (replicationType == null) {
return null;
}
- switch (replicationType) {
- case RATIS:
- return HddsProtos.ReplicationType.RATIS;
- case STAND_ALONE:
- return HddsProtos.ReplicationType.STAND_ALONE;
- case CHAINED:
- return HddsProtos.ReplicationType.CHAINED;
- case EC:
- return HddsProtos.ReplicationType.EC;
- default:
- throw new IllegalArgumentException(
- "Unsupported replication type: " + replicationType);
- }
+ return replicationType.toProto();
Review Comment:
Ah I see.
--
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]