/** * Convenience method for {@link #mount(TachyonURI, TachyonURI, MountOptions)} with default * options. */ public boolean mount(TachyonURI tachyonPath, TachyonURI ufsPath) throws IOException, TachyonException { return mount(tachyonPath, ufsPath, MountOptions.defaults()); }
/** Mounts a UFS path onto a Tachyon path. * * @param argv Aaray of arguments given by the user's input from the terminal * @return 0 if command is successful, -1 if an error occurred * @throws IOException if an I/O error occurs */ public int mount(String[] argv) throws IOException { TachyonURI tachyonPath = new TachyonURI(argv[1]); TachyonURI ufsPath = new TachyonURI(argv[2]); try { if (mTfs.mount(tachyonPath, ufsPath)) { System.out.println("Mounted " + ufsPath + " at " + tachyonPath); return 0; } else { System.out.println("mount: Failed to mount" + ufsPath + " to " + tachyonPath); return -1; } } catch (TachyonException e) { throw new IOException(e.getMessage()); } }