You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by prabhjyotsingh <gi...@git.apache.org> on 2017/04/06 11:46:38 UTC
[GitHub] zeppelin pull request #2229: [Zeppelin 2367] Hive JDBC proxy user option sho...
GitHub user prabhjyotsingh opened a pull request:
https://github.com/apache/zeppelin/pull/2229
[Zeppelin 2367] Hive JDBC proxy user option should be avail even without kerberos
### What is this PR for?
Hive JDBC proxy user option should be available generically.
### What type of PR is it?
[Improvement]
### What is the Jira issue?
* [Zeppelin 2367](https://issues.apache.org/jira/browse/ZEPPELIN-2367)
### How should this be tested?
Enable Shiro authentication and set `zeppelin.jdbc.auth.type` as `SIMPLE` in the interpreter setting, and observe the connection string for the Hive.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need an update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-2367
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2229.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2229
----
commit 8999d93ae5153c698ef0591b2a10f6362578262c
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-06T11:17:07Z
ZEPPELIN-2367: Hive JDBC proxy user option should be avail even without kerberos
commit ee8a6b524c481210486761032cb1f5fd6266bb54
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-06T11:42:40Z
add doc
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@AhyoungRyu @felixcheung thank you for the review, have made the suggested changes.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
> why is zeppelin.jdbc.auth.kerberos.proxy.enable removed?
My bad, while fixing the above issues, I thought this is redundant, but I forgot about the case where KERBEROS is enabled and the user does not want to use proxy behavior. Have reverted that change.
> also is there a way not to hardcode hive jdbc [here](https://github.com/apache/zeppelin/pull/2229/files#diff-ecdae8ee9594a5c4b21a3c217a3f130cR365)
Hive doesn't work with [this](https://github.com/apache/zeppelin/pull/2229/files#diff-ecdae8ee9594a5c4b21a3c217a3f130cR370) (UserGroupInformation.createProxyUser), and since we allow user to configure multiple JDBC sources using the same interpreter setting; there can be a case where user has configured say Phoenix (requires UserGroupInformation.createProxyUser to proxy user) and Hive (fails if UserGroupInformation.createProxyUser is used), we could introduce new parameter like `{profile}.kerberos.proxy.enable` but this will increase the documentation part.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Perhaps generalize this to something non-Hive specific? Like a property for userStringToAppend? Add user to JDBC URL should be common place - seems like in this case we just like a way to change the name and value of the property to add on the JDBC URL.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2229: [Zeppelin 2367] Hive JDBC proxy user option sho...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/zeppelin/pull/2229
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@felixcheung any specific change that you are looking for?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Merging this to master and branch-0.7 if no more discussion.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@felixcheung Sure what you have recommended does make a lot of sense, have implemented what you have suggested.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@felixcheung ping
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:
https://github.com/apache/zeppelin/pull/2229
actually, I wasn't referring to the function name at all. instead of having this fairly hive specific, how about a function like this to take the user name property name and value
```
// Untested!
private void appendProxyUserToURL(StringBuilder connectionUrl, String user) {
if ("true".equalsIgnoreCase(property.getProperty("jdbc.url.set.user") {
Integer lastIndexOfUrl = connectionUrl.indexOf("?");
if (lastIndexOfUrl == -1) {
lastIndexOfUrl = connectionUrl.length();
}
if (user != null && !user.equals("anonymous") &&
property.getProperty("jdbc.url.user.property").length() > 1) { // check not empty or whitespace instead
logger.info("Using jdbc user as :" + user);
connectionUrl.insert(lastIndexOfUrl, ";" + property.getProperty("jdbc.url.user.property") + "=" + user + ";");
}
}
}
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Thank you @felixcheung. Will merge this to master.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@felixcheung have removed hard coded string "hive" as well.
CI fails for; not relavent for this change.
```
Tests in error:
ParagraphActionsIT.testClearOutputButton:335->AbstractZeppelinIT.clickAndWait:126 ยป ElementNotVisible
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Sure, got it, have renamed it to "appendProxyUserToURL".
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@felixcheung Have handled your review comments. Let me know if I missed any.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
@AhyoungRyu, @felixcheung ping
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Yes, I thought of few options but this was bit con
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by r-kamath <gi...@git.apache.org>.
Github user r-kamath commented on the issue:
https://github.com/apache/zeppelin/pull/2229
Tested. LGTM.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2229: [Zeppelin 2367] Hive JDBC proxy user option sho...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh closed the pull request at:
https://github.com/apache/zeppelin/pull/2229
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin pull request #2229: [Zeppelin 2367] Hive JDBC proxy user option sho...
Posted by prabhjyotsingh <gi...@git.apache.org>.
GitHub user prabhjyotsingh reopened a pull request:
https://github.com/apache/zeppelin/pull/2229
[Zeppelin 2367] Hive JDBC proxy user option should be available even without kerberos
### What is this PR for?
Hive JDBC proxy user option should be available generically.
### What type of PR is it?
[Improvement]
### What is the Jira issue?
* [Zeppelin 2367](https://issues.apache.org/jira/browse/ZEPPELIN-2367)
### How should this be tested?
Enable Shiro authentication and set `zeppelin.jdbc.auth.type` as `SIMPLE` in the interpreter setting, and observe the connection string for the Hive.
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need an update? N/A
* Is there breaking changes for older versions? N/A
* Does this needs documentation? N/A
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/prabhjyotsingh/zeppelin ZEPPELIN-2367
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2229.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2229
----
commit 8999d93ae5153c698ef0591b2a10f6362578262c
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-06T11:17:07Z
ZEPPELIN-2367: Hive JDBC proxy user option should be avail even without kerberos
commit ee8a6b524c481210486761032cb1f5fd6266bb54
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-06T11:42:40Z
add doc
commit 40489c89d44b18643f74726ddb39b3b157a67370
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-09T04:20:18Z
Merge remote-tracking branch 'origin/master' into ZEPPELIN-2367
commit 01b18b9d267c042442b90a0abe00fb191822b625
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-09T05:49:12Z
add doc (reverted from commit ee8a6b524c481210486761032cb1f5fd6266bb54)
commit d51e770b244ee657786de33cb54b41a13bc17c5d
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-09T05:49:39Z
add doc in jdbc.md
commit 4c382eefa101619c51fba28a63f465a16785d0db
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-09T06:23:12Z
log user details as well
commit a7516741519f37c52270a1cf67b6707e6ac5b07a
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-20T06:31:47Z
Merge remote-tracking branch 'origin/master' into ZEPPELIN-2367
# Conflicts:
# jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
commit 3fa2b1e98040aca53e8ba678fabe70dc64b20336
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-20T07:11:54Z
change name to appendProxyUserToURL
commit 513987a2885d8d5f25accfd74fde0086117dd38f
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-24T11:36:35Z
apply genric logic to appendProxyUserToURL
commit 1802b453fb7a8b4b23726382b497a7591973e66d
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-24T11:40:46Z
remove hive string from logger
commit c180f5ce2f10f8fabc93ab99be574b34ebc1f041
Author: Prabhjyot Singh <pr...@gmail.com>
Date: 2017-04-24T13:43:53Z
Merge remote-tracking branch 'origin/master' into ZEPPELIN-2367
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by felixcheung <gi...@git.apache.org>.
Github user felixcheung commented on the issue:
https://github.com/apache/zeppelin/pull/2229
From my earlier comment, I'm interested in others thought on having very Hive specific logic in the generic JDBC interpreter?
https://github.com/apache/zeppelin/pull/2229/files#r110512765
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] zeppelin issue #2229: [Zeppelin 2367] Hive JDBC proxy user option should be ...
Posted by prabhjyotsingh <gi...@git.apache.org>.
Github user prabhjyotsingh commented on the issue:
https://github.com/apache/zeppelin/pull/2229
CI is green;
https://travis-ci.org/prabhjyotsingh/zeppelin/builds/225173700
https://travis-ci.org/prabhjyotsingh/zeppelin/builds/225214327
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---