jojochuang commented on code in PR #9985:
URL: https://github.com/apache/ozone/pull/9985#discussion_r3049189035
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/protocolPB/OzoneManagerRequestHandler.java:
##########
@@ -1387,16 +1393,28 @@ private GetS3VolumeContextResponse getS3VolumeContext()
@DisallowedUntilLayoutVersion(FILESYSTEM_SNAPSHOT)
private SnapshotDiffResponse snapshotDiff(
SnapshotDiffRequest snapshotDiffRequest) throws IOException {
- org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse response =
- impl.snapshotDiff(
- snapshotDiffRequest.getVolumeName(),
- snapshotDiffRequest.getBucketName(),
- snapshotDiffRequest.getFromSnapshot(),
- snapshotDiffRequest.getToSnapshot(),
- snapshotDiffRequest.getToken(),
- snapshotDiffRequest.getPageSize(),
- snapshotDiffRequest.getForceFullDiff(),
- snapshotDiffRequest.getDisableNativeDiff());
+ org.apache.hadoop.ozone.snapshot.SnapshotDiffResponse response;
+
+ if (snapshotDiffRequest.hasForceFullDiff() &&
snapshotDiffRequest.hasDisableNativeDiff()) {
+ response = impl.snapshotDiff(
Review Comment:
call impl.submitSnapshotDiff() instead?
##########
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/rpc/RpcClient.java:
##########
Review Comment:
call ozoneManagerClient.submitSnapshotDiff() instead?
##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotDiffHandler.java:
##########
@@ -82,6 +82,12 @@ public class SnapshotDiffHandler extends Handler {
defaultValue = "false")
private boolean cancel;
+ @CommandLine.Option(names = {"-r", "--get-report"},
+ description = "Get the snapshot diff report is available; " +
Review Comment:
```suggestion
description = "Get the snapshot diff report if available; " +
```
##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotDiffHandler.java:
##########
@@ -109,15 +115,25 @@ protected void execute(OzoneClient client, OzoneAddress
address)
if (cancel) {
cancelSnapshotDiff(client.getObjectStore(), volumeName, bucketName);
- } else {
+ } else if (getReport) {
getSnapshotDiff(client.getObjectStore(), volumeName, bucketName);
Review Comment:
need test coverage.
##########
hadoop-ozone/cli-shell/src/main/java/org/apache/hadoop/ozone/shell/snapshot/SnapshotDiffHandler.java:
##########
@@ -109,15 +115,25 @@ protected void execute(OzoneClient client, OzoneAddress
address)
if (cancel) {
cancelSnapshotDiff(client.getObjectStore(), volumeName, bucketName);
- } else {
+ } else if (getReport) {
getSnapshotDiff(client.getObjectStore(), volumeName, bucketName);
+ } else {
+ submitSnapshotDiff(client.getObjectStore(), volumeName, bucketName);
Review Comment:
test coverage
--
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]