You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "hemantk-12 (via GitHub)" <gi...@apache.org> on 2023/06/27 21:24:30 UTC

[GitHub] [ozone] hemantk-12 commented on a diff in pull request #4993: HDDS-8859. [Snapshot] Return failure message to client for a failed snapshot diff jobs

hemantk-12 commented on code in PR #4993:
URL: https://github.com/apache/ozone/pull/4993#discussion_r1244377236


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/SnapshotDiffJob.java:
##########
@@ -72,6 +78,7 @@ public SnapshotDiffJob(long creationTime,
     this.toSnapshot = toSnapshot;
     this.forceFullDiff = forceFullDiff;
     this.totalDiffEntries = totalDiffEntries;
+    this.reason = null;

Review Comment:
   Changed to empty string.



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/snapshot/SnapshotDiffResponse.java:
##########
@@ -45,59 +45,28 @@ public static JobStatus fromProtobuf(JobStatusProto jobStatusProto) {
     }
   }
 
-  /**
-   * Snapshot diff cancel result enum.
-   */
-  public enum JobCancelResult {
-    JOB_NOT_CANCELLED("Job hasn't been cancelled"),
-    NEW_JOB("Cannot cancel a newly submitted job"),
-    JOB_DONE("Job is already DONE"),
-    INVALID_STATUS_TRANSITION("Job is not IN_PROGRESS, cancel failed"),
-    JOB_ALREADY_CANCELLED("Job has already been cancelled"),
-    CANCELLATION_SUCCESS("Job has successfully been cancelled");
-
-    private final String description;
-
-    JobCancelResult(String description) {
-      this.description = description;
-    }
-
-    public String getDescription() {
-      return description;
-    }
-
-    public JobCancelResultProto toProtobuf() {
-      return JobCancelResultProto.valueOf(this.name());
-    }
-
-    public static JobCancelResult fromProtobuf(
-        JobCancelResultProto jobCancelResultProto) {
-      return JobCancelResult.valueOf(jobCancelResultProto.name());
-    }
-  }
-
   private final SnapshotDiffReportOzone snapshotDiffReport;
   private final JobStatus jobStatus;
   private final long waitTimeInMs;
-  private final JobCancelResult jobCancelResult;
+  private final String reason;
 
   public SnapshotDiffResponse(final SnapshotDiffReportOzone snapshotDiffReport,
                               final JobStatus jobStatus,
                               final long waitTimeInMs) {
     this.snapshotDiffReport = snapshotDiffReport;
     this.jobStatus = jobStatus;
     this.waitTimeInMs = waitTimeInMs;
-    this.jobCancelResult = JobCancelResult.JOB_NOT_CANCELLED;
+    this.reason = null;

Review Comment:
   Changed to empty string.



-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org