sadanand48 commented on code in PR #4491:
URL: https://github.com/apache/ozone/pull/4491#discussion_r1152002528


##########
hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicRootedOzoneClientAdapterImpl.java:
##########
@@ -1282,4 +1285,19 @@ public String createSnapshot(String pathStr, String 
snapshotName)
             ofsPath.getBucketName(),
             snapshotName);
   }
+
+  @Override
+  public SnapshotDiffReport getSnapshotDiffReport(Path snapshotDir,
+      String fromSnapshot, String toSnapshot)
+      throws IOException, InterruptedException {
+    OFSPath ofsPath = new OFSPath(snapshotDir, config);
+    SnapshotDiffResponse snapshotDiffResponse = null;
+    do {
+      snapshotDiffResponse = objectStore.snapshotDiff(ofsPath.getVolumeName(),
+          ofsPath.getBucketName(), fromSnapshot, toSnapshot, "", -1, false);
+      Thread.sleep(snapshotDiffResponse.getWaitTimeInMs());
+    } while (snapshotDiffResponse.getJobStatus() != DONE);

Review Comment:
   Currently Distcp behaviour doesn't expect async behaviour for Snapshot Diff 
as we have currently implemented for Ozone i.e  it needs an instantaneous 
response with SnapshotDiffReport. Currently I have added a wait condition here 
in FS client of Ozone for it to work, 
   Should this be okay or we should add the ability for distcp client to wait 
(which would require hdfs change similar to the first revision of 
https://github.com/apache/hadoop/pull/5364) ?
   
   cc @prashantpogde @umamaheswararao 



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