|
|
|
@ -85,7 +85,6 @@ public class RootCloudIotDataFormatterJob { |
|
|
|
|
|
|
|
public static void main(String[] args) throws Exception { |
|
|
|
|
|
|
|
|
|
|
|
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); |
|
|
|
env.enableCheckpointing(60000L, CheckpointingMode.EXACTLY_ONCE); |
|
|
|
KafkaSource<JSONObject> source = KafkaSource.<JSONObject>builder() |
|
|
|
@ -154,6 +153,12 @@ public class RootCloudIotDataFormatterJob { |
|
|
|
|
|
|
|
|
|
|
|
private static AIWarningDataReceivedEvent transform(JSONObject event) { |
|
|
|
//图片可能没生成 todo 需要问下树根,先休眠一下 |
|
|
|
try { |
|
|
|
Thread.sleep(10000); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
AIWarningDataReceivedEvent aiWaringDataReceivedEvent = new AIWarningDataReceivedEvent(); |
|
|
|
Object object = event.get("payload"); |
|
|
|
if (Objects.nonNull(object)) { |
|
|
|
|