adoroszlai commented on code in PR #9670:
URL: https://github.com/apache/ozone/pull/9670#discussion_r2736576925


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/HadoopRpcOMFollowerReadFailoverProxyProvider.java:
##########
@@ -62,17 +60,15 @@
  * Read and write requests will still be sent to leader OM if reading from
  * follower is disabled.
  */
-public class HadoopRpcOMFollowerReadFailoverProxyProvider<T> implements 
FailoverProxyProvider<T> {
+public class HadoopRpcOMFollowerReadFailoverProxyProvider implements 
FailoverProxyProvider<OzoneManagerProtocolPB> {
   @VisibleForTesting
   public static final Logger LOG = 
LoggerFactory.getLogger(HadoopRpcOMFollowerReadFailoverProxyProvider.class);

Review Comment:
   nit (not introduced in this patch): this can be `private` and annotation 
removed.



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/HadoopRpcOMFollowerReadFailoverProxyProvider.java:
##########
@@ -107,32 +95,25 @@ public HadoopRpcOMFollowerReadFailoverProxyProvider(String 
omServiceId, Class<T>
         .map(a -> a.proxyInfo)
         .reduce((a, b) -> a + ", " + b).orElse("") + "]";
     @SuppressWarnings("unchecked")

Review Comment:
   Suppression is no longer needed.



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/HadoopRpcOMFollowerReadFailoverProxyProvider.java:
##########
@@ -87,18 +83,10 @@ public class 
HadoopRpcOMFollowerReadFailoverProxyProvider<T> implements Failover
   private int currentIndex = -1;
 
   /** The last proxy that has been used. Only used for testing. */
-  private volatile OMProxyInfo<T> lastProxy = null;
-
-  public HadoopRpcOMFollowerReadFailoverProxyProvider(
-      ConfigurationSource configuration, UserGroupInformation ugi, String 
omServiceId, Class<T> protocol)
-      throws IOException {
-    this(omServiceId, protocol,
-        new HadoopRpcOMFailoverProxyProvider<>(configuration, ugi, 
omServiceId, protocol));
-  }
+  private volatile OMProxyInfo<OzoneManagerProtocolPB> lastProxy = null;
 
-  public HadoopRpcOMFollowerReadFailoverProxyProvider(String omServiceId, 
Class<T> protocol,
-      HadoopRpcOMFailoverProxyProvider<T> failoverProxy) {
-    this.protocolClass = protocol;
+  public HadoopRpcOMFollowerReadFailoverProxyProvider(String omServiceId,

Review Comment:
   nit: `omServiceId` is unused



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/HadoopRpcOMFollowerReadFailoverProxyProvider.java:
##########


Review Comment:
   nit (not introduced in this patch): This is currently unused.  Is this going 
to change in follow-up or can be removed?



-- 
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]

Reply via email to