Skip to content

Commit f86de6f

Browse files
Hexiaoqiaojojochuang
authored andcommitted
HDFS-13529. Fix default trash policy emptier trigger time correctly. Contributed by He Xiaoqiao.
Signed-off-by: Wei-Chiu Chuang <[email protected]>
1 parent e111789 commit f86de6f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/TrashPolicyDefault.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,9 @@ protected class Emptier implements Runnable {
271271
public void run() {
272272
if (emptierInterval == 0)
273273
return; // trash disabled
274-
long now = Time.now();
275-
long end;
274+
long now, end;
276275
while (true) {
276+
now = Time.now();
277277
end = ceiling(now, emptierInterval);
278278
try { // sleep for interval
279279
Thread.sleep(end - now);

0 commit comments

Comments
 (0)