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. 17
      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. 4
      dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/log/TaskLogAppender.java
  9. 1
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/formModel/tasks/sqoop.vue
  10. 2
      dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/startingParam/index.vue
  11. 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
#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 :
#alert.plugin.dir=/opt/soft/spi/lib/plugin/alert
#eg :alert.plugin.dir=/opt/soft/spi/lib/plugin/alert
#maven.local.repository=/Users/gaojun/Documents/jianguoyun/localRepository

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

@ -17,13 +17,18 @@
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.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import static org.junit.Assert.*;
/**
* Test PropertyUtils
* and the resource path is src/test/resources/alert.properties.
@ -196,19 +201,19 @@ public class PropertyUtilsTest {
public void testGetEnum() {
//Expected MASTER
ZKNodeType zkNodeType = PropertyUtils.getEnum("test.server.enum1", ZKNodeType.class,ZKNodeType.WORKER);
ZKNodeType zkNodeType = PropertyUtils.getEnum("test.server.enum1", ZKNodeType.class, ZKNodeType.WORKER);
assertEquals(ZKNodeType.MASTER, zkNodeType);
//Expected DEAD_SERVER
zkNodeType = PropertyUtils.getEnum("test.server.enum2", ZKNodeType.class,ZKNodeType.WORKER);
zkNodeType = PropertyUtils.getEnum("test.server.enum2", ZKNodeType.class, ZKNodeType.WORKER);
assertEquals(ZKNodeType.DEAD_SERVER, zkNodeType);
//If key is null, then return defaultval
zkNodeType = PropertyUtils.getEnum(null, ZKNodeType.class,ZKNodeType.WORKER);
zkNodeType = PropertyUtils.getEnum(null, ZKNodeType.class, ZKNodeType.WORKER);
assertEquals(ZKNodeType.WORKER, zkNodeType);
//If the value doesn't define in enum ,it will log the error and return -1
zkNodeType = PropertyUtils.getEnum("test.server.enum3", ZKNodeType.class,ZKNodeType.WORKER);
zkNodeType = PropertyUtils.getEnum("test.server.enum3", ZKNodeType.class, ZKNodeType.WORKER);
assertEquals(ZKNodeType.WORKER, zkNodeType);
}

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

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

4
dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/log/TaskLogAppender.java

@ -27,11 +27,11 @@ import ch.qos.logback.core.FileAppender;
/**
* Task log appender
*/
public class TaskLogAppender extends FileAppender<ILoggingEvent>{
public class TaskLogAppender extends FileAppender<ILoggingEvent> {
@Override
protected void append(ILoggingEvent event) {
Marker marker = event.getMarker();
if (marker !=null) {
if (marker != null) {
if (marker.equals(FINALIZE_SESSION_MARKER)) {
stop();
}

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

@ -1176,7 +1176,6 @@
if (val !== 0) {
this.title = ''
this.receivers = []
this.receiversCc = []
}
},
// 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('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('Recipient')}}</span><span class="content">{{startupParam.receivers || '-'}}</span></li>
<li><span class="tab">{{$t('Cc')}}</span><span class="content">{{startupParam.receiversCc || '-'}}</span></li>
</ul>
</div>
</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) {
return new Promise((resolve, reject) => {
io.get(`projects/${state.projectName}/process/get-task-list`, payload, res => {

Loading…
Cancel
Save