LvJiancheng commented on a change in pull request #2547:
URL: https://github.com/apache/incubator-inlong/pull/2547#discussion_r810828435



##########
File path: 
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/fetcher/dtos/JobProfileDto.java
##########
@@ -130,11 +219,21 @@ public static TriggerProfile 
convertToTriggerProfile(DataConfig dataConfigs) {
         if (!dataConfigs.isValid()) {
             throw new IllegalArgumentException("input dataConfig" + 
dataConfigs + "is invalid please check");
         }
+        TaskTypeEnum 
taskType=TaskTypeEnum.getTaskType(dataConfigs.getTaskType());
         JobProfileDto profileDto = new JobProfileDto();
         Proxy proxy = getProxy(dataConfigs);
-        Job job = getJob(dataConfigs);
+        switch (taskType) {
+            case SQL:
+            case BINLOG:
+                BinlogJob binlogJob = getBinlogJob(dataConfigs);
+                profileDto.setBinlogJob(binlogJob);
+            case FILE:
+                FileJob job = getFileJob(dataConfigs);

Review comment:
       done

##########
File path: 
inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/fetcher/dtos/JobProfileDto.java
##########
@@ -58,24 +62,73 @@
     }
 
     @Data
-    public static class Job {
+    public static class FileJob {
 
-        private Dir dir;
-        private String trigger;
-        private int id;
-        private Thread thread;
+        private String op;
         private String name;
         private String source;
         private String sink;
         private String channel;
+        private String trigger;
+        private String deliveryTime;
+
+
+        private Dir dir;
+        private int id;
+        private Thread thread;
         private String pattern;
-        private String op;
         private String cycleUnit;
         private String timeOffset;
-        private String deliveryTime;
         private String addictiveString;
     }
 
+    @Data
+    public static class FileJobTaskConfig {
+
+        private String dataName;
+        private String path;
+        private int taskId;
+        private Thread thread;
+        private String pattern;
+        private String cycleUnit;
+        private String timeOffset;
+        private String additionalAttr;
+    }
+
+    @Data
+    public static class BinlogJob {
+
+        private String op;
+        private String trigger;
+        private String name;
+        private String source;
+        private String sink;
+        private String channel;
+        private String deliveryTime;
+
+        private  String job_database_user;

Review comment:
       done




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to