You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/03/07 15:01:35 UTC

[incubator-inlong] branch master updated: [INLONG-2985][Manager] Fix task type and timezone param for agent (#2986)

This is an automated email from the ASF dual-hosted git repository.

healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 3d5ecdc  [INLONG-2985][Manager] Fix task type and timezone param for agent (#2986)
3d5ecdc is described below

commit 3d5ecdcba167aa7ac7dc28e3fc0199fadd8ba46d
Author: pacino <ge...@gmail.com>
AuthorDate: Mon Mar 7 23:01:27 2022 +0800

    [INLONG-2985][Manager] Fix task type and timezone param for agent (#2986)
---
 .../manager/client/api/source/MySQLBinlogSource.java       |  2 +-
 .../inlong/manager/service/core/impl/AgentServiceImpl.java | 14 +-------------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/source/MySQLBinlogSource.java b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/source/MySQLBinlogSource.java
index b81f6c7..dc0e089 100644
--- a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/source/MySQLBinlogSource.java
+++ b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/source/MySQLBinlogSource.java
@@ -69,7 +69,7 @@ public class MySQLBinlogSource extends StreamSource {
     private List<String> tableNames;
 
     @ApiModelProperty("Database time zone, Default is UTC")
-    private String serverTimezone = "UTF";
+    private String serverTimezone = "UTC";
 
     @ApiModelProperty("The interval for recording an offset")
     private String intervalMs;
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
index e882af5..a4fec35 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java
@@ -23,7 +23,6 @@ import com.google.gson.GsonBuilder;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.inlong.common.constant.Constants;
 import org.apache.inlong.common.db.CommandEntity;
-import org.apache.inlong.common.enums.TaskTypeEnum;
 import org.apache.inlong.common.pojo.agent.CmdConfig;
 import org.apache.inlong.common.pojo.agent.DataConfig;
 import org.apache.inlong.common.pojo.agent.TaskRequest;
@@ -41,7 +40,6 @@ import org.apache.inlong.manager.common.pojo.agent.FileAgentCommandInfo;
 import org.apache.inlong.manager.common.pojo.agent.FileAgentCommandInfo.CommandInfoBean;
 import org.apache.inlong.manager.common.pojo.agent.FileAgentTaskConfig;
 import org.apache.inlong.manager.common.pojo.agent.FileAgentTaskInfo;
-import org.apache.inlong.manager.common.pojo.source.binlog.BinlogSourceDTO;
 import org.apache.inlong.manager.dao.entity.DataSourceCmdConfigEntity;
 import org.apache.inlong.manager.dao.entity.InlongStreamEntity;
 import org.apache.inlong.manager.dao.entity.InlongStreamFieldEntity;
@@ -245,17 +243,7 @@ public class AgentServiceImpl implements AgentService {
 
     private int getTaskType(StreamSourceEntity sourceEntity) {
         SourceType sourceType = SourceType.forType(sourceEntity.getSourceType());
-        if (sourceType != SourceType.BINLOG) {
-            return sourceType.getTaskType().getType();
-        } else {
-            BinlogSourceDTO binlogSourceDTO = binlogStreamSourceOperation.getFromEntity(sourceEntity,
-                    BinlogSourceDTO::new);
-            if (binlogSourceDTO.isAllMigration()) {
-                return TaskTypeEnum.DATABASE_MIGRATION.getType();
-            } else {
-                return sourceType.getTaskType().getType();
-            }
-        }
+        return sourceType.getTaskType().getType();
     }
 
     private List<CmdConfig> getAgentCmdConfigs(TaskRequest taskRequest) {