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 2022/03/21 13:39:36 UTC

[incubator-inlong] branch master updated: [INLONG-3269][Manager] Change the request method of list query from GET to POST (#3277)

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 e1f8765  [INLONG-3269][Manager] Change the request method of list query from GET to POST (#3277)
e1f8765 is described below

commit e1f87659b62bc9aac982b8df0908b0136c1b6875
Author: healchow <he...@gmail.com>
AuthorDate: Mon Mar 21 21:39:32 2022 +0800

    [INLONG-3269][Manager] Change the request method of list query from GET to POST (#3277)
---
 .../dao/mapper/StreamSourceEntityMapper.java       |  2 +-
 .../resources/mappers/StreamSourceEntityMapper.xml | 11 +++--
 .../inlong/manager/service/core/AgentService.java  |  7 ++--
 .../service/core/impl/AgentServiceImpl.java        | 48 ++++++++--------------
 .../main/resources/sql/apache_inlong_manager.sql   | 10 ++---
 .../manager-web/sql/apache_inlong_manager.sql      | 10 ++---
 .../web/controller/InlongGroupController.java      | 30 +++++++-------
 .../web/controller/InlongStreamController.java     | 42 +++++++++----------
 .../web/controller/openapi/AgentController.java    |  2 +-
 9 files changed, 74 insertions(+), 88 deletions(-)

diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/StreamSourceEntityMapper.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/StreamSourceEntityMapper.java
index b70998b..9db424e 100644
--- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/StreamSourceEntityMapper.java
+++ b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/StreamSourceEntityMapper.java
@@ -55,7 +55,7 @@ public interface StreamSourceEntityMapper {
     /**
      * According to the group id, stream id and source type, query valid source entity list.
      */
-    List<StreamSourceEntity> selectByRelatedIdAndTypeForUpdate(@Param("groupId") String groupId,
+    List<StreamSourceEntity> selectByRelatedIdForUpdate(@Param("groupId") String groupId,
             @Param("streamId") String streamId, @Param("sourceType") String sourceType);
 
     /**
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
index 81d476a..7d827d4 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/StreamSourceEntityMapper.xml
@@ -45,8 +45,7 @@
         <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
     </resultMap>
     <sql id="Base_Column_List">
-        id
-        , inlong_group_id, inlong_stream_id, source_type, source_name, agent_ip, uuid,
+        id, inlong_group_id, inlong_stream_id, source_type, source_name, agent_ip, uuid,
         server_id, server_name, cluster_id, cluster_name, snapshot, report_time, ext_params,
         status, previous_status, is_deleted, creator, modifier, create_time, modify_time
     </sql>
@@ -272,7 +271,7 @@
             </if>
         </where>
     </select>
-    <select id="selectByRelatedIdAndTypeForUpdate" resultType="org.apache.inlong.manager.dao.entity.StreamSourceEntity">
+    <select id="selectByRelatedIdForUpdate" resultType="org.apache.inlong.manager.dao.entity.StreamSourceEntity">
         select
         <include refid="Base_Column_List"/>
         from stream_source
@@ -434,7 +433,7 @@
     <update id="updateStatus">
         update stream_source
         set previous_status = status,
-            status          = #{nextStatus, jdbcType=INTEGER}
+        status = #{nextStatus, jdbcType=INTEGER}
         <if test="modifyTime != null">
             ,modify_time = #{modifyTime,jdbcType=TIMESTAMP}
         </if>
@@ -453,8 +452,8 @@
     </update>
     <update id="updateIpAndUuid">
         update stream_source
-        set agent_ip    = #{agentIp,jdbcType=VARCHAR},
-            uuid        = #{uuid,jdbcType=VARCHAR}
+        set agent_ip = #{agentIp,jdbcType=VARCHAR},
+        uuid = #{uuid,jdbcType=VARCHAR}
         <if test="modifyTime != null">
             ,modify_time = #{modifyTime,jdbcType=TIMESTAMP}
         </if>
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/AgentService.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/AgentService.java
index f118187..021fe1c 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/AgentService.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/AgentService.java
@@ -45,15 +45,14 @@ public interface AgentService {
     /**
      * Agent report the task result.
      *
-     * @param request Request of the task result.
-     * @return Task result.
+     * @param request Result of the task.
      */
     void report(TaskRequest request);
 
     /**
-     *  Pull task config to operate.
+     * Agent pull task config.
      *
-     * @param request Request of the task result.
+     * @param request Request of the task.
      * @return Task result.
      */
     TaskResult getTaskResult(TaskRequest request);
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 c6c7c68..41a15aa 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
@@ -33,6 +33,7 @@ import org.apache.inlong.manager.common.enums.EntityStatus;
 import org.apache.inlong.manager.common.enums.FileAgentDataGenerateRule;
 import org.apache.inlong.manager.common.enums.SourceState;
 import org.apache.inlong.manager.common.enums.SourceType;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
 import org.apache.inlong.manager.common.pojo.agent.AgentStatusReportRequest;
 import org.apache.inlong.manager.common.pojo.agent.CheckAgentTaskConfRequest;
 import org.apache.inlong.manager.common.pojo.agent.ConfirmAgentIpRequest;
@@ -41,7 +42,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.util.Preconditions;
 import org.apache.inlong.manager.dao.entity.DataSourceCmdConfigEntity;
 import org.apache.inlong.manager.dao.entity.InlongStreamEntity;
 import org.apache.inlong.manager.dao.entity.InlongStreamFieldEntity;
@@ -54,7 +54,6 @@ import org.apache.inlong.manager.dao.mapper.SourceFileDetailEntityMapper;
 import org.apache.inlong.manager.dao.mapper.StreamSourceEntityMapper;
 import org.apache.inlong.manager.service.core.AgentService;
 import org.apache.inlong.manager.service.source.SourceSnapshotOperation;
-import org.apache.inlong.manager.service.source.binlog.BinlogStreamSourceOperation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -97,8 +96,6 @@ public class AgentServiceImpl implements AgentService {
     private InlongStreamFieldEntityMapper streamFieldMapper;
     @Autowired
     private InlongStreamEntityMapper streamMapper;
-    @Autowired
-    private BinlogStreamSourceOperation binlogStreamSourceOperation;
 
     /**
      * If the reported task time and the modification time in the database exceed this value,
@@ -117,12 +114,10 @@ public class AgentServiceImpl implements AgentService {
             propagation = Propagation.REQUIRES_NEW)
     public void report(TaskRequest request) {
         LOGGER.info("begin to get agent task: {}", request);
-        if (request == null) {
-            LOGGER.warn("agent request was empty, just return");
-            return;
+        if (request == null || StringUtils.isBlank(request.getAgentIp())) {
+            throw new BusinessException("agent request or agent ip was empty, just return");
         }
-        Preconditions.checkNotEmpty(request.getAgentIp(),
-                String.format("AgentIp should not be null in request=%s", request));
+
         if (CollectionUtils.isEmpty(request.getCommandInfo())) {
             LOGGER.warn("task result was empty, just return");
             return;
@@ -137,6 +132,7 @@ public class AgentServiceImpl implements AgentService {
         Integer taskId = command.getTaskId();
         StreamSourceEntity current = sourceMapper.selectByIdForUpdate(taskId);
         if (current == null) {
+            LOGGER.warn("stream source not found by id={}, just return", taskId);
             return;
         }
 
@@ -176,12 +172,10 @@ public class AgentServiceImpl implements AgentService {
     @Transactional(rollbackFor = Throwable.class, isolation = Isolation.READ_COMMITTED,
             propagation = Propagation.REQUIRES_NEW)
     public TaskResult getTaskResult(TaskRequest request) {
-        if (request == null) {
-            LOGGER.warn("agent request was empty, just return");
-            return null;
+        if (request == null || StringUtils.isBlank(request.getAgentIp())) {
+            throw new BusinessException("agent request or agent ip was empty, just return");
         }
-        Preconditions.checkNotEmpty(request.getAgentIp(),
-                String.format("AgentIp should not be null in request=%s", request));
+
         // Query the tasks that needed to add or active - without agentIp and uuid
         List<Integer> addedStatusList = Arrays.asList(SourceState.TO_BE_ISSUED_ADD.getCode(),
                 SourceState.TO_BE_ISSUED_ACTIVE.getCode());
@@ -189,16 +183,13 @@ public class AgentServiceImpl implements AgentService {
 
         String agentIp = request.getAgentIp();
         String uuid = request.getUuid();
-        if (StringUtils.isNotEmpty(agentIp)) {
-            // Query other tasks by agentIp and uuid - not included status with TO_BE_ISSUED_ADD and TO_BE_ISSUED_ACTIVE
-            List<Integer> statusList = Arrays.asList(SourceState.TO_BE_ISSUED_DELETE.getCode(),
-                    SourceState.TO_BE_ISSUED_RETRY.getCode(), SourceState.TO_BE_ISSUED_BACKTRACK.getCode(),
-                    SourceState.TO_BE_ISSUED_FROZEN.getCode(), SourceState.TO_BE_ISSUED_CHECK.getCode(),
-                    SourceState.TO_BE_ISSUED_REDO_METRIC.getCode(), SourceState.TO_BE_ISSUED_MAKEUP.getCode());
-            List<StreamSourceEntity> agentAddList = sourceMapper.selectByStatusAndIpForUpdate(statusList, agentIp,
-                    uuid);
-            entityList.addAll(agentAddList);
-        }
+        // Query other tasks by agentIp and uuid - not included status with TO_BE_ISSUED_ADD and TO_BE_ISSUED_ACTIVE
+        List<Integer> statusList = Arrays.asList(SourceState.TO_BE_ISSUED_DELETE.getCode(),
+                SourceState.TO_BE_ISSUED_RETRY.getCode(), SourceState.TO_BE_ISSUED_BACKTRACK.getCode(),
+                SourceState.TO_BE_ISSUED_FROZEN.getCode(), SourceState.TO_BE_ISSUED_CHECK.getCode(),
+                SourceState.TO_BE_ISSUED_REDO_METRIC.getCode(), SourceState.TO_BE_ISSUED_MAKEUP.getCode());
+        List<StreamSourceEntity> addedList = sourceMapper.selectByStatusAndIpForUpdate(statusList, agentIp, uuid);
+        entityList.addAll(addedList);
 
         List<DataConfig> dataConfigs = Lists.newArrayList();
         for (StreamSourceEntity entity : entityList) {
@@ -223,11 +214,9 @@ public class AgentServiceImpl implements AgentService {
 
         // Update agentIp and uuid for the added and active tasks
         for (StreamSourceEntity entity : entityList) {
-            if (StringUtils.isNotEmpty(agentIp)
-                    && StringUtils.isEmpty(entity.getAgentIp())) {
+            if (StringUtils.isEmpty(entity.getAgentIp())) {
                 sourceMapper.updateIpAndUuid(entity.getId(), agentIp, uuid, entity.getModifyTime());
-                LOGGER.info("update stream source ip to [{}], uuid to [{}] for id [{}] ", agentIp, uuid,
-                        entity.getId());
+                LOGGER.info("update stream source ip to [{}], uuid to [{}] for id [{}]", agentIp, uuid, entity.getId());
             }
         }
 
@@ -247,8 +236,7 @@ public class AgentServiceImpl implements AgentService {
         dataConfig.setTaskName(entity.getSourceName());
         dataConfig.setSnapshot(entity.getSnapshot());
         dataConfig.setExtParams(entity.getExtParams());
-        LocalDateTime dateTime = LocalDateTime.ofInstant(entity.getModifyTime().toInstant(),
-                ZoneId.systemDefault());
+        LocalDateTime dateTime = LocalDateTime.ofInstant(entity.getModifyTime().toInstant(), ZoneId.systemDefault());
         dataConfig.setDeliveryTime(dateTime.format(TIME_FORMATTER));
 
         String groupId = entity.getInlongGroupId();
diff --git a/inlong-manager/manager-test/src/main/resources/sql/apache_inlong_manager.sql b/inlong-manager/manager-test/src/main/resources/sql/apache_inlong_manager.sql
index 4db620e..ab51e4c 100644
--- a/inlong-manager/manager-test/src/main/resources/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-test/src/main/resources/sql/apache_inlong_manager.sql
@@ -97,7 +97,7 @@ CREATE TABLE `inlong_group`
     `zookeeper_enabled`   int(4)                DEFAULT '1' COMMENT 'Need zookeeper support, 0 false 1 true',
     `proxy_cluster_id`    int(11)               DEFAULT NULL COMMENT 'The id of dataproxy cluster',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `unique_inlong_group` (`inlong_group_id`, `is_deleted`, `modify_time`)
+    UNIQUE KEY `unique_inlong_group` (`inlong_group_id`, `is_deleted`)
 );
 
 -- ----------------------------
@@ -139,7 +139,7 @@ CREATE TABLE `inlong_group_ext`
     `modify_time`     timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     PRIMARY KEY (`id`),
     KEY `index_group_id` (`inlong_group_id`),
-    UNIQUE KEY `group_key_idx` (`inlong_group_id`, `key_name`)
+    UNIQUE KEY `unique_inlong_group_key` (`inlong_group_id`, `key_name`)
 );
 
 -- ----------------------------
@@ -310,7 +310,7 @@ CREATE TABLE `data_schema`
     `sort_type`          int(11)      NOT NULL COMMENT 'sort logic rules, 0, 5, 9, 10, 13, 15',
     `time_offset`        varchar(10)  NOT NULL COMMENT 'time offset',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `name` (`name`)
+    UNIQUE KEY `unique_schema_name` (`name`)
 );
 
 -- create default data schema
@@ -368,7 +368,7 @@ CREATE TABLE `inlong_stream`
     `modify_time`            timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     `temp_view`              text              DEFAULT NULL COMMENT 'Temporary view, used to save intermediate data that has not been submitted or approved after modification',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `unique_inlong_stream` (`inlong_stream_id`, `inlong_group_id`, `is_deleted`, `modify_time`)
+    UNIQUE KEY `unique_inlong_stream` (`inlong_stream_id`, `inlong_group_id`, `is_deleted`)
 );
 
 -- ----------------------------
@@ -386,7 +386,7 @@ CREATE TABLE `inlong_stream_ext`
     `modify_time`      timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     PRIMARY KEY (`id`),
     KEY `index_stream_id` (`inlong_stream_id`),
-    UNIQUE KEY `unique_group_stream_key` (`inlong_group_id`, `inlong_stream_id`, `key_name`)
+    UNIQUE KEY `unique_inlong_stream_key` (`inlong_group_id`, `inlong_stream_id`, `key_name`)
 );
 
 -- ----------------------------
diff --git a/inlong-manager/manager-web/sql/apache_inlong_manager.sql b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
index fc2ee52..72ec752 100644
--- a/inlong-manager/manager-web/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
@@ -105,7 +105,7 @@ CREATE TABLE `inlong_group`
     `zookeeper_enabled`   int(4)            DEFAULT '1' COMMENT 'Need zookeeper support, 0: false, 1: true',
     `proxy_cluster_id`    int(11)           DEFAULT NULL COMMENT 'The id of dataproxy cluster',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `unique_inlong_group` (`inlong_group_id`, `is_deleted`, `modify_time`)
+    UNIQUE KEY `unique_inlong_group` (`inlong_group_id`, `is_deleted`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='Inlong group table';
 
@@ -149,7 +149,7 @@ CREATE TABLE `inlong_group_ext`
     `modify_time`     timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     PRIMARY KEY (`id`),
     KEY `index_group_id` (`inlong_group_id`),
-    UNIQUE KEY `group_key_idx` (`inlong_group_id`, `key_name`)
+    UNIQUE KEY `unique_group_key` (`inlong_group_id`, `key_name`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='Inlong group extension table';
 
@@ -327,7 +327,7 @@ CREATE TABLE `data_schema`
     `sort_type`          int(11)      NOT NULL COMMENT 'sort logic rules, 0, 5, 9, 10, 13, 15',
     `time_offset`        varchar(10)  NOT NULL COMMENT 'time offset',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `name` (`name`)
+    UNIQUE KEY `unique_schema_name` (`name`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='Data format table';
 
@@ -388,7 +388,7 @@ CREATE TABLE `inlong_stream`
     `modify_time`            timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     `temp_view`              text              DEFAULT NULL COMMENT 'Temporary view, used to save intermediate data that has not been submitted or approved after modification',
     PRIMARY KEY (`id`),
-    UNIQUE KEY `unique_inlong_stream` (`inlong_stream_id`, `inlong_group_id`, `is_deleted`, `modify_time`)
+    UNIQUE KEY `unique_inlong_stream` (`inlong_stream_id`, `inlong_group_id`, `is_deleted`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='Inlong stream table';
 
@@ -407,7 +407,7 @@ CREATE TABLE `inlong_stream_ext`
     `modify_time`      timestamp    NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
     PRIMARY KEY (`id`),
     KEY `index_stream_id` (`inlong_stream_id`),
-    UNIQUE KEY `unique_group_stream_key` (`inlong_group_id`, `inlong_stream_id`, `key_name`)
+    UNIQUE KEY `unique_stream_key` (`inlong_group_id`, `inlong_stream_id`, `key_name`)
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='Inlong stream extension table';
 
diff --git a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java
index 833f0df..3f2573f 100644
--- a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java
+++ b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongGroupController.java
@@ -46,7 +46,7 @@ import org.springframework.web.bind.annotation.RestController;
  */
 @RestController
 @RequestMapping("/group")
-@Api(tags = "Inlong group config")
+@Api(tags = "Inlong-Group-API")
 public class InlongGroupController {
 
     @Autowired
@@ -56,21 +56,21 @@ public class InlongGroupController {
 
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.CREATE)
-    @ApiOperation(value = "Save inlong group information")
+    @ApiOperation(value = "Save inlong group info")
     public Response<String> save(@RequestBody InlongGroupRequest groupInfo) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
         return Response.success(groupService.save(groupInfo, operator));
     }
 
     @RequestMapping(value = "/get/{groupId}", method = RequestMethod.GET)
-    @ApiOperation(value = "Query inlong group information")
+    @ApiOperation(value = "Get inlong group info")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class, required = true)
     public Response<InlongGroupResponse> get(@PathVariable String groupId) {
         return Response.success(groupService.get(groupId).genResponse());
     }
 
     @RequestMapping(value = "/list", method = RequestMethod.POST)
-    @ApiOperation(value = "Query inlong group list according to conditions")
+    @ApiOperation(value = "Get inlong group list by paginating")
     public Response<PageInfo<InlongGroupListResponse>> listByCondition(@RequestBody InlongGroupPageRequest request) {
         request.setCurrentUser(LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(groupService.listByCondition(request));
@@ -78,28 +78,28 @@ public class InlongGroupController {
 
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.UPDATE)
-    @ApiOperation(value = "Modify inlong group information")
+    @ApiOperation(value = "Update inlong group info")
     public Response<String> update(@RequestBody InlongGroupRequest groupInfo) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
         return Response.success(groupService.update(groupInfo, operator));
     }
 
     @RequestMapping(value = "/exist/{groupId}", method = RequestMethod.GET)
-    @ApiOperation(value = "Query whether the inlong group id exists")
+    @ApiOperation(value = "Is exists of the inlong group id")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class, required = true)
     public Response<Boolean> exist(@PathVariable String groupId) {
         return Response.success(groupService.exist(groupId));
     }
 
     @RequestMapping(value = "/countByStatus", method = RequestMethod.GET)
-    @ApiOperation(value = "Statistics of current user's inlong group status")
+    @ApiOperation(value = "Count inlong group status for current user")
     public Response<InlongGroupCountResponse> countGroupByUser() {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
         return Response.success(groupService.countGroupByUser(operator));
     }
 
     @RequestMapping(value = "startProcess/{groupId}", method = RequestMethod.POST)
-    @ApiOperation(value = "Start approval process")
+    @ApiOperation(value = "Start inlong approval process")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class)
     public Response<WorkflowResult> startProcess(@PathVariable String groupId) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
@@ -107,7 +107,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "suspendProcess/{groupId}", method = RequestMethod.POST)
-    @ApiOperation(value = "Suspend process")
+    @ApiOperation(value = "Suspend inlong group process")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class)
     public Response<WorkflowResult> suspendProcess(@PathVariable String groupId) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
@@ -115,7 +115,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "restartProcess/{groupId}", method = RequestMethod.POST)
-    @ApiOperation(value = "Restart process")
+    @ApiOperation(value = "Restart inlong group process")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class)
     public Response<WorkflowResult> restartProcess(@PathVariable String groupId) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
