This is an automated email from the ASF dual-hosted git repository.
weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new f86de6f HDFS-13529. Fix default trash policy emptier trigger time
correctly. Contributed by He Xiaoqiao.
f86de6f is described below
commit f86de6f76a3079c2655df9b242fc968edfb17b9d
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]>
---
.../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]