@Override public void run() { // We perform CleanUp only in LocalMetricsCollectionService , where TTL is NOT supported // by underlying data store. try { // delete metrics from metrics resolution table metricStore.deleteTTLExpired(); } catch (Exception e) { throw Throwables.propagate(e); } // delete based on the min retention interval scheduler.schedule(this, nextScheduleDelaySecs, TimeUnit.SECONDS); } };
@Override public void run() { // We perform CleanUp only in LocalMetricsCollectionService , where TTL is NOT supported // by underlying data store. long currentTime = TimeUnit.SECONDS.convert(System.currentTimeMillis(), TimeUnit.MILLISECONDS); try { // delete metrics from metrics resolution table metricStore.deleteTTLExpired(); } catch (Exception e) { throw Throwables.propagate(e); } // delete based on the min retention interval scheduler.schedule(this, nextScheduleDelaySecs, TimeUnit.SECONDS); } };