Search in sources :

Example 1 with AddAclResponse

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();
}
Also used : OMRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest) AddAclResponse(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclResponse) AddAclRequest(org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclRequest)

Aggregations

AddAclRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclRequest)1 AddAclResponse (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AddAclResponse)1 OMRequest (org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMRequest)1