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:
He Xiaoqiao 2019-08-01 14:53:56 -07:00 committed by Wei-Chiu Chuang
parent e111789aeb
commit f86de6f76a

View File

@ -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);