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 39d5e73f0ba..55580676deb 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 @@ -262,9 +262,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);