EricGao888 commented on code in PR #10434:
URL: https://github.com/apache/dolphinscheduler/pull/10434#discussion_r898926818


##########
dolphinscheduler-task-plugin/dolphinscheduler-task-zeppelin/src/main/java/org/apache/dolphinscheduler/plugin/task/zeppelin/ZeppelinTask.java:
##########
@@ -85,11 +87,32 @@ public void handle() throws Exception {
             }
 
             // Submit zeppelin task
-            ParagraphResult paragraphResult = 
this.zClient.executeParagraph(noteId, paragraphId, zeppelinParamsMap);
-            String resultContent = paragraphResult.getResultInText();
-            Status status = paragraphResult.getStatus();
-            final int exitStatusCode = mapStatusToExitCode(status);
+            String resultContent;
+            Status status = Status.FINISHED;
+            if (paragraphId == null) {
+                NoteResult noteResult = this.zClient.executeNote(noteId, 
zeppelinParamsMap);
+                List<ParagraphResult> paragraphResultList = 
noteResult.getParagraphResultList();
+                StringBuilder resultContentBuilder = new StringBuilder();
+                for (ParagraphResult paragraphResult : paragraphResultList) {
+                    resultContentBuilder.append(
+                            String.format(
+                                    "paragraph_id: %s, paragraph_result: %s\n",
+                                    paragraphResult.getParagraphId(),
+                                    paragraphResult.getResultInText()));
+                    status = paragraphResult.getStatus();
+                    if (status != Status.FINISHED) {

Review Comment:
   Sure, comments added in the latest commit.



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