errose28 commented on code in PR #7015:
URL: https://github.com/apache/ozone/pull/7015#discussion_r1700473102


##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/io/KeyOutputStream.java:
##########
@@ -457,6 +460,9 @@ public void hsync() throws IOException {
       throw new UnsupportedOperationException("The replication factor = "
           + replication.getRequiredNodes() + " <= 1");
     }
+    if (ozoneManagerVersion.compareTo(OzoneManagerVersion.HBASE_SUPPORT) < 0) {
+      throw new IOException("OzoneManager does not support hsync");

Review Comment:
   I think we need `UnsupportedOperationException` here. It's a better fit, and 
still allows jobs like 
[teragen](https://github.com/apache/hadoop/blob/9f1c017f444d5e57899493dc23207c6b5fc26dae/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/terasort/TeraOutputFormat.java#L84)
 to work from newer clients.



##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneClientAdapterImpl.java:
##########
@@ -703,8 +703,8 @@ public LeaseKeyInfo recoverFilePrepare(final String 
pathStr, boolean force) thro
     incrementCounter(Statistic.INVOCATION_RECOVER_FILE_PREPARE, 1);
 
     try {
-      return ozoneClient.getProxy().getOzoneManagerClient().recoverLease(
-          volume.getName(), bucket.getName(), pathStr, force);
+      RpcClient rpcClient = (RpcClient) ozoneClient.getProxy();

Review Comment:
   Why add the cast if the methods like `recoverLease` are also added to the 
`ClientProtocol` interface?



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