Skip to content

Commit 4bd0127

Browse files
committed
[INLONG-5555][Manager] Fix mapper function name, remove redundant unque key
1 parent a779eff commit 4bd0127

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/StreamSourceEntityMapper.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ List<StreamSourceEntity> selectByStatusAndType(@Param("list") List<Integer> list
7676
/**
7777
* Query the tasks by the given status list and type List.
7878
*/
79-
List<StreamSourceEntity> selectTaskByAgentIpOrCluster(@Param("statusList") List<Integer> statusList,
79+
List<StreamSourceEntity> selectByAgentIpOrCluster(@Param("statusList") List<Integer> statusList,
8080
@Param("sourceTypeList") List<String> sourceTypeList, @Param("agentIp") String agentIp,
8181
@Param("clusterName") String clusterName, @Param("limit") int limit);
8282

inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AgentServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ private List<DataConfig> fetchFileTasks(TaskRequest taskRequest) {
212212
final String agentClusterName = taskRequest.getClusterName();
213213
final String uuid = taskRequest.getUuid();
214214
LOGGER.debug("file task query = {}", taskRequest);
215-
List<StreamSourceEntity> sourceEntities = sourceMapper.selectTaskByAgentIpOrCluster(needAddStatusList,
215+
List<StreamSourceEntity> sourceEntities = sourceMapper.selectByAgentIpOrCluster(needAddStatusList,
216216
Lists.newArrayList(SourceType.FILE), agentIp, agentClusterName,TASK_FETCH_SIZE * 10);
217217
List<DataConfig> fileTasks = Lists.newArrayList();
218218
for (StreamSourceEntity sourceEntity : sourceEntities) {

inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ CREATE TABLE IF NOT EXISTS `stream_source`
398398
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time',
399399
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
400400
PRIMARY KEY (`id`),
401-
UNIQUE KEY `unique_source_name` (`inlong_group_id`, `inlong_stream_id`, `source_name`, `is_deleted`),
401+
KEY `group_stream_index` (`inlong_group_id`, `inlong_stream_id`, `is_deleted`),
402402
KEY `source_status_index` (`status`, `is_deleted`),
403403
KEY `source_agent_ip_index` (`agent_ip`, `is_deleted`)
404404
);

inlong-manager/manager-web/sql/apache_inlong_manager.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ CREATE TABLE IF NOT EXISTS `stream_source`
419419
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time',
420420
`modify_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time',
421421
PRIMARY KEY (`id`),
422-
UNIQUE KEY `unique_source_name` (`inlong_group_id`, `inlong_stream_id`, `source_name`, `is_deleted`),
422+
KEY `group_stream_index` (`inlong_group_id`, `inlong_stream_id`, `is_deleted`),
423423
KEY `source_status_index` (`status`, `is_deleted`),
424424
KEY `source_agent_ip_index` (`agent_ip`, `is_deleted`)
425425
) ENGINE = InnoDB

0 commit comments

Comments
 (0)