You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/09/28 03:50:27 UTC

[GitHub] [incubator-seatunnel] hailin0 commented on a diff in pull request #2906: [Connector-V1] Improve druid and doris connector

hailin0 commented on code in PR #2906:
URL: https://github.com/apache/incubator-seatunnel/pull/2906#discussion_r981914999


##########
seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/core/flink/command/FlinkApiTaskExecuteCommand.java:
##########
@@ -63,7 +61,10 @@ public FlinkApiTaskExecuteCommand(FlinkCommandArgs flinkCommandArgs) {
     public void execute() throws CommandExecuteException {
         EngineType engine = flinkCommandArgs.getEngineType();
         Path configFile = FileUtils.getConfigPath(flinkCommandArgs);
-
+        this.flinkCommandArgs.getVariables().stream()
+                .map(variable -> variable.split("=", 2))
+                .filter(pair -> pair.length == 2)
+                .forEach(pair -> System.setProperty(pair[0], pair[1]));

Review Comment:
   @EricJoy2048 
   
   please confirm 



##########
seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-druid/src/main/java/org/apache/seatunnel/flink/druid/source/DruidSource.java:
##########
@@ -169,6 +179,8 @@ private RowTypeInfo getRowTypeInfo(String jdbcURL, String datasource, Collection
             names[i] = field;
             i++;
         }
+        long count = Arrays.stream(typeInformation).filter(t -> null == t).count();
+        System.out.println("typeInformation null:::" + count);

Review Comment:
   remove?



##########
seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-druid/src/main/java/org/apache/seatunnel/flink/druid/source/DruidSource.java:
##########
@@ -117,17 +117,27 @@ public CheckResult checkConfig() {
     @Override
     public void prepare(FlinkEnvironment env) {
         String jdbcURL = config.getString(JDBC_URL);
+        String user = config.getString("user");
+        String password = config.getString("password");
         String datasource = config.getString(DATASOURCE);
-        String startTimestamp = config.hasPath(START_TIMESTAMP) ? config.getString(START_TIMESTAMP) : null;
-        String endTimestamp = config.hasPath(END_TIMESTAMP) ? config.getString(END_TIMESTAMP) : null;
+        String escape_delimiter = config.getString(ESCAPE_DELIMITER_KEY);
+        if (StringUtils.isBlank(escape_delimiter)){
+            escape_delimiter = ESCAPE_DELIMITER_DEFAULT;
+        }
+        String startTimestamp = config.hasPath(START_TIMESTAMP) ? config.getString(START_TIMESTAMP).replaceAll(escape_delimiter, " ") : null;
+        String endTimestamp = config.hasPath(END_TIMESTAMP) ? config.getString(END_TIMESTAMP).replaceAll(escape_delimiter, " ") : null;
         List<String> columns = config.hasPath(COLUMNS) ? config.getStringList(COLUMNS) : null;
-
+        System.out.println(jdbcURL);
+        System.out.println(user);
+        System.out.println(password);

Review Comment:
   remove?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org