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


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java:
##########
@@ -2454,7 +2458,10 @@ public boolean recoverLease(String volumeName, String 
bucketName,
 
     RecoverLeaseResponse recoverLeaseResponse =
             handleError(submitRequest(omRequest)).getRecoverLeaseResponse();
-    return recoverLeaseResponse.getResponse();
+    ArrayList list = new ArrayList();

Review Comment:
   ArrayList has no type parameter



##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestLeaseRecovery.java:
##########
@@ -149,8 +149,7 @@ public void testRecovery() throws Exception {
         Thread.sleep(1000);
       }
       // The lease should have been recovered.
-      assertTrue("File should be closed", fs.recoverLease(file));

Review Comment:
   Does recoverLease() throw except if the file is already closed? If so, it 
would be a deviation from HDFS.



##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeyRequest.java:
##########
@@ -660,6 +662,25 @@ protected OmBucketInfo getBucketInfo(OMMetadataManager 
omMetadataManager,
     return value != null ? value.getCacheValue() : null;
   }
 
+  @NotNull

Review Comment:
   This is moved from OMKeyCommitRequest.



##########
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:
##########
@@ -2070,7 +2073,8 @@ message RecoverLeaseRequest {
 }
 
 message RecoverLeaseResponse {
-  optional bool response = 1;

Review Comment:
   This is potentially incompatible. But given that the feature is disabled by 
default, I agree this is acceptable.



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java:
##########
@@ -2454,7 +2458,10 @@ public boolean recoverLease(String volumeName, String 
bucketName,
 
     RecoverLeaseResponse recoverLeaseResponse =
             handleError(submitRequest(omRequest)).getRecoverLeaseResponse();
-    return recoverLeaseResponse.getResponse();
+    ArrayList list = new ArrayList();
+    list.add(OmKeyInfo.getFromProtobuf(recoverLeaseResponse.getKeyInfo()));
+    list.add(OmKeyInfo.getFromProtobuf(recoverLeaseResponse.getOpenKeyInfo()));

Review Comment:
   Looks like the second element is not used by callers.



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