You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by "xiaomin0322 (via GitHub)" <gi...@apache.org> on 2023/03/31 14:12:52 UTC

[GitHub] [zeppelin] xiaomin0322 opened a new pull request, #4579: Dev zeppelin client bug

xiaomin0322 opened a new pull request, #4579:
URL: https://github.com/apache/zeppelin/pull/4579

   ### What is this PR for?
   A few sentences describing the overall goals of the pull request's commits.
   First time? Check out the contributing guide - https://zeppelin.apache.org/contribution/contributions.html
   use ZeppelinClient  Example:
   
   public class ZeppelinTest {
   
   	public static void main(String[] args) throws Exception {
   		ClientConfig clientConfig = new ClientConfig("http://ip:8080");
   		ZeppelinClient zClient = new ZeppelinClient(clientConfig);
   	
   		
   		String zeppelinVersion = zClient.getVersion();
   		System.out.println("Zeppelin version: " + zeppelinVersion);
   		// execute note 2A94M5J1Z paragraph by paragraph
   		try {
   			//ParagraphResult paragraphResult = zClient.executeParagraph("2HXQ8YRYN", "20230330-101251_25695257");
   			ParagraphResult paragraphResult = zClient.executeParagraph("2HXQ8YRYN","20230330-101251_25695257");
   			System.out.println("Execute the 1st spark tutorial paragraph, paragraph result: " + paragraphResult);
   			/*paragraphResult = zClient.executeParagraph("2A94M5J1Z", "20150210-015302_1492795503");
   			System.out.println("Execute the 2nd spark tutorial paragraph, paragraph result: " + paragraphResult);
   			Map<String, String> parameters = new HashMap<>();
   			parameters.put("maxAge", "40");
   			paragraphResult = zClient.executeParagraph("2A94M5J1Z", "20150212-145404_867439529", parameters);
   			System.out.println("Execute the 3rd spark tutorial paragraph, paragraph result: " + paragraphResult);
   			parameters = new HashMap<>();
   			parameters.put("marital", "married");
   			paragraphResult = zClient.executeParagraph("2A94M5J1Z", "20150213-230422_1600658137", parameters);
   */			System.out.println("Execute the 4th spark tutorial paragraph, paragraph result: " + paragraphResult);
   		
               System.out.println("");
   		} finally {
   			// you need to stop interpreter explicitly if you are running paragraph
   			// separately.
   			//zClient.stopInterpreter("2A94M5J1Z", "spark");
   		}
   
   	}
   }
   
   
   
   exception:
   kong.unirest.json.JSONException: JSONObject["progress"] not found.
   	at kong.unirest.json.JSONObject.getProperty(JSONObject.java:954)
   	at kong.unirest.json.JSONObject.lambda$getInt$11(JSONObject.java:485)
   	at kong.unirest.json.JSONObject.tryNumber(JSONObject.java:961)
   	at kong.unirest.json.JSONObject.getInt(JSONObject.java:485)
   	at org.apache.zeppelin.client.ParagraphResult.<init>(ParagraphResult.java:48)
   	at org.apache.zeppelin.client.ZeppelinClient.queryParagraphResult(ZeppelinClient.java:782)
   	at org.apache.zeppelin.client.ZeppelinClient.submitParagraph(ZeppelinClient.java:676)
   	at org.apache.zeppelin.client.ZeppelinClient.executeParagraph(ZeppelinClient.java:602)
   	at org.apache.zeppelin.client.ZeppelinClient.executeParagraph(ZeppelinClient.java:618)
   	at org.apache.dolphinscheduler.plugin.task.zeppelin.ZeppelinTask.handle(ZeppelinTask.java:131)
   	at org.apache.dolphinscheduler.server.worker.runner.DefaultWorkerDelayTaskExecuteRunnable.executeTask(DefaultWorkerDelayTaskExecuteRunnable.java:49)
   
   paragraphJson.getInt("progress");  May occur ong.unirest.json.JSONException: JSONObject["progress"] not found.
   
   ### What type of PR is it?
   Bug Fix
   Improvement
   Feature
   Documentation
   Hot Fix
   Refactoring
   *Please leave your type of PR only*
   Bug Fix
   ### Todos
   * [ ] - Task
   update code 
   ### What is the Jira issue?
   * Open an issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN/
   * Put link here, and add [ZEPPELIN-*Jira number*] in PR title, eg. [ZEPPELIN-533]
   
   ### How should this be tested?
   * Strongly recommended: add automated unit tests for any new or changed behavior
   * Outline any manual steps to test the PR here.
   
   ### Screenshots (if appropriate)
   
   ### Questions:
   * Does the license files need to update?
   * Is there breaking changes for older versions?
   * Does this needs documentation?
   


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] xiaomin0322 commented on pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "xiaomin0322 (via GitHub)" <gi...@apache.org>.
xiaomin0322 commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1523168683

   > LGTM Would be merged if no more comment.
   
   华哥合吧,嘿嘿 !@huage1994 


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] huage1994 commented on pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "huage1994 (via GitHub)" <gi...@apache.org>.
huage1994 commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1523131644

   LGTM  
   Would be merged if no more comment.


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] xiaomin0322 commented on pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "xiaomin0322 (via GitHub)" <gi...@apache.org>.
xiaomin0322 commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1521444700

   > @xiaomin0322 Could you update the jira title to be more specific? `Dev zeppelin client bug` is too vague. Something like `NPE in ParagraphResult when getting progress from paragraphJson`
   
   I have updated as required
   


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] xiaomin0322 commented on pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "xiaomin0322 (via GitHub)" <gi...@apache.org>.
xiaomin0322 commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1522705230

   > Could you please improve your description of the pull request. Have a look at #4568 for a good example.
   
   Adjusted


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] huage1994 merged pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "huage1994 (via GitHub)" <gi...@apache.org>.
huage1994 merged PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] zjffdu commented on pull request #4579: [ZEPPELIN-5893] Dev zeppelin client bug

Posted by "zjffdu (via GitHub)" <gi...@apache.org>.
zjffdu commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1518472971

   @xiaomin0322 Could you update the jira title to be more specific? `Dev zeppelin client bug` is too vague. 
   Something like `NPE in ParagraphResult when getting progress from paragraphJson`


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] Reamer commented on pull request #4579: [ZEPPELIN-5893] NPE in ParagraphResult when getting progress from paragraphJson

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1521464643

   Could you please improve your description of the pull request.
   Have a look at #4568 for a good example.


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] xiaomin0322 commented on pull request #4579: [ZEPPELIN-5893] Dev zeppelin client bug

Posted by "xiaomin0322 (via GitHub)" <gi...@apache.org>.
xiaomin0322 commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1501041328

   I have updated the jira link, the address is: https://issues.apache.org/jira/browse/ZEPPELIN-5893, please attention


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [zeppelin] Reamer commented on pull request #4579: Dev zeppelin client bug

Posted by "Reamer (via GitHub)" <gi...@apache.org>.
Reamer commented on PR #4579:
URL: https://github.com/apache/zeppelin/pull/4579#issuecomment-1498753398

   Open a Jira ticket and get your PullRequest into shape. The source code is also indented incorrectly.


-- 
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: dev-unsubscribe@zeppelin.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org