wuxiaofei 4 years ago
parent
commit
6fc124e775
  1. 25
      docker/kubernetes/dolphinscheduler/requirements.yaml~HEAD_0
  2. 25
      docker/kubernetes/dolphinscheduler/requirements.yaml~dev_0
  3. 3
      dolphinscheduler-alert/src/main/resources/alert.properties
  4. 9
      dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/utils/PropertyUtilsTest.java
  5. 10
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java
  6. 47
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HiveConfUtilsTest.java~HEAD
  7. 47
      dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HiveConfUtilsTest.java~dev
  8. 1
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue
  9. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
  10. 12
      dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js

25
docker/kubernetes/dolphinscheduler/requirements.yaml~HEAD_0

@ -0,0 +1,25 @@
#
# 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.
#
dependencies:
- name: postgresql
version: 8.x.x
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: zookeeper
version: 5.x.x
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled

25
docker/kubernetes/dolphinscheduler/requirements.yaml~dev_0

@ -0,0 +1,25 @@
#
# 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.
#
dependencies:
- name: postgresql
version: 8.x.x
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: zookeeper
version: 5.x.x
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled

3
dolphinscheduler-alert/src/main/resources/alert.properties

@ -21,8 +21,7 @@
#eg : Alert Server Listener port #eg : Alert Server Listener port
#alert.plugin.dir config the Alert Plugin dir . AlertServer while find and load the Alert Plugin Jar from this dir when deploy and start AlertServer on the server . #alert.plugin.dir config the Alert Plugin dir . AlertServer while find and load the Alert Plugin Jar from this dir when deploy and start AlertServer on the server .
#eg : #eg :alert.plugin.dir=/opt/soft/spi/lib/plugin/alert
#alert.plugin.dir=/opt/soft/spi/lib/plugin/alert
#maven.local.repository=/Users/gaojun/Documents/jianguoyun/localRepository #maven.local.repository=/Users/gaojun/Documents/jianguoyun/localRepository

9
dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/utils/PropertyUtilsTest.java

@ -17,13 +17,18 @@
package org.apache.dolphinscheduler.alert.utils; package org.apache.dolphinscheduler.alert.utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import org.apache.dolphinscheduler.common.enums.ZKNodeType; import org.apache.dolphinscheduler.common.enums.ZKNodeType;
import org.junit.Test; import org.junit.Test;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
/** /**
* Test PropertyUtils * Test PropertyUtils
* and the resource path is src/test/resources/alert.properties. * and the resource path is src/test/resources/alert.properties.

10
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/UsersService.java

@ -131,7 +131,7 @@ public class UsersService extends BaseService {
String queue, String queue,
int state) throws Exception { int state) throws Exception {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>(5);
//check all user params //check all user params
String msg = this.checkUserParams(userName, userPassword, email, phone); String msg = this.checkUserParams(userName, userPassword, email, phone);
@ -773,7 +773,7 @@ public class UsersService extends BaseService {
* @return user list * @return user list
*/ */
public Map<String, Object> queryAllGeneralUsers(User loginUser) { public Map<String, Object> queryAllGeneralUsers(User loginUser) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>(5);
//only admin can operate //only admin can operate
if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
return result; return result;
@ -794,7 +794,7 @@ public class UsersService extends BaseService {
* @return user list * @return user list
*/ */
public Map<String, Object> queryUserList(User loginUser) { public Map<String, Object> queryUserList(User loginUser) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>(5);
//only admin can operate //only admin can operate
if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
return result; return result;
@ -838,7 +838,7 @@ public class UsersService extends BaseService {
*/ */
public Map<String, Object> unauthorizedUser(User loginUser, Integer alertgroupId) { public Map<String, Object> unauthorizedUser(User loginUser, Integer alertgroupId) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>(5);
//only admin can operate //only admin can operate
if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
return result; return result;
@ -874,7 +874,7 @@ public class UsersService extends BaseService {
* @return authorized result code * @return authorized result code
*/ */
public Map<String, Object> authorizedUser(User loginUser, Integer alertgroupId) { public Map<String, Object> authorizedUser(User loginUser, Integer alertgroupId) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>(5);
//only admin can operate //only admin can operate
if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) { if (check(result, !isAdmin(loginUser), Status.USER_NO_OPERATION_PERM)) {
return result; return result;

47
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HiveConfUtilsTest.java~HEAD

@ -0,0 +1,47 @@
/*
* 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.common.utils;
import org.junit.Assert;
import org.junit.Test;
/**
* hive conf utils test
*/
public class HiveConfUtilsTest {
/**
* test is hive conf var
*/
@Test
public void testIsHiveConfVar() {
String conf = "hive.exec.script.wrapper=123";
boolean hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertTrue(hiveConfVar);
conf = "hive.test.v1=v1";
hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertFalse(hiveConfVar);
conf = "tez.queue.name=tezQueue";
hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertTrue(hiveConfVar);
}
}

47
dolphinscheduler-common/src/test/java/org/apache/dolphinscheduler/common/utils/HiveConfUtilsTest.java~dev

@ -0,0 +1,47 @@
/*
* 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.common.utils;
import org.junit.Assert;
import org.junit.Test;
/**
* hive conf utils test
*/
public class HiveConfUtilsTest {
/**
* test is hive conf var
*/
@Test
public void testIsHiveConfVar() {
String conf = "hive.exec.script.wrapper=123";
boolean hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertTrue(hiveConfVar);
conf = "hive.test.v1=v1";
hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertFalse(hiveConfVar);
conf = "tez.queue.name=tezQueue";
hiveConfVar = HiveConfUtils.isHiveConfVar(conf);
Assert.assertTrue(hiveConfVar);
}
}

1
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue

@ -1176,7 +1176,6 @@
if (val !== 0) { if (val !== 0) {
this.title = '' this.title = ''
this.receivers = [] this.receivers = []
this.receiversCc = []
} }
}, },
// Listening data source // Listening data source

2
dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue

@ -27,8 +27,6 @@
<li><span class="tab">{{$t('Worker group')}}</span><span class="content" v-if="workerGroupList.length">{{startupParam.workerGroup}}</span></li> <li><span class="tab">{{$t('Worker group')}}</span><span class="content" v-if="workerGroupList.length">{{startupParam.workerGroup}}</span></li>
<li><span class="tab">{{$t('Notification strategy')}}</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li> <li><span class="tab">{{$t('Notification strategy')}}</span><span class="content">{{_rtWarningType(startupParam.warningType)}}</span></li>
<li><span class="tab">{{$t('Notification group')}}</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li> <li><span class="tab">{{$t('Notification group')}}</span><span class="content" v-if="notifyGroupList.length">{{_rtNotifyGroupName(startupParam.warningGroupId)}}</span></li>
<li><span class="tab">{{$t('Recipient')}}</span><span class="content">{{startupParam.receivers || '-'}}</span></li>
<li><span class="tab">{{$t('Cc')}}</span><span class="content">{{startupParam.receiversCc || '-'}}</span></li>
</ul> </ul>
</div> </div>
</template> </template>

12
dolphinscheduler-ui/src/js/conf/home/store/dag/actions.js

@ -807,18 +807,6 @@ export default {
}) })
}) })
}, },
/**
* Get the mailbox list interface
*/
getReceiver ({ state }, payload) {
return new Promise((resolve, reject) => {
io.get(`projects/${state.projectName}/executors/get-receiver-cc`, payload, res => {
resolve(res.data)
}).catch(e => {
reject(e)
})
})
},
getTaskListDefIdAll ({ state }, payload) { getTaskListDefIdAll ({ state }, payload) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => { io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => {

Loading…
Cancel
Save