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 2022/02/09 13:56:09 UTC

[GitHub] [hadoop] whbing commented on pull request #3970: HADOOP-18117. Add an option to preserve root directory permissions

whbing commented on pull request #3970:
URL: https://github.com/apache/hadoop/pull/3970#issuecomment-1033786629


   It might be better to add a test, e.g.
   ```java
       ...
       fs.setOwner(src,"userA", "groupA");
       fs.setTimes(src, new Random().nextLong(), new Random().nextLong());
       String[] args = {"-p", "-update", src.toString(), dest.toString()};
       DistCp distCp = new DistCp(conf, null);
       assertEquals(DistCpConstants.SUCCESS, ToolRunner.run(conf, distCp, args));
   
       FileStatus srcStatus = fs.getFileStatus(src);
       FileStatus destStatus = fs.getFileStatus(dest);
       assertTrue(destStatus.getOwner().equals(srcStatus.getOwner()));
       assertTrue(destStatus.getModificationTime() == srcStatus.getModificationTime());
   
   ```


-- 
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