HDDS-1845. Fix OMVolumeSetQuota|OwnerRequest#validateAndUpdateCache return response. (#1141)

This commit is contained in:
Bharat Viswanadham 2019-07-23 14:45:47 -07:00 committed by GitHub
parent fbe2fc6580
commit ecb9f817ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 5 deletions

View File

@ -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));
}

View File

@ -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));
}