use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclResponse in project ozone by apache.
the class OzoneManagerProtocolClientSideTranslatorPB method addAcl.
/**
* Add acl for Ozone object. Return true if acl is added successfully else
* false.
*
* @param obj Ozone object for which acl should be added.
* @param acl ozone acl to be added.
* @throws IOException if there is error.
*/
@Override
public boolean addAcl(OzoneObj obj, OzoneAcl acl) throws IOException {
AddAclRequest req = AddAclRequest.newBuilder().setObj(OzoneObj.toProtobuf(obj)).setAcl(OzoneAcl.toProtobuf(acl)).build();
OMRequest omRequest = createOMRequest(Type.AddAcl).setAddAclRequest(req).build();
AddAclResponse addAclResponse = handleError(submitRequest(omRequest)).getAddAclResponse();
return addAclResponse.getResponse();
}
Aggregations