/** * Convenience method for {@link #mkdir(TachyonURI, MkdirOptions)} with default options. */ public boolean mkdir(TachyonURI path) throws IOException, TachyonException, FileAlreadyExistsException, InvalidPathException { return mkdir(path, MkdirOptions.defaults()); }
/** * Creates a new directory specified by the path in argv, including any parent folders that are * required. This method fails if a directory or file with the same path already exists. * * @param path The TachyonURI path as the input of the command * @return 0 if command is successful, -1 if an error occurred */ public int mkdir(TachyonURI path) { try { MkdirOptions options = new MkdirOptions.Builder(mTachyonConf).setRecursive(true).build(); mTfs.mkdir(path, options); System.out.println("Successfully created directory " + path); return 0; } catch (IOException e) { return -1; } catch (TachyonException e) { return -1; } }
} else { try { tachyonClient.mkdir(dstPath); } catch (TachyonException e) { throw new IOException(e.getMessage());
mTfs.mkdir(dstPath); } catch (TachyonException e) { switch (e.getType()) {