Package org.apache.hadoop.fs.shell.find

Examples of org.apache.hadoop.fs.shell.find.Perm


    __x_w__wx = new PathData("__x_w__wx", fs.getConf());
  }

  @Test
  public void applyOctalExact() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "123");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }
View Full Code Here


    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }

  @Test
  public void applyOctalMask() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "-123");
    perm.initialise(new FindOptions());

    assertEquals(Result.PASS, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }
View Full Code Here

    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }

  @Test
  public void applySymbolicExact() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "u=x,g=w,o=wx");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }
View Full Code Here

    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }

  @Test
  public void applySymbolicMask() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "-u=x,g=w,o=wx");
    perm.initialise(new FindOptions());

    assertEquals(Result.PASS, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }
View Full Code Here

    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }

  @Test
  public void applySymbolicComplex() throws IOException {
    Perm perm = new Perm();
    addArgument(perm, "u=xrw,g=x,o=wx,u-rw,g+w,g-x");
    perm.initialise(new FindOptions());

    assertEquals(Result.FAIL, perm.apply(rwxrwxrwx));
    assertEquals(Result.FAIL, perm.apply(rwx______));
    assertEquals(Result.FAIL, perm.apply(r__r__r__));
    assertEquals(Result.FAIL, perm.apply(rwxr_____));
    assertEquals(Result.PASS, perm.apply(__x_w__wx));
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.shell.find.Perm

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.