Browse Source
* [Improvement][Server] Rename MASTER_PREFIX to MASTER_TYPE and WORKER_PREFIX to WORKER_TYPE * [Feature][Api&Dao] Support api and dao of worker group * [Feature][UI] Support to create, edit and delete worker group * [Feature][API&UI] Support work groups from database and zookeeper to display together in worker group management * [Feature][API&Dao] Support long ip list and check request parameters when saving worker group * [Feature][*] Refactor ipList to addrList * [Feature][Server] Support host manager to select worker host by worker group in database * [Improvement][Server] Improve the config of master and worker * [Improvement][*] Rename zkRegistered to systemDefault * [Improvement][Test] Fix unit test and improve ui * [Improvement][Server] Improve getServerMaps Co-authored-by: dailidong <dailidong66@gmail.com>pull/3/MERGE
Shiwen Cheng
4 years ago
committed by
GitHub
51 changed files with 957 additions and 324 deletions
@ -0,0 +1,46 @@
|
||||
/* |
||||
* 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.dolphinscheduler.dao.mapper; |
||||
|
||||
import org.apache.dolphinscheduler.dao.entity.WorkerGroup; |
||||
|
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* worker group mapper interface
|
||||
*/ |
||||
public interface WorkerGroupMapper extends BaseMapper<WorkerGroup> { |
||||
|
||||
/** |
||||
* query all worker group |
||||
* @return worker group list |
||||
*/ |
||||
List<WorkerGroup> queryAllWorkerGroup(); |
||||
|
||||
/** |
||||
* query worer grouop by name |
||||
* @param name name |
||||
* @return worker group list |
||||
*/ |
||||
List<WorkerGroup> queryWorkerGroupByName(@Param("name") String name); |
||||
|
||||
} |
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="org.apache.dolphinscheduler.dao.mapper.WorkerGroupMapper"> |
||||
<select id="queryAllWorkerGroup" resultType="org.apache.dolphinscheduler.dao.entity.WorkerGroup"> |
||||
select * |
||||
from t_ds_worker_group |
||||
order by update_time desc |
||||
</select> |
||||
<select id="queryWorkerGroupByName" resultType="org.apache.dolphinscheduler.dao.entity.WorkerGroup"> |
||||
select * |
||||
from t_ds_worker_group |
||||
where name = #{name} |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,38 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
|
||||
SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); |
||||
|
||||
-- uc_dolphin_T_t_ds_worker_group_R_ip_list |
||||
drop PROCEDURE if EXISTS uc_dolphin_T_t_ds_worker_group_R_ip_list; |
||||
delimiter d// |
||||
CREATE PROCEDURE uc_dolphin_T_t_ds_worker_group_R_ip_list() |
||||
BEGIN |
||||
IF EXISTS (SELECT 1 FROM information_schema.COLUMNS |
||||
WHERE TABLE_NAME='t_ds_worker_group' |
||||
AND TABLE_SCHEMA=(SELECT DATABASE()) |
||||
AND COLUMN_NAME ='ip_list') |
||||
THEN |
||||
ALTER TABLE t_ds_worker_group CHANGE COLUMN `ip_list` `addr_list` text; |
||||
END IF; |
||||
END; |
||||
|
||||
d// |
||||
|
||||
delimiter ; |
||||
CALL uc_dolphin_T_t_ds_worker_group_R_ip_list; |
||||
DROP PROCEDURE uc_dolphin_T_t_ds_worker_group_R_ip_list; |
@ -0,0 +1,16 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
Loading…
Reference in new issue