ruanwenjun commented on code in PR #10776:
URL:
https://github.com/apache/dolphinscheduler/pull/10776#discussion_r1270239076
##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/WorkflowExecuteRunnable.java:
##########
@@ -784,6 +785,16 @@ public void checkSerialProcess(ProcessDefinition
processDefinition) {
return;
}
Map<String, Object> cmdParam = new HashMap<>();
+ //write the parameters of the nextProcessInstance to command
+ if (StringUtils.isNotEmpty(nextProcessInstance.getCommandParam())) {
+ Map<String, String> commandStartParamsMap =
JSONUtils.toMap(nextProcessInstance.getCommandParam());
+ if (MapUtils.isNotEmpty(commandStartParamsMap)) {
+ Map<String, String> paramsMap =
JSONUtils.toMap(commandStartParamsMap.get(CMD_PARAM_START_PARAMS));
+ if (MapUtils.isNotEmpty(paramsMap)) {
+ cmdParam.put(CMD_PARAM_START_PARAMS,
JSONUtils.toJsonString(paramsMap));
+ }
+ }
+ }
Review Comment:
Please revert this.
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/generator/sources/MySQLSourceGenerator.java:
##########
@@ -89,7 +90,8 @@ public String generate(SqoopParameters sqoopParameters,
SqoopTaskExecutionContex
.append(SPACE).append(sourceMysqlParameter.getSrcTable());
}
- if
(StringUtils.isNotEmpty(sourceMysqlParameter.getSrcColumns())) {
+ if (sourceMysqlParameter.getSrcColumnType() ==
SqoopColumnType.SOME_COLUMNS.getCode()
Review Comment:
```suggestion
if (sourceMysqlParameter.getSrcColumnType() ==
SqoopColumnType. CUSTOMIZE_COLUMNS.getCode()
```
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-sqoop/src/main/java/org/apache/dolphinscheduler/plugin/task/sqoop/SqoopColumnType.java:
##########
@@ -0,0 +1,41 @@
+/*
+ * 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.plugin.task.sqoop;
+
+public enum SqoopColumnType {
+
+ ALL_COLUMNS(0, "GET_ALL_COLUMNS"),
+ SOME_COLUMNS(1, "CUSTOMIZE_COLUMNS");
Review Comment:
```suggestion
CUSTOMIZE_COLUMNS(1, "CUSTOMIZE_COLUMNS");
```
##########
dolphinscheduler-service/src/main/java/org/apache/dolphinscheduler/service/process/ProcessServiceImpl.java:
##########
@@ -774,7 +775,8 @@ private Boolean checkCmdParam(Command command, Map<String,
String> cmdParam) {
CommandType commandTypeIfComplement =
getCommandTypeIfComplement(processInstance, command);
// reset global params while repeat running and recover tolerance
fault process is needed by cmdParam
if (commandTypeIfComplement == CommandType.REPEAT_RUNNING ||
- commandTypeIfComplement ==
CommandType.RECOVER_TOLERANCE_FAULT_PROCESS) {
+ commandTypeIfComplement ==
CommandType.RECOVER_TOLERANCE_FAULT_PROCESS ||
+ commandTypeIfComplement == CommandType.RECOVER_SERIAL_WAIT) {
Review Comment:
Please revert this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]