diff options
| author | houjinchuan <[email protected]> | 2024-05-16 16:00:21 +0800 |
|---|---|---|
| committer | houjinchuan <[email protected]> | 2024-05-16 16:00:21 +0800 |
| commit | caf3c7ff8415f4ed6cf7466dfc8b5bd0dfb78ea0 (patch) | |
| tree | cdf1dab100a60a2edfb1a4397e4e9153475531f1 | |
| parent | 2ae770710555e6f04a4ad48b90590bf787275f2a (diff) | |
优化pom文件
| -rw-r--r-- | pom.xml | 67 | ||||
| -rw-r--r-- | src/test/java/com/zdjizhi/FileChunkCombinerTests.java | 30 |
2 files changed, 59 insertions, 38 deletions
@@ -45,8 +45,13 @@ <artifactId>log4j-over-slf4j</artifactId> <groupId>org.slf4j</groupId> </exclusion> + <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> </exclusions> </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> @@ -57,11 +62,7 @@ <artifactId>slf4j-log4j12</artifactId> <version>1.7.25</version> </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.17</version> - </dependency> + <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-core</artifactId> @@ -94,15 +95,11 @@ </dependency> <dependency> <groupId>org.apache.flink</groupId> - <artifactId>flink-metrics-dropwizard</artifactId> - <version>${flink.version}</version> - </dependency> - <dependency> - <groupId>org.apache.flink</groupId> <artifactId>flink-runtime_2.12</artifactId> <version>${flink.version}</version> <scope>provided</scope> </dependency> + <dependency> <groupId>org.apache.flink</groupId> <artifactId>flink-test-utils_2.12</artifactId> @@ -110,6 +107,19 @@ <scope>test</scope> </dependency> <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>2.21.0</version> + <scope>test</scope> + </dependency> + + <dependency> <groupId>org.msgpack</groupId> <artifactId>msgpack-core</artifactId> <version>0.9.5</version> @@ -119,33 +129,25 @@ <artifactId>jackson-dataformat-msgpack</artifactId> <version>0.9.5</version> </dependency> + <dependency> <groupId>cn.hutool</groupId> <artifactId>hutool-all</artifactId> - <version>5.8.22</version> + <version>5.8.25</version> </dependency> + <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>2.0.32</version> </dependency> + <dependency> <groupId>org.jasypt</groupId> <artifactId>jasypt</artifactId> <version>1.9.3</version> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.12</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.21.0</version> - <scope>test</scope> - </dependency> + <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> @@ -161,6 +163,7 @@ <artifactId>httpasyncclient</artifactId> <version>4.1.5</version> </dependency> + <dependency> <groupId>org.apache.hbase</groupId> <artifactId>hbase-client</artifactId> @@ -179,6 +182,10 @@ <artifactId>log4j-over-slf4j</artifactId> </exclusion> <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> + <exclusion> <groupId>org.apache.hadoop</groupId> <artifactId>hadoop-annotations</artifactId> </exclusion> @@ -193,12 +200,24 @@ <artifactId>hadoop-common</artifactId> <version>2.8.5</version> <scope>provided</scope> + <exclusions> + <exclusion> + <groupId>jdk.tools</groupId> + <artifactId>jdk.tools</artifactId> + </exclusion> + <exclusion> + <artifactId>log4j</artifactId> + <groupId>log4j</groupId> + </exclusion> + </exclusions> </dependency> + <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-jexl3</artifactId> <version>3.2.1</version> </dependency> + <dependency> <groupId>com.github.ben-manes.caffeine</groupId> <artifactId>caffeine</artifactId> @@ -260,6 +279,7 @@ <configuration> <source>11</source> <target>11</target> + <encoding>UTF-8</encoding> <forceJavacCompilerUse>true</forceJavacCompilerUse> </configuration> </plugin> @@ -267,6 +287,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> + <version>3.2.4</version> <configuration> <shadedArtifactAttached>false</shadedArtifactAttached> <createDependencyReducedPom>true</createDependencyReducedPom> diff --git a/src/test/java/com/zdjizhi/FileChunkCombinerTests.java b/src/test/java/com/zdjizhi/FileChunkCombinerTests.java index d3d30c4..959db5c 100644 --- a/src/test/java/com/zdjizhi/FileChunkCombinerTests.java +++ b/src/test/java/com/zdjizhi/FileChunkCombinerTests.java @@ -630,20 +630,6 @@ public class FileChunkCombinerTests { } } - private static class ProcessWindowFunctionMock extends ProcessWindowFunction<FileChunk, FileChunk, String, TimeWindow> implements OutputTypeConfigurable<FileChunk> { - private static final long serialVersionUID = 1L; - - private ProcessWindowFunctionMock() { - } - - @Override - public void process(String s, Context context, Iterable<FileChunk> elements, Collector<FileChunk> out) throws Exception { - } - - public void setOutputType(TypeInformation<FileChunk> outTypeInfo, ExecutionConfig executionConfig) { - } - } - private StreamExecutionEnvironment createPipeline(int parallelism, SourceFunction<byte[]> source, long windowTime, long windowIdleTime) { StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.setParallelism(parallelism); @@ -656,7 +642,7 @@ public class FileChunkCombinerTests { Trigger<Object, TimeWindow> trigger = MultipleTrigger.of(triggers); env.addSource(source) .map(new ParseMessagePackMapFunction()) - .filter(new FileChunkFilterFunction("","test")) + .filter(new FileChunkFilterFunction("", "test")) .assignTimestampsAndWatermarks(watermarkStrategy) .keyBy(new FileChunkKeySelector(), BasicTypeInfo.STRING_TYPE_INFO) .window(TumblingEventTimeWindows.of(Time.seconds(windowTime))) @@ -715,6 +701,20 @@ public class FileChunkCombinerTests { // windowFunction.close(); // Mockito.verify(mock).close(); // } +// +// private static class ProcessWindowFunctionMock extends ProcessWindowFunction<FileChunk, FileChunk, String, TimeWindow> implements OutputTypeConfigurable<FileChunk> { +// private static final long serialVersionUID = 1L; +// +// private ProcessWindowFunctionMock() { +// } +// +// @Override +// public void process(String s, Context context, Iterable<FileChunk> elements, Collector<FileChunk> out) throws Exception { +// } +// +// public void setOutputType(TypeInformation<FileChunk> outTypeInfo, ExecutionConfig executionConfig) { +// } +// } // @Test // public void testCombineChunkProcessWindowFunction() throws Exception { |
