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


   Thanks @cnauroth . The problem here seems to be very specific to 
snapshotRoot. 
   `
   @Test
   
     public void testXattrOnFileWithSnapshotAndNNRestart() throws Exception {
       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: [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