Browse Source

更新

feature_hph_新增rabbitmq_sink
1049970895@qniao.cn 3 years ago
parent
commit
0308077f6a
1 changed files with 4 additions and 4 deletions
  1. 8
      src/main/java/com/qniao/iot/IotMonitoringDataJob.java

8
src/main/java/com/qniao/iot/IotMonitoringDataJob.java

@ -76,7 +76,7 @@ public class IotMonitoringDataJob {
/**
* 当前索引日期后缀
*/
private static String currIndicsDateSuffix;
private static String currIndicesDateSuffix;
public static void main(String[] args) throws Exception {
@ -512,12 +512,12 @@ public class IotMonitoringDataJob {
private static void checkIndicesIsExists(String indexDateSuffix, String indicesName) {
if(currIndicsDateSuffix == null) {
if(currIndicesDateSuffix == null) {
// 当前月的索引为空
createIndices(indicesName, indexDateSuffix);
}else {
// 校验当前消息能否符合当前索引
if(!indexDateSuffix.equals(currIndicsDateSuffix)) {
if(!indexDateSuffix.equals(currIndicesDateSuffix)) {
// 如果不符合需要重建索引
createIndices(indicesName, indexDateSuffix);
}
@ -585,7 +585,7 @@ public class IotMonitoringDataJob {
if(!acknowledged || !shardsAcknowledged) {
throw new Exception("自定义索引创建失败!!!");
}
currIndicsDateSuffix = indexDateSuffix;
currIndicesDateSuffix = indexDateSuffix;
}
} catch (Exception e) {
e.printStackTrace();

Loading…
Cancel
Save