HDFS-13529. Fix default trash policy emptier trigger time correctly. Contributed by He Xiaoqiao.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
(cherry picked from commit f86de6f76a
)
(cherry picked from commit 555b56c0421be84efd09221db2b3f26c8b44ed45)
This commit is contained in:
parent
639763c561
commit
5d35393912
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue