HDFS-13529. Fix default trash policy emptier trigger time correctly. Contributed by He Xiaoqiao.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
e111789aeb
commit
f86de6f76a
@ -271,9 +271,9 @@ protected class Emptier implements Runnable {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user