You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zeppelin.apache.org by GitBox <gi...@apache.org> on 2020/11/05 03:51:58 UTC
[GitHub] [zeppelin] zjffdu opened a new pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
zjffdu opened a new pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965
### What is this PR for?
Several improvements of hive on kerbors support
1. Remove ยท`zeppelin.jdbc.auth.kerberos.proxy.enable`, it is never documented, use `prefix.proxy.user.property` is enough.
2. Append principal to url automatically for users.
3. Remove the doAs code block, it looks like is not necessary.
### What type of PR is it?
[Improvement ]
### Todos
* [ ] - Task
### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-5121
### How should this be tested?
* CI pass
### Screenshots (if appropriate)
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r518573099
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,54 +501,21 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
+ if (!StringUtils.isBlank(principal) && !url.contains("principal=")) {
+ url = url + ";principal=" + principal;
+ }
if (isEmpty(getProperty("zeppelin.jdbc.auth.type"))) {
connection = getConnectionFromPool(url, user, dbPrefix, properties);
} else {
UserGroupInformation.AuthenticationMethod authType =
- JDBCSecurityImpl.getAuthtype(getProperties());
+ JDBCSecurityImpl.getAuthType(getProperties());
final String connectionUrl = appendProxyUserToURL(url, user, dbPrefix);
-
JDBCSecurityImpl.createSecureConfiguration(getProperties(), authType);
- switch (authType) {
- case KERBEROS:
- if (user == null || "false".equalsIgnoreCase(
- getProperty("zeppelin.jdbc.auth.kerberos.proxy.enable"))) {
- connection = getConnectionFromPool(connectionUrl, user, dbPrefix, properties);
- } else {
- if (basePropertiesMap.get(dbPrefix).containsKey("proxy.user.property")) {
- connection = getConnectionFromPool(connectionUrl, user, dbPrefix, properties);
- } else {
- UserGroupInformation ugi = null;
- try {
- ugi = UserGroupInformation.createProxyUser(
- user, UserGroupInformation.getCurrentUser());
- } catch (Exception e) {
- LOGGER.error("Error in getCurrentUser", e);
- throw new InterpreterException("Error in getCurrentUser", e);
- }
-
- final String poolKey = dbPrefix;
- try {
- connection = ugi.doAs(new PrivilegedExceptionAction<Connection>() {
Review comment:
I see, line:534, sounds like it should work. let me test this latest patch. Will update this thread.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r518284030
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,54 +501,21 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
+ if (!StringUtils.isBlank(principal) && !url.contains("principal=")) {
+ url = url + ";principal=" + principal;
+ }
if (isEmpty(getProperty("zeppelin.jdbc.auth.type"))) {
connection = getConnectionFromPool(url, user, dbPrefix, properties);
} else {
UserGroupInformation.AuthenticationMethod authType =
- JDBCSecurityImpl.getAuthtype(getProperties());
+ JDBCSecurityImpl.getAuthType(getProperties());
final String connectionUrl = appendProxyUserToURL(url, user, dbPrefix);
-
JDBCSecurityImpl.createSecureConfiguration(getProperties(), authType);
- switch (authType) {
- case KERBEROS:
- if (user == null || "false".equalsIgnoreCase(
- getProperty("zeppelin.jdbc.auth.kerberos.proxy.enable"))) {
- connection = getConnectionFromPool(connectionUrl, user, dbPrefix, properties);
- } else {
- if (basePropertiesMap.get(dbPrefix).containsKey("proxy.user.property")) {
- connection = getConnectionFromPool(connectionUrl, user, dbPrefix, properties);
- } else {
- UserGroupInformation ugi = null;
- try {
- ugi = UserGroupInformation.createProxyUser(
- user, UserGroupInformation.getCurrentUser());
- } catch (Exception e) {
- LOGGER.error("Error in getCurrentUser", e);
- throw new InterpreterException("Error in getCurrentUser", e);
- }
-
- final String poolKey = dbPrefix;
- try {
- connection = ugi.doAs(new PrivilegedExceptionAction<Connection>() {
Review comment:
This Kerberos case looks important? Will the "doas" case continue to work for hive/phoenix without this?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r520262904
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
@prabhjyotsingh I have removed this change, please help test again.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-722202734
@Reamer It would finish after the hive sql is finished.
```
while (hiveStmt.hasMoreLogs() && !Thread.interrupted()) {
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r519337434
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
In short for the cluster that I've configured this
```jdbc:hive2://phivea-3.phivea.root.hwx.site:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;retries=5;hiveCreateAsExternalLegacy=true;hive.server2.proxy.user=admin;
```
works, but
```jdbc:hive2://phivea-3.phivea.root.hwx.site:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;retries=5;hiveCreateAsExternalLegacy=true;principal=zeppelin/phivea-1.phivea.root.hwx.site@ROOT.HWX.SITE;hive.server2.proxy.user=admin;
```
fails
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r519436620
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
It is weird it fails with principal specified, do you have the exact error message ? IIUC, the principal is required. It should fails if it is not specified.
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
It is weird it fails with principal specified, do you have the exact error message ? IIUC, the principal is required. It should fail if it is not specified.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723553320
This only happens is I specify jdbc-hive (CDH) that is somehow bundlling log4j.property which is causing no logs getting generated for jdbc interpreter.
But like i said on the same cluster without this patch things work.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723453236
@prabhjyotsingh This is zeppelin server log, could you attach the jdbc interpreter log ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r520255546
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
Let me revert this change. Originally I just want to remove the redundant principal in `default.url`, because we already ask user to specify principal in `zeppelin.jdbc.principal`, if hive behaivor changes, it is better not to append principal for user
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r519337434
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
In short for the cluster that I've configured this
```
jdbc:hive2://phivea-3.phivea.root.hwx.site:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;retries=5;hiveCreateAsExternalLegacy=true;hive.server2.proxy.user=admin;
```
works, but
```
jdbc:hive2://phivea-3.phivea.root.hwx.site:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;retries=5;hiveCreateAsExternalLegacy=true;principal=zeppelin/phivea-1.phivea.root.hwx.site@ROOT.HWX.SITE;hive.server2.proxy.user=admin;
```
fails
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh edited a comment on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh edited a comment on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723528679
There are no jdbc log :(
```
zeppelin@phivea-1:~/zeppelin$ ls -alh /var/log/zeppelin/
total 2.7M
drwxrwxrwx 2 zeppelin zeppelin 4.0K Nov 8 04:19 .
drwxr-xr-x 23 root root 4.0K Nov 8 03:27 ..
-rw-rw-r-- 1 zeppelin zeppelin 0 Nov 8 04:19 zeppelin-interpreter-jdbc-shared_process-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 4.5K Nov 8 04:19 zeppelin-interpreter-md-shared_process-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 2.7M Nov 8 04:20 zeppelin-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 4.3K Nov 8 04:14 zeppelin-zeppelin-phivea-1.phivea.root.hwx.site.out
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723445831
Hope this helps:
This is the query that was executed:
```
%jdbc(hive)
select current_user()
```
Log - https://pastebin.com/5NxLUCpY
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] Reamer commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
Reamer commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-722201939
I know this has nothing to do with your change, but the HiveMonitor thread seems to run forever after the start. It also seems that one thread is created per statement.
Is that right?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723537856
I could not make jdbc log to work, looks like there is a conflicting jar/property that gets downloaded with org.apache.hive:hive-jdbc. But here are hive-server logs:
When it does not work (with patch applied): https://pastebin.com/GZPMw26q
When it works (without patch): https://pastebin.com/6CZkxQC0
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r519335209
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
I did not notice this earlier, if I remove these three lines, it starts working again as expected.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723528679
There are no jdbc log
```
zeppelin@phivea-1:~/zeppelin$ ls -alh /var/log/zeppelin/
total 2.7M
drwxrwxrwx 2 zeppelin zeppelin 4.0K Nov 8 04:19 .
drwxr-xr-x 23 root root 4.0K Nov 8 03:27 ..
-rw-rw-r-- 1 zeppelin zeppelin 0 Nov 8 04:19 zeppelin-interpreter-jdbc-shared_process-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 4.5K Nov 8 04:19 zeppelin-interpreter-md-shared_process-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 2.7M Nov 8 04:20 zeppelin-zeppelin-phivea-1.phivea.root.hwx.site.log
-rw-rw-r-- 1 zeppelin zeppelin 4.3K Nov 8 04:14 zeppelin-zeppelin-phivea-1.phivea.root.hwx.site.out
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723417626
@prabhjyotsingh Do you have the full jdbc interpreter log ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] asfgit closed pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh edited a comment on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh edited a comment on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723537856
I could not make jdbc log to work, looks like there is a conflicting jar/log4j.property that gets downloaded with org.apache.hive:hive-jdbc. But here are hive-server logs:
When it does not work (with patch applied): https://pastebin.com/GZPMw26q
When it works (without patch): https://pastebin.com/6CZkxQC0
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723397796
@zjffdu I'm using following JDBC config:
```
hive.driver org.apache.hive.jdbc.HiveDriver
hive.user hive
hive.password
hive.proxy.user.property hive.server2.proxy.user
hive.url jdbc:hive2://phivea-3.phivea.root.psk.site:2181/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;retries=5;hiveCreateAsExternalLegacy=true
hive.splitQueries true
zeppelin.jdbc.keytab.location /var/run/cloudera-scm-agent/process/180-zeppelin-ZEPPELIN_SERVER/zeppelin.keytab
zeppelin.jdbc.principal zeppelin/phivea-1.phivea.root.hwx.site@ROOT.HWX.SITE
zeppelin.jdbc.auth.type KERBEROS
```
And it does not work, fails with:
```
Could not open client transport for any of the Server URI's in ZooKeeper: Peer indicated failure: GSS initiate failed
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] zjffdu commented on pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#issuecomment-723542510
It looks like you are using ranger, not sure whether it is related. And if there's no log file, this is an issue that we should fix as well. (I remember I can produce the jdbc log file, not sure how it doesn't work for you)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zeppelin] prabhjyotsingh commented on a change in pull request #3965: [ZEPPELIN-5121]. Improve the support of hive on kerbose
Posted by GitBox <gi...@apache.org>.
prabhjyotsingh commented on a change in pull request #3965:
URL: https://github.com/apache/zeppelin/pull/3965#discussion_r519479120
##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -500,53 +502,41 @@ public Connection getConnection(String dbPrefix, InterpreterContext context)
setUserProperty(dbPrefix, context);
final Properties properties = jdbcUserConfigurations.getPropertyMap(dbPrefix);
- final String url = properties.getProperty(URL_KEY);
+ String url = properties.getProperty(URL_KEY);
+ String principal = getProperty("zeppelin.jdbc.principal");
Review comment:
Yes, it works. Not sure may be something changed in the recent version of hive. Should we make this a configurable?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org