Search in sources :

Example 1 with SetPermissionRequestProto

use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.SetPermissionRequestProto in project hadoop by apache.

the class ClientNamenodeProtocolTranslatorPB method setPermission.

@Override
public void setPermission(String src, FsPermission permission) throws IOException {
    SetPermissionRequestProto req = SetPermissionRequestProto.newBuilder().setSrc(src).setPermission(PBHelperClient.convert(permission)).build();
    try {
        if (Client.isAsynchronousMode()) {
            rpcProxy.setPermission(null, req);
            setAsyncReturnValue();
        } else {
            rpcProxy.setPermission(null, req);
        }
    } catch (ServiceException e) {
        throw ProtobufHelper.getRemoteException(e);
    }
}
Also used : ServiceException(com.google.protobuf.ServiceException) SetPermissionRequestProto(org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.SetPermissionRequestProto)

Aggregations

ServiceException (com.google.protobuf.ServiceException)1 SetPermissionRequestProto (org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.SetPermissionRequestProto)1