luchunliang commented on a change in pull request #2439: URL: https://github.com/apache/incubator-inlong/pull/2439#discussion_r804334078
########## File path: inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortTaskSinkParamServiceImpl.java ########## @@ -0,0 +1,52 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.inlong.manager.service.core.impl; + +import org.apache.inlong.manager.dao.entity.SortTaskSinkParamEntity; +import org.apache.inlong.manager.dao.mapper.SortTaskSinkParamEntityMapper; +import org.apache.inlong.manager.service.core.SortTaskSinkParamService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** Sort sink params service implementation. */ +@Service +public class SortTaskSinkParamServiceImpl implements SortTaskSinkParamService { + private static final Logger LOGGER = LoggerFactory.getLogger(SortTaskSinkParamServiceImpl.class); + + private static final String KEY_SINK_TYPE = "type"; + + @Autowired private SortTaskSinkParamEntityMapper sortTaskSinkParamEntityMapper; Review comment: @Autowired needs an independent line. ########## File path: inlong-manager/manager-dao/src/main/resources/generatorConfig.xml ########## @@ -224,9 +224,15 @@ enableUpdateByPrimaryKey="true" enableDeleteByPrimaryKey="true" enableInsert="true" enableCountByExample="false" enableDeleteByExample="false" - enableSelectByExample="false" enableUpdateByExample="false"/>--> + enableSelectByExample="false" enableUpdateByExample="false"/> <table tableName="sort_task_id_param" domainObjectName="SortTaskIdParamEntity" + enableSelectByPrimaryKey="true" + enableUpdateByPrimaryKey="true" + enableDeleteByPrimaryKey="true" enableInsert="true" + enableCountByExample="false" enableDeleteByExample="false" + enableSelectByExample="false" enableUpdateByExample="false"/>--> Review comment: Please remove unusable code. ########## File path: inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/SortServiceImpl.java ########## @@ -80,12 +83,14 @@ public SortClusterConfigResponse getClusterConfig(String clusterName, String md5 private SortTaskConfig getTaskConfig(SortClusterConfigEntity clusterConfig) { List<Map<String, String>> idParams = sortTaskIdParamService.selectByTaskName(clusterConfig.getTaskName()); - // TODO add method that get sink params + Map<String, String> sinkParams = + sortTaskSinkParamService + .selectByTaskNameAndType(clusterConfig.getTaskName(), clusterConfig.getSinkType()); return SortTaskConfig.builder() .taskName(clusterConfig.getTaskName()) .sinkType(SinkType.valueOf(clusterConfig.getSinkType().toUpperCase())) Review comment: Please filter unsupported SinkType. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
