From ecb9f817ac416493928989776792fd3e7753e268 Mon Sep 17 00:00:00 2001 From: Bharat Viswanadham Date: Tue, 23 Jul 2019 14:45:47 -0700 Subject: [PATCH] HDDS-1845. Fix OMVolumeSetQuota|OwnerRequest#validateAndUpdateCache return response. (#1141) --- .../ozone/om/request/volume/OMVolumeSetOwnerRequest.java | 4 +--- .../ozone/om/request/volume/OMVolumeSetQuotaRequest.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetOwnerRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetOwnerRequest.java index 8fbd73b5175..413f55dd0eb 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetOwnerRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetOwnerRequest.java @@ -21,7 +21,6 @@ package org.apache.hadoop.ozone.om.request.volume; import java.io.IOException; import java.util.Map; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.google.common.base.Optional; @@ -36,7 +35,6 @@ import org.apache.hadoop.ozone.om.OzoneManager; import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs; import org.apache.hadoop.ozone.om.response.OMClientResponse; -import org.apache.hadoop.ozone.om.response.volume.OMVolumeCreateResponse; import org.apache.hadoop.ozone.om.response.volume.OMVolumeSetOwnerResponse; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos @@ -110,7 +108,7 @@ public class OMVolumeSetOwnerRequest extends OMVolumeRequest { omMetrics.incNumVolumeUpdateFails(); auditLog(auditLogger, buildAuditMessage(OMAction.SET_OWNER, auditMap, ex, userInfo)); - return new OMVolumeCreateResponse(null, null, + return new OMVolumeSetOwnerResponse(null, null, null, null, createErrorOMResponse(omResponse, ex)); } diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java index cf2fc4fcc21..f276b99e071 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/volume/OMVolumeSetQuotaRequest.java @@ -36,7 +36,6 @@ import org.apache.hadoop.ozone.om.exceptions.OMException; import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs; import org.apache.hadoop.ozone.om.response.OMClientResponse; import org.apache.hadoop.ozone.om.response.volume.OMVolumeSetQuotaResponse; -import org.apache.hadoop.ozone.om.response.volume.OMVolumeCreateResponse; import org.apache.hadoop.ozone.security.acl.IAccessAuthorizer; import org.apache.hadoop.ozone.security.acl.OzoneObj; import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos; @@ -112,7 +111,7 @@ public class OMVolumeSetQuotaRequest extends OMVolumeRequest { omMetrics.incNumVolumeUpdateFails(); auditLog(auditLogger, buildAuditMessage(OMAction.SET_QUOTA, auditMap, ex, userInfo)); - return new OMVolumeCreateResponse(null, null, + return new OMVolumeSetQuotaResponse(null, createErrorOMResponse(omResponse, ex)); }