|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|