use of org.graylog.shaded.elasticsearch7.org.elasticsearch.index.reindex.BulkByScrollResponse in project incubator-skywalking by apache.
the class InstanceAlarmEsPersistenceDAO method deleteHistory.
@Override
public void deleteHistory(Long startTimestamp, Long endTimestamp) {
long startTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(startTimestamp);
long endTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(endTimestamp);
BulkByScrollResponse response = getClient().prepareDelete(QueryBuilders.rangeQuery(InstanceAlarmTable.COLUMN_LAST_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket), InstanceAlarmTable.TABLE).get();
long deleted = response.getDeleted();
logger.info("Delete {} rows history from {} index.", deleted, InstanceAlarmTable.TABLE);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.index.reindex.BulkByScrollResponse in project incubator-skywalking by apache.
the class InstanceReferenceAlarmEsPersistenceDAO method deleteHistory.
@Override
public void deleteHistory(Long startTimestamp, Long endTimestamp) {
long startTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(startTimestamp);
long endTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(endTimestamp);
BulkByScrollResponse response = getClient().prepareDelete(QueryBuilders.rangeQuery(InstanceReferenceAlarmTable.COLUMN_LAST_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket), InstanceReferenceAlarmTable.TABLE).get();
long deleted = response.getDeleted();
logger.info("Delete {} rows history from {} index.", deleted, InstanceReferenceAlarmTable.TABLE);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.index.reindex.BulkByScrollResponse in project incubator-skywalking by apache.
the class ServiceReferenceAlarmEsPersistenceDAO method deleteHistory.
@Override
public void deleteHistory(Long startTimestamp, Long endTimestamp) {
long startTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(startTimestamp);
long endTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(endTimestamp);
BulkByScrollResponse response = getClient().prepareDelete(QueryBuilders.rangeQuery(ServiceReferenceAlarmTable.COLUMN_LAST_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket), ServiceReferenceAlarmTable.TABLE).get();
long deleted = response.getDeleted();
logger.info("Delete {} rows history from {} index.", deleted, ServiceReferenceAlarmTable.TABLE);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.index.reindex.BulkByScrollResponse in project incubator-skywalking by apache.
the class ApplicationReferenceAlarmEsPersistenceDAO method deleteHistory.
@Override
public void deleteHistory(Long startTimestamp, Long endTimestamp) {
long startTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(startTimestamp);
long endTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(endTimestamp);
BulkByScrollResponse response = getClient().prepareDelete(QueryBuilders.rangeQuery(ApplicationReferenceAlarmTable.COLUMN_LAST_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket), ApplicationReferenceAlarmTable.TABLE).get();
long deleted = response.getDeleted();
logger.info("Delete {} rows history from {} index.", deleted, ApplicationReferenceAlarmTable.TABLE);
}
use of org.graylog.shaded.elasticsearch7.org.elasticsearch.index.reindex.BulkByScrollResponse in project incubator-skywalking by apache.
the class InstanceReferenceAlarmListEsPersistenceDAO method deleteHistory.
@Override
public void deleteHistory(Long startTimestamp, Long endTimestamp) {
long startTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(startTimestamp);
long endTimeBucket = TimeBucketUtils.INSTANCE.getMinuteTimeBucket(endTimestamp);
BulkByScrollResponse response = getClient().prepareDelete(QueryBuilders.rangeQuery(InstanceReferenceAlarmListTable.COLUMN_TIME_BUCKET).gte(startTimeBucket).lte(endTimeBucket), InstanceReferenceAlarmListTable.TABLE).get();
long deleted = response.getDeleted();
logger.info("Delete {} rows history from {} index.", deleted, InstanceReferenceAlarmListTable.TABLE);
}
Aggregations