private void lostFoundInit(DFSClient dfs) { lfInited = true; try { String lfName = "/lost+found"; final HdfsFileStatus lfStatus = dfs.getFileInfo(lfName); if (lfStatus == null) { // not exists lfInitedOk = dfs.mkdirs(lfName, null, true); lostFound = lfName; } else if (!lfStatus.isDirectory()) { // exists but not a directory LOG.warn("Cannot use /lost+found : a regular file with this name exists."); lfInitedOk = false; } else { // exists and is a directory lostFound = lfName; lfInitedOk = true; } } catch (Exception e) { e.printStackTrace(); lfInitedOk = false; } if (lostFound == null) { LOG.warn("Cannot initialize /lost+found ."); lfInitedOk = false; internalError = true; } }
@Override public Boolean doCall(final Path p) throws IOException, UnresolvedLinkException { return dfs.mkdirs(getPathName(p), permission, createParent); }
/** */ public boolean mkdirs(String src) throws IOException { return mkdirs(src, null); }
@Override public Boolean doCall(final Path p) throws IOException, UnresolvedLinkException { return dfs.mkdirs(getPathName(p), permission, createParent); }
/** */ public boolean mkdirs(String src) throws IOException { return mkdirs(src, null); }
/** */ @Deprecated public boolean mkdirs(String src) throws IOException { return mkdirs(src, null, true); }
/** */ @Deprecated public boolean mkdirs(String src) throws IOException { return mkdirs(src, null, true); }
/** */ @Deprecated public boolean mkdirs(String src) throws IOException { return mkdirs(src, null, true); }
@Override protected void createPath() throws IOException { if (!client.exists(rootPath) && !client.mkdirs(rootPath, new FsPermission(FsAction.ALL, FsAction.ALL, FsAction.ALL), true)) { logger.warn("Could not create root path " + rootPath); } }
@Override public Boolean doCall(final Path p) throws IOException { return dfs.mkdirs(getPathName(p), permission, createParent); }
public boolean mkdirs(Path f, FsPermission permission) throws IOException { return dfs.mkdirs(getPathName(f), permission); }
public boolean mkdirs(Path f, FsPermission permission) throws IOException { return dfs.mkdirs(getPathName(f), permission); }
@Override public void run() { try { client.mkdirs("/dir", null, false); } catch (IOException e) { // test will fail LOG.error("Unable to create /dir", e); } } }, 1, TimeUnit.SECONDS);
private void lostFoundInit(DFSClient dfs) { lfInited = true; try { String lfName = "/lost+found"; // check that /lost+found exists if (!dfs.exists(lfName)) { lfInitedOk = dfs.mkdirs(lfName); lostFound = lfName; } else if (!dfs.isDirectory(lfName)) { LOG.warn("Cannot use /lost+found : a regular file with this name exists."); lfInitedOk = false; } else { // exists and isDirectory lostFound = lfName; lfInitedOk = true; } } catch (Exception e) { e.printStackTrace(); lfInitedOk = false; } if (lostFound == null) { LOG.warn("Cannot initialize /lost+found ."); lfInitedOk = false; } }
private void lostFoundInit(DFSClient dfs) { lfInited = true; try { String lfName = "/lost+found"; // check that /lost+found exists if (!dfs.exists(lfName)) { lfInitedOk = dfs.mkdirs(lfName); lostFound = lfName; } else if (!dfs.isDirectory(lfName)) { LOG.warn("Cannot use /lost+found : a regular file with this name exists."); lfInitedOk = false; } else { // exists and isDirectory lostFound = lfName; lfInitedOk = true; } } catch (Exception e) { e.printStackTrace(); lfInitedOk = false; } if (lostFound == null) { LOG.warn("Cannot initialize /lost+found ."); lfInitedOk = false; } }
private void lostFoundInit(DFSClient dfs) { lfInited = true; try { String lfName = "/lost+found"; final HdfsFileStatus lfStatus = dfs.getFileInfo(lfName); if (lfStatus == null) { // not exists lfInitedOk = dfs.mkdirs(lfName, null, true); lostFound = lfName; } else if (!lfStatus.isDir()) { // exists but not a directory LOG.warn("Cannot use /lost+found : a regular file with this name exists."); lfInitedOk = false; } else { // exists and is a directory lostFound = lfName; lfInitedOk = true; } } catch (Exception e) { e.printStackTrace(); lfInitedOk = false; } if (lostFound == null) { LOG.warn("Cannot initialize /lost+found ."); lfInitedOk = false; internalError = true; } }
private void lostFoundInit(DFSClient dfs) { lfInited = true; try { String lfName = "/lost+found"; final HdfsFileStatus lfStatus = dfs.getFileInfo(lfName); if (lfStatus == null) { // not exists lfInitedOk = dfs.mkdirs(lfName, null, true); lostFound = lfName; } else if (!lfStatus.isDir()) { // exists but not a directory LOG.warn("Cannot use /lost+found : a regular file with this name exists."); lfInitedOk = false; } else { // exists and is a directory lostFound = lfName; lfInitedOk = true; } } catch (Exception e) { e.printStackTrace(); lfInitedOk = false; } if (lostFound == null) { LOG.warn("Cannot initialize /lost+found ."); lfInitedOk = false; internalError = true; } }
: FsPermission.getDefault().applyUMask(umask); if (!dfsClient.mkdirs(fileIdPath, permission, false)) { WccData dirWcc = Nfs3Utils.createWccData( Nfs3Utils.getWccAttr(preOpDirAttr), dfsClient, dirFileIdPath, iug);
DFSInotifyEventInputStream eis = client.getInotifyEventStream(); for (int i = 0; i < 10; i++) { client.mkdirs("/dir" + i, null, false);