jojochuang commented on a change in pull request #1223: HADOOP-16112. Delete
the baseTrashPath's subDir leads to don't modify baseTrashPath
URL: https://github.com/apache/hadoop/pull/1223#discussion_r311849454
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
##########
@@ -157,14 +163,37 @@ public boolean moveToTrash(Path path) throws IOException
{
} catch (FileAlreadyExistsException e) {
// find the path which is not a directory, and modify baseTrashPath
// & trashPath, then mkdirs
+ if (moveToTrashForTests) {
+ try {
+ Thread.sleep(5000);
Review comment:
Can we use a more deterministic approach to test the code, instead of a time
based one?
Like CountDownLatch?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]