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 @@
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.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 OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
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.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 OMClientResponse validateAndUpdateCache(OzoneManager ozoneManager,
omMetrics.incNumVolumeUpdateFails();
auditLog(auditLogger, buildAuditMessage(OMAction.SET_QUOTA, auditMap,
ex, userInfo));
return new OMVolumeCreateResponse(null, null,
return new OMVolumeSetQuotaResponse(null,
createErrorOMResponse(omResponse, ex));
}