You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/12/03 10:58:52 UTC
[incubator-inlong] branch master updated: [INLONG-1886][Improve][InLong-Manager] Refactor and delete unused entities (#1887)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang 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 3e0697f [INLONG-1886][Improve][InLong-Manager] Refactor and delete unused entities (#1887)
3e0697f is described below
commit 3e0697f2e6eefe28bb26c0e62b665fa96d84827d
Author: healchow <he...@gmail.com>
AuthorDate: Fri Dec 3 18:58:45 2021 +0800
[INLONG-1886][Improve][InLong-Manager] Refactor and delete unused entities (#1887)
Co-authored-by: healchow <he...@gmail.com>
---
.../inlong/manager/dao/entity/TaskDefEntity.java | 39 -----
.../inlong/manager/dao/entity/TaskEntity.java | 40 -----
.../manager/dao/entity/TaskFlowDefEntity.java | 36 ----
.../inlong/manager/dao/entity/TaskFlowEntity.java | 37 ----
.../manager/dao/mapper/TaskDefEntityMapper.java | 37 ----
.../manager/dao/mapper/TaskEntityMapper.java | 37 ----
.../dao/mapper/TaskFlowDefEntityMapper.java | 37 ----
.../manager/dao/mapper/TaskFlowEntityMapper.java | 37 ----
.../mappers/DataSourceCmdConfigEntityMapper.xml | 20 +--
.../mappers/SourceFileDetailEntityMapper.xml | 6 +-
.../main/resources/mappers/TaskDefEntityMapper.xml | 176 -------------------
.../main/resources/mappers/TaskEntityMapper.xml | 186 ---------------------
.../resources/mappers/TaskFlowDefEntityMapper.xml | 140 ----------------
.../resources/mappers/TaskFlowEntityMapper.xml | 151 -----------------
.../service/core/impl/AgentTaskServiceImpl.java | 33 ++--
.../web/controller/ConsumptionController.java | 12 +-
16 files changed, 33 insertions(+), 991 deletions(-)
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskDefEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskDefEntity.java
deleted file mode 100644
index dea2777..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskDefEntity.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-@Data
-public class TaskDefEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private Long id;
- private Long taskflowDefId;
- private Long parentId;
- private String implclass;
- private String taskName;
- private Date createTime;
- private String createBy;
- private Date updateTime;
- private Date updateBy;
- private Long deliveryId;
-
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskEntity.java
deleted file mode 100644
index 5a09c25..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskEntity.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-@Data
-public class TaskEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private Long id;
- private Long taskflowId;
- private Long taskDefId;
- private String taskName;
- private String status;
- private String postParam;
- private String resultmsg;
- private Date createTime;
- private String createBy;
- private Date updateTime;
- private String updateBy;
-
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowDefEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowDefEntity.java
deleted file mode 100644
index 0cf7f22..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowDefEntity.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-@Data
-public class TaskFlowDefEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private Long id;
- private String name;
- private String descrip;
- private Date createTime;
- private String createBy;
- private Integer isvalid;
- private String triggerEvent;
-
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowEntity.java
deleted file mode 100644
index 32f4f2f..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/TaskFlowEntity.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-import lombok.Data;
-
-@Data
-public class TaskFlowEntity implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private Long id;
- private Long taskflowDefId;
- private String status;
- private String createBy;
- private Date createTime;
- private Date updateTime;
- private String updateBy;
- private String event;
-
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskDefEntityMapper.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskDefEntityMapper.java
deleted file mode 100644
index b016009..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskDefEntityMapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.mapper;
-
-import org.apache.inlong.manager.dao.entity.TaskDefEntity;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface TaskDefEntityMapper {
-
- int deleteByPrimaryKey(Long id);
-
- int insert(TaskDefEntity record);
-
- int insertSelective(TaskDefEntity record);
-
- TaskDefEntity selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(TaskDefEntity record);
-
- int updateByPrimaryKey(TaskDefEntity record);
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskEntityMapper.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskEntityMapper.java
deleted file mode 100644
index 3278e99..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskEntityMapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.mapper;
-
-import org.apache.inlong.manager.dao.entity.TaskEntity;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface TaskEntityMapper {
-
- int deleteByPrimaryKey(Long id);
-
- int insert(TaskEntity record);
-
- int insertSelective(TaskEntity record);
-
- TaskEntity selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(TaskEntity record);
-
- int updateByPrimaryKey(TaskEntity record);
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowDefEntityMapper.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowDefEntityMapper.java
deleted file mode 100644
index 2172f0f..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowDefEntityMapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.mapper;
-
-import org.apache.inlong.manager.dao.entity.TaskFlowDefEntity;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface TaskFlowDefEntityMapper {
-
- int deleteByPrimaryKey(Long id);
-
- int insert(TaskFlowDefEntity record);
-
- int insertSelective(TaskFlowDefEntity record);
-
- TaskFlowDefEntity selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(TaskFlowDefEntity record);
-
- int updateByPrimaryKey(TaskFlowDefEntity record);
-}
diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowEntityMapper.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowEntityMapper.java
deleted file mode 100644
index 6f0bceb..0000000
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/TaskFlowEntityMapper.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.inlong.manager.dao.mapper;
-
-import org.apache.inlong.manager.dao.entity.TaskFlowEntity;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface TaskFlowEntityMapper {
-
- int deleteByPrimaryKey(Long id);
-
- int insert(TaskFlowEntity record);
-
- int insertSelective(TaskFlowEntity record);
-
- TaskFlowEntity selectByPrimaryKey(Long id);
-
- int updateByPrimaryKeySelective(TaskFlowEntity record);
-
- int updateByPrimaryKey(TaskFlowEntity record);
-}
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml
index 0e223eb..0d16757 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml
@@ -39,6 +39,16 @@
from data_source_cmd_config
where id = #{id,jdbcType=INTEGER}
</select>
+ <select id="queryCmdByAgentIp" resultMap="BaseResultMap">
+ select cmd.*
+ from data_source_cmd_config cmd,
+ source_file_detail fd
+ where cmd.task_id = fd.id
+ and cmd.cmd_type in (2, 6, 7, 8)
+ and cmd.bSend = 0
+ and fd.ip = #{ip,jdbcType=VARCHAR}
+ </select>
+
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete
from data_source_cmd_config
@@ -147,14 +157,4 @@
where id = #{id,jdbcType=INTEGER}
</update>
- <select id="queryCmdByAgentIp" resultMap="BaseResultMap">
- select cmd.*
- from data_source_cmd_config cmd,
- source_file_detail fd
- where cmd.task_id = fd.id
- and cmd.cmd_type in (2, 6, 7, 8)
- and cmd.bSend = 0
- and fd.ip = #{ip,jdbcType=VARCHAR}
-
- </select>
</mapper>
\ No newline at end of file
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/SourceFileDetailEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/SourceFileDetailEntityMapper.xml
index 8009a97..c67f95e 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/SourceFileDetailEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/SourceFileDetailEntityMapper.xml
@@ -56,7 +56,7 @@
<result column="middleware_type" jdbcType="VARCHAR" property="middlewareType"/>
<result column="mq_resource_obj" jdbcType="VARCHAR" property="topic"/>
<result column="data_generate_rule" jdbcType="VARCHAR" property="dataGenerateRule"/>
- <result column="file_delimiter" jdbcType="VARCHAR" property="fieldSplitter"/>
+ <result column="data_separator" jdbcType="VARCHAR" property="fieldSplitter"/>
<result column="sort_type" jdbcType="VARCHAR" property="sortType"/>
</resultMap>
<sql id="Base_Column_List">
@@ -387,7 +387,7 @@
biz.mq_resource_obj,
ds.data_generate_rule,
ds.sort_type,
- stream.file_delimiter
+ stream.data_separator
from source_file_basic basic,
source_file_detail detail,
business biz,
@@ -417,7 +417,7 @@
biz.mq_resource_obj,
ds.data_generate_rule,
ds.sort_type,
- stream.file_delimiter
+ stream.data_separator
from source_file_basic basic,
source_file_detail detail,
business biz,
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/TaskDefEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/TaskDefEntityMapper.xml
deleted file mode 100644
index a44332c..0000000
--- a/inlong-manager/manager-dao/src/main/resources/mappers/TaskDefEntityMapper.xml
+++ /dev/null
@@ -1,176 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.apache.inlong.manager.dao.mapper.TaskDefEntityMapper">
- <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.TaskDefEntity">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="taskflow_def_id" jdbcType="BIGINT" property="taskflowDefId"/>
- <result column="parent_id" jdbcType="BIGINT" property="parentId"/>
- <result column="implclass" jdbcType="VARCHAR" property="implclass"/>
- <result column="task_name" jdbcType="VARCHAR" property="taskName"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="update_by" jdbcType="TIMESTAMP" property="updateBy"/>
- <result column="delivery_id" jdbcType="BIGINT" property="deliveryId"/>
- </resultMap>
- <sql id="Base_Column_List">
- id, taskflow_def_id, parent_id, implclass, task_name, create_time, create_by,
- update_time, update_by, delivery_id
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from task_def
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete
- from task_def
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskDefEntity">
- insert into task_def (id, taskflow_def_id, parent_id,
- implclass, task_name, create_time,
- create_by, update_time, update_by,
- delivery_id)
- values (#{id,jdbcType=BIGINT}, #{taskflowDefId,jdbcType=BIGINT}, #{parentId,jdbcType=BIGINT},
- #{implclass,jdbcType=VARCHAR}, #{taskName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
- #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=TIMESTAMP},
- #{deliveryId,jdbcType=BIGINT})
- </insert>
- <insert id="insertSelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskDefEntity">
- insert into task_def
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="taskflowDefId != null">
- taskflow_def_id,
- </if>
- <if test="parentId != null">
- parent_id,
- </if>
- <if test="implclass != null">
- implclass,
- </if>
- <if test="taskName != null">
- task_name,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="deliveryId != null">
- delivery_id,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="taskflowDefId != null">
- #{taskflowDefId,jdbcType=BIGINT},
- </if>
- <if test="parentId != null">
- #{parentId,jdbcType=BIGINT},
- </if>
- <if test="implclass != null">
- #{implclass,jdbcType=VARCHAR},
- </if>
- <if test="taskName != null">
- #{taskName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=TIMESTAMP},
- </if>
- <if test="deliveryId != null">
- #{deliveryId,jdbcType=BIGINT},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskDefEntity">
- update task_def
- <set>
- <if test="taskflowDefId != null">
- taskflow_def_id = #{taskflowDefId,jdbcType=BIGINT},
- </if>
- <if test="parentId != null">
- parent_id = #{parentId,jdbcType=BIGINT},
- </if>
- <if test="implclass != null">
- implclass = #{implclass,jdbcType=VARCHAR},
- </if>
- <if test="taskName != null">
- task_name = #{taskName,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=TIMESTAMP},
- </if>
- <if test="deliveryId != null">
- delivery_id = #{deliveryId,jdbcType=BIGINT},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey"
- parameterType="org.apache.inlong.manager.dao.entity.TaskDefEntity">
- update task_def
- set taskflow_def_id = #{taskflowDefId,jdbcType=BIGINT},
- parent_id = #{parentId,jdbcType=BIGINT},
- implclass = #{implclass,jdbcType=VARCHAR},
- task_name = #{taskName,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- create_by = #{createBy,jdbcType=VARCHAR},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=TIMESTAMP},
- delivery_id = #{deliveryId,jdbcType=BIGINT}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/TaskEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/TaskEntityMapper.xml
deleted file mode 100644
index 6967e16..0000000
--- a/inlong-manager/manager-dao/src/main/resources/mappers/TaskEntityMapper.xml
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.apache.inlong.manager.dao.mapper.TaskEntityMapper">
- <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.TaskEntity">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="taskflow_id" jdbcType="BIGINT" property="taskflowId"/>
- <result column="task_def_id" jdbcType="BIGINT" property="taskDefId"/>
- <result column="task_name" jdbcType="VARCHAR" property="taskName"/>
- <result column="status" jdbcType="VARCHAR" property="status"/>
- <result column="post_param" jdbcType="VARCHAR" property="postParam"/>
- <result column="resultmsg" jdbcType="VARCHAR" property="resultmsg"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
- </resultMap>
- <sql id="Base_Column_List">
- id, taskflow_id, task_def_id, task_name, status, post_param, resultmsg, create_time,
- create_by, update_time, update_by
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from task
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete
- from task
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskEntity">
- insert into task (id, taskflow_id, task_def_id,
- task_name, status, post_param,
- resultmsg, create_time, create_by,
- update_time, update_by)
- values (#{id,jdbcType=BIGINT}, #{taskflowId,jdbcType=BIGINT}, #{taskDefId,jdbcType=BIGINT},
- #{taskName,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, #{postParam,jdbcType=VARCHAR},
- #{resultmsg,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
- #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="org.apache.inlong.manager.dao.entity.TaskEntity">
- insert into task
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="taskflowId != null">
- taskflow_id,
- </if>
- <if test="taskDefId != null">
- task_def_id,
- </if>
- <if test="taskName != null">
- task_name,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="postParam != null">
- post_param,
- </if>
- <if test="resultmsg != null">
- resultmsg,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="taskflowId != null">
- #{taskflowId,jdbcType=BIGINT},
- </if>
- <if test="taskDefId != null">
- #{taskDefId,jdbcType=BIGINT},
- </if>
- <if test="taskName != null">
- #{taskName,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="postParam != null">
- #{postParam,jdbcType=VARCHAR},
- </if>
- <if test="resultmsg != null">
- #{resultmsg,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskEntity">
- update task
- <set>
- <if test="taskflowId != null">
- taskflow_id = #{taskflowId,jdbcType=BIGINT},
- </if>
- <if test="taskDefId != null">
- task_def_id = #{taskDefId,jdbcType=BIGINT},
- </if>
- <if test="taskName != null">
- task_name = #{taskName,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="postParam != null">
- post_param = #{postParam,jdbcType=VARCHAR},
- </if>
- <if test="resultmsg != null">
- resultmsg = #{resultmsg,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey"
- parameterType="org.apache.inlong.manager.dao.entity.TaskEntity">
- update task
- set taskflow_id = #{taskflowId,jdbcType=BIGINT},
- task_def_id = #{taskDefId,jdbcType=BIGINT},
- task_name = #{taskName,jdbcType=VARCHAR},
- status = #{status,jdbcType=VARCHAR},
- post_param = #{postParam,jdbcType=VARCHAR},
- resultmsg = #{resultmsg,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- create_by = #{createBy,jdbcType=VARCHAR},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowDefEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowDefEntityMapper.xml
deleted file mode 100644
index 44a10e8..0000000
--- a/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowDefEntityMapper.xml
+++ /dev/null
@@ -1,140 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.apache.inlong.manager.dao.mapper.TaskFlowDefEntityMapper">
- <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.TaskFlowDefEntity">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="name" jdbcType="VARCHAR" property="name"/>
- <result column="descrip" jdbcType="VARCHAR" property="descrip"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="isValid" jdbcType="INTEGER" property="isvalid"/>
- <result column="trigger_event" jdbcType="VARCHAR" property="triggerEvent"/>
- </resultMap>
- <sql id="Base_Column_List">
- id, name, descrip, create_time, create_by, isValid, trigger_event
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from taskflow_def
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete
- from taskflow_def
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskFlowDefEntity">
- insert into taskflow_def (id, name, descrip,
- create_time, create_by, isValid,
- trigger_event)
- values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{descrip,jdbcType=VARCHAR},
- #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{isvalid,jdbcType=INTEGER},
- #{triggerEvent,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowDefEntity">
- insert into taskflow_def
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="name != null">
- name,
- </if>
- <if test="descrip != null">
- descrip,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="isvalid != null">
- isValid,
- </if>
- <if test="triggerEvent != null">
- trigger_event,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="descrip != null">
- #{descrip,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="isvalid != null">
- #{isvalid,jdbcType=INTEGER},
- </if>
- <if test="triggerEvent != null">
- #{triggerEvent,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowDefEntity">
- update taskflow_def
- <set>
- <if test="name != null">
- name = #{name,jdbcType=VARCHAR},
- </if>
- <if test="descrip != null">
- descrip = #{descrip,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="isvalid != null">
- isValid = #{isvalid,jdbcType=INTEGER},
- </if>
- <if test="triggerEvent != null">
- trigger_event = #{triggerEvent,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowDefEntity">
- update taskflow_def
- set name = #{name,jdbcType=VARCHAR},
- descrip = #{descrip,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- create_by = #{createBy,jdbcType=VARCHAR},
- isValid = #{isvalid,jdbcType=INTEGER},
- trigger_event = #{triggerEvent,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowEntityMapper.xml
deleted file mode 100644
index 761bcf7..0000000
--- a/inlong-manager/manager-dao/src/main/resources/mappers/TaskFlowEntityMapper.xml
+++ /dev/null
@@ -1,151 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="org.apache.inlong.manager.dao.mapper.TaskFlowEntityMapper">
- <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.TaskFlowEntity">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="taskflow_def_id" jdbcType="BIGINT" property="taskflowDefId"/>
- <result column="status" jdbcType="VARCHAR" property="status"/>
- <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
- <result column="event" jdbcType="VARCHAR" property="event"/>
- </resultMap>
- <sql id="Base_Column_List">
- id, taskflow_def_id, status, create_by, create_time, update_time, update_by, event
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from taskflow
- where id = #{id,jdbcType=BIGINT}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete
- from taskflow
- where id = #{id,jdbcType=BIGINT}
- </delete>
- <insert id="insert" parameterType="org.apache.inlong.manager.dao.entity.TaskFlowEntity">
- insert into taskflow (id, taskflow_def_id, status,
- create_by, create_time, update_time,
- update_by, event)
- values (#{id,jdbcType=BIGINT}, #{taskflowDefId,jdbcType=BIGINT}, #{status,jdbcType=VARCHAR},
- #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
- #{updateBy,jdbcType=VARCHAR}, #{event,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowEntity">
- insert into taskflow
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">
- id,
- </if>
- <if test="taskflowDefId != null">
- taskflow_def_id,
- </if>
- <if test="status != null">
- status,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="createTime != null">
- create_time,
- </if>
- <if test="updateTime != null">
- update_time,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="event != null">
- event,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">
- #{id,jdbcType=BIGINT},
- </if>
- <if test="taskflowDefId != null">
- #{taskflowDefId,jdbcType=BIGINT},
- </if>
- <if test="status != null">
- #{status,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="event != null">
- #{event,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowEntity">
- update taskflow
- <set>
- <if test="taskflowDefId != null">
- taskflow_def_id = #{taskflowDefId,jdbcType=BIGINT},
- </if>
- <if test="status != null">
- status = #{status,jdbcType=VARCHAR},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null">
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateTime != null">
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="event != null">
- event = #{event,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=BIGINT}
- </update>
- <update id="updateByPrimaryKey"
- parameterType="org.apache.inlong.manager.dao.entity.TaskFlowEntity">
- update taskflow
- set taskflow_def_id = #{taskflowDefId,jdbcType=BIGINT},
- status = #{status,jdbcType=VARCHAR},
- create_by = #{createBy,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- update_time = #{updateTime,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=VARCHAR},
- event = #{event,jdbcType=VARCHAR}
- where id = #{id,jdbcType=BIGINT}
- </update>
-</mapper>
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentTaskServiceImpl.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentTaskServiceImpl.java
index 2c78ee6..3ac5c99 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentTaskServiceImpl.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentTaskServiceImpl.java
@@ -54,13 +54,13 @@ public class AgentTaskServiceImpl implements AgentTaskService {
private static final Logger LOGGER = LoggerFactory.getLogger(AgentTaskServiceImpl.class);
@Autowired
- private SourceFileDetailEntityMapper sourceFileDetailEntityMapper;
+ private SourceFileDetailEntityMapper fileDetailMapper;
@Autowired
- private DataSourceCmdConfigEntityMapper dataSourceCmdConfigEntityMapper;
+ private DataSourceCmdConfigEntityMapper sourceCmdConfigMapper;
@Autowired
- private DataStreamFieldEntityMapper dataStreamFieldEntityMapper;
+ private DataStreamFieldEntityMapper streamFieldMapper;
@Override
public FileAgentTaskInfo getFileAgentTask(FileAgentCommandInfo info) {
@@ -74,13 +74,11 @@ public class AgentTaskServiceImpl implements AgentTaskService {
// Query pending special commands
List<FileAgentCMDConfig> cmdConfigs = getFileAgentCMDConfigs(info);
- FileAgentTaskInfo taskInfo = FileAgentTaskInfo.builder().cmdConfigs(cmdConfigs).dataConfigs(taskConfigs)
- .build();
- return taskInfo;
+ return FileAgentTaskInfo.builder().cmdConfigs(cmdConfigs).dataConfigs(taskConfigs).build();
}
private List<FileAgentCMDConfig> getFileAgentCMDConfigs(FileAgentCommandInfo info) {
- return dataSourceCmdConfigEntityMapper.queryCmdByAgentIp(info.getAgentIp()).stream().map(cmd -> {
+ return sourceCmdConfigMapper.queryCmdByAgentIp(info.getAgentIp()).stream().map(cmd -> {
FileAgentCMDConfig cmdConfig = new FileAgentCMDConfig();
cmdConfig.setDataTime(cmd.getSpecifiedDataTime());
cmdConfig.setOp(cmd.getCmdType());
@@ -92,7 +90,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
private List<FileAgentTaskConfig> getFileAgentTaskConfigs(FileAgentCommandInfo info) {
// Query pending special commands
- List<FileAgentTaskConfig> taskConfigs = sourceFileDetailEntityMapper.selectFileAgentTaskByIp(info.getAgentIp());
+ List<FileAgentTaskConfig> taskConfigs = fileDetailMapper.selectFileAgentTaskByIp(info.getAgentIp());
for (FileAgentTaskConfig config : taskConfigs) {
FileAgentDataGenerateRule ruleEnu = FileAgentDataGenerateRule.fromRuleValue(config.getDataGenerateRule());
if (ruleEnu != null) {
@@ -106,7 +104,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
s.append("p=t").append("&");
}
- List<DataStreamFieldEntity> preFields = dataStreamFieldEntityMapper
+ List<DataStreamFieldEntity> preFields = streamFieldMapper
.selectDataStreamFields(config.getInlongGroupId(), config.getInlongStreamId());
if (!config.getSortType().equalsIgnoreCase("13")) {
@@ -128,7 +126,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
update.setId(config.getTaskId());
update.setStatus(nextStatus);
update.setPreviousStatus(currentStatus);
- sourceFileDetailEntityMapper.updateByPrimaryKeySelective(update);
+ fileDetailMapper.updateByPrimaryKeySelective(update);
}
}
return taskConfigs;
@@ -139,7 +137,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
List<FileAgentCommandInfo.CommandInfoBean> commandInfos = info.getCommandInfo();
for (FileAgentCommandInfo.CommandInfoBean command : commandInfos) {
- SourceFileDetailEntity current = sourceFileDetailEntityMapper.selectByPrimaryKey(command.getTaskId());
+ SourceFileDetailEntity current = fileDetailMapper.selectByPrimaryKey(command.getTaskId());
if (current != null) {
int opType = command.getOpType();
@@ -150,7 +148,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
cmd.setBsend(true);
cmd.setModifyTime(new Date());
cmd.setResultInfo(String.valueOf(command.getCommandResult()));
- dataSourceCmdConfigEntityMapper.updateByPrimaryKeySelective(cmd);
+ sourceCmdConfigMapper.updateByPrimaryKeySelective(cmd);
}
} else { // Modify the result status of the data collection task
@@ -177,7 +175,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
update.setId(command.getTaskId());
update.setStatus(nextStatus);
update.setPreviousStatus(current.getStatus());
- sourceFileDetailEntityMapper.updateByPrimaryKeySelective(update);
+ fileDetailMapper.updateByPrimaryKeySelective(update);
}
}
}
@@ -188,7 +186,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
@Override
public String confirmAgentIp(ConfirmAgentIpRequest request) {
for (String ip : request.getIpList()) {
- List<FileAgentTaskConfig> taskConfigs = sourceFileDetailEntityMapper.selectFileAgentTaskByIp(ip);
+ List<FileAgentTaskConfig> taskConfigs = fileDetailMapper.selectFileAgentTaskByIp(ip);
if (!taskConfigs.isEmpty()) {
return taskConfigs.get(0).getIp();
}
@@ -198,8 +196,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
@Override
public List<FileAgentTaskConfig> checkAgentTaskConf(CheckAgentTaskConfRequest request) {
- List<FileAgentTaskConfig> taskConfigs = sourceFileDetailEntityMapper
- .selectFileAgentTaskByIpForCheck(request.getAgentIp());
+ List<FileAgentTaskConfig> taskConfigs = fileDetailMapper.selectFileAgentTaskByIpForCheck(request.getAgentIp());
LOGGER.info(request.getAgentIp() + " taskConfigs = " + taskConfigs);
List<FileAgentTaskConfig> toAdds = getToBeAdded(request.getTaskInfo(), taskConfigs);
List<Integer> toRemoves = getToBeRemoved(request.getTaskInfo(), taskConfigs);
@@ -239,7 +236,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
result.add(fileAgentTaskConfig);
} else {
// 100, 103 print log
- LOGGER.warn("Agent {} report taskid = {} with status {}, Skip taskid fileAgentTaskConfig = {} ",
+ LOGGER.warn("Agent {} report task id = {} with status {}, skip task id fileAgentTaskConfig = {} ",
request.getAgentIp(),
fileAgentTaskConfig.getTaskId(),
currentStatus,
@@ -262,7 +259,7 @@ public class AgentTaskServiceImpl implements AgentTaskService {
s.append("p=t").append("&");
}
- List<DataStreamFieldEntity> preFields = dataStreamFieldEntityMapper.selectDataStreamFields(
+ List<DataStreamFieldEntity> preFields = streamFieldMapper.selectDataStreamFields(
config.getInlongGroupId(),
config.getInlongStreamId());
diff --git a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ConsumptionController.java b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ConsumptionController.java
index 4b2e75f..8f12b9d 100644
--- a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ConsumptionController.java
+++ b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/ConsumptionController.java
@@ -21,7 +21,6 @@ import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
import org.apache.inlong.manager.common.beans.Response;
import org.apache.inlong.manager.common.enums.OperationType;
import org.apache.inlong.manager.common.pojo.consumption.ConsumptionInfo;
@@ -69,16 +68,16 @@ public class ConsumptionController {
@GetMapping("/get/{id}")
@ApiOperation(value = "Get consumption details")
- public Response<ConsumptionInfo> getDetail(
- @ApiParam(value = "Consumption ID", required = true) @PathVariable(name = "id") Integer id) {
+ @ApiImplicitParam(name = "id", value = "Consumption ID", dataTypeClass = Integer.class, required = true)
+ public Response<ConsumptionInfo> getDetail(@PathVariable(name = "id") Integer id) {
return Response.success(consumptionService.get(id));
}
@DeleteMapping("/delete/{id}")
@OperationLog(operation = OperationType.DELETE)
@ApiOperation(value = "Delete data consumption")
- public Response<Object> delete(
- @ApiParam(value = "Consumption ID", required = true) @PathVariable(name = "id") Integer id) {
+ @ApiImplicitParam(name = "id", value = "Consumption ID", dataTypeClass = Integer.class, required = true)
+ public Response<Object> delete(@PathVariable(name = "id") Integer id) {
this.consumptionService.delete(id, LoginUserUtil.getLoginUserDetail().getUserName());
return Response.success();
}
@@ -86,8 +85,7 @@ public class ConsumptionController {
@PostMapping("/save")
@OperationLog(operation = OperationType.UPDATE)
@ApiOperation(value = "Save data consumption", notes = "Full coverage")
- public Response<Integer> saveConsumptionInfo(
- @Validated @RequestBody ConsumptionInfo consumptionInfo) {
+ public Response<Integer> save(@Validated @RequestBody ConsumptionInfo consumptionInfo) {
String currentUser = LoginUserUtil.getLoginUserDetail().getUserName();
return Response.success(consumptionService.save(consumptionInfo, currentUser));
}