@@ -123,7 +123,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "/delete/{groupId}", method = RequestMethod.DELETE)
-    @ApiOperation(value = "Delete inlong group information")
+    @ApiOperation(value = "Delete inlong group info")
     @OperationLog(operation = OperationType.DELETE)
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class, required = true)
     public Response<Boolean> delete(@PathVariable String groupId) {
@@ -132,7 +132,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "suspendProcessAsync/{groupId}", method = RequestMethod.POST)
-    @ApiOperation(value = "Suspend process")
+    @ApiOperation(value = "Suspend inlong group process")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class)
     public Response<String> suspendProcessAsync(@PathVariable String groupId) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
@@ -140,7 +140,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "restartProcessAsync/{groupId}", method = RequestMethod.POST)
-    @ApiOperation(value = "Restart process")
+    @ApiOperation(value = "Restart inlong group process")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class)
     public Response<String> restartProcessAsync(@PathVariable String groupId) {
         String operator = LoginUserUtils.getLoginUserDetail().getUserName();
@@ -148,7 +148,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "/deleteAsync/{groupId}", method = RequestMethod.DELETE)
-    @ApiOperation(value = "Delete inlong group information")
+    @ApiOperation(value = "Delete inlong group info")
     @OperationLog(operation = OperationType.DELETE)
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class, required = true)
     public Response<String> deleteAsync(@PathVariable String groupId) {
@@ -157,7 +157,7 @@ public class InlongGroupController {
     }
 
     @RequestMapping(value = "getTopic/{groupId}", method = RequestMethod.GET)
-    @ApiOperation(value = "Get Topic via the inlong group")
+    @ApiOperation(value = "Get topic info")
     public Response<InlongGroupTopicResponse> getTopic(@PathVariable String groupId) {
         return Response.success(groupService.getTopic(groupId));
     }
diff --git a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongStreamController.java b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongStreamController.java
index 3f789e5..143a441 100644
--- a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongStreamController.java
+++ b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongStreamController.java
@@ -24,12 +24,12 @@ import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.apache.inlong.manager.common.beans.Response;
 import org.apache.inlong.manager.common.enums.OperationType;
-import org.apache.inlong.manager.common.pojo.stream.InlongStreamInfo;
-import org.apache.inlong.manager.common.pojo.stream.InlongStreamListResponse;
-import org.apache.inlong.manager.common.pojo.stream.InlongStreamPageRequest;
 import org.apache.inlong.manager.common.pojo.stream.FullPageUpdateRequest;
 import org.apache.inlong.manager.common.pojo.stream.FullStreamRequest;
 import org.apache.inlong.manager.common.pojo.stream.FullStreamResponse;
+import org.apache.inlong.manager.common.pojo.stream.InlongStreamInfo;
+import org.apache.inlong.manager.common.pojo.stream.InlongStreamListResponse;
+import org.apache.inlong.manager.common.pojo.stream.InlongStreamPageRequest;
 import org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse;
 import org.apache.inlong.manager.common.util.LoginUserUtils;
 import org.apache.inlong.manager.service.core.InlongStreamService;
@@ -49,7 +49,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/stream")
-@Api(tags = "Inlong stream config")
+@Api(tags = "Inlong-Stream-API")
 public class InlongStreamController {
 
     @Autowired
@@ -57,7 +57,7 @@ public class InlongStreamController {
 
     @RequestMapping(value = "/save", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.CREATE)
-    @ApiOperation(value = "Save inlong stream information")
+    @ApiOperation(value = "Save inlong stream info")
     public Response<Integer> save(@RequestBody InlongStreamInfo streamInfo) {
         int result = streamService.save(streamInfo, LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(result);
@@ -65,21 +65,21 @@ public class InlongStreamController {
 
     @RequestMapping(value = "/saveAll", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.CREATE)
-    @ApiOperation(value = "Save inlong stream page information, including source and sink")
+    @ApiOperation(value = "Save inlong stream info page")
     public Response<Boolean> saveAll(@RequestBody FullStreamRequest pageInfo) {
         return Response.success(streamService.saveAll(pageInfo, LoginUserUtils.getLoginUserDetail().getUserName()));
     }
 
     @RequestMapping(value = "/batchSaveAll", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.CREATE)
-    @ApiOperation(value = "Batch save inlong stream page information, including source and sink")
+    @ApiOperation(value = "Save inlong stream page info in batch")
     public Response<Boolean> batchSaveAll(@RequestBody List<FullStreamRequest> infoList) {
         boolean result = streamService.batchSaveAll(infoList, LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(result);
     }
 
     @RequestMapping(value = "/get", method = RequestMethod.GET)
-    @ApiOperation(value = "Query inlong stream information")
+    @ApiOperation(value = "Get inlong stream info")
     @ApiImplicitParams({
             @ApiImplicitParam(name = "groupId", dataTypeClass = String.class, required = true),
             @ApiImplicitParam(name = "streamId", dataTypeClass = String.class, required = true)
@@ -88,23 +88,23 @@ public class InlongStreamController {
         return Response.success(streamService.get(groupId, streamId));
     }
 
-    @RequestMapping(value = "/list", method = RequestMethod.GET)
-    @ApiOperation(value = "Paging query inlong stream list")
-    public Response<PageInfo<InlongStreamListResponse>> listByCondition(InlongStreamPageRequest request) {
+    @RequestMapping(value = "/list", method = RequestMethod.POST)
+    @ApiOperation(value = "Get inlong stream by paginating")
+    public Response<PageInfo<InlongStreamListResponse>> listByCondition(@RequestBody InlongStreamPageRequest request) {
         request.setCurrentUser(LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(streamService.listByCondition(request));
     }
 
-    @RequestMapping(value = "/listAll", method = RequestMethod.GET)
-    @ApiOperation(value = "Paging query all data of the inlong stream page under the specified groupId")
-    public Response<PageInfo<FullStreamResponse>> listAllWithGroupId(InlongStreamPageRequest request) {
+    @RequestMapping(value = "/listAll", method = RequestMethod.POST)
+    @ApiOperation(value = "Get all inlong stream info by paginating")
+    public Response<PageInfo<FullStreamResponse>> listAllWithGroupId(@RequestBody InlongStreamPageRequest request) {
         request.setCurrentUser(LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(streamService.listAllWithGroupId(request));
     }
 
     @RequestMapping(value = "/update", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.UPDATE)
-    @ApiOperation(value = "Modify inlong stream information")
+    @ApiOperation(value = "Update inlong stream info")
     public Response<Boolean> update(@RequestBody InlongStreamInfo streamInfo) {
         String username = LoginUserUtils.getLoginUserDetail().getUserName();
         return Response.success(streamService.update(streamInfo, username));
@@ -112,7 +112,7 @@ public class InlongStreamController {
 
     @RequestMapping(value = "/updateAll", method = RequestMethod.POST)
     @OperationLog(operation = OperationType.UPDATE)
-    @ApiOperation(value = "Modify inlong stream page information,including basic data source information")
+    @ApiOperation(value = "Update inlong stream page info")
     public Response<Boolean> updateAll(@RequestBody FullPageUpdateRequest updateInfo) {
         boolean result = streamService.updateAll(updateInfo, LoginUserUtils.getLoginUserDetail().getUserName());
         return Response.success(result);
@@ -120,18 +120,18 @@ public class InlongStreamController {
 
     @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
     @OperationLog(operation = OperationType.DELETE)
-    @ApiOperation(value = "Delete inlong stream information")
+    @ApiOperation(value = "Delete inlong stream info")
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "inlongGroupId", dataTypeClass = String.class, required = true),
+            @ApiImplicitParam(name = "groupId", dataTypeClass = String.class, required = true),
             @ApiImplicitParam(name = "streamId", dataTypeClass = String.class, required = true)
     })
-    public Response<Boolean> delete(@RequestParam String inlongGroupId, @RequestParam String streamId) {
+    public Response<Boolean> delete(@RequestParam String groupId, @RequestParam String streamId) {
         String username = LoginUserUtils.getLoginUserDetail().getUserName();
-        return Response.success(streamService.delete(inlongGroupId, streamId, username));
+        return Response.success(streamService.delete(groupId, streamId, username));
     }
 
     @RequestMapping(value = "/getSummaryList/{groupId}", method = RequestMethod.GET)
-    @ApiOperation(value = "Obtain the flow of inlong stream according to groupId")
+    @ApiOperation(value = "Get inlong stream summary list")
     @ApiImplicitParam(name = "groupId", value = "Inlong group id", dataTypeClass = String.class, required = true)
     public Response<List<StreamBriefResponse>> getSummaryList(@PathVariable String groupId) {
         return Response.success(streamService.getBriefList(groupId));
diff --git a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/openapi/AgentController.java b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/openapi/AgentController.java
index 0744bfe..9651170 100644
--- a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/openapi/AgentController.java
+++ b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/openapi/AgentController.java
@@ -71,7 +71,7 @@ public class AgentController {
     }
 
     @PostMapping("/reportAndGetTask")
-    @ApiOperation(value = "Report source task snapshot")
+    @ApiOperation(value = "Report task result and get next tasks")
     public Response<TaskResult> reportAndGetTask(@RequestBody TaskRequest request) {
         agentService.report(request);
         return Response.success(agentService.getTaskResult(request));