This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 535c4f90bc [KYUUBI #6753] Set hadoop fs delegation token renewer to 
empty
535c4f90bc is described below

commit 535c4f90bcd611fe316750137f5c11b27e3d4baf
Author: wforget <[email protected]>
AuthorDate: Fri Oct 18 10:56:33 2024 +0800

    [KYUUBI #6753] Set hadoop fs delegation token renewer to empty
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    Allow delegation tokens to be used and renewed by yarn resourcemanager. 
(used in proxy user mode of flink engine, address 
https://github.com/apache/kyuubi/pull/6383#discussion_r1635768060)
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Set hadoop fs delegation token renewer to empty.
    
    ## Types of changes :bookmark:
    
    - [X] Bugfix (non-breaking change which fixes an issue)
    - [ ] New feature (non-breaking change which adds functionality)
    - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
    
    ## Test Plan ๐Ÿงช
    
    #### Behavior Without This Pull Request :coffin:
    
    #### Behavior With This Pull Request :tada:
    
    #### Related Unit Tests
    
    ---
    
    # Checklist ๐Ÿ“
    
    - [X] This patch was not authored or co-authored using [Generative 
Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    **Be nice. Be informative.**
    
    Closes #6753 from wForget/renewer.
    
    Closes #6753
    
    f2e1f0aa1 [wforget] Set hadoop fs delegation token renewer to empty
    
    Authored-by: wforget <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../apache/kyuubi/credentials/HadoopFsDelegationTokenProvider.scala   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopFsDelegationTokenProvider.scala
 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopFsDelegationTokenProvider.scala
index d73f827bf7..be1b9fab58 100644
--- 
a/kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopFsDelegationTokenProvider.scala
+++ 
b/kyuubi-server/src/main/scala/org/apache/kyuubi/credentials/HadoopFsDelegationTokenProvider.scala
@@ -68,12 +68,10 @@ class HadoopFsDelegationTokenProvider extends 
HadoopDelegationTokenProvider with
       }.toMap
 
       try {
-        // Renewer is not needed. But setting a renewer can avoid potential 
NPE.
-        val renewer = UserGroupInformation.getCurrentUser.getUserName
         fileSystems.foreach { case (fs, uri) =>
           info(s"getting token owned by $owner for: $uri")
           try {
-            fs.addDelegationTokens(renewer, creds)
+            fs.addDelegationTokens("", creds)
           } catch {
             case e: Exception =>
               throw new KyuubiException(s"Failed to get token owned by $owner 
for: $uri", e)

Reply via email to