Examples of modifyAclEntries()


Examples of org.apache.hadoop.fs.FileSystem.modifyAclEntries()

    httpfs.setAcl(path, AclEntry.parseAclSpec(aclSet,true));
    proxyAclStat = proxyFs.getAclStatus(path);
    httpfsAclStat = httpfs.getAclStatus(path);
    assertSameAcls(httpfsAclStat, proxyAclStat);

    httpfs.modifyAclEntries(path, AclEntry.parseAclSpec(aclUser2, true));
    proxyAclStat = proxyFs.getAclStatus(path);
    httpfsAclStat = httpfs.getAclStatus(path);
    assertSameAcls(httpfsAclStat, proxyAclStat);

    httpfs.removeAclEntries(path, AclEntry.parseAclSpec(aclUser1, true));
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.modifyAclEntries()

    Path mockFsPath1 = new Path("/a/b/c");
    Path viewFsPath2 = new Path("/mounts/mockfs2/d/e/f");
    Path mockFsPath2 = new Path("/d/e/f");
    List<AclEntry> entries = Collections.emptyList();

    viewFs.modifyAclEntries(viewFsPath1, entries);
    verify(mockFs1).modifyAclEntries(mockFsPath1, entries);
    viewFs.modifyAclEntries(viewFsPath2, entries);
    verify(mockFs2).modifyAclEntries(mockFsPath2, entries);

    viewFs.removeAclEntries(viewFsPath1, entries);
View Full Code Here

Examples of org.apache.hadoop.fs.FileSystem.modifyAclEntries()

    Path mockFsPath2 = new Path("/d/e/f");
    List<AclEntry> entries = Collections.emptyList();

    viewFs.modifyAclEntries(viewFsPath1, entries);
    verify(mockFs1).modifyAclEntries(mockFsPath1, entries);
    viewFs.modifyAclEntries(viewFsPath2, entries);
    verify(mockFs2).modifyAclEntries(mockFsPath2, entries);

    viewFs.removeAclEntries(viewFsPath1, entries);
    verify(mockFs1).removeAclEntries(mockFsPath1, entries);
    viewFs.removeAclEntries(viewFsPath2, entries);
View Full Code Here

Examples of org.apache.hadoop.fs.viewfs.ChRootedFileSystem.modifyAclEntries()

    Path chrootPath = new Path("/c");
    Path rawPath = new Path("/a/b/c");
    List<AclEntry> entries = Collections.emptyList();

    chrootFs.modifyAclEntries(chrootPath, entries);
    verify(mockFs).modifyAclEntries(rawPath, entries);

    chrootFs.removeAclEntries(chrootPath, entries);
    verify(mockFs).removeAclEntries(rawPath, entries);
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

    fs.create(p).close();
    fs.mkdirs(new Path("/23"));

    AclEntry e = new AclEntry.Builder().setName("foo")
        .setPermission(READ_EXECUTE).setScope(ACCESS).setType(USER).build();
    fs.modifyAclEntries(p, Lists.newArrayList(e));

    restart(fs, persistNamespace);

    AclStatus s = cluster.getNamesystem().getAclStatus(p.toString());
    AclEntry[] returned = Lists.newArrayList(s.getEntries()).toArray(
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

    s = cluster.getNamesystem().getAclStatus(p.toString());
    returned = Lists.newArrayList(s.getEntries()).toArray(new AclEntry[0]);
    Assert.assertArrayEquals(new AclEntry[] { }, returned);

    fs.modifyAclEntries(p, Lists.newArrayList(e));
    s = cluster.getNamesystem().getAclStatus(p.toString());
    returned = Lists.newArrayList(s.getEntries()).toArray(new AclEntry[0]);
    Assert.assertArrayEquals(new AclEntry[] {
        aclEntry(ACCESS, USER, "foo", READ_EXECUTE),
        aclEntry(ACCESS, GROUP, READ) }, returned);
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

      .toArray(new AclEntry[0]);
    Assert.assertArrayEquals(subdirExpected, subdirReturned);
    assertPermission(fs, subdirPath, (short)010755);

    aclSpec = Lists.newArrayList(aclEntry(DEFAULT, USER, "foo", READ_WRITE));
    fs.modifyAclEntries(dirPath, aclSpec);

    fileReturned = fs.getAclStatus(filePath).getEntries()
      .toArray(new AclEntry[0]);
    Assert.assertArrayEquals(fileExpected, fileReturned);
    subdirReturned = fs.getAclStatus(subdirPath).getEntries()
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

    fs.create(p).close();
    fs.mkdirs(new Path("/23"));

    AclEntry e = new AclEntry.Builder().setName("foo")
        .setPermission(READ_EXECUTE).setScope(ACCESS).setType(USER).build();
    fs.modifyAclEntries(p, Lists.newArrayList(e));

    restart(fs, persistNamespace);

    AclStatus s = cluster.getNamesystem().getAclStatus(p.toString());
    AclEntry[] returned = Lists.newArrayList(s.getEntries()).toArray(
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

    s = cluster.getNamesystem().getAclStatus(p.toString());
    returned = Lists.newArrayList(s.getEntries()).toArray(new AclEntry[0]);
    Assert.assertArrayEquals(new AclEntry[] { }, returned);

    fs.modifyAclEntries(p, Lists.newArrayList(e));
    s = cluster.getNamesystem().getAclStatus(p.toString());
    returned = Lists.newArrayList(s.getEntries()).toArray(new AclEntry[0]);
    Assert.assertArrayEquals(new AclEntry[] {
        aclEntry(ACCESS, USER, "foo", READ_EXECUTE),
        aclEntry(ACCESS, GROUP, READ) }, returned);
View Full Code Here

Examples of org.apache.hadoop.hdfs.DistributedFileSystem.modifyAclEntries()

      .toArray(new AclEntry[0]);
    Assert.assertArrayEquals(subdirExpected, subdirReturned);
    assertPermission(fs, subdirPath, (short)0755);

    aclSpec = Lists.newArrayList(aclEntry(DEFAULT, USER, "foo", READ_WRITE));
    fs.modifyAclEntries(dirPath, aclSpec);

    fileReturned = fs.getAclStatus(filePath).getEntries()
      .toArray(new AclEntry[0]);
    Assert.assertArrayEquals(fileExpected, fileReturned);
    subdirReturned = fs.getAclStatus(subdirPath).getEntries()
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.