diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/cluster/ClusterMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/cluster/ClusterMapper.java index dc505622..eea050a8 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/cluster/ClusterMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/cluster/ClusterMapper.java @@ -34,25 +34,25 @@ @Mapper public interface ClusterMapper { - @Select("select * from cluster where is_delete=0") + @Select("SELECT * FROM cluster WHERE is_delete=0") List selectAllCluster(); - @Select("select * from cluster where id=#{id} and is_delete=0") + @Select("SELECT * FROM cluster WHERE id=#{id} AND is_delete=0") ClusterEntity selectClusterById(ClusterEntity cluster); - @Insert("insert into cluster (name, register_name_list, bootstrap_servers, eventmesh_version, client_properties, " - + "jmx_properties, reg_properties, description, auth_type, run_state) values (#{name},#{registerNameList}," + @Insert("INSERT INTO cluster (name, register_name_list, bootstrap_servers, eventmesh_version, client_properties, " + + "jmx_properties, reg_properties, description, auth_type, run_state) VALUES (#{name},#{registerNameList}," + "#{bootstrapServers},#{eventmeshVersion},#{clientProperties},#{jmxProperties},#{regProperties},#{description},#{authType},#{runState})") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addCluster(ClusterEntity cluster); - @Update("update cluster set name =#{name},reg_properties=#{regProperties},bootstrap_servers=#{bootstrapServers}," + @Update("UPDATE cluster SET name =#{name},reg_properties=#{regProperties},bootstrap_servers=#{bootstrapServers}," + "eventmesh_version=#{eventmeshVersion},client_properties=#{clientProperties},jmx_properties=#{jmxProperties}," + "reg_properties=#{regProperties},description=#{description},auth_type=#{authType},run_state=#{runState} ," - + "register_name_list=#{registerNameList} where id=#{id}") + + "register_name_list=#{registerNameList} WHERE id=#{id}") void updateClusterById(ClusterEntity cluster); - @Delete("update cluster set is_delete=1 where id=#{id}") + @Delete("UPDATE cluster SET is_delete=1 WHERE id=#{id}") void deleteClusterById(ClusterEntity clusterEntity); } diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/config/ConfigMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/config/ConfigMapper.java index 6e4a83f2..e7ee325e 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/config/ConfigMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/config/ConfigMapper.java @@ -40,21 +40,21 @@ public interface ConfigMapper { @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") Integer addConfig(ConfigEntity configEntity); - @Update("update config set status=2 where id=#{id}") + @Update("UPDATE config SET status=2 WHERE id=#{id}") Integer deleteConfig(ConfigEntity configEntity); - @Update("update config set config_value=#{configValue} where status=1 and edit=2") + @Update("UPDATE config SET config_value=#{configValue} WHERE status=1 AND edit=2") void updateConfig(ConfigEntity configEntity); - @Select("select * from config where business_type=#{businessType} and instance_type=#{instanceType} " - + "and instance_id=#{instanceId}") + @Select("SELECT * FROM config WHERE business_type=#{businessType} AND instance_type=#{instanceType} " + + "AND instance_id=#{instanceId}") List selectByInstanceId(ConfigEntity configEntity); - @Select("select * from config where cluster_id=-1 and business_type=#{businessType} and instance_type=#{instanceType}") + @Select("SELECT * FROM config WHERE cluster_id=-1 AND business_type=#{businessType} AND instance_type=#{instanceType}") List selectDefaultConfig(ConfigEntity configEntity); - @Select("select * from config where cluster_id=#{clusterId} and instance_type=#{instanceType} " - + "and instance_id=#{instanceId} and config_name=#{configName} and status=1") + @Select("SELECT * FROM config WHERE cluster_id=#{clusterId} AND instance_type=#{instanceType} " + + "AND instance_id=#{instanceId} AND config_name=#{configName} AND status=1") ConfigEntity selectByUnique(ConfigEntity configEntity); } diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/group/OprGroupMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/group/OprGroupMapper.java index 78128619..321e76c9 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/group/OprGroupMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/group/OprGroupMapper.java @@ -36,36 +36,36 @@ public interface OprGroupMapper { @Insert("INSERT INTO `group` (cluster_id, name, member_count, members, type, state)" + "VALUE (#{clusterId},#{name},#{memberCount},#{members},#{type},#{state}) " - + "on duplicate key update is_delete=0") + + "ON DUPLICATE KEY UPDATE is_delete=0") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addGroup(GroupEntity groupEntity); - @Update("update `group`set member_count=#{memberCount}," - + "members=#{members},type=#{type},state=#{state} where id=#{id}") + @Update("UPDATE `group` SET member_count=#{memberCount}," + + "members=#{members},type=#{type},state=#{state} WHERE id=#{id}") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") Integer updateGroup(GroupEntity groupEntity); - @Delete("update `group` set is_delete=1 where id=#{id}") + @Delete("UPDATE `group` SET is_delete=1 WHERE id=#{id}") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") Integer deleteGroup(GroupEntity groupEntity); - @Select("select * from `group` where cluster_id=#{clusterId} and name=#{name} and is_delete=0") + @Select("SELECT * FROM `group` WHERE cluster_id=#{clusterId} AND name=#{name} AND is_delete=0") GroupEntity selectGroupByUnique(GroupEntity groupEntity); - @Select("select * from `group` where id=#{id} and is_delete=0") + @Select("SELECT * FROM `group` WHERE id=#{id} AND is_delete=0") GroupEntity selectGroupById(GroupEntity groupEntity); @Select({ ""}) List selectGroup(GroupEntity groupEntity); diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/groupmember/OprGroupMemberMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/groupmember/OprGroupMemberMapper.java index aac0a592..b3dab8aa 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/groupmember/OprGroupMemberMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/groupmember/OprGroupMemberMapper.java @@ -36,47 +36,47 @@ @Mapper public interface OprGroupMemberMapper { - @Select("select * from group_member where cluster_id=#{clusterId} and is_delete=0") + @Select("SELECT * FROM group_member WHERE cluster_id=#{clusterId} AND is_delete=0") List getGroupByClusterId(GroupMemberEntity groupMemberEntity); - @Insert("insert into group_member (cluster_id, topic_name, group_name, eventmesh_user,state)" + @Insert("INSERT INTO group_member (cluster_id, topic_name, group_name, eventmesh_user,state)" + " VALUE (#{clusterId},#{topicName},#{groupName},#{eventMeshUser},#{state})" - + "on duplicate key update is_delete=0") + + "ON DUPLICATE KEY UPDATE is_delete=0") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addGroupMember(GroupMemberEntity groupMemberEntity); - @Update("update group_member set state=#{state} where id=#{id}") + @Update("UPDATE group_member SET state=#{state} WHERE id=#{id}") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void updateGroupMember(GroupMemberEntity groupMemberEntity); - @Delete("update group_member set is_delete=1 where id=#{id} ") + @Delete("UPDATE group_member SET is_delete=1 WHERE id=#{id} ") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") GroupMemberEntity deleteGroupMember(GroupMemberEntity groupMemberEntity); - @Select("select * from group_member where cluster_id=#{clusterId} and group_name=#{groupName} and topic_name=#{topicName} and is_delete=0") + @Select("SELECT * FROM group_member WHERE cluster_id=#{clusterId} AND group_name=#{groupName} AND topic_name=#{topicName} AND is_delete=0") GroupMemberEntity selectGroupMemberByUnique(GroupMemberEntity groupMemberEntity); - @Select("select * from group_member where id=#{id} and is_delete=0") + @Select("SELECT * FROM group_member WHERE id=#{id} AND is_delete=0") GroupMemberEntity selectGroupMemberById(GroupMemberEntity groupMemberEntity); @Select({ ""}) List selectMember(GroupMemberEntity groupMemberEntity); - @Update("update group_member set state=#{state} where topic_name=#{topicName}") + @Update("UPDATE group_member SET state=#{state} WHERE topic_name=#{topicName}") void updateMemberByTopic(GroupMemberEntity groupMemberEntity); } \ No newline at end of file diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/log/OprLogMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/log/OprLogMapper.java index 09360fa3..fcc7dc98 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/log/OprLogMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/log/OprLogMapper.java @@ -35,27 +35,27 @@ public interface OprLogMapper { @Select({ ""}) List getLogList(LogEntity logEntity); - @Insert("insert into operation_log ( cluster_id, operation_type,target_Type, content,operation_user,result)" + @Insert("INSERT INTO operation_log ( cluster_id, operation_type,target_Type, content,operation_user,result)" + "VALUE (#{clusterId},#{operationType},#{targetType},#{content},#{operationUser},#{result})") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") Long addLog(LogEntity logEntity); - @Update("update operation_log set status=#{status} ,result=#{resultContent} where id=#{id}") + @Update("UPDATE operation_log SET status=#{status} ,result=#{resultContent} WHERE id=#{id}") Integer updateLog(LogEntity logEntity); } diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/runtime/RuntimeMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/runtime/RuntimeMapper.java index 2037a4cd..a9db87f6 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/runtime/RuntimeMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/runtime/RuntimeMapper.java @@ -34,18 +34,18 @@ @Mapper public interface RuntimeMapper { - @Insert("insert into runtime (cluster_id, host, storage_cluster_id, port, jmx_port, start_timestamp, rack, status, " + @Insert("INSERT INTO runtime (cluster_id, host, storage_cluster_id, port, jmx_port, start_timestamp, rack, status, " + "endpoint_map) VALUES(#{clusterId},#{host},#{storageClusterId},#{port},#{jmxPort},#{startTimestamp},#{rack},#{status},#{endpointMap})") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addRuntime(RuntimeEntity runtimeEntity); - @Select("select * from runtime where cluster_id=#{clusterId} and is_delete=0") + @Select("SELECT * FROM runtime WHERE cluster_id=#{clusterId} AND is_delete=0") List selectRuntimeByCluster(RuntimeEntity runtimeEntity); - @Update("update runtime set port=#{port} ,jmx_port=#{jmxPort} ,status=#{status} where cluster_id=#{clusterId} and is_delete=0") + @Update("UPDATE runtime SET port=#{port} ,jmx_port=#{jmxPort} ,status=#{status} WHERE cluster_id=#{clusterId} AND is_delete=0") void updateRuntimeByCluster(RuntimeEntity runtimeEntity); - @Delete("update runtime set is_delete=1 where cluster_id=#{clusterId}") + @Delete("UPDATE runtime SET is_delete=1 WHERE cluster_id=#{clusterId}") void deleteRuntimeByCluster(RuntimeEntity runtimeEntity); } diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/storage/StoreMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/storage/StoreMapper.java index 88a84317..6ee1f509 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/storage/StoreMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/storage/StoreMapper.java @@ -33,19 +33,19 @@ @Mapper public interface StoreMapper { - @Insert("insert into store (cluster_id, store_id, store_type, host, runtime_id, topic_list, diff_type" + @Insert("INSERT INTO store (cluster_id, store_id, store_type, host, runtime_id, topic_list, diff_type" + ", port, jmx_port, start_timestamp, rack, status, endpoint_map ) VALUES (" + "#{clusterId},#{storeId},#{storeType},#{host},#{runtimeId},#{topicList},#{diffType},#{port},#{jmxPort}" + ",#{startTimestamp},#{rack},#{status},#{endpointMap})") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addStorage(StoreEntity storeEntity); - @Update("update store set is_delete=1 where cluster_id=#{clusterId} and store_id=#{storeId}") + @Update("UPDATE store SET is_delete=1 WHERE cluster_id=#{clusterId} AND store_id=#{storeId}") void deleteStoreByUnique(StoreEntity storeEntity); - @Select("select * from store where cluster_id=#{clusterId} and is_delete=0") + @Select("SELECT * FROM store WHERE cluster_id=#{clusterId} AND is_delete=0") List selectStoreByCluster(StoreEntity storeEntity); - @Update("update store set status=#{status} where cluster_id=#{clusterId} and store_id=#{storeId}") + @Update("UPDATE store SET status=#{status} WHERE cluster_id=#{clusterId} AND store_id=#{storeId}") void updateStoreByUnique(StoreEntity storeEntity); } diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java index 92712630..0fe2cadc 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/mapper/topic/TopicMapper.java @@ -35,40 +35,43 @@ @Mapper public interface TopicMapper { + @Select("SELECT count(*) FROM topic WHERE cluster_id=#{clusterId}") + Integer selectTopicNumByCluster(TopicEntity topicEntity); + @Select({ ""}) List getTopicList(TopicEntity topicEntity); @Insert("INSERT INTO topic (cluster_id, topic_name, runtime_id, storage_id, retention_ms, type, description) " + "VALUE (#{clusterId},#{topicName},#{runtimeId},#{storageId},#{retentionMs},#{type},#{description})" - + "on duplicate key update is_delete = 0") + + "ON DUPLICATE KEY UPDATE is_delete = 0") @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void addTopic(TopicEntity topicEntity); - @Update("update topic set type=#{type},description=#{description} where id=#{id}") + @Update("UPDATE topic SET type=#{type},description=#{description} WHERE id=#{id}") void updateTopic(TopicEntity topicEntity); - @Delete("update `topic` set is_delete=1 where id=#{id}") + @Delete("UPDATE `topic` SET is_delete=1 WHERE id=#{id}") void deleteTopic(TopicEntity topicEntity); - @Select("select * from topic where cluster_id=#{clusterId} and topic_name=#{topicName}") + @Select("SELECT * FROM topic WHERE cluster_id=#{clusterId} AND topic_name=#{topicName}") TopicEntity selectTopicByUnique(TopicEntity topicEntity); - @Select("select * from topic where id=#{id}") + @Select("SELECT * FROM topic WHERE id=#{id}") TopicEntity selectTopicById(TopicEntity topicEntity); - @Select("select * from topic where cluster_id=#{clusterId}") + @Select("SELECT * FROM topic WHERE cluster_id=#{clusterId}") List selectTopicByCluster(TopicEntity topicEntity); } \ No newline at end of file diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigTask.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigDBToInstanceTask.java similarity index 93% rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigTask.java rename to eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigDBToInstanceTask.java index 63f100c0..b6c08378 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigTask.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousConnectorConfigDBToInstanceTask.java @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; @Service -public class SynchronousConnectorConfigTask { +public class SynchronousConnectorConfigDBToInstanceTask { @Autowired private ConnectorDataService connectorDataService; @@ -71,7 +71,7 @@ public void synchronousConnectorConfig(Long clusterId) { } } - public ConcurrentHashMap configListToMap(List configEntityList) { + private ConcurrentHashMap configListToMap(List configEntityList) { ConcurrentHashMap connectorConfigMap = new ConcurrentHashMap<>(); configEntityList.forEach(n -> { connectorConfigMap.put(n.getConfigName(), n.getConfigValue()); @@ -81,7 +81,7 @@ public ConcurrentHashMap configListToMap(List conf } - public ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { + private ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { ConfigEntity configEntity = new ConfigEntity(); configEntity.setClusterId(clusterId); configEntity.setInstanceId(id); diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigTask.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigDBToInstanceTask.java similarity index 93% rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigTask.java rename to eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigDBToInstanceTask.java index 225db7ea..47eb2a51 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigTask.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousRuntimeConfigDBToInstanceTask.java @@ -31,7 +31,7 @@ import org.springframework.stereotype.Service; @Service -public class SynchronousRuntimeConfigTask { +public class SynchronousRuntimeConfigDBToInstanceTask { @Autowired private RuntimeService runtimeService; @@ -73,7 +73,7 @@ public void synchronousRuntimeConfig(Long clusterId) { } } - public ConcurrentHashMap configListToMap(List configEntityList) { + private ConcurrentHashMap configListToMap(List configEntityList) { ConcurrentHashMap runtimeConfigMap = new ConcurrentHashMap<>(); configEntityList.forEach(n -> { runtimeConfigMap.put(n.getConfigName(), n.getConfigValue()); @@ -83,7 +83,7 @@ public ConcurrentHashMap configListToMap(List conf } - public ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { + private ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { ConfigEntity configEntity = new ConfigEntity(); configEntity.setClusterId(clusterId); configEntity.setInstanceId(id); diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigTask.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigDBToInstanceTask.java similarity index 93% rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigTask.java rename to eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigDBToInstanceTask.java index 00dd7afb..68bab825 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigTask.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousStorageConfigDBToInstanceTask.java @@ -30,7 +30,7 @@ import org.springframework.stereotype.Service; @Service -public class SynchronousStorageConfigTask { +public class SynchronousStorageConfigDBToInstanceTask { @Autowired private RuntimeService runtimeService; @@ -72,7 +72,7 @@ public void synchronousRuntimeConfig(Long clusterId) { } } - public ConcurrentHashMap configListToMap(List configEntityList) { + private ConcurrentHashMap configListToMap(List configEntityList) { ConcurrentHashMap runtimeConfigMap = new ConcurrentHashMap<>(); configEntityList.forEach(n -> { runtimeConfigMap.put(n.getConfigName(), n.getConfigValue()); @@ -82,7 +82,7 @@ public ConcurrentHashMap configListToMap(List conf } - public ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { + private ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { ConfigEntity configEntity = new ConfigEntity(); configEntity.setClusterId(clusterId); configEntity.setInstanceId(id); diff --git a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigTask.java b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigDBToInstanceTask.java similarity index 93% rename from eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigTask.java rename to eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigDBToInstanceTask.java index d881726f..469786e6 100644 --- a/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigTask.java +++ b/eventmesh-dashboard-console/src/main/java/org/apache/eventmesh/dashboard/console/service/config/synchronous/SynchronousTopicConfigDBToInstanceTask.java @@ -31,7 +31,7 @@ @Service -public class SynchronousTopicConfigTask { +public class SynchronousTopicConfigDBToInstanceTask { @Autowired private TopicService topicService; @@ -73,7 +73,7 @@ public void synchronousTopicConfig(Long clusterId) { } } - public ConcurrentHashMap configListToMap(List configEntityList) { + private ConcurrentHashMap configListToMap(List configEntityList) { ConcurrentHashMap topicConfigMap = new ConcurrentHashMap<>(); configEntityList.forEach(n -> { topicConfigMap.put(n.getConfigName(), n.getConfigValue()); @@ -83,7 +83,7 @@ public ConcurrentHashMap configListToMap(List conf } - public ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { + private ConfigEntity getConfigEntityBelongInstance(Long clusterId, Long id) { ConfigEntity configEntity = new ConfigEntity(); configEntity.setClusterId(clusterId); configEntity.setInstanceId(id);