You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2021/08/18 06:26:10 UTC

[GitHub] [hadoop] ayushtkn commented on a change in pull request #3306: HDFS-16176. fix Client EC -unsetPolicy not success

ayushtkn commented on a change in pull request #3306:
URL: https://github.com/apache/hadoop/pull/3306#discussion_r690936357



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestUnsetAndChangeDirectoryEcPolicy.java
##########
@@ -388,4 +390,31 @@ public void testUnsetEcPolicyInEditLog() throws IOException {
     cluster.restartNameNode(true);
     Assert.assertNull(fs.getErasureCodingPolicy(new Path("/")));
   }
+
+  /*
+   * Test Client unset EC policy on directory.
+   */
+  @Test
+  public void testClientUnsetEcPolicy() throws Exception {
+    ClientProtocol clientProtocol = fs.getClient().getNamenode();
+    clientProtocol.setErasureCodingPolicy("/",ErasureCodeConstants.REPLICATION_POLICY_NAME);
+    final String dirString = "/striped";
+    clientProtocol.mkdirs(dirString, null, false);

Review comment:
       It gave me a NPE here. 
   I changed it to 
   ``
   fs.mkdirs(new Path(dirString));
   ``
   to make it work.
   
   But this test passes without your fix as well. So, this isn't reproducing the issue




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org