hanishakoneru commented on a change in pull request #626: HDDS-1262. In OM HA
OpenKey and initiateMultipartUpload call Should happen only leader OM.
URL: https://github.com/apache/hadoop/pull/626#discussion_r268886537
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -1985,6 +1990,51 @@ public OpenKeySession openKey(OmKeyArgs args) throws
IOException {
}
}
+ @Override
+ public void applyOpenKey(KeyArgs omKeyArgs, KeyInfo keyInfo, long clientID)
+ throws IOException {
+ // Do we need to check again Acl's for apply OpenKey call?
+ if(isAclEnabled) {
+ checkAcls(ResourceType.KEY, StoreType.OZONE, ACLType.READ,
+ omKeyArgs.getVolumeName(), omKeyArgs.getBucketName(),
+ omKeyArgs.getKeyName());
+ }
+ boolean auditSuccess = true;
+ try {
+ keyManager.applyOpenKey(omKeyArgs, keyInfo, clientID);
+ } catch (Exception ex) {
+ metrics.incNumKeyAllocateFails();
+ auditSuccess = false;
+ AUDIT.logWriteFailure(buildAuditMessageForFailure(
+ OMAction.APPLY_ALLOCATE_KEY,
+ (omKeyArgs == null) ? null : toAuditMap(omKeyArgs), ex));
+ throw ex;
+ } finally {
+ if(auditSuccess){
+ AUDIT.logWriteSuccess(buildAuditMessageForSuccess(
+ OMAction.ALLOCATE_KEY, (omKeyArgs == null) ? null :
Review comment:
OMAction should be APPLY_ALLOCATE_KEY.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]