bharatviswa504 commented on a change in pull request #1263: HDDS-1927.
Consolidate add/remove Acl into OzoneAclUtil class. Contri…
URL: https://github.com/apache/hadoop/pull/1263#discussion_r315452170
##########
File path:
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmKeyInfo.java
##########
@@ -235,123 +231,22 @@ public FileEncryptionInfo getFileEncryptionInfo() {
return encInfo;
}
- public List<OzoneAclInfo> getAcls() {
+ public List<OzoneAcl> getAcls() {
Review comment:
What I mean here is:
Take an example OMBucketAddAclRequest
```
public OMBucketAddAclRequest(OMRequest omRequest) {
super(omRequest, bucketAddAclOp);
OzoneManagerProtocolProtos.AddAclRequest addAclRequest =
getOmRequest().getAddAclRequest();
path = addAclRequest.getObj().getPath();
ozoneAcls = Lists.newArrayList(
OzoneAcl.fromProtobuf(addAclRequest.getAcl()));
```
If OMBucketInfo, has direct protobuf structures we can avoid the conversion.
Now, we do 1 conversion in constructor, and the other when write to DB.
ozoneAcl -> proto -> byte Array. If we can have direct protobuf structures, we
can save unnecessary protobuf conversions.
----------------------------------------------------------------
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]