Fix DataTTLKeeperTimer's startTimestamp and endTimestamp
This commit is contained in:
parent
6f986cc770
commit
dde58ef004
|
|
@ -19,23 +19,13 @@
|
|||
|
||||
package org.apache.skywalking.apm.collector.storage.es;
|
||||
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.*;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IInstanceMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryPoolMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IServiceReferenceMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.core.module.ModuleManager;
|
||||
import org.apache.skywalking.apm.collector.storage.StorageModule;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationComponentPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationMappingPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IApplicationReferenceMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ICpuMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGCMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IGlobalTracePersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.IMemoryMetricPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentCostPersistenceDAO;
|
||||
import org.apache.skywalking.apm.collector.storage.dao.ISegmentPersistenceDAO;
|
||||
|
||||
/**
|
||||
* @author peng-yongsheng
|
||||
|
|
@ -62,13 +52,14 @@ public class DataTTLKeeperTimer {
|
|||
private void delete() {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(System.currentTimeMillis());
|
||||
calendar.set(Calendar.DAY_OF_MONTH, -daysBefore);
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -daysBefore);
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 0);
|
||||
calendar.set(Calendar.MINUTE, 0);
|
||||
calendar.set(Calendar.SECOND, 0);
|
||||
|
||||
long startTimestamp = calendar.getTimeInMillis();
|
||||
|
||||
calendar.set(Calendar.HOUR_OF_DAY, 23);
|
||||
calendar.set(Calendar.MINUTE, 59);
|
||||
calendar.set(Calendar.SECOND, 59);
|
||||
long endTimestamp = calendar.getTimeInMillis();
|
||||
|
|
|
|||
Loading…
Reference in New Issue