Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-1159] Livy interpreter gets "404 not found" error #1184

Closed
wants to merge 1 commit into from

Conversation

prabhjyotsingh
Copy link
Contributor

@prabhjyotsingh prabhjyotsingh commented Jul 14, 2016

What is this PR for?

RestTemplate throws HttpClientErrorException, exception thrown when an HTTP 4xx is received.
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/HttpClientErrorException.html

What type of PR is it?

[Bug Fix]

What is the Jira issue?

How should this be tested?

Run a paragraph using livy interpreter (say sc.version), now let this session expire (or just restart livy server), then try running the same paragraph, this should result in proper error message.

Screenshots (if appropriate)

Questions:

  • Does the licenses files need update? no
  • Is there breaking changes for older versions? no
  • Does this needs documentation? no

@felixcheung
Copy link
Member

LGTM

@prabhjyotsingh
Copy link
Contributor Author

Merging this if no more discussion.

@zjffdu
Copy link
Contributor

zjffdu commented Jul 18, 2016

@prabhjyotsingh
this is result in proper error message.
What does this mean ? Is the behavior livy interpreter give proper error message to client or just recreate a new session ?

@prabhjyotsingh
Copy link
Contributor Author

@zjffdu have updated PR's description, what I meant was "this should result in proper error message".
So, the original issue was with the RestTemplate that we are using which throws HttpClientErrorException exception when a HTTP 4xx is received, and when ever a session is queried which is either expired or does not exist livy throws "Session '10' not found." with response code 404, and because of this HttpClientErrorException proper error message was not shown on UI.

@zjffdu
Copy link
Contributor

zjffdu commented Jul 18, 2016

@prabhjyotsingh understood.
But I feel the better solution is to either recreate a new session for user implicitly or tell the user to restart the livy interpreter as the session is expired. Because I don't think it is proper to expose the concept session to users, as users don't know what livy session represent. And user don't know what to do to handle "Session '10' not found."

@prabhjyotsingh
Copy link
Contributor Author

@zjffdu yes, we handle it("Session '10' not found.") here.
https://github.com/apache/zeppelin/pull/1184/files#diff-6590a16671e62be8da95e793c364d739L305

and change this string to Exception: Session not found, Livy server would have restarted, or lost session.

@zjffdu
Copy link
Contributor

zjffdu commented Jul 18, 2016

@prabhjyotsingh Got it, I would prefer to create new session for user implicitly and don't expose any livy concept to users. Just try to make it transparent to users. Anyway, we can do it in a follow up ticket, rest lgtm.

@prabhjyotsingh
Copy link
Contributor Author

Sure thanks.

@asfgit asfgit closed this in 473dc72 Jul 19, 2016
asfgit pushed a commit that referenced this pull request Jul 22, 2016
### What is this PR for?
RestTemplate throws HttpClientErrorException, exception thrown when an HTTP 4xx is received.
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/HttpClientErrorException.html

### What type of PR is it?
[Bug Fix]

### What is the Jira issue?
* [ZEPPELIN-1159](https://issues.apache.org/jira/browse/ZEPPELIN-1159)

### How should this be tested?
Run a paragraph using livy interpreter (say sc.version), now let this session expire (or just restart livy server), then try running the same paragraph, this should result in proper error message.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes #1184 from prabhjyotsingh/ZEPPELIN-1159 and squashes the following commits:

7c58e42 [Prabhjyot Singh] ZEPPELIN-1159 - catch RestTemplate exception

(cherry picked from commit 473dc72)
Signed-off-by: Mina Lee <minalee@apache.org>
PhilippGrulich pushed a commit to SWC-SENSE/zeppelin that referenced this pull request Aug 8, 2016
### What is this PR for?
RestTemplate throws HttpClientErrorException, exception thrown when an HTTP 4xx is received.
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/HttpClientErrorException.html

### What type of PR is it?
[Bug Fix]

### What is the Jira issue?
* [ZEPPELIN-1159](https://issues.apache.org/jira/browse/ZEPPELIN-1159)

### How should this be tested?
Run a paragraph using livy interpreter (say sc.version), now let this session expire (or just restart livy server), then try running the same paragraph, this should result in proper error message.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes apache#1184 from prabhjyotsingh/ZEPPELIN-1159 and squashes the following commits:

7c58e42 [Prabhjyot Singh] ZEPPELIN-1159 - catch RestTemplate exception
prabhjyotsingh added a commit to prabhjyotsingh/zeppelin that referenced this pull request Dec 9, 2017
### What is this PR for?
RestTemplate throws HttpClientErrorException, exception thrown when an HTTP 4xx is received.
http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/web/client/HttpClientErrorException.html

### What type of PR is it?
[Bug Fix]

### What is the Jira issue?
* [ZEPPELIN-1159](https://issues.apache.org/jira/browse/ZEPPELIN-1159)

### How should this be tested?
Run a paragraph using livy interpreter (say sc.version), now let this session expire (or just restart livy server), then try running the same paragraph, this should result in proper error message.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: Prabhjyot Singh <prabhjyotsingh@gmail.com>

Closes apache#1184 from prabhjyotsingh/ZEPPELIN-1159 and squashes the following commits:

7c58e42 [Prabhjyot Singh] ZEPPELIN-1159 - catch RestTemplate exception
@prabhjyotsingh prabhjyotsingh deleted the ZEPPELIN-1159 branch February 25, 2018 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants