@Override public void run() { LOG.debug("Cleaner starting"); long startTime = Time.monotonicNow(); try { cleanLogs(doneRootPath, fs, logRetainMillis); } catch (Exception e) { Throwable t = extract(e); if (t instanceof InterruptedException) { LOG.info("Cleaner interrupted"); } else { LOG.error("Error cleaning files", e); } } finally { metrics.addLogCleanTime(Time.monotonicNow() - startTime); } LOG.debug("Cleaner finished"); } }
cleanLogs(stat.getPath(), fs, retainMillis);