This is an automated email from the ASF dual-hosted git repository.
kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new a8b47e1 [Bug][Master] Typo in MasterConfig #5141 (#5142)
a8b47e1 is described below
commit a8b47e1d4f4ebb9795239ef69b57f2928a81f44c
Author: wenjun <[email protected]>
AuthorDate: Fri Mar 26 09:47:21 2021 +0800
[Bug][Master] Typo in MasterConfig #5141 (#5142)
---
.../server/master/config/MasterConfig.java | 2 +-
.../server/master/config/MasterConfigTest.java | 39 ++++++++++++++++++++
.../src/test/resources/master.properties | 43 ++++++++++++++++++++++
pom.xml | 1 +
4 files changed, 84 insertions(+), 1 deletion(-)
diff --git
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
index efd29dd..ef52362 100644
---
a/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
+++
b/dolphinscheduler-server/src/main/java/org/apache/dolphinscheduler/server/master/config/MasterConfig.java
@@ -37,7 +37,7 @@ public class MasterConfig {
@Value("${master.task.commit.retryTimes:5}")
private int masterTaskCommitRetryTimes;
- @Value("${master.dispatch.task.num :3}")
+ @Value("${master.dispatch.task.num:3}")
private int masterDispatchTaskNumber;
@Value("${master.task.commit.interval:1000}")
diff --git
a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/config/MasterConfigTest.java
b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/config/MasterConfigTest.java
new file mode 100644
index 0000000..43d2469
--- /dev/null
+++
b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/config/MasterConfigTest.java
@@ -0,0 +1,39 @@
+/*
+ * 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.server.master.config;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = {MasterConfig.class})
+public class MasterConfigTest {
+
+ @Autowired
+ private MasterConfig masterConfig;
+
+ @Test
+ public void getMasterDispatchTaskNumber() {
+ int masterDispatchTaskNumber =
masterConfig.getMasterDispatchTaskNumber();
+ Assert.assertEquals(6, masterDispatchTaskNumber);
+ }
+}
\ No newline at end of file
diff --git a/dolphinscheduler-server/src/test/resources/master.properties
b/dolphinscheduler-server/src/test/resources/master.properties
new file mode 100644
index 0000000..91d84eb
--- /dev/null
+++ b/dolphinscheduler-server/src/test/resources/master.properties
@@ -0,0 +1,43 @@
+#
+# 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.
+#
+
+# master execute thread num
+#master.exec.threads=100
+
+# master execute task number in parallel
+#master.exec.task.num=20
+
+# master dispatch task number
+master.dispatch.task.num=6
+
+# master heartbeat interval
+#master.heartbeat.interval=10
+
+# master commit task retry times
+#master.task.commit.retryTimes=5
+
+# master commit task interval
+#master.task.commit.interval=1000
+
+# only less than cpu avg load, master server can work. default value -1 : the
number of cpu cores * 2
+#master.max.cpuload.avg=-1
+
+# only larger than reserved memory, master server can work. default value :
physical memory * 1/10, unit is G.
+#master.reserved.memory=0.3
+
+# master listen port
+#master.listen.port=5678
diff --git a/pom.xml b/pom.xml
index 96c2e94..660da7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -914,6 +914,7 @@
<!--<include>**/server/log/TaskLogDiscriminatorTest.java</include>-->
<include>**/server/log/TaskLogFilterTest.java</include>
<include>**/server/log/WorkerLogFilterTest.java</include>
+
<include>**/server/master/config/MasterConfigTest.java</include>
<include>**/server/master/consumer/TaskPriorityQueueConsumerTest.java</include>
<include>**/server/master/runner/MasterTaskExecThreadTest.java</include>
<!--<include>**/server/master/dispatch/executor/NettyExecutorManagerTest.java</include>-->