Examples of FsCommand


Examples of org.apache.hadoop.fs.shell.FsCommand

   * Tests combinations of valid and invalid user and group arguments to chown.
   */
  @Test
  public void testChownUserAndGroupValidity() {
    // This test only covers argument parsing, so override to skip processing.
    FsCommand chown = new FsShellPermissions.Chown() {
      @Override
      protected void processArgument(PathData item) {
      }
    };
    chown.setConf(new Configuration());

    // The following are valid (no exception expected).
    chown.run("user", "/path");
    chown.run("user:group", "/path");
    chown.run(":group", "/path");

    // The following are valid only on Windows.
    assertValidArgumentsOnWindows(chown, "User With Spaces", "/path");
    assertValidArgumentsOnWindows(chown, "User With Spaces:group", "/path");
    assertValidArgumentsOnWindows(chown, "User With Spaces:Group With Spaces",
View Full Code Here

Examples of org.apache.hadoop.fs.shell.FsCommand

   * Tests valid and invalid group arguments to chgrp.
   */
  @Test
  public void testChgrpGroupValidity() {
    // This test only covers argument parsing, so override to skip processing.
    FsCommand chgrp = new FsShellPermissions.Chgrp() {
      @Override
      protected void processArgument(PathData item) {
      }
    };
    chgrp.setConf(new Configuration());

    // The following are valid (no exception expected).
    chgrp.run("group", "/path");

    // The following are valid only on Windows.
    assertValidArgumentsOnWindows(chgrp, "Group With Spaces", "/path");

    // The following are invalid (exception expected).
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.