Skip to content

Commit 1b0366d

Browse files
Merge branch 'v1.8.0_dev' of ssh://git.dtstack.cn:10022/dtstack/dt-center-flinkStreamSQL into '1.8_polardb'
2 parents 4481c3a + 95fa295 commit 1b0366d

File tree

63 files changed

+1349
-1462
lines changed

Some content is hidden

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

63 files changed

+1349
-1462
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,16 @@
5656
```
5757
mvn clean package -Dmaven.test.skip
5858
59-
打包结束后,项目根目录下会产生plugins目录,plugins目录下存放编译好的数据同步插件包,在lib目下存放job提交的包
6059
```
6160

61+
打包完成后的包结构:
62+
63+
> * dt-center-flinkStreamSQL
64+
> > * bin: 任务启动脚本
65+
> > * lib: launcher包存储路径,是任务提交的入口
66+
> > * plugins: 插件包存储路径
67+
> > * ........ : core及插件代码
68+
6269
### 1.4 启动
6370

6471
#### 1.4.1 启动命令

cassandra/cassandra-side/cassandra-all-side/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
<goal>shade</goal>
3737
</goals>
3838
<configuration>
39+
<createDependencyReducedPom>false</createDependencyReducedPom>
3940
<artifactSet>
4041
<excludes>
4142
<exclude>org.slf4j</exclude>

cassandra/cassandra-side/cassandra-async-side/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<goal>shade</goal>
5353
</goals>
5454
<configuration>
55+
<createDependencyReducedPom>false</createDependencyReducedPom>
5556
<artifactSet>
5657
<excludes>
5758
<exclude>org.slf4j</exclude>

cassandra/cassandra-side/cassandra-side-core/src/main/java/com/dtstack/flink/sql/side/cassandra/table/CassandraSideParser.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ public class CassandraSideParser extends AbsSideTableParser {
6868

6969
public static final String POOL_TIMEOUT_MILLIS_KEY = "poolTimeoutMillis";
7070

71-
static {
72-
keyPatternMap.put(SIDE_SIGN_KEY, SIDE_TABLE_SIGN);
73-
keyHandlerMap.put(SIDE_SIGN_KEY, CassandraSideParser::dealSideSign);
71+
public CassandraSideParser() {
72+
addParserHandler(SIDE_SIGN_KEY, SIDE_TABLE_SIGN, this::dealSideSign);
7473
}
7574

7675
@Override
@@ -97,7 +96,7 @@ public TableInfo getTableInfo(String tableName, String fieldsInfo, Map<String, O
9796
return cassandraSideTableInfo;
9897
}
9998

100-
private static void dealSideSign(Matcher matcher, TableInfo tableInfo) {
99+
private void dealSideSign(Matcher matcher, TableInfo tableInfo) {
101100
}
102101

103102
public Class dbTypeConvertToJavaType(String fieldType) {

console/console-sink/src/test/java/com/dtstack/flinkx/AppTest.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

core/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@
116116
<version>${flink.version}</version>
117117
</dependency>
118118

119+
119120
</dependencies>
120121

121122
<build>
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
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+
19+
package com.dtstack.flink.sql.side;
20+
21+
import java.io.Serializable;
22+
23+
/**
24+
* Predicate base info
25+
*
26+
* Date: 2019/12/11
27+
* Company: www.dtstack.com
28+
* @author maqi
29+
*/
30+
public class PredicateInfo implements Serializable {
31+
32+
private String operatorName;
33+
private String operatorKind;
34+
private String ownerTable;
35+
private String fieldName;
36+
private String condition;
37+
38+
public PredicateInfo(String operatorName, String operatorKind, String ownerTable, String fieldName, String condition) {
39+
this.operatorName = operatorName;
40+
this.operatorKind = operatorKind;
41+
this.ownerTable = ownerTable;
42+
this.fieldName = fieldName;
43+
this.condition = condition;
44+
}
45+
46+
public String getOperatorName() {
47+
return operatorName;
48+
}
49+
50+
public void setOperatorName(String operatorName) {
51+
this.operatorName = operatorName;
52+
}
53+
54+
public String getOperatorKind() {
55+
return operatorKind;
56+
}
57+
58+
public void setOperatorKind(String operatorKind) {
59+
this.operatorKind = operatorKind;
60+
}
61+
62+
public String getOwnerTable() {
63+
return ownerTable;
64+
}
65+
66+
public void setOwnerTable(String ownerTable) {
67+
this.ownerTable = ownerTable;
68+
}
69+
70+
public String getFieldName() {
71+
return fieldName;
72+
}
73+
74+
public void setFieldName(String fieldName) {
75+
this.fieldName = fieldName;
76+
}
77+
78+
public String getCondition() {
79+
return condition;
80+
}
81+
82+
public void setCondition(String condition) {
83+
this.condition = condition;
84+
}
85+
86+
@Override
87+
public String toString() {
88+
return "PredicateInfo{" +
89+
"operatorName='" + operatorName + '\'' +
90+
", operatorKind='" + operatorKind + '\'' +
91+
", ownerTable='" + ownerTable + '\'' +
92+
", fieldName='" + fieldName + '\'' +
93+
", condition='" + condition + '\'' +
94+
'}';
95+
}
96+
97+
public static Builder builder() {
98+
return new Builder();
99+
}
100+
101+
102+
public static class Builder {
103+
104+
private String operatorName;
105+
private String operatorKind;
106+
private String ownerTable;
107+
private String fieldName;
108+
private String condition;
109+
110+
public Builder setOperatorName(String operatorName) {
111+
this.operatorName = operatorName;
112+
return this;
113+
}
114+
115+
public Builder setOperatorKind(String operatorKind) {
116+
this.operatorKind = operatorKind;
117+
return this;
118+
}
119+
120+
public Builder setOwnerTable(String ownerTable) {
121+
this.ownerTable = ownerTable;
122+
return this;
123+
}
124+
125+
public Builder setFieldName(String fieldName) {
126+
this.fieldName = fieldName;
127+
return this;
128+
}
129+
130+
public Builder setCondition(String condition) {
131+
this.condition = condition;
132+
return this;
133+
}
134+
135+
public PredicateInfo build() {
136+
return new PredicateInfo(
137+
operatorName, operatorKind, ownerTable, fieldName, condition);
138+
}
139+
}
140+
141+
142+
}

0 commit comments

Comments
 (0)