jojochuang commented on code in PR #5978:
URL: https://github.com/apache/ozone/pull/5978#discussion_r1452955130


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java:
##########
@@ -1421,6 +1431,53 @@ public void recoverFile(OmKeyArgs keyArgs) throws 
IOException {
     ozoneClient.getProxy().getOzoneManagerClient().recoverKey(keyArgs, 0L);
   }
 
+  @Override
+  public long finalizeBlock(OmKeyLocationInfo block) throws IOException {
+    incrementCounter(Statistic.INVOCATION_FINALIZE_BLOCK, 1);

Review Comment:
   this method appears exactly the same as 
BasicOzoneClientAdapterImpl.fiinalizeBlock().



##########
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/RootedOzoneFileSystem.java:
##########
@@ -142,12 +149,27 @@ public boolean recoverLease(final Path f) throws 
IOException {
       }
       throw e;
     }
-    // TODO: query DN to get the final block length
+
     OmKeyInfo keyInfo = infoList.get(0);
+    // finalize the final block and get block length

Review Comment:
   Looks like we can extract this method so it can be reused by 
OzoneFileSystem.recoverLease()



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