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() {
|
public void run() {
|
||||||
if (emptierInterval == 0)
|
if (emptierInterval == 0)
|
||||||
return; // trash disabled
|
return; // trash disabled
|
||||||
long now = Time.now();
|
long now, end;
|
||||||
long end;
|
|
||||||
while (true) {
|
while (true) {
|
||||||
|
now = Time.now();
|
||||||
end = ceiling(now, emptierInterval);
|
end = ceiling(now, emptierInterval);
|
||||||
try { // sleep for interval
|
try { // sleep for interval
|
||||||
Thread.sleep(end - now);
|
Thread.sleep(end - now);
|
||||||
|
Loading…
Reference in New Issue
Block a user