You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/03/10 06:51:04 UTC

[GitHub] [incubator-kyuubi] lightning-L opened a new pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wa…

lightning-L opened a new pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092


   …it for completion
   
   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you closed pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wait for completion

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092


   


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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] yaooqinn commented on pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wait for completion

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092#issuecomment-1063842510


   @lightning-L thanks, just take your time.


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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] turboFei commented on a change in pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wait for completion

Posted by GitBox <gi...@apache.org>.
turboFei commented on a change in pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092#discussion_r824366025



##########
File path: kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopCredentialsManager.scala
##########
@@ -212,17 +215,18 @@ class HadoopCredentialsManager private (name: String) extends AbstractService(na
     providers.contains(serviceName)
   }
 
-  private def scheduleRenewal(
-      userRef: CredentialsRef,
-      delay: Long,
-      waitCompletion: Boolean = false): Unit = {
+  private def scheduleRenewal(userRef: CredentialsRef, delay: Long): Unit = {
     val renewalTask = new Runnable {
       override def run(): Unit = {
         try {
-          val creds = new Credentials()
-          providers.values
-            .foreach(_.obtainDelegationTokens(userRef.getAppUser, creds))
-          userRef.updateCredentials(creds)
+          val credentialsFuture: Future[Unit] = Future {
+            val creds = new Credentials()
+            providers.values
+              .foreach(_.obtainDelegationTokens(userRef.getAppUser, creds))
+            userRef.updateCredentials(creds)
+          }(ExecutionContext.fromExecutorService(renewalExecutor.get))
+          userRef.setFuture(credentialsFuture)

Review comment:
       shall we wait the future completion here?




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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wait for completion

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092#issuecomment-1068638660


   thanks, merging to master/branch-1.5


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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


[GitHub] [incubator-kyuubi] lightning-L commented on pull request #2092: [KYUUBI #1936][FOLLOWUP] Send credentials when opening session and wait for completion

Posted by GitBox <gi...@apache.org>.
lightning-L commented on pull request #2092:
URL: https://github.com/apache/incubator-kyuubi/pull/2092#issuecomment-1063788615


   I am working on resolving the test failures.


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

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org