use of org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos.MkdirsRequestProto in project hadoop by apache.
the class ClientNamenodeProtocolTranslatorPB method mkdirs.
@Override
public boolean mkdirs(String src, FsPermission masked, boolean createParent) throws IOException {
MkdirsRequestProto.Builder builder = MkdirsRequestProto.newBuilder().setSrc(src).setMasked(PBHelperClient.convert(masked)).setCreateParent(createParent);
FsPermission unmasked = masked.getUnmasked();
if (unmasked != null) {
builder.setUnmasked(PBHelperClient.convert(unmasked));
}
MkdirsRequestProto req = builder.build();
try {
return rpcProxy.mkdirs(null, req).getResult();
} catch (ServiceException e) {
throw ProtobufHelper.getRemoteException(e);
}
}
Aggregations