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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to