-
Notifications
You must be signed in to change notification settings - Fork 2.8k
ZEPPELIN-2953 Allow custom http header for livy interpreter #2600
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
Conversation
| </tr> | ||
| <tr> | ||
| <td>zeppelin.livy.http.headers</td> | ||
| <td>key_1: value_1; key_2: value_2</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are ; and : valid separators that would not be present in any header itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
felixcheung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a concrete example of what this could be useful for?
|
Custom http headers is needed when integrating knox with livy interpreter. |
felixcheung
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one comment
| String[] headers = property.getProperty("zeppelin.livy.http.headers").split(";"); | ||
| for (String header : headers) { | ||
| String[] splits = header.split(":"); | ||
| customHeaders.put(splits[0].trim(), splits[1].trim()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handle the case when splits[1] is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per rfc, looks like : is required but field value is not.
we should probably error out if : is missing but handle empty value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
301f8bb to
a615f00
Compare
What is this PR for?
This PR is trying to allow user to add custom http headers when calling livy rest api. User just need to specify
zeppelin.livy.http.headersin livy interpreter settingWhat type of PR is it?
[Feature]
Todos
What is the Jira issue?
How should this be tested?
Outline the steps to test the PR here.
Screenshots (if appropriate)
Questions: