Commit e080c49b by shenjunjie

Merge branch 'release' into 'master'

Release

See merge request !437
parents 2420b385 87f14b36
......@@ -76,13 +76,13 @@ public class ChannelEsDao extends EsClientDao {
public void upsertChannelRecord(List<ChannelRecord> channelRecords) {
String index = getChannelRecordIndexes().get(0);
// 打印统计时间
AtomicLong startTime = new AtomicLong(-1);
AtomicLong endTime = new AtomicLong(-1);
for (List<ChannelRecord> records : ListUtils.partition(channelRecords, 100)) {
// 打印统计时间
AtomicLong atomicStartTime = new AtomicLong(-1);
AtomicLong atomicEndTime = new AtomicLong(-1);
BulkRequest bulkRequest = new BulkRequest();
for (ChannelRecord record : records) {
bulkRequest.add(createChannelRecordIndexRequest(record, index, startTime, endTime));
bulkRequest.add(createChannelRecordIndexRequest(record, index, atomicStartTime, atomicEndTime));
}
BulkResponse bulkResponse;
try {
......@@ -98,6 +98,8 @@ public class ChannelEsDao extends EsClientDao {
// 重试三次后失败拆分channelRecords
bulkResponse = upsertChannelRecordLimit(records, index, 10);
}
Long startTime = atomicStartTime.get();
Long endTime = atomicEndTime.get();
if (null == bulkResponse) {
log.error("upsertRecord批量操作重试后失败,index:{},rangeTime:{}", index, startTime + "-" + endTime);
} else if (bulkResponse.hasFailures()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment