[Tachyon-14] TachyonURI (TFsShell)

Refactor TFsShell to use Tachyon URI.
Thanks
On Sep 4, 2014 9:39 AM, "calvinjia" <notifications@github.com> wrote:

> In core/src/main/java/tachyon/command/TFsShell.java:
>
> > @@ -460,18 +451,11 @@ public int rename(String argv[]) throws IOException {
> >        System.out.println("Usage: tfs mv <src> <dst>");
> >        return -1;
> >      }
> > -    String srcPath = argv[1];
> > -    String dstPath = argv[2];
> > -    String srcMasterAddr = Utils.validatePath(srcPath);
> > -    String dstMasterAddr = Utils.validatePath(dstPath);
> > -    if (!srcMasterAddr.startsWith(dstMasterAddr.substring(0, Constants.HEADER.length()))) {
> > -      throw new IOException("The file system of source and destination must be the same");
> > -    }
> > -    String srcFile = Utils.getFilePath(srcPath);
> > -    String dstFile = Utils.getFilePath(dstPath);
> > +    TachyonURI srcPath = new TachyonURI(argv[1]);
>
> Yeah, rename does validates both the src and destination uris and requires
> the scheme & authority to be empty or match the TachyonFS's
> scheme/authority.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/amplab/tachyon/pull/416/files#r17125823>.
>