This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new a405db8 HDFS-13529. Fix default trash policy emptier trigger time
correctly. Contributed by He Xiaoqiao.
a405db8 is described below
commit a405db8014efa7182ec4e9ea14e43cd205b2d7a8
Author: He Xiaoqiao <[email protected]>
AuthorDate: Thu Aug 1 14:53:56 2019 -0700
HDFS-13529. Fix default trash policy emptier trigger time correctly.
Contributed by He Xiaoqiao.
Signed-off-by: Wei-Chiu Chuang <[email protected]>
(cherry picked from commit f86de6f76a3079c2655df9b242fc968edfb17b9d)
---
.../src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
index 9f07d3d..18972ea 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java
@@ -271,9 +271,9 @@ public class TrashPolicyDefault extends TrashPolicy {
public void run() {
if (emptierInterval == 0)
return; // trash disabled
- long now = Time.now();
- long end;
+ long now, end;
while (true) {
+ now = Time.now();
end = ceiling(now, emptierInterval);
try { // sleep for interval
Thread.sleep(end - now);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]