HDDS-1845. Fix OMVolumeSetQuota|OwnerRequest#validateAndUpdateCache return response. (#1141)
This commit is contained in:
parent
fbe2fc6580
commit
ecb9f817ac
|
@ -21,7 +21,6 @@ package org.apache.hadoop.ozone.om.request.volume;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import com.google.common.base.Optional;
|
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.exceptions.OMException;
|
||||||
import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs;
|
import org.apache.hadoop.ozone.om.helpers.OmVolumeArgs;
|
||||||
import org.apache.hadoop.ozone.om.response.OMClientResponse;
|
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.om.response.volume.OMVolumeSetOwnerResponse;
|
||||||
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
|
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
|
||||||
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();
|
omMetrics.incNumVolumeUpdateFails();
|
||||||
auditLog(auditLogger, buildAuditMessage(OMAction.SET_OWNER, auditMap,
|
auditLog(auditLogger, buildAuditMessage(OMAction.SET_OWNER, auditMap,
|
||||||
ex, userInfo));
|
ex, userInfo));
|
||||||
return new OMVolumeCreateResponse(null, null,
|
return new OMVolumeSetOwnerResponse(null, null, null, null,
|
||||||
createErrorOMResponse(omResponse, ex));
|
createErrorOMResponse(omResponse, ex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.helpers.OmVolumeArgs;
|
||||||
import org.apache.hadoop.ozone.om.response.OMClientResponse;
|
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.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.IAccessAuthorizer;
|
||||||
import org.apache.hadoop.ozone.security.acl.OzoneObj;
|
import org.apache.hadoop.ozone.security.acl.OzoneObj;
|
||||||
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
|
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos;
|
||||||
|
@ -112,7 +111,7 @@ public class OMVolumeSetQuotaRequest extends OMVolumeRequest {
|
||||||
omMetrics.incNumVolumeUpdateFails();
|
omMetrics.incNumVolumeUpdateFails();
|
||||||
auditLog(auditLogger, buildAuditMessage(OMAction.SET_QUOTA, auditMap,
|
auditLog(auditLogger, buildAuditMessage(OMAction.SET_QUOTA, auditMap,
|
||||||
ex, userInfo));
|
ex, userInfo));
|
||||||
return new OMVolumeCreateResponse(null, null,
|
return new OMVolumeSetQuotaResponse(null,
|
||||||
createErrorOMResponse(omResponse, ex));
|
createErrorOMResponse(omResponse, ex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue