Skip to content

Commit 229afce

Browse files
committed
connection info
1 parent ba2d191 commit 229afce

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

core/src/main/java/com/dtstack/flink/sql/side/AbstractSideTableInfo.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,4 +170,19 @@ public int getAsyncPoolSize() {
170170
public void setAsyncPoolSize(int asyncPoolSize) {
171171
this.asyncPoolSize = asyncPoolSize;
172172
}
173+
174+
@Override
175+
public String toString() {
176+
return "Cache Info{" +
177+
"cacheType='" + cacheType + '\'' +
178+
", cacheSize=" + cacheSize +
179+
", cacheTimeout=" + cacheTimeout +
180+
", asyncCapacity=" + asyncCapacity +
181+
", asyncTimeout=" + asyncTimeout +
182+
", asyncPoolSize=" + asyncPoolSize +
183+
", asyncTimeoutNumLimit=" + asyncTimeoutNumLimit +
184+
", partitionedJoin=" + partitionedJoin +
185+
", cacheMode='" + cacheMode + '\'' +
186+
'}';
187+
}
173188
}

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/all/AbstractRdbAllReqRow.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,7 @@ public AbstractRdbAllReqRow(BaseSideInfo sideInfo) {
7878
public void open(Configuration parameters) throws Exception {
7979
super.open(parameters);
8080
RdbSideTableInfo tableInfo = (RdbSideTableInfo) sideInfo.getSideTableInfo();
81-
LOG.info("jdbc url: {} ", tableInfo.getUrl());
82-
LOG.info("query table name: {}", tableInfo.getTableName());
83-
LOG.info("all cache type: {}", tableInfo.getCacheType());
84-
LOG.info("all cache size: {}", tableInfo.getCacheSize());
85-
LOG.info("all cache timeout: {}", tableInfo.getCacheTimeout());
81+
LOG.info("rdb dim table config info: {} ", tableInfo.toString());
8682
}
8783

8884

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/async/RdbAsyncReqRow.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,7 @@ protected void init(BaseSideInfo sideInfo) {
8989
public void open(Configuration parameters) throws Exception {
9090
super.open(parameters);
9191
RdbSideTableInfo rdbSideTableInfo = (RdbSideTableInfo) sideInfo.getSideTableInfo();
92-
LOG.info("use rdb pool size: {}", rdbSideTableInfo.getAsyncPoolSize());
93-
LOG.info("jdbc url: {} ", rdbSideTableInfo.getUrl());
94-
LOG.info("query table name: {}", rdbSideTableInfo.getTableName());
95-
LOG.info("async cache type: {}", rdbSideTableInfo.getCacheType());
96-
LOG.info("async cache mode: {}", rdbSideTableInfo.getCacheMode());
97-
LOG.info("async cache capacity: {}", rdbSideTableInfo.getAsyncCapacity());
98-
LOG.info("async cache timeout: {}", rdbSideTableInfo.getAsyncTimeout());
92+
LOG.info("rdb dim table config info: {} ", rdbSideTableInfo.toString());
9993
}
10094

10195
@Override

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/table/RdbSideTableInfo.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,15 @@ public String getPassword() {
9999
public void setPassword(String password) {
100100
this.password = password;
101101
}
102+
103+
@Override
104+
public String toString() {
105+
String cacheInfo = super.toString();
106+
String connectionInfo = "Rdb Side Connection Info{" +
107+
"url='" + url + '\'' +
108+
", tableName='" + tableName + '\'' +
109+
", schema='" + schema + '\'' +
110+
'}';
111+
return cacheInfo + " , " + connectionInfo;
112+
}
102113
}

0 commit comments

Comments
 (0)