Browse Source

更新

master
1049970895@qniao.cn 3 years ago
parent
commit
57e25c1531
1 changed files with 54 additions and 54 deletions
  1. 108
      iot-machine-state-event-generator-job/src/main/java/com/qniao/iot/machine/event/generator/job/IotMachineEventGeneratorJob.java

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

@ -452,60 +452,60 @@ public class IotMachineEventGeneratorJob {
CreateIndexRequest request = new CreateIndexRequest(indicesName);
// 字段映射
String mappersStr = "{\n" +
" \"properties\": {\n" +
" \"countOfThePeriod\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"durationOfThePeriod\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"jobCountOfTheDay\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"jobDurationOfTheDay\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"machineWorkingStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"machineIotMac\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"machinePwrStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"currWaitingDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"igStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"currJobDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"currJobCount\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"receivedTime\": {\n" +
" \"type\": \"date\"\n" +
" },\n" +
" \"currStoppingDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"id\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"accJobCount\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"dataSource\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"reportTime\": {\n" +
" \"type\": \"date\"\n" +
" }\n" +
" }\n" +
" }";
" \"properties\": {\n" +
" \"machineWorkingStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"jobCountOfTheDay\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"machineIotMac\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"machinePwrStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"durationOfThePeriod\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"currWaitingDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"igStat\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"currJobDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"currJobCount\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"receivedTime\": {\n" +
" \"type\": \"date\"\n" +
" },\n" +
" \"currStoppingDuration\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"countOfThePeriod\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"id\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"jobDurationOfTheDay\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"accJobCount\": {\n" +
" \"type\": \"long\"\n" +
" },\n" +
" \"dataSource\": {\n" +
" \"type\": \"integer\"\n" +
" },\n" +
" \"reportTime\": {\n" +
" \"type\": \"date\"\n" +
" }\n" +
" }\n" +
" }";
request.mapping(mappersStr, XContentType.JSON);
// 设置索引别名
request.alias(new Alias(ApolloConfig.getStr(ConfigConstant.SINK_ELASTICSEARCH_INDEX)));

Loading…
Cancel
Save