Java 类org.apache.hadoop.hdfs.server.namenode.FSAclBaseTest 实例源码

项目:hadoop    文件:TestAclWithSnapshot.java   
private void deleteSnapshotWithAclAndVerify(AclFeature aclFeature,
    Path pathToCheckAcl, int totalAclFeatures) throws IOException {
  hdfs.deleteSnapshot(path, snapshotName);
  AclFeature afterDeleteAclFeature = FSAclBaseTest.getAclFeature(
      pathToCheckAcl, cluster);
  assertSame(aclFeature, afterDeleteAclFeature);
  assertEquals("Reference count should remain same"
      + " even after deletion of snapshot", 1,
      afterDeleteAclFeature.getRefCount());

  hdfs.removeAcl(pathToCheckAcl);
  assertEquals("Reference count should be 0", 0, aclFeature.getRefCount());
  assertEquals("Unique ACL features should remain same", totalAclFeatures,
      AclStorage.getUniqueAclFeatures().getUniqueElementsSize());
}
项目:aliyun-oss-hadoop-fs    文件:TestAclWithSnapshot.java   
private void deleteSnapshotWithAclAndVerify(AclFeature aclFeature,
    Path pathToCheckAcl, int totalAclFeatures) throws IOException {
  hdfs.deleteSnapshot(path, snapshotName);
  AclFeature afterDeleteAclFeature = FSAclBaseTest.getAclFeature(
      pathToCheckAcl, cluster);
  assertSame(aclFeature, afterDeleteAclFeature);
  assertEquals("Reference count should remain same"
      + " even after deletion of snapshot", 1,
      afterDeleteAclFeature.getRefCount());

  hdfs.removeAcl(pathToCheckAcl);
  assertEquals("Reference count should be 0", 0, aclFeature.getRefCount());
  assertEquals("Unique ACL features should remain same", totalAclFeatures,
      AclStorage.getUniqueAclFeatures().getUniqueElementsSize());
}
项目:big-c    文件:TestAclWithSnapshot.java   
private void deleteSnapshotWithAclAndVerify(AclFeature aclFeature,
    Path pathToCheckAcl, int totalAclFeatures) throws IOException {
  hdfs.deleteSnapshot(path, snapshotName);
  AclFeature afterDeleteAclFeature = FSAclBaseTest.getAclFeature(
      pathToCheckAcl, cluster);
  assertSame(aclFeature, afterDeleteAclFeature);
  assertEquals("Reference count should remain same"
      + " even after deletion of snapshot", 1,
      afterDeleteAclFeature.getRefCount());

  hdfs.removeAcl(pathToCheckAcl);
  assertEquals("Reference count should be 0", 0, aclFeature.getRefCount());
  assertEquals("Unique ACL features should remain same", totalAclFeatures,
      AclStorage.getUniqueAclFeatures().getUniqueElementsSize());
}