Skip to content

Commit

Permalink
refactor: rename Submiter class (DataLinkDC#1590)
Browse files Browse the repository at this point in the history
Signed-off-by: Licho <[email protected]>
  • Loading branch information
leechor authored Feb 1, 2023
1 parent 3a15a61 commit 8be6860
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submiter;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;
Expand All @@ -41,6 +41,6 @@ public static void main(String[] args) throws IOException {
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submiter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submiter;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;
Expand All @@ -41,6 +41,6 @@ public static void main(String[] args) throws IOException {
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submiter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submiter;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;
Expand All @@ -41,6 +41,6 @@ public static void main(String[] args) throws IOException {
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submiter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submiter;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;
Expand All @@ -41,6 +41,6 @@ public static void main(String[] args) throws IOException {
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submiter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
package org.dinky.app;

import org.dinky.app.db.DBConfig;
import org.dinky.app.flinksql.Submiter;
import org.dinky.app.flinksql.Submitter;
import org.dinky.assertion.Asserts;
import org.dinky.constant.FlinkParamConstant;
import org.dinky.utils.FlinkBaseUtil;
Expand All @@ -41,6 +41,6 @@ public static void main(String[] args) throws IOException {
String id = params.get(FlinkParamConstant.ID);
Asserts.checkNullString(id, "请配置入参 id ");
DBConfig dbConfig = DBConfig.build(params);
Submiter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
Submitter.submit(Integer.valueOf(id), dbConfig, params.get(FlinkParamConstant.DINKY_ADDR));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
* @author wenmo
* @since 2021/10/27
*/
public class Submiter {
public class Submitter {

private static final Logger logger = LoggerFactory.getLogger(Submiter.class);
private static final Logger logger = LoggerFactory.getLogger(Submitter.class);
private static final String NULL = "null";

private static String getQuerySQL(Integer id) throws SQLException {
Expand Down Expand Up @@ -156,7 +156,7 @@ public static void submit(Integer id, DBConfig dbConfig, String dinkyAddr) {
dinkyAddr = "";
}
StringBuilder sb = new StringBuilder();
Map<String, String> taskConfig = Submiter.getTaskConfig(id, dbConfig);
Map<String, String> taskConfig = Submitter.getTaskConfig(id, dbConfig);

if (Asserts.isNotNull(taskConfig.get("envId"))) {
String envId = getFlinkSQLStatement(Integer.valueOf(taskConfig.get("envId")), dbConfig);
Expand All @@ -169,7 +169,7 @@ public static void submit(Integer id, DBConfig dbConfig, String dinkyAddr) {
sb.append(getDbSourceSqlStatements(dbConfig, id));
// 添加自定义全局变量信息
sb.append(getFlinkSQLStatement(id, dbConfig));
List<String> statements = Submiter.getStatements(sb.toString());
List<String> statements = Submitter.getStatements(sb.toString());
ExecutorSetting executorSetting = ExecutorSetting.build(taskConfig);

// 加载第三方jar
Expand Down

0 comments on commit 8be6860

Please sign in to comment.