Browse Source

更新

master
hupenghui@qniao.cn 3 years ago
parent
commit
7196cf3b33
1 changed files with 0 additions and 5 deletions
  1. 5
      iot-machine-state-event-generator-job/src/main/java/com/qniao/iot/machine/event/generator/job/IotMachineEventGeneratorJob.java

5
iot-machine-state-event-generator-job/src/main/java/com/qniao/iot/machine/event/generator/job/IotMachineEventGeneratorJob.java

@ -101,8 +101,6 @@ public class IotMachineEventGeneratorJob {
"where qmrs.iot_mac = ?\n" +
" and qmrs.is_delete = 0";
private static final ReentrantLock lock = new ReentrantLock(true);
/**
* 当前索引日期后缀
*/
@ -425,7 +423,6 @@ public class IotMachineEventGeneratorJob {
GetIndexRequest exist = new GetIndexRequest(indicesName);
// 先判断客户端是否存在
try {
lock.lock();
boolean exists = restHighLevelClient.indices().exists(exist, RequestOptions.DEFAULT);
if (!exists) {
// 创建索引
@ -500,8 +497,6 @@ public class IotMachineEventGeneratorJob {
}
} catch (Exception e) {
e.printStackTrace();
}finally {
lock.unlock();
}
}

Loading…
Cancel
Save