You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2020/03/19 01:21:23 UTC

[GitHub] [incubator-dolphinscheduler] simon824 commented on a change in pull request #2224: support custom datax configuration

simon824 commented on a change in pull request #2224: support custom datax configuration 
URL: https://github.com/apache/incubator-dolphinscheduler/pull/2224#discussion_r394736584
 
 

 ##########
 File path: dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/worker/task/datax/DataxTask.java
 ##########
 @@ -192,24 +192,47 @@ private String buildDataxJsonFile()
         throws Exception {
         // generate json
         String fileName = String.format("%s/%s_job.json", taskDir, taskProps.getTaskAppId());
+        String json;
 
         Path path = new File(fileName).toPath();
         if (Files.exists(path)) {
             return fileName;
         }
 
-        JSONObject job = new JSONObject();
-        job.put("content", buildDataxJobContentJson());
-        job.put("setting", buildDataxJobSettingJson());
 
-        JSONObject root = new JSONObject();
-        root.put("job", job);
-        root.put("core", buildDataxCoreJson());
 
-        logger.debug("datax job json : {}", root.toString());
+        if (dataXParameters.getCustomConfig() == 1){
+
+            json = dataXParameters.getJson().replaceAll("\\r\\n", "\n");
+
 
 Review comment:
   here is about custom variables 
   ![image](https://user-images.githubusercontent.com/18065113/77021783-afaace00-69c2-11ea-9db7-db09767daee7.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services