Skip to content

Commit 317d406

Browse files
authored
Merge f1712a6 into a17923a
2 parents a17923a + f1712a6 commit 317d406

4 files changed

Lines changed: 18 additions & 12 deletions

File tree

dolphinscheduler-microbench/src/main/java/org/apache/dolphinscheduler/microbench/base/AbstractBaseBenchmark.java

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,17 @@ private static String getReportDir() {
117117
}
118118

119119
private static int getForks() {
120-
String value = System.getProperty("forkCount");
121-
return null != value ? Integer.parseInt(value) : -1;
122-
}
120+
String forkCount = System.getProperty("forkCount");
121+
if (forkCount == null) {
122+
return -1;
123+
}
123124

125+
try {
126+
return Integer.parseInt(forkCount);
127+
} catch (NumberFormatException e) {
128+
logger.error("fail to convert forkCount into int", e);
129+
}
130+
131+
return -1;
132+
}
124133
}

dolphinscheduler-scheduler-plugin/dolphinscheduler-scheduler-quartz/src/main/java/org/apache/dolphinscheduler/scheduler/quartz/ProcessScheduleTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.dolphinscheduler.scheduler.quartz;
1919

20-
import org.apache.commons.lang3.StringUtils;
2120
import org.apache.dolphinscheduler.common.Constants;
2221
import org.apache.dolphinscheduler.common.enums.CommandType;
2322
import org.apache.dolphinscheduler.common.enums.ReleaseState;
@@ -27,6 +26,8 @@
2726
import org.apache.dolphinscheduler.scheduler.quartz.utils.QuartzTaskUtils;
2827
import org.apache.dolphinscheduler.service.process.ProcessService;
2928

29+
import org.apache.commons.lang3.StringUtils;
30+
3031
import java.util.Date;
3132

3233
import org.quartz.JobDataMap;

dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import static org.apache.dolphinscheduler.plugin.task.api.enums.Direct.IN;
3333
import static org.apache.dolphinscheduler.plugin.task.api.utils.DataQualityConstants.TASK_INSTANCE_ID;
3434

35-
import org.apache.commons.lang3.StringUtils;
3635
import org.apache.dolphinscheduler.common.Constants;
3736
import org.apache.dolphinscheduler.common.enums.AuthorizationType;
3837
import org.apache.dolphinscheduler.common.enums.CommandType;
@@ -138,6 +137,7 @@
138137
import org.apache.dolphinscheduler.spi.enums.ResourceType;
139138

140139
import org.apache.commons.collections.CollectionUtils;
140+
import org.apache.commons.lang3.StringUtils;
141141

142142
import java.util.ArrayList;
143143
import java.util.Arrays;
@@ -416,7 +416,9 @@ public int createCommand(Command command) {
416416
// add command timezone
417417
Schedule schedule = scheduleMapper.queryByProcessDefinitionCode(command.getProcessDefinitionCode());
418418
if (schedule != null) {
419-
Map<String, String> commandParams = StringUtils.isNotBlank(command.getCommandParam()) ? JSONUtils.toMap(command.getCommandParam()) : new HashMap<>();
419+
Map<String, String> commandParams =
420+
StringUtils.isNotBlank(command.getCommandParam()) ? JSONUtils.toMap(command.getCommandParam())
421+
: new HashMap<>();
420422
commandParams.put(Constants.SCHEDULE_TIMEZONE, schedule.getTimezoneId());
421423
command.setCommandParam(JSONUtils.toJsonString(commandParams));
422424
}

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -640,11 +640,6 @@
640640
<version>${spotless.version}</version>
641641
<configuration>
642642
<java>
643-
<!--TODO: Remove the following excludes section when junit4 removed from e2e and microbench module-->
644-
<excludes>
645-
<exclude>**/e2e/**/*.java</exclude>
646-
<exclude>**/microbench/**/*.java</exclude>
647-
</excludes>
648643
<eclipse>
649644
<file>style/spotless_dolphinscheduler_formatter.xml</file>
650645
</eclipse>
@@ -693,7 +688,6 @@
693688
<include>docs/**/*.md</include>
694689
</includes>
695690
<excludes>
696-
<!--Avoid conflicts with formatting tools in some special modules-->
697691
<exclude>**/.github/**/*.md</exclude>
698692
</excludes>
699693
<flexmark />

0 commit comments

Comments
 (0)