Skip to content

Commit f99c509

Browse files
authored
Merge pull request #186 from ni-ze/snapshot-1.0.4
[ISSUE #187]Merge from Snapshot 1.0.4
2 parents b654e66 + ce2f98b commit f99c509

File tree

211 files changed

+9648
-2380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+9648
-2380
lines changed

pom.xml

Lines changed: 29 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<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/xsd/maven-4.0.0.xsd">
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1921
<modelVersion>4.0.0</modelVersion>
2022

2123
<parent>
@@ -31,56 +33,6 @@
3133
<packaging>pom</packaging>
3234
<url>https://rocketmq.apache.org/</url>
3335

34-
35-
<scm>
36-
<url>[email protected]:apache/rocketmq-streams.git</url>
37-
<connection>scm:git:[email protected]:apache/rocketmq-streams.git</connection>
38-
<developerConnection>scm:git:[email protected]:apache/rocketmq-streams.git</developerConnection>
39-
<tag>1.0.0-preview</tag>
40-
</scm>
41-
42-
<mailingLists>
43-
<mailingList>
44-
<name>Development List</name>
45-
<subscribe>[email protected]</subscribe>
46-
<unsubscribe>[email protected]</unsubscribe>
47-
<post>[email protected]</post>
48-
</mailingList>
49-
<mailingList>
50-
<name>User List</name>
51-
<subscribe>[email protected]</subscribe>
52-
<unsubscribe>[email protected]</unsubscribe>
53-
<post>[email protected]</post>
54-
</mailingList>
55-
<mailingList>
56-
<name>Commits List</name>
57-
<subscribe>[email protected]</subscribe>
58-
<unsubscribe>[email protected]</unsubscribe>
59-
<post>[email protected]</post>
60-
</mailingList>
61-
</mailingLists>
62-
63-
<developers>
64-
<developer>
65-
<id>Apache RocketMQ</id>
66-
<name>Apache RocketMQ of ASF</name>
67-
<url>https://rocketmq.apache.org/</url>
68-
</developer>
69-
</developers>
70-
71-
<organization>
72-
<name>Apache Software Foundation</name>
73-
<url>http://www.apache.org</url>
74-
</organization>
75-
76-
<licenses>
77-
<license>
78-
<name>Apache License, Version 2.0</name>
79-
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
80-
<distribution>repo</distribution>
81-
</license>
82-
</licenses>
83-
8436
<modules>
8537
<module>rocketmq-streams-commons</module>
8638
<module>rocketmq-streams-transport-minio</module>
@@ -112,13 +64,13 @@
11264
<java.version>1.8</java.version>
11365
<java.encoding>UTF-8</java.encoding>
11466
<project.build.sourceEncoding>${java.encoding}</project.build.sourceEncoding>
115-
<log4j.version>1.2.17</log4j.version>
11667
<commons-logging.version>1.1</commons-logging.version>
117-
<spring.version>3.2.13.RELEASE</spring.version>
68+
<spring.version>5.1.14.RELEASE</spring.version>
11869
<auto-service.version>1.0-rc5</auto-service.version>
11970
<mysql-connector.version>5.1.40</mysql-connector.version>
12071
<fastjson.version>1.2.83</fastjson.version>
12172
<quartz.version>2.3.2</quartz.version>
73+
12274
<httpclient.version>4.5.13</httpclient.version>
12375
<commons-io.version>2.7</commons-io.version>
12476
<junit.version>4.13.1</junit.version>
@@ -140,8 +92,10 @@
14092
<commons-lang.version>2.5</commons-lang.version>
14193
<elasticsearch.version>7.4.0</elasticsearch.version>
14294
<kafka.version>1.1.0</kafka.version>
143-
<maven.javadoc.skip>true</maven.javadoc.skip>
14495
<paho.version>1.2.2</paho.version>
96+
<kryo.version>5.3.0</kryo.version>
97+
<fst.version>2.56</fst.version>
98+
<slf4j-log4j12.version>1.7.36</slf4j-log4j12.version>
14599
</properties>
146100

147101

@@ -167,10 +121,7 @@
167121
<exclude>build_without_test.sh</exclude>
168122
<exclude>NOTICE</exclude>
169123
<exclude>LICENSE</exclude>
170-
<exclude>README.md</exclude>
171-
<exclude>README-chinese.md</exclude>
172-
<exclude>QUICKSTART.md</exclude>
173-
<exclude>quick_start.md</exclude>
124+
<exclude>*.md</exclude>
174125
<exclude>.github/**</exclude>
175126
<exclude>*/target/**</exclude>
176127
<exclude>*/*.iml</exclude>
@@ -202,18 +153,6 @@
202153
<artifactId>versions-maven-plugin</artifactId>
203154
<version>2.2</version>
204155
</plugin>
205-
<plugin>
206-
<groupId>org.codehaus.mojo</groupId>
207-
<artifactId>cobertura-maven-plugin</artifactId>
208-
<version>2.7</version>
209-
<configuration>
210-
<formats>
211-
<format>html</format>
212-
<format>xml</format>
213-
</formats>
214-
<check />
215-
</configuration>
216-
</plugin>
217156
<plugin>
218157
<groupId>org.jacoco</groupId>
219158
<artifactId>jacoco-maven-plugin</artifactId>
@@ -260,11 +199,6 @@
260199
<artifactId>rocketmq-streams-commons</artifactId>
261200
<version>${project.version}</version>
262201
</dependency>
263-
<dependency>
264-
<groupId>org.apache.rocketmq</groupId>
265-
<artifactId>rocketmq-streams-channel-es</artifactId>
266-
<version>${project.version}</version>
267-
</dependency>
268202
<dependency>
269203
<groupId>org.apache.rocketmq</groupId>
270204
<artifactId>rocketmq-streams-channel-mqtt</artifactId>
@@ -305,11 +239,6 @@
305239
<artifactId>rocketmq-streams-db-operator</artifactId>
306240
<version>${project.version}</version>
307241
</dependency>
308-
<dependency>
309-
<groupId>org.apache.rocketmq</groupId>
310-
<artifactId>rocketmq-streams-dim</artifactId>
311-
<version>${project.version}</version>
312-
</dependency>
313242
<dependency>
314243
<groupId>org.apache.rocketmq</groupId>
315244
<artifactId>rocketmq-streams-filter</artifactId>
@@ -331,11 +260,6 @@
331260
</exclusion>
332261
</exclusions>
333262
</dependency>
334-
<dependency>
335-
<groupId>org.apache.rocketmq</groupId>
336-
<artifactId>rocketmq-streams-script-python</artifactId>
337-
<version>${project.version}</version>
338-
</dependency>
339263
<dependency>
340264
<groupId>org.apache.rocketmq</groupId>
341265
<artifactId>rocketmq-streams-serviceloader</artifactId>
@@ -366,7 +290,6 @@
366290
<artifactId>rocketmq-streams-channel-rocketmq</artifactId>
367291
<version>${project.version}</version>
368292
</dependency>
369-
370293
<dependency>
371294
<groupId>org.apache.rocketmq</groupId>
372295
<artifactId>rocketmq-streams-examples</artifactId>
@@ -398,12 +321,6 @@
398321
<version>${rocketmq.version}</version>
399322
</dependency>
400323

401-
<dependency>
402-
<groupId>org.apache.rocketmq</groupId>
403-
<artifactId>rocketmq-tools</artifactId>
404-
<version>${rocketmq.version}</version>
405-
</dependency>
406-
407324
<!-- ================================================= -->
408325
<!-- tool library -->
409326
<!-- ================================================= -->
@@ -437,9 +354,9 @@
437354
</dependency>
438355

439356
<dependency>
440-
<groupId>log4j</groupId>
441-
<artifactId>log4j</artifactId>
442-
<version>${log4j.version}</version>
357+
<groupId>org.slf4j</groupId>
358+
<artifactId>slf4j-log4j12</artifactId>
359+
<version>${slf4j-log4j12.version}</version>
443360
</dependency>
444361

445362
<dependency>
@@ -586,6 +503,12 @@
586503
<artifactId>elasticsearch-rest-client</artifactId>
587504
<version>${elasticsearch.version}</version>
588505
</dependency>
506+
507+
<dependency>
508+
<groupId>org.elasticsearch</groupId>
509+
<artifactId>elasticsearch</artifactId>
510+
<version>${elasticsearch.version}</version>
511+
</dependency>
589512
<dependency>
590513
<groupId>org.apache.kafka</groupId>
591514
<artifactId>kafka_2.12</artifactId>
@@ -598,6 +521,17 @@
598521
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
599522
<version>${paho.version}</version>
600523
</dependency>
524+
525+
<dependency>
526+
<groupId>de.ruedigermoeller</groupId>
527+
<artifactId>fst</artifactId>
528+
<version>${fst.version}</version>
529+
</dependency>
530+
<dependency>
531+
<groupId>com.esotericsoftware</groupId>
532+
<artifactId>kryo</artifactId>
533+
<version>${kryo.version}</version>
534+
</dependency>
601535
</dependencies>
602536
</dependencyManagement>
603537

rocketmq-streams-channel-db/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
See the License for the specific language governing permissions and
1616
limitations under the License.
1717
-->
18-
<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/xsd/maven-4.0.0.xsd">
18+
<project xmlns="http://maven.apache.org/POM/4.0.0"
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
1921
<modelVersion>4.0.0</modelVersion>
2022
<parent>
2123
<groupId>org.apache.rocketmq</groupId>

rocketmq-streams-channel-db/src/main/java/org/apache/rocketmq/streams/db/sink/AbstractMultiTableSink.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public abstract class AbstractMultiTableSink extends EnhanceDBSink {
3434
protected transient AtomicLong messageCount = new AtomicLong(0);
3535
protected transient MultiTableSplitFunction<IMessage> multiTableSplitFunction;
3636

37-
public AbstractMultiTableSink(){
37+
public AbstractMultiTableSink() {
3838
}
3939

4040
public AbstractMultiTableSink(String url, String userName, String password) {
@@ -44,16 +44,16 @@ public AbstractMultiTableSink(String url, String userName, String password) {
4444
}
4545

4646
@Override
47-
protected boolean initConfigurable(){
47+
protected boolean initConfigurable() {
4848
Iterator<EnhanceDBSink> it = tableSinks.values().iterator();
49-
while(it.hasNext()){
49+
while (it.hasNext()) {
5050
it.next().initConfigurable();
5151
}
5252
return true;
5353
}
5454

5555
@Override
56-
public boolean batchAdd(IMessage message, ISplit split) {
56+
public boolean batchAdd(IMessage message, ISplit<?, ?> split) {
5757

5858
EnhanceDBSink sink = getOrCreateDBSink(split.getQueueId());
5959
boolean success = sink.batchAdd(message, split);
@@ -68,7 +68,7 @@ public boolean batchAdd(IMessage message, ISplit split) {
6868

6969
@Override
7070
public boolean batchAdd(IMessage message) {
71-
ISplit split = getSplitFromMessage(message);
71+
ISplit<?, ?> split = getSplitFromMessage(message);
7272
return batchAdd(message, split);
7373
}
7474

@@ -142,7 +142,7 @@ protected EnhanceDBSink getOrCreateDBSink(String splitId) {
142142

143143
protected abstract String createTableName(String splitId);
144144

145-
protected abstract ISplit getSplitFromMessage(IMessage message);
145+
protected abstract ISplit<?, ?> getSplitFromMessage(IMessage message);
146146

147147
protected class SingleDBSinkCache extends MessageCache<IMessage> {
148148

rocketmq-streams-channel-db/src/main/java/org/apache/rocketmq/streams/db/sink/DynamicMultipleDBSink.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class DynamicMultipleDBSink extends AbstractMultiTableSink implements IAf
3232
String logicTableName;
3333
String fieldName;
3434

35-
public DynamicMultipleDBSink(){
35+
public DynamicMultipleDBSink() {
3636
}
3737

3838
public String getLogicTableName() {
@@ -63,21 +63,21 @@ protected String createTableName(String splitId) {
6363
}
6464

6565
@Override
66-
protected ISplit getSplitFromMessage(IMessage message) {
66+
protected ISplit<?, ?> getSplitFromMessage(IMessage message) {
6767
return this.multiTableSplitFunction.createSplit(message);
6868
}
6969

70-
7170
@Override
7271
public void doProcessAfterRefreshConfigurable(IConfigurableService configurableService) {
7372

74-
if(this.multiTableSplitFunction == null){
73+
if (this.multiTableSplitFunction == null) {
7574

7675
this.multiTableSplitFunction = new MultiTableSplitFunction<IMessage>() {
7776
@Override
78-
public ISplit createSplit(IMessage message) {
77+
public ISplit<?, ?> createSplit(IMessage message) {
7978
return new DynamicMultipleDBSplit(message.getMessageBody().getString(fieldName), logicTableName);
8079
}
80+
8181
@Override
8282
public String createTableFromSplitId(String splitId) {
8383
return splitId;
@@ -86,6 +86,5 @@ public String createTableFromSplitId(String splitId) {
8686

8787
}
8888

89-
9089
}
9190
}

rocketmq-streams-channel-db/src/main/java/org/apache/rocketmq/streams/db/sink/SelfMultiTableSink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ protected String createTableName(String splitId) {
4141
}
4242

4343
@Override
44-
protected ISplit getSplitFromMessage(IMessage message) {
44+
protected ISplit<?, ?> getSplitFromMessage(IMessage message) {
4545
return multiTableSplitFunction.createSplit(message);
4646
}
4747

rocketmq-streams-channel-db/src/main/java/org/apache/rocketmq/streams/db/sink/SplitBySerialNumber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected String createTableName(String splitId) {
3030
}
3131

3232
@Override
33-
protected ISplit getSplitFromMessage(IMessage message) {
33+
protected ISplit<?, ?> getSplitFromMessage(IMessage message) {
3434
return null;
3535
}
3636
}

rocketmq-streams-channel-db/src/main/java/org/apache/rocketmq/streams/db/sink/SplitByTimeMultiTableSink.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected String createTableName(String splitId) {
3030
}
3131

3232
@Override
33-
protected ISplit getSplitFromMessage(IMessage message) {
33+
protected ISplit<?, ?> getSplitFromMessage(IMessage message) {
3434
return null;
3535
}
3636
}

rocketmq-streams-channel-es/pom.xml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!--
3-
Licensed to the Apache Software Foundation (ASF) under one or more
4-
contributor license agreements. See the NOTICE file distributed with
5-
this work for additional information regarding copyright ownership.
6-
The ASF licenses this file to You under the Apache License, Version 2.0
7-
(the "License"); you may not use this file except in compliance with
8-
the License. You may obtain a copy of the License at
92

10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing, software
13-
distributed under the License is distributed on an "AS IS" BASIS,
14-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
See the License for the specific language governing permissions and
16-
limitations under the License.
17-
-->
18-
<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/xsd/maven-4.0.0.xsd">
3+
<project xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
196
<modelVersion>4.0.0</modelVersion>
207
<parent>
218
<groupId>org.apache.rocketmq</groupId>
229
<artifactId>rocketmq-streams</artifactId>
2310
<version>1.0.2-preview-SNAPSHOT</version>
24-
</parent>
11+
</parent>
2512
<artifactId>rocketmq-streams-channel-es</artifactId>
2613
<name>ROCKETMQ STREAMS :: channel-es</name>
2714
<packaging>jar</packaging>
@@ -39,6 +26,12 @@
3926
<groupId>org.apache.rocketmq</groupId>
4027
<artifactId>rocketmq-streams-configurable</artifactId>
4128
</dependency>
29+
30+
<dependency>
31+
<groupId>org.elasticsearch</groupId>
32+
<artifactId>elasticsearch</artifactId>
33+
</dependency>
34+
4235
</dependencies>
4336
<repositories>
4437
<repository>

0 commit comments

Comments
 (0)