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/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 7cd711676 [INLONG-7890][Manager] Add checks for unmodifiable 
data_node_name and cluster_name (#7891)
7cd711676 is described below

commit 7cd7116762055e7a11133f30f22c5e682c1e9558
Author: fuweng11 <[email protected]>
AuthorDate: Mon Apr 24 18:29:02 2023 +0800

    [INLONG-7890][Manager] Add checks for unmodifiable data_node_name and 
cluster_name (#7891)
---
 .../inlong/manager/dao/entity/DataNodeEntity.java  |  1 +
 .../manager/dao/entity/InlongClusterEntity.java    |  1 +
 .../resources/mappers/DataNodeEntityMapper.xml     | 43 +++++++------
 .../mappers/InlongClusterEntityMapper.xml          | 58 ++++++++++--------
 .../inlong/manager/pojo/cluster/ClusterInfo.java   |  3 +
 .../manager/pojo/cluster/ClusterPageRequest.java   |  3 +
 .../manager/pojo/cluster/ClusterRequest.java       |  8 ++-
 .../inlong/manager/pojo/node/DataNodeInfo.java     |  3 +
 .../manager/pojo/node/DataNodePageRequest.java     |  4 +-
 .../inlong/manager/pojo/node/DataNodeRequest.java  |  6 +-
 .../service/cluster/InlongClusterServiceImpl.java  | 17 ++++++
 .../manager/service/node/DataNodeServiceImpl.java  | 20 +++++++
 .../service/cluster/InlongClusterServiceTest.java  |  2 +-
 .../service/core/impl/DataNodeServiceTest.java     |  2 +-
 .../main/resources/h2/apache_inlong_manager.sql    | 70 +++++++++++-----------
 .../manager-web/sql/apache_inlong_manager.sql      | 70 +++++++++++-----------
 inlong-manager/manager-web/sql/changes-1.7.0.sql   |  6 ++
 .../web/controller/StreamSinkController.java       |  2 +-
 .../web/controller/DataNodeControllerTest.java     |  2 +-
 19 files changed, 199 insertions(+), 122 deletions(-)

diff --git 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/DataNodeEntity.java
 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/DataNodeEntity.java
index 99dc757ad..d503beb43 100644
--- 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/DataNodeEntity.java
+++ 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/DataNodeEntity.java
@@ -31,6 +31,7 @@ public class DataNodeEntity implements Serializable {
     private static final long serialVersionUID = 1L;
     private Integer id;
     private String name;
+    private String displayName;
     private String type;
     private String url;
     private String username;
diff --git 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/InlongClusterEntity.java
 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/InlongClusterEntity.java
index bb39a21ab..98d150d0b 100644
--- 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/InlongClusterEntity.java
+++ 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/InlongClusterEntity.java
@@ -32,6 +32,7 @@ public class InlongClusterEntity implements Serializable {
 
     private Integer id;
     private String name;
+    private String displayName;
     private String type;
     private String url;
     private String clusterTags;
diff --git 
a/inlong-manager/manager-dao/src/main/resources/mappers/DataNodeEntityMapper.xml
 
b/inlong-manager/manager-dao/src/main/resources/mappers/DataNodeEntityMapper.xml
index 0015debbf..ec88eb7c2 100644
--- 
a/inlong-manager/manager-dao/src/main/resources/mappers/DataNodeEntityMapper.xml
+++ 
b/inlong-manager/manager-dao/src/main/resources/mappers/DataNodeEntityMapper.xml
@@ -23,6 +23,7 @@
     <resultMap id="BaseResultMap" 
type="org.apache.inlong.manager.dao.entity.DataNodeEntity">
         <id column="id" jdbcType="INTEGER" property="id"/>
         <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="display_name" jdbcType="VARCHAR" 
property="displayName"/>
         <result column="type" jdbcType="VARCHAR" property="type"/>
         <result column="url" jdbcType="VARCHAR" property="url"/>
         <result column="username" jdbcType="VARCHAR" property="username"/>
@@ -39,20 +40,21 @@
         <result column="version" jdbcType="INTEGER" property="version"/>
     </resultMap>
     <sql id="Base_Column_List">
-        id, name, type, url, username, token, ext_params, description, 
in_charges, status, is_deleted,
+        id, name, display_name, type, url, username, token, ext_params, 
description, in_charges, status, is_deleted,
         creator, modifier, create_time, modify_time, version
     </sql>
 
     <insert id="insert" useGeneratedKeys="true" keyProperty="id"
             
parameterType="org.apache.inlong.manager.dao.entity.DataNodeEntity">
-        insert into data_node (id, name, type,
+        insert into data_node (id, name, display_name, type,
                                url, username, token,
                                ext_params, description, in_charges,
                                status, creator, modifier)
-        values (#{id, jdbcType=INTEGER}, #{name, jdbcType=VARCHAR}, #{type, 
jdbcType=VARCHAR},
-                #{url, jdbcType=VARCHAR}, #{username, jdbcType=VARCHAR}, 
#{token, jdbcType=VARCHAR},
-                #{extParams,jdbcType=LONGVARCHAR}, #{description, 
jdbcType=VARCHAR}, #{inCharges, jdbcType=VARCHAR},
-                #{status, jdbcType=INTEGER}, #{creator, jdbcType=VARCHAR}, 
#{modifier, jdbcType=VARCHAR})
+        values (#{id, jdbcType=INTEGER}, #{name, jdbcType=VARCHAR}, 
#{displayName,jdbcType=VARCHAR},
+                #{type, jdbcType=VARCHAR}, #{url, jdbcType=VARCHAR}, 
#{username, jdbcType=VARCHAR},
+                #{token, jdbcType=VARCHAR}, #{extParams,jdbcType=LONGVARCHAR}, 
#{description, jdbcType=VARCHAR},
+                #{inCharges, jdbcType=VARCHAR}, #{status, jdbcType=INTEGER}, 
#{creator, jdbcType=VARCHAR},
+                #{modifier, jdbcType=VARCHAR})
     </insert>
 
     <select id="selectById" parameterType="java.lang.Integer" 
resultMap="BaseResultMap">
@@ -87,6 +89,7 @@
             <if test="keyword != null and keyword != ''">
                 and (
                 name like CONCAT('%', #{keyword}, '%')
+                or display_name like CONCAT('%', #{keyword}, '%')
                 or type like CONCAT('%', #{keyword}, '%')
                 or url like CONCAT('%', #{keyword}, '%')
                 )
@@ -115,18 +118,19 @@
     </select>
     <update id="updateById" 
parameterType="org.apache.inlong.manager.dao.entity.DataNodeEntity">
         update data_node
-        set name        = #{name, jdbcType=VARCHAR},
-            type        = #{type, jdbcType=VARCHAR},
-            url         = #{url, jdbcType=VARCHAR},
-            username    = #{username, jdbcType=VARCHAR},
-            token       = #{token, jdbcType=VARCHAR},
-            ext_params  = #{extParams, jdbcType=LONGVARCHAR},
-            description = #{description,jdbcType=VARCHAR},
-            in_charges  = #{inCharges, jdbcType=VARCHAR},
-            status      = #{status, jdbcType=INTEGER},
-            is_deleted  = #{isDeleted, jdbcType=INTEGER},
-            modifier    = #{modifier, jdbcType=VARCHAR},
-            version     = #{version, jdbcType=INTEGER} + 1
+        set name         = #{name, jdbcType=VARCHAR},
+            display_name = #{displayName, jdbcType=VARCHAR},
+            type         = #{type, jdbcType=VARCHAR},
+            url          = #{url, jdbcType=VARCHAR},
+            username     = #{username, jdbcType=VARCHAR},
+            token        = #{token, jdbcType=VARCHAR},
+            ext_params   = #{extParams, jdbcType=LONGVARCHAR},
+            description  = #{description,jdbcType=VARCHAR},
+            in_charges   = #{inCharges, jdbcType=VARCHAR},
+            status       = #{status, jdbcType=INTEGER},
+            is_deleted   = #{isDeleted, jdbcType=INTEGER},
+            modifier     = #{modifier, jdbcType=VARCHAR},
+            version      = #{version, jdbcType=INTEGER} + 1
         where id = #{id, jdbcType=INTEGER}
           and version = #{version, jdbcType=INTEGER}
     </update>
@@ -136,6 +140,9 @@
             <if test="name != null">
                 name = #{name, jdbcType=VARCHAR},
             </if>
+            <if test="displayName !=null">
+                display_name = #{displayName, jdbcType=VARCHAR},
+            </if>
             <if test="type != null">
                 type = #{type, jdbcType=VARCHAR},
             </if>
diff --git 
a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
 
b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
index 22ced8ba3..e95cf6de3 100644
--- 
a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
+++ 
b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
@@ -23,6 +23,7 @@
     <resultMap id="BaseResultMap" 
type="org.apache.inlong.manager.dao.entity.InlongClusterEntity">
         <id column="id" jdbcType="INTEGER" property="id"/>
         <result column="name" jdbcType="VARCHAR" property="name"/>
+        <result column="display_name" property="displayName"/>
         <result column="type" jdbcType="VARCHAR" property="type"/>
         <result column="url" jdbcType="VARCHAR" property="url"/>
         <result column="cluster_tags" jdbcType="VARCHAR" 
property="clusterTags"/>
@@ -41,35 +42,35 @@
         <result column="version" jdbcType="INTEGER" property="version"/>
     </resultMap>
     <sql id="Base_Column_List">
-        id, name, type, url, cluster_tags, ext_tag, token, ext_params, 
description, heartbeat,
+        id, name, display_name, type, url, cluster_tags, ext_tag, token, 
ext_params, description, heartbeat,
         in_charges, status, is_deleted, creator, modifier, create_time, 
modify_time, version
     </sql>
 
     <insert id="insert" useGeneratedKeys="true" keyProperty="id"
             
parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity">
-        insert into inlong_cluster (id, name, type,
+        insert into inlong_cluster (id, name, display_name, type,
                                     url, cluster_tags, ext_tag,
                                     token, ext_params, description,
                                     heartbeat, in_charges,
                                     status, creator, modifier)
-        values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
#{type,jdbcType=VARCHAR},
-                #{url,jdbcType=VARCHAR}, #{clusterTags,jdbcType=VARCHAR}, 
#{extTag,jdbcType=VARCHAR},
-                #{token,jdbcType=VARCHAR}, #{extParams,jdbcType=LONGVARCHAR}, 
#{description, jdbcType=VARCHAR},
-                #{heartbeat,jdbcType=LONGVARCHAR}, 
#{inCharges,jdbcType=VARCHAR},
+        values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
#{displayName,jdbcType=VARCHAR},
+                #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, 
#{clusterTags,jdbcType=VARCHAR},
+                #{extTag,jdbcType=VARCHAR}, #{token,jdbcType=VARCHAR}, 
#{extParams,jdbcType=LONGVARCHAR},
+                #{description, jdbcType=VARCHAR}, 
#{heartbeat,jdbcType=LONGVARCHAR}, #{inCharges,jdbcType=VARCHAR},
                 #{status,jdbcType=INTEGER}, #{creator,jdbcType=VARCHAR}, 
#{modifier,jdbcType=VARCHAR})
     </insert>
 
     <insert id="insertOnDuplicateKeyUpdate" useGeneratedKeys="true" 
keyProperty="id"
             
parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity">
-        insert into inlong_cluster (id, name, type,
+        insert into inlong_cluster (id, name, display_name, type,
                                     url, cluster_tags, ext_tag,
                                     token, ext_params, heartbeat,
                                     in_charges, status,
                                     creator, modifier)
-        values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
#{type,jdbcType=VARCHAR},
-                #{url,jdbcType=VARCHAR}, #{clusterTags,jdbcType=VARCHAR}, 
#{extTag,jdbcType=VARCHAR},
-                #{token,jdbcType=VARCHAR}, #{extParams,jdbcType=LONGVARCHAR}, 
#{heartbeat,jdbcType=LONGVARCHAR},
-                #{inCharges,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
+        values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
#{displayName,jdbcType=VARCHAR},
+                #{type,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, 
#{clusterTags,jdbcType=VARCHAR},
+                #{extTag,jdbcType=VARCHAR},#{token,jdbcType=VARCHAR}, 
#{extParams,jdbcType=LONGVARCHAR},
+                #{heartbeat,jdbcType=LONGVARCHAR}, 
#{inCharges,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
                 #{creator,jdbcType=VARCHAR}, #{modifier,jdbcType=VARCHAR})
         ON DUPLICATE KEY UPDATE cluster_tags = VALUES(cluster_tags),
                                 ext_tag      = VALUES(ext_tag),
@@ -155,6 +156,7 @@
             </if>
             <if test="keyword != null and keyword != ''">
                 and (name like CONCAT('%', #{keyword}, '%')
+                or display_name like CONCAT('%', #{keyword}, '%')
                 or cluster_tags like CONCAT('%', #{keyword}, '%')
                 or ext_tag like CONCAT('%', #{keyword}, '%')
                 )
@@ -182,7 +184,7 @@
         </where>
         order by modify_time desc
     </select>
-    <select id="selectAllClusters" 
resultType="org.apache.inlong.manager.pojo.sort.standalone.SortSourceClusterInfo"
 >
+    <select id="selectAllClusters" 
resultType="org.apache.inlong.manager.pojo.sort.standalone.SortSourceClusterInfo">
         select name,
                type,
                url,
@@ -195,20 +197,21 @@
 
     <update id="updateById" 
parameterType="org.apache.inlong.manager.dao.entity.InlongClusterEntity">
         update inlong_cluster
-        set name         = #{name,jdbcType=VARCHAR},
-            type         = #{type,jdbcType=VARCHAR},
-            url          = #{url,jdbcType=VARCHAR},
-            cluster_tags = #{clusterTags,jdbcType=VARCHAR},
-            ext_tag      = #{extTag,jdbcType=VARCHAR},
-            token        = #{token,jdbcType=VARCHAR},
-            ext_params   = #{extParams,jdbcType=LONGVARCHAR},
-            description  = #{description,jdbcType=VARCHAR},
-            heartbeat    = #{heartbeat,jdbcType=LONGVARCHAR},
-            in_charges   = #{inCharges,jdbcType=VARCHAR},
-            status       = #{status,jdbcType=INTEGER},
-            is_deleted   = #{isDeleted,jdbcType=INTEGER},
-            modifier     = #{modifier,jdbcType=VARCHAR},
-            version      = #{version,jdbcType=INTEGER} + 1
+        set name                 = #{name,jdbcType=VARCHAR},
+            display_name         = #{displayName,jdbcType=VARCHAR},
+            type                 = #{type,jdbcType=VARCHAR},
+            url                  = #{url,jdbcType=VARCHAR},
+            cluster_tags         = #{clusterTags,jdbcType=VARCHAR},
+            ext_tag              = #{extTag,jdbcType=VARCHAR},
+            token                = #{token,jdbcType=VARCHAR},
+            ext_params           = #{extParams,jdbcType=LONGVARCHAR},
+            description          = #{description,jdbcType=VARCHAR},
+            heartbeat            = #{heartbeat,jdbcType=LONGVARCHAR},
+            in_charges           = #{inCharges,jdbcType=VARCHAR},
+            status               = #{status,jdbcType=INTEGER},
+            is_deleted           = #{isDeleted,jdbcType=INTEGER},
+            modifier             = #{modifier,jdbcType=VARCHAR},
+            version              = #{version,jdbcType=INTEGER} + 1
         where id = #{id,jdbcType=INTEGER}
           and version = #{version,jdbcType=INTEGER}
     </update>
@@ -218,6 +221,9 @@
             <if test="name != null">
                 name = #{name,jdbcType=VARCHAR},
             </if>
+            <if test="displayName != null">
+                display_name = #{displayName,jdbcType=VARCHAR},
+            </if>
             <if test="type != null">
                 type = #{type,jdbcType=VARCHAR},
             </if>
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterInfo.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterInfo.java
index 0a2a31f92..7e3819ea9 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterInfo.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterInfo.java
@@ -45,6 +45,9 @@ public abstract class ClusterInfo {
     @ApiModelProperty(value = "Cluster name")
     private String name;
 
+    @ApiModelProperty(value = "Cluster display name, just for display")
+    private String displayName;
+
     @ApiModelProperty(value = "Cluster type, including TUBEMQ, PULSAR, KAFKA, 
DATAPROXY, etc.")
     private String type;
 
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterPageRequest.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterPageRequest.java
index 41ee95c6d..9f35d7600 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterPageRequest.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterPageRequest.java
@@ -48,6 +48,9 @@ public class ClusterPageRequest extends PageRequest {
     @ApiModelProperty(value = "Cluster name")
     private String name;
 
+    @ApiModelProperty(value = "Cluster display name, just for display")
+    private String displayName;
+
     @ApiModelProperty(value = "Parent cluster ID, used for cluster node")
     private Integer parentId;
 
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterRequest.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterRequest.java
index 240f939f9..8ac076e61 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterRequest.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/cluster/ClusterRequest.java
@@ -48,11 +48,13 @@ public abstract class ClusterRequest {
     private Integer id;
 
     @ApiModelProperty(value = "Cluster name")
-    @NotBlank(groups = {SaveValidation.class, UpdateByKeyValidation.class}, 
message = "cluster name cannot be blank")
-    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
-    @Pattern(regexp = "^[a-z0-9_.-]{1,128}$", message = "only supports 
lowercase letters, numbers, '.', '-', or '_'")
+    @Pattern(regexp = "^[A-Za-z0-9_-]{1,128}$", message = "only supports 
letters, numbers, '-', or '_'")
     private String name;
 
+    @ApiModelProperty(value = "Cluster display name, just for display")
+    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
+    private String displayName;
+
     @ApiModelProperty(value = "Cluster type, including TUBEMQ, PULSAR, KAFKA, 
DATAPROXY, etc.")
     @NotBlank(message = "cluster type cannot be blank")
     @Length(min = 1, max = 20, message = "length must be between 1 and 20")
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeInfo.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeInfo.java
index 64aa7c4aa..77ec9b77d 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeInfo.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeInfo.java
@@ -45,6 +45,9 @@ public abstract class DataNodeInfo {
     @ApiModelProperty(value = "Data node name")
     private String name;
 
+    @ApiModelProperty(value = "Data node display name, just for display")
+    private String displayName;
+
     @ApiModelProperty(value = "Data node type, including MYSQL, HIVE, KAFKA, 
ES, etc.")
     private String type;
 
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodePageRequest.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodePageRequest.java
index bb87e793e..0bfaea894 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodePageRequest.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodePageRequest.java
@@ -39,10 +39,12 @@ public class DataNodePageRequest extends PageRequest {
     private String type;
 
     @ApiModelProperty(value = "Data node name")
-    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
     @Pattern(regexp = "^[A-Za-z0-9_-]{1,128}$", message = "only supports 
letters, numbers, '-', or '_'")
     private String name;
 
+    @ApiModelProperty(value = "Data node display name, just for display")
+    private String displayName;
+
     @ApiModelProperty(value = "Keywords, name, url, etc.")
     private String keyword;
 
diff --git 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeRequest.java
 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeRequest.java
index 69c027089..b9ac9cce9 100644
--- 
a/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeRequest.java
+++ 
b/inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/node/DataNodeRequest.java
@@ -48,11 +48,13 @@ public abstract class DataNodeRequest {
     private Integer id;
 
     @ApiModelProperty(value = "Data node name")
-    @NotBlank(groups = {SaveValidation.class, UpdateByKeyValidation.class}, 
message = "node name cannot be blank")
-    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
     @Pattern(regexp = "^[A-Za-z0-9_-]{1,128}$", message = "only supports 
letters, numbers, '-', or '_'")
     private String name;
 
+    @ApiModelProperty(value = "Data node display name, just for display")
+    @Length(min = 1, max = 128, message = "length must be between 1 and 128")
+    private String displayName;
+
     @ApiModelProperty(value = "Data node type, including MYSQL, HIVE, KAFKA, 
ES, etc.")
     @NotBlank(message = "node type cannot be blank")
     @Length(max = 20, message = "length must be less than or equal to 20")
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
index 7d9b05709..c1b06627a 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceImpl.java
@@ -89,6 +89,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
+import java.util.UUID;
 import java.util.stream.Collectors;
 
 /**
@@ -422,7 +423,13 @@ public class InlongClusterServiceImpl implements 
InlongClusterService {
 
         // check if the cluster already exist
         String clusterTag = request.getClusterTags();
+
+        // The name cannot be modified and is automatically generated by the 
system
         String name = request.getName();
+        if (StringUtils.isBlank(name)) {
+            name = UUID.randomUUID().toString();
+            request.setName(name);
+        }
         String type = request.getType();
         List<InlongClusterEntity> exist = 
clusterMapper.selectByKey(clusterTag, name, type);
         if (CollectionUtils.isNotEmpty(exist)) {
@@ -440,6 +447,12 @@ public class InlongClusterServiceImpl implements 
InlongClusterService {
 
     @Override
     public Integer save(ClusterRequest request, UserInfo opInfo) {
+        // The name cannot be modified and is automatically generated by the 
system
+        String name = request.getName();
+        if (StringUtils.isBlank(name)) {
+            name = UUID.randomUUID().toString();
+            request.setName(name);
+        }
         // check if the cluster already exist
         List<InlongClusterEntity> exist = clusterMapper.selectByKey(
                 request.getClusterTags(), request.getName(), 
request.getType());
@@ -1408,6 +1421,10 @@ public class InlongClusterServiceImpl implements 
InlongClusterService {
         // check and append name
         if (StringUtils.isBlank(request.getName())) {
             request.setName(entity.getName());
+        } else {
+            // check name
+            Preconditions.expectEquals(entity.getName(), request.getName(),
+                    ErrorCodeEnum.INVALID_PARAMETER, "name not allowed 
modify");
         }
         // check and append clusterTag
         if (StringUtils.isBlank(request.getClusterTags())) {
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/DataNodeServiceImpl.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/DataNodeServiceImpl.java
index b2d094e64..ebc22757d 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/DataNodeServiceImpl.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/node/DataNodeServiceImpl.java
@@ -41,6 +41,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.List;
+import java.util.UUID;
 import java.util.stream.Collectors;
 
 /**
@@ -60,7 +61,12 @@ public class DataNodeServiceImpl implements DataNodeService {
 
     @Override
     public Integer save(DataNodeRequest request, String operator) {
+        // The name cannot be modified and is automatically generated by the 
system
         String name = request.getName();
+        if (StringUtils.isBlank(name)) {
+            name = UUID.randomUUID().toString();
+            request.setName(name);
+        }
         String type = request.getType();
 
         // check if data node already exist
@@ -79,6 +85,13 @@ public class DataNodeServiceImpl implements DataNodeService {
 
     @Override
     public Integer save(DataNodeRequest request, UserInfo opInfo) {
+        // The name cannot be modified and is automatically generated by the 
system
+        String name = request.getName();
+        if (StringUtils.isBlank(name)) {
+            name = UUID.randomUUID().toString();
+            request.setName(name);
+        }
+
         // only the person in charges can query
         if (!opInfo.getAccountType().equals(UserTypeEnum.ADMIN.getCode())) {
             throw new BusinessException(ErrorCodeEnum.PERMISSION_REQUIRED);
@@ -314,6 +327,13 @@ public class DataNodeServiceImpl implements 
DataNodeService {
         // check type
         Preconditions.expectEquals(curEntity.getType(), request.getType(),
                 ErrorCodeEnum.INVALID_PARAMETER, "type not allowed modify");
+        if (StringUtils.isBlank(request.getName())) {
+            request.setName(curEntity.getName());
+        } else {
+            // check name
+            Preconditions.expectEquals(curEntity.getName(), request.getName(),
+                    ErrorCodeEnum.INVALID_PARAMETER, "name not allowed 
modify");
+        }
         // check record version
         Preconditions.expectEquals(curEntity.getVersion(), 
request.getVersion(),
                 ErrorCodeEnum.CONFIG_EXPIRED,
diff --git 
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceTest.java
 
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceTest.java
index e1cbe01c9..c4dabbbee 100644
--- 
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceTest.java
+++ 
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/cluster/InlongClusterServiceTest.java
@@ -214,7 +214,7 @@ public class InlongClusterServiceTest extends 
ServiceBaseTest {
         Assertions.assertEquals(adminUrl, pulsarCluster.getAdminUrl());
 
         // update cluster
-        String clusterNameUpdate = "default_pulsar_2";
+        String clusterNameUpdate = "default_pulsar";
         String clusterTagUpdate = "default_cluster_2";
         String adminUrlUpdate = "http://127.0.0.1:8088";;
         Boolean updateSuccess =
diff --git 
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/impl/DataNodeServiceTest.java
 
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/impl/DataNodeServiceTest.java
index 5f249e8c5..92f0e968c 100644
--- 
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/impl/DataNodeServiceTest.java
+++ 
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/impl/DataNodeServiceTest.java
@@ -115,7 +115,7 @@ public class DataNodeServiceTest extends ServiceBaseTest {
         Assertions.assertEquals(listDataNode.getTotal(), 1);
 
         // test update data node
-        String newNodeName = "hiveNode2";
+        String newNodeName = "hiveNode1";
         String newType = DataNodeType.HIVE;
         String newUrl = "127.0.0.1:8083";
         String newUsername = "admin2";
diff --git 
a/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql 
b/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql
index f64d5babc..8b2cc004f 100644
--- 
a/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql
+++ 
b/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql
@@ -97,24 +97,25 @@ CREATE TABLE IF NOT EXISTS `inlong_cluster_tag`
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `inlong_cluster`
 (
-    `id`           int(11)      NOT NULL AUTO_INCREMENT COMMENT 'Incremental 
primary key',
-    `name`         varchar(128) NOT NULL COMMENT 'Cluster name',
-    `type`         varchar(20)           DEFAULT '' COMMENT 'Cluster type, 
such as: TUBEMQ, PULSAR, DATAPROXY, etc',
-    `url`          varchar(512)          DEFAULT NULL COMMENT 'Cluster URL',
-    `cluster_tags` varchar(512)          DEFAULT NULL COMMENT 'Cluster tag, 
separated by commas',
-    `ext_tag`      varchar(128)          DEFAULT NULL COMMENT 'Extension tag, 
for extended use',
-    `token`        varchar(512)          DEFAULT NULL COMMENT 'Cluster token',
-    `ext_params`   mediumtext            DEFAULT NULL COMMENT 'Extended 
params, will be saved as JSON string',
-    `description`  varchar(256)          DEFAULT '' COMMENT 'Description of 
cluster',
-    `heartbeat`    mediumtext            DEFAULT NULL COMMENT 'Cluster 
heartbeat info',
-    `in_charges`   varchar(512) NOT NULL COMMENT 'Name of responsible person, 
separated by commas',
-    `status`       int(4)                DEFAULT '0' COMMENT 'Cluster status',
-    `is_deleted`   int(11)               DEFAULT '0' COMMENT 'Whether to 
delete, 0: not deleted, > 0: deleted',
-    `creator`      varchar(64)  NOT NULL COMMENT 'Creator name',
-    `modifier`     varchar(64)           DEFAULT NULL COMMENT 'Modifier name',
-    `create_time`  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 
'Create time',
-    `modify_time`  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP COMMENT 'Modify time',
-    `version`      int(11)      NOT NULL DEFAULT '1' COMMENT 'Version number, 
which will be incremented by 1 after modification',
+    `id`                    int(11)      NOT NULL AUTO_INCREMENT COMMENT 
'Incremental primary key',
+    `name`                  varchar(128) NOT NULL COMMENT 'Cluster name',
+    `display_name`          varchar(128)          DEFAULT NULL COMMENT 
'Cluster display name',
+    `type`                  varchar(20)           DEFAULT '' COMMENT 'Cluster 
type, such as: TUBEMQ, PULSAR, DATAPROXY, etc',
+    `url`                   varchar(512)          DEFAULT NULL COMMENT 
'Cluster URL',
+    `cluster_tags`          varchar(512)          DEFAULT NULL COMMENT 
'Cluster tag, separated by commas',
+    `ext_tag`               varchar(128)          DEFAULT NULL COMMENT 
'Extension tag, for extended use',
+    `token`                 varchar(512)          DEFAULT NULL COMMENT 
'Cluster token',
+    `ext_params`            mediumtext            DEFAULT NULL COMMENT 
'Extended params, will be saved as JSON string',
+    `description`           varchar(256)          DEFAULT '' COMMENT 
'Description of cluster',
+    `heartbeat`             mediumtext            DEFAULT NULL COMMENT 
'Cluster heartbeat info',
+    `in_charges`            varchar(512) NOT NULL COMMENT 'Name of responsible 
person, separated by commas',
+    `status`                int(4)                DEFAULT '0' COMMENT 'Cluster 
status',
+    `is_deleted`            int(11)               DEFAULT '0' COMMENT 'Whether 
to delete, 0: not deleted, > 0: deleted',
+    `creator`               varchar(64)  NOT NULL COMMENT 'Creator name',
+    `modifier`              varchar(64)           DEFAULT NULL COMMENT 
'Modifier name',
+    `create_time`           timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
COMMENT 'Create time',
+    `modify_time`           timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON 
UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
+    `version`               int(11)      NOT NULL DEFAULT '1' COMMENT 'Version 
number, which will be incremented by 1 after modification',
     PRIMARY KEY (`id`),
     UNIQUE KEY `unique_inlong_cluster` (`name`, `type`, `is_deleted`),
     INDEX `cluster_type_index` (`type`)
@@ -178,22 +179,23 @@ CREATE TABLE IF NOT EXISTS `inlong_consume`
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `data_node`
 (
-    `id`          int(11)      NOT NULL AUTO_INCREMENT COMMENT 'Incremental 
primary key',
-    `name`        varchar(128) NOT NULL COMMENT 'Node name',
-    `type`        varchar(20)           DEFAULT '' COMMENT 'Node type, such 
as: MYSQL, HIVE, KAFKA, ES, etc',
-    `url`         varchar(512)          DEFAULT NULL COMMENT 'Node URL',
-    `username`    varchar(128)          DEFAULT NULL COMMENT 'Username for 
node if needed',
-    `token`       varchar(512)          DEFAULT NULL COMMENT 'Node token',
-    `ext_params`  mediumtext            DEFAULT NULL COMMENT 'Extended params, 
will be saved as JSON string',
-    `description` varchar(256)          DEFAULT '' COMMENT 'Description of 
data node',
-    `in_charges`  varchar(512) NOT NULL COMMENT 'Name of responsible person, 
separated by commas',
-    `status`      int(4)                DEFAULT '0' COMMENT 'Node status',
-    `is_deleted`  int(11)               DEFAULT '0' COMMENT 'Whether to 
delete, 0: not deleted, > 0: deleted',
-    `creator`     varchar(64)  NOT NULL COMMENT 'Creator name',
-    `modifier`    varchar(64)           DEFAULT NULL COMMENT 'Modifier name',
-    `create_time` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 
'Create time',
-    `modify_time` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP COMMENT 'Modify time',
-    `version`     int(11)      NOT NULL DEFAULT '1' COMMENT 'Version number, 
which will be incremented by 1 after modification',
+    `id`                      int(11)      NOT NULL AUTO_INCREMENT COMMENT 
'Incremental primary key',
+    `name`                    varchar(128) NOT NULL COMMENT 'Node name',
+    `display_name`            varchar(128)          DEFAULT NULL COMMENT 'Data 
node display name',
+    `type`                    varchar(20)           DEFAULT '' COMMENT 'Node 
type, such as: MYSQL, HIVE, KAFKA, ES, etc',
+    `url`                     varchar(512)          DEFAULT NULL COMMENT 'Node 
URL',
+    `username`                varchar(128)          DEFAULT NULL COMMENT 
'Username for node if needed',
+    `token`                   varchar(512)          DEFAULT NULL COMMENT 'Node 
token',
+    `ext_params`              mediumtext            DEFAULT NULL COMMENT 
'Extended params, will be saved as JSON string',
+    `description`             varchar(256)          DEFAULT '' COMMENT 
'Description of data node',
+    `in_charges`              varchar(512) NOT NULL COMMENT 'Name of 
responsible person, separated by commas',
+    `status`                  int(4)                DEFAULT '0' COMMENT 'Node 
status',
+    `is_deleted`              int(11)               DEFAULT '0' COMMENT 
'Whether to delete, 0: not deleted, > 0: deleted',
+    `creator`                 varchar(64)  NOT NULL COMMENT 'Creator name',
+    `modifier`                varchar(64)           DEFAULT NULL COMMENT 
'Modifier name',
+    `create_time`             timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
COMMENT 'Create time',
+    `modify_time`             timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
+    `version`                 int(11)      NOT NULL DEFAULT '1' COMMENT 
'Version number, which will be incremented by 1 after modification',
     PRIMARY KEY (`id`),
     UNIQUE KEY `unique_data_node` (`name`, `type`, `is_deleted`)
 );
diff --git a/inlong-manager/manager-web/sql/apache_inlong_manager.sql 
b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
index 9e398382b..197885cea 100644
--- a/inlong-manager/manager-web/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
@@ -106,24 +106,25 @@ CREATE TABLE IF NOT EXISTS `inlong_cluster_tag`
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `inlong_cluster`
 (
-    `id`           int(11)      NOT NULL AUTO_INCREMENT COMMENT 'Incremental 
primary key',
-    `name`         varchar(128) NOT NULL COMMENT 'Cluster name',
-    `type`         varchar(20)           DEFAULT '' COMMENT 'Cluster type, 
such as: TUBEMQ, PULSAR, DATAPROXY, etc',
-    `url`          varchar(512)          DEFAULT NULL COMMENT 'Cluster URL',
-    `cluster_tags` varchar(512)          DEFAULT NULL COMMENT 'Cluster tag, 
separated by commas',
-    `ext_tag`      varchar(128)          DEFAULT NULL COMMENT 'Extension tag, 
for extended use',
-    `token`        varchar(512)          DEFAULT NULL COMMENT 'Cluster token',
-    `ext_params`   mediumtext            DEFAULT NULL COMMENT 'Extended 
params, will be saved as JSON string',
-    `description`  varchar(256)          DEFAULT '' COMMENT 'Description of 
cluster',
-    `heartbeat`    mediumtext            DEFAULT NULL COMMENT 'Cluster 
heartbeat info',
-    `in_charges`   varchar(512) NOT NULL COMMENT 'Name of responsible person, 
separated by commas',
-    `status`       int(4)                DEFAULT '0' COMMENT 'Cluster status',
-    `is_deleted`   int(11)               DEFAULT '0' COMMENT 'Whether to 
delete, 0: not deleted, > 0: deleted',
-    `creator`      varchar(64)  NOT NULL COMMENT 'Creator name',
-    `modifier`     varchar(64)           DEFAULT NULL COMMENT 'Modifier name',
-    `create_time`  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 
'Create time',
-    `modify_time`  timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP COMMENT 'Modify time',
-    `version`      int(11)      NOT NULL DEFAULT '1' COMMENT 'Version number, 
which will be incremented by 1 after modification',
+    `id`                    int(11)      NOT NULL AUTO_INCREMENT COMMENT 
'Incremental primary key',
+    `name`                  varchar(128) NOT NULL COMMENT 'Cluster name',
+    `display_name`          varchar(128)          DEFAULT NULL COMMENT 
'Cluster display name',
+    `type`                  varchar(20)           DEFAULT '' COMMENT 'Cluster 
type, such as: TUBEMQ, PULSAR, DATAPROXY, etc',
+    `url`                   varchar(512)          DEFAULT NULL COMMENT 
'Cluster URL',
+    `cluster_tags`          varchar(512)          DEFAULT NULL COMMENT 
'Cluster tag, separated by commas',
+    `ext_tag`               varchar(128)          DEFAULT NULL COMMENT 
'Extension tag, for extended use',
+    `token`                 varchar(512)          DEFAULT NULL COMMENT 
'Cluster token',
+    `ext_params`            mediumtext            DEFAULT NULL COMMENT 
'Extended params, will be saved as JSON string',
+    `description`           varchar(256)          DEFAULT '' COMMENT 
'Description of cluster',
+    `heartbeat`             mediumtext            DEFAULT NULL COMMENT 
'Cluster heartbeat info',
+    `in_charges`            varchar(512) NOT NULL COMMENT 'Name of responsible 
person, separated by commas',
+    `status`                int(4)                DEFAULT '0' COMMENT 'Cluster 
status',
+    `is_deleted`            int(11)               DEFAULT '0' COMMENT 'Whether 
to delete, 0: not deleted, > 0: deleted',
+    `creator`               varchar(64)  NOT NULL COMMENT 'Creator name',
+    `modifier`              varchar(64)           DEFAULT NULL COMMENT 
'Modifier name',
+    `create_time`           timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
COMMENT 'Create time',
+    `modify_time`           timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON 
UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
+    `version`               int(11)      NOT NULL DEFAULT '1' COMMENT 'Version 
number, which will be incremented by 1 after modification',
     PRIMARY KEY (`id`),
     UNIQUE KEY `unique_inlong_cluster` (`name`, `type`, `is_deleted`),
     INDEX `cluster_type_index` (`type`)
@@ -189,22 +190,23 @@ CREATE TABLE IF NOT EXISTS `inlong_consume`
 -- ----------------------------
 CREATE TABLE IF NOT EXISTS `data_node`
 (
-    `id`          int(11)      NOT NULL AUTO_INCREMENT COMMENT 'Incremental 
primary key',
-    `name`        varchar(128) NOT NULL COMMENT 'Node name',
-    `type`        varchar(20)           DEFAULT '' COMMENT 'Node type, such 
as: MYSQL, HIVE, KAFKA, ES, etc',
-    `url`         varchar(512)          DEFAULT NULL COMMENT 'Node URL',
-    `username`    varchar(128)          DEFAULT NULL COMMENT 'Username for 
node if needed',
-    `token`       varchar(512)          DEFAULT NULL COMMENT 'Node token',
-    `ext_params`  mediumtext            DEFAULT NULL COMMENT 'Extended params, 
will be saved as JSON string',
-    `description` varchar(256)          DEFAULT '' COMMENT 'Description of 
data node',
-    `in_charges`  varchar(512) NOT NULL COMMENT 'Name of responsible person, 
separated by commas',
-    `status`      int(4)                DEFAULT '0' COMMENT 'Node status',
-    `is_deleted`  int(11)               DEFAULT '0' COMMENT 'Whether to 
delete, 0: not deleted, > 0: deleted',
-    `creator`     varchar(64)  NOT NULL COMMENT 'Creator name',
-    `modifier`    varchar(64)           DEFAULT NULL COMMENT 'Modifier name',
-    `create_time` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 
'Create time',
-    `modify_time` timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE 
CURRENT_TIMESTAMP COMMENT 'Modify time',
-    `version`     int(11)      NOT NULL DEFAULT '1' COMMENT 'Version number, 
which will be incremented by 1 after modification',
+    `id`                      int(11)      NOT NULL AUTO_INCREMENT COMMENT 
'Incremental primary key',
+    `name`                    varchar(128) NOT NULL COMMENT 'Node name',
+    `display_name`            varchar(128)          DEFAULT NULL COMMENT 'Data 
node display name',
+    `type`                    varchar(20)           DEFAULT '' COMMENT 'Node 
type, such as: MYSQL, HIVE, KAFKA, ES, etc',
+    `url`                     varchar(512)          DEFAULT NULL COMMENT 'Node 
URL',
+    `username`                varchar(128)          DEFAULT NULL COMMENT 
'Username for node if needed',
+    `token`                   varchar(512)          DEFAULT NULL COMMENT 'Node 
token',
+    `ext_params`              mediumtext            DEFAULT NULL COMMENT 
'Extended params, will be saved as JSON string',
+    `description`             varchar(256)          DEFAULT '' COMMENT 
'Description of data node',
+    `in_charges`              varchar(512) NOT NULL COMMENT 'Name of 
responsible person, separated by commas',
+    `status`                  int(4)                DEFAULT '0' COMMENT 'Node 
status',
+    `is_deleted`              int(11)               DEFAULT '0' COMMENT 
'Whether to delete, 0: not deleted, > 0: deleted',
+    `creator`                 varchar(64)  NOT NULL COMMENT 'Creator name',
+    `modifier`                varchar(64)           DEFAULT NULL COMMENT 
'Modifier name',
+    `create_time`             timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
COMMENT 'Create time',
+    `modify_time`             timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP 
ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
+    `version`                 int(11)      NOT NULL DEFAULT '1' COMMENT 
'Version number, which will be incremented by 1 after modification',
     PRIMARY KEY (`id`),
     UNIQUE KEY `unique_data_node` (`name`, `type`, `is_deleted`)
 ) ENGINE = InnoDB
diff --git a/inlong-manager/manager-web/sql/changes-1.7.0.sql 
b/inlong-manager/manager-web/sql/changes-1.7.0.sql
index 5be093283..2ac93adb6 100644
--- a/inlong-manager/manager-web/sql/changes-1.7.0.sql
+++ b/inlong-manager/manager-web/sql/changes-1.7.0.sql
@@ -28,3 +28,9 @@ DROP INDEX `stream_id_index` ON `inlong_stream_ext`;
 DROP INDEX `stream_group_id_index` ON `inlong_stream`;
 DROP INDEX `unique_inlong_stream` ON `inlong_stream`;
 ALTER TABLE `inlong_stream` ADD UNIQUE KEY `unique_inlong_stream` 
(`inlong_group_id`, `inlong_stream_id`, `is_deleted`);
+
+ALTER TABLE `data_node`
+    ADD COLUMN `display_name`  varchar(128) DEFAULT NULL COMMENT 'Data node 
display name';
+
+ALTER TABLE `inlong_cluster`
+    ADD COLUMN `display_name`  varchar(128) DEFAULT NULL COMMENT 'Cluster 
display name';
\ No newline at end of file
diff --git 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/StreamSinkController.java
 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/StreamSinkController.java
index 8dff84bdd..6faf55010 100644
--- 
a/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/StreamSinkController.java
+++ 
b/inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/StreamSinkController.java
@@ -68,7 +68,7 @@ public class StreamSinkController {
     @ApiOperation(value = "Get stream sink")
     @ApiImplicitParam(name = "id", dataTypeClass = Integer.class, required = 
true)
     public Response<StreamSink> get(@PathVariable Integer id) {
-        return Response.success(sinkService.get(id));
+        return Response.success(sinkService.get(id, 
LoginUserUtils.getLoginUser()));
     }
 
     @RequestMapping(value = "/sink/list", method = RequestMethod.POST)
diff --git 
a/inlong-manager/manager-web/src/test/java/org/apache/inlong/manager/web/controller/DataNodeControllerTest.java
 
b/inlong-manager/manager-web/src/test/java/org/apache/inlong/manager/web/controller/DataNodeControllerTest.java
index f7f61c191..53bbe50a4 100644
--- 
a/inlong-manager/manager-web/src/test/java/org/apache/inlong/manager/web/controller/DataNodeControllerTest.java
+++ 
b/inlong-manager/manager-web/src/test/java/org/apache/inlong/manager/web/controller/DataNodeControllerTest.java
@@ -131,7 +131,7 @@ class DataNodeControllerTest extends WebBaseTest {
 
         DataNodeRequest request = getHiveDataNodeRequest();
         request.setId(nodeEntity.getId());
-        request.setName("test447777");
+        request.setName("test");
         request.setVersion(nodeEntity.getVersion());
         MvcResult mvcResult = postForSuccessMvcResult("/api/node/update", 
request);
 


Reply via email to