You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/08/01 21:54:51 UTC
[hadoop] branch trunk updated: HDFS-13529. Fix default trash policy
emptier trigger time correctly. Contributed by He Xiaoqiao.
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 <he...@apache.org>
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 <we...@apache.org>
---
.../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: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org