ruanwenjun commented on code in PR #15911:
URL: 
https://github.com/apache/dolphinscheduler/pull/15911#discussion_r1579456723


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-remoteshell/src/main/java/org/apache/dolphinscheduler/plugin/task/remoteshell/RemoteExecutor.java:
##########
@@ -131,7 +131,9 @@ public Integer getTaskExitCode(String taskId) throws 
IOException {
         int exitCode = -1;
         log.info("Remote shell task run status: {}", logLine);
         if (logLine.contains(STATUS_TAG_MESSAGE)) {
-            String status = logLine.replace(STATUS_TAG_MESSAGE, "").trim();
+            int startIndex = logLine.indexOf(STATUS_TAG_MESSAGE) + 
STATUS_TAG_MESSAGE.length();
+            int endIndex = logLine.length();
+            String status = logLine.substring(startIndex, endIndex);

Review Comment:
   ```suggestion
               String status = StringUtils.substringAfter(logLine, 
STATUS_TAG_MESSAGE);
   ```



-- 
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]

Reply via email to