10 changed files with 86 additions and 159 deletions
Split View
Diff Options
-
2ai-root-cloud-event/src/main/java/com/qniao/rootcloudevent/AIRootCloudWarningDataReceivedEvent.java
-
22ai-root-cloud-event/src/main/java/com/qniao/rootcloudevent/AIWarningDataReceivedEvent.java
-
98ai-root-cloud-statistics/dependency-reduced-pom.xml
-
2ai-root-cloud-statistics/pom.xml
-
44ai-root-cloud-statistics/src/main/java/com/qniao/rootcloudstatistics/RootCloudIotDataFormatterJob.java
-
33ai-root-cloud-statistics/src/main/java/com/qniao/rootcloudstatistics/event/AIRootCloudWaringDataReceivedEventDeserializationSchema.java
-
33ai-root-cloud-statistics/src/main/java/com/qniao/rootcloudstatistics/event/AIRootCloudWarningDataReceivedEventDeserializationSchema.java
-
6ai-root-cloud-statistics/src/main/java/com/qniao/rootcloudstatistics/event/AIWarningDataReceivedEventSerializationSchema.java
-
2ai-root-cloud-statistics/src/main/resources/META-INF/app.properties
-
3pom.xml
@ -1,98 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
|||
<parent> |
|||
<artifactId>ai-root-cloud-waring-formatter</artifactId> |
|||
<groupId>com.qniao</groupId> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
</parent> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<artifactId>ai-root-cloud-statistics</artifactId> |
|||
<name>ai-root-cloud-statistics</name> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
<description>ai-root-cloud-statistics</description> |
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
<version>3.1</version> |
|||
<configuration> |
|||
<source>${target.java.version}</source> |
|||
<target>${target.java.version}</target> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<artifactId>maven-shade-plugin</artifactId> |
|||
<version>3.1.1</version> |
|||
<executions> |
|||
<execution> |
|||
<phase>package</phase> |
|||
<goals> |
|||
<goal>shade</goal> |
|||
</goals> |
|||
<configuration> |
|||
<artifactSet> |
|||
<excludes> |
|||
<exclude>org.apache.flink:flink-shaded-force-shading</exclude> |
|||
<exclude>com.google.code.findbugs:jsr305</exclude> |
|||
<exclude>org.slf4j:*</exclude> |
|||
<exclude>org.apache.logging.log4j:*</exclude> |
|||
</excludes> |
|||
</artifactSet> |
|||
<filters> |
|||
<filter> |
|||
<artifact>*:*</artifact> |
|||
<excludes> |
|||
<exclude>META-INF/*.SF</exclude> |
|||
<exclude>META-INF/*.DSA</exclude> |
|||
<exclude>META-INF/*.RSA</exclude> |
|||
</excludes> |
|||
</filter> |
|||
</filters> |
|||
<transformers> |
|||
<transformer /> |
|||
<transformer> |
|||
<mainClass>com.qniao.iot.rc.RootCloudIotDataFormatterJob</mainClass> |
|||
</transformer> |
|||
</transformers> |
|||
</configuration> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.apache.logging.log4j</groupId> |
|||
<artifactId>log4j-slf4j-impl</artifactId> |
|||
<version>2.17.2</version> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.logging.log4j</groupId> |
|||
<artifactId>log4j-api</artifactId> |
|||
<version>2.17.2</version> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.logging.log4j</groupId> |
|||
<artifactId>log4j-core</artifactId> |
|||
<version>2.17.2</version> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
<distributionManagement> |
|||
<repository> |
|||
<id>maven-releases</id> |
|||
<name>Nexus releases Repository</name> |
|||
<url>http://120.78.76.88:8081/repository/maven-snapshots/</url> |
|||
</repository> |
|||
</distributionManagement> |
|||
<properties> |
|||
<target.java.version>1.8</target.java.version> |
|||
<log4j.version>2.17.2</log4j.version> |
|||
<flink.version>1.15.0</flink.version> |
|||
<maven.compiler.source>${target.java.version}</maven.compiler.source> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<maven.compiler.target>${target.java.version}</maven.compiler.target> |
|||
</properties> |
|||
</project> |
|||
@ -1,33 +0,0 @@ |
|||
package com.qniao.rootcloudstatistics.event; |
|||
|
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.qniao.rootcloudevent.AIRootCloudWaringDataReceivedEvent; |
|||
import org.apache.flink.api.common.serialization.DeserializationSchema; |
|||
import org.apache.flink.api.common.typeinfo.TypeInformation; |
|||
|
|||
import java.io.IOException; |
|||
|
|||
/** |
|||
* @author Lzk |
|||
*/ |
|||
public class AIRootCloudWaringDataReceivedEventDeserializationSchema implements DeserializationSchema<AIRootCloudWaringDataReceivedEvent> { |
|||
/** |
|||
* 注册JavaTimeModule,支持LocalDateTime字段的解析 |
|||
*/ |
|||
final private ObjectMapper objectMapper = new ObjectMapper(); |
|||
|
|||
@Override |
|||
public AIRootCloudWaringDataReceivedEvent deserialize(byte[] message) throws IOException { |
|||
return objectMapper.readValue(message, AIRootCloudWaringDataReceivedEvent.class); |
|||
} |
|||
|
|||
@Override |
|||
public boolean isEndOfStream(AIRootCloudWaringDataReceivedEvent nextElement) { |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public TypeInformation<AIRootCloudWaringDataReceivedEvent> getProducedType() { |
|||
return TypeInformation.of(AIRootCloudWaringDataReceivedEvent.class); |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
package com.qniao.rootcloudstatistics.event; |
|||
|
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.qniao.rootcloudevent.AIRootCloudWarningDataReceivedEvent; |
|||
import org.apache.flink.api.common.serialization.DeserializationSchema; |
|||
import org.apache.flink.api.common.typeinfo.TypeInformation; |
|||
|
|||
import java.io.IOException; |
|||
|
|||
/** |
|||
* @author Lzk |
|||
*/ |
|||
public class AIRootCloudWarningDataReceivedEventDeserializationSchema implements DeserializationSchema<AIRootCloudWarningDataReceivedEvent> { |
|||
/** |
|||
* 注册JavaTimeModule,支持LocalDateTime字段的解析 |
|||
*/ |
|||
final private ObjectMapper objectMapper = new ObjectMapper(); |
|||
|
|||
@Override |
|||
public AIRootCloudWarningDataReceivedEvent deserialize(byte[] message) throws IOException { |
|||
return objectMapper.readValue(message, AIRootCloudWarningDataReceivedEvent.class); |
|||
} |
|||
|
|||
@Override |
|||
public boolean isEndOfStream(AIRootCloudWarningDataReceivedEvent nextElement) { |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public TypeInformation<AIRootCloudWarningDataReceivedEvent> getProducedType() { |
|||
return TypeInformation.of(AIRootCloudWarningDataReceivedEvent.class); |
|||
} |
|||
} |
|||
@ -1,4 +1,4 @@ |
|||
app.id=ai-root-cloud-waring-formatter |
|||
app.id=ai-root-cloud-warning-formatter |
|||
|
|||
# ???? 8.135.8.221 |
|||
# ???? 47.112.164.224 |
|||
Write
Preview
Loading…
Cancel
Save