hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whe...@apache.org
Subject [1/2] hadoop git commit: HDFS-6651. Deletion failure can leak inodes permanently. Contributed by Jing Zhao.
Date Tue, 03 Feb 2015 00:34:31 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 a3a7efe74 -> 7cb70d344


http://git-wip-us.apache.org/repos/asf/hadoop/blob/7cb70d34/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestXAttrWithSnapshot.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestXAttrWithSnapshot.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestXAttrWithSnapshot.java
index 28277c5..4b957bf 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestXAttrWithSnapshot.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestXAttrWithSnapshot.java
@@ -344,77 +344,6 @@ public class TestXAttrWithSnapshot {
   }
 
   /**
-   * Assert exception of setting xattr when exceeding quota.
-   */
-  @Test
-  public void testSetXAttrExceedsQuota() throws Exception {
-    Path filePath = new Path(path, "file1");
-    Path fileSnapshotPath = new Path(snapshotPath, "file1");
-    FileSystem.mkdirs(hdfs, path, FsPermission.createImmutable((short) 0755));
-    hdfs.allowSnapshot(path);
-    hdfs.setQuota(path, 3, HdfsConstants.QUOTA_DONT_SET);
-    FileSystem.create(hdfs, filePath,
-        FsPermission.createImmutable((short) 0600)).close();
-    hdfs.setXAttr(filePath, name1, value1);
-
-    hdfs.createSnapshot(path, snapshotName);
-
-    byte[] value = hdfs.getXAttr(filePath, name1);
-    Assert.assertArrayEquals(value, value1);
-
-    value = hdfs.getXAttr(fileSnapshotPath, name1);
-    Assert.assertArrayEquals(value, value1);
-
-    exception.expect(NSQuotaExceededException.class);
-    hdfs.setXAttr(filePath, name2, value2);
-  }
-
-
-  /**
-   * Test that an exception is thrown when adding an XAttr Feature to
-   * a snapshotted path
-   */
-  @Test
-  public void testSetXAttrAfterSnapshotExceedsQuota() throws Exception {
-    Path filePath = new Path(path, "file1");
-    FileSystem.mkdirs(hdfs, path, FsPermission.createImmutable((short) 0755));
-    hdfs.allowSnapshot(path);
-    hdfs.setQuota(path, 3, HdfsConstants.QUOTA_DONT_SET);
-    FileSystem.create(hdfs, filePath,
-        FsPermission.createImmutable((short) 0600)).close();
-    hdfs.createSnapshot(path, snapshotName);
-    // This adds an XAttr feature, which can throw an exception
-    exception.expect(NSQuotaExceededException.class);
-    hdfs.setXAttr(filePath, name1, value1);
-  }
-
-  /**
-   * Assert exception of removing xattr when exceeding quota.
-   */
-  @Test
-  public void testRemoveXAttrExceedsQuota() throws Exception {
-    Path filePath = new Path(path, "file1");
-    Path fileSnapshotPath = new Path(snapshotPath, "file1");
-    FileSystem.mkdirs(hdfs, path, FsPermission.createImmutable((short) 0755));
-    hdfs.allowSnapshot(path);
-    hdfs.setQuota(path, 3, HdfsConstants.QUOTA_DONT_SET);
-    FileSystem.create(hdfs, filePath,
-        FsPermission.createImmutable((short) 0600)).close();
-    hdfs.setXAttr(filePath, name1, value1);
-
-    hdfs.createSnapshot(path, snapshotName);
-
-    byte[] value = hdfs.getXAttr(filePath, name1);
-    Assert.assertArrayEquals(value, value1);
-
-    value = hdfs.getXAttr(fileSnapshotPath, name1);
-    Assert.assertArrayEquals(value, value1);
-
-    exception.expect(NSQuotaExceededException.class);
-    hdfs.removeXAttr(filePath, name1);
-  }
-
-  /**
    * Test that users can copy a snapshot while preserving its xattrs.
    */
   @Test (timeout = 120000)


Mime
View raw message