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 2021/01/16 15:02:41 UTC

[GitHub] [zeppelin] zjffdu opened a new pull request #4024: [ZEPPELIN-5199]. Should login via keytab first in jdbc interpreter

zjffdu opened a new pull request #4024:
URL: https://github.com/apache/zeppelin/pull/4024


   ### What is this PR for?
   
   This PR would login via keytab in open method of jdbc interpreter, otherwise the underlying runKerbose thread will
   fail and cause the interpreter closed.
   
   ### What type of PR is it?
   [Bug Fix ]
   
   ### Todos
   * [ ] - Task
   
   ### What is the Jira issue?
   * https://issues.apache.org/jira/browse/ZEPPELIN-5199
   
   ### How should this be tested?
   * Manually tested
   
   ### 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] zjffdu commented on a change in pull request #4024: [ZEPPELIN-5199]. Should login via keytab first in jdbc interpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on a change in pull request #4024:
URL: https://github.com/apache/zeppelin/pull/4024#discussion_r559402320



##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -207,6 +207,16 @@ protected boolean runKerberosLogin() {
   @Override
   public void open() {
     super.open();
+
+    // login via keytab first in open method, otherwise the underlying runKerbose thread will
+    // fail and cause the interpreter closed.
+    String authType = properties.getProperty("zeppelin.jdbc.auth.type", "SIMPLE")
+            .trim().toUpperCase();
+    if (authType.equalsIgnoreCase("KERBEROS")) {

Review comment:
       addressed




----------------------------------------------------------------
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 a change in pull request #4024: [ZEPPELIN-5199]. Should login via keytab first in jdbc interpreter

Posted by GitBox <gi...@apache.org>.
Reamer commented on a change in pull request #4024:
URL: https://github.com/apache/zeppelin/pull/4024#discussion_r559093375



##########
File path: jdbc/src/main/java/org/apache/zeppelin/jdbc/JDBCInterpreter.java
##########
@@ -207,6 +207,16 @@ protected boolean runKerberosLogin() {
   @Override
   public void open() {
     super.open();
+
+    // login via keytab first in open method, otherwise the underlying runKerbose thread will
+    // fail and cause the interpreter closed.
+    String authType = properties.getProperty("zeppelin.jdbc.auth.type", "SIMPLE")
+            .trim().toUpperCase();
+    if (authType.equalsIgnoreCase("KERBEROS")) {

Review comment:
       Please swap the order of comparison. `toUpperCase()` is not necessary if you used `equalsIgnoreCase()`.




----------------------------------------------------------------
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 #4024: [ZEPPELIN-5199]. Should login via keytab first in jdbc interpreter

Posted by GitBox <gi...@apache.org>.
zjffdu commented on pull request #4024:
URL: https://github.com/apache/zeppelin/pull/4024#issuecomment-761577818


   @VipinRathor 


----------------------------------------------------------------
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 edited a comment on pull request #4024: [ZEPPELIN-5199]. Should login via keytab first in jdbc interpreter

Posted by GitBox <gi...@apache.org>.
zjffdu edited a comment on pull request #4024:
URL: https://github.com/apache/zeppelin/pull/4024#issuecomment-761577818


   @VipinRathor I have verified it manually, but I would be very appreciate if you can also help verify it in your environment. 


----------------------------------------------------------------
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