prashantpogde commented on code in PR #4993:
URL: https://github.com/apache/ozone/pull/4993#discussion_r1244365685
##########
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:
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: [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]