bshashikant edited a comment on pull request #3340:
URL: https://github.com/apache/hadoop/pull/3340#issuecomment-916599655


   
   Thanks @cnauroth . The problem here is very specific to snapshotRoot. 
   
   `@Test
     public void testXattrOnFileWithSnapshotAndNNRestart() throws Exception {
       // Init
       FileSystem.mkdirs(hdfs, path, FsPermission.createImmutable((short) 
0700));
       Path file = new Path(path, "file1");
       FileSystem.create(hdfs, file, FsPermission.createImmutable((short) 
07777));
       hdfs.setXAttr(file, name1, value1);
       hdfs.allowSnapshot(path);
       hdfs.createSnapshot(path, snapshotName);
       SnapshotDiffReport report =
           hdfs.getSnapshotDiffReport(path, snapshotName, "");
       System.out.println(report);
       Assert.assertEquals(0, report.getDiffList().size());
       report =
           hdfs.getSnapshotDiffReport(path, snapshotName, "");
       System.out.println(report);
       Assert.assertEquals(0, report.getDiffList().size());
       hdfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_ENTER);
       hdfs.saveNamespace();
       hdfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_LEAVE);
       cluster.restartNameNode(true);
       report =
           hdfs.getSnapshotDiffReport(path, snapshotName, "");
       System.out.println(report);
       Assert.assertEquals(0, report.getDiffList().size());
     }`
   
   The same test with xattrs set on file inside the snapshotRoot/SubDirecory 
will just work with/without the patch.


-- 
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-unsubscr...@hadoop.apache.org

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



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

Reply via email to