Search in sources :

Example 1 with SetAclRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.AclProtos.SetAclRequestProto in project hadoop by apache.

the class ClientNamenodeProtocolTranslatorPB method setAcl.

@Override
public void setAcl(String src, List<AclEntry> aclSpec) throws IOException {
    SetAclRequestProto req = SetAclRequestProto.newBuilder().setSrc(src).addAllAclSpec(PBHelperClient.convertAclEntryProto(aclSpec)).build();
    try {
        if (Client.isAsynchronousMode()) {
            rpcProxy.setAcl(null, req);
            setAsyncReturnValue();
        } else {
            rpcProxy.setAcl(null, req);
        }
    } catch (ServiceException e) {
        throw ProtobufHelper.getRemoteException(e);
    }
}
Also used : SetAclRequestProto(org.apache.hadoop.hdfs.protocol.proto.AclProtos.SetAclRequestProto) ServiceException(com.google.protobuf.ServiceException)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 SetAclRequestProto (org.apache.hadoop.hdfs.protocol.proto.AclProtos.SetAclRequestProto)1