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

yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 904a2ac  [Bug] keytab file maybe not thread-safe (#5578)
904a2ac is described below

commit 904a2ac86a15895851f93da896d2505245399dd5
Author: xinghuayu007 <[email protected]>
AuthorDate: Thu Apr 8 09:12:45 2021 +0800

    [Bug] keytab file maybe not thread-safe (#5578)
    
    * make keytab file thread-safe
    
    * remove delte file code
    
    Co-authored-by: wangxixu <[email protected]>
---
 .../src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
 
b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
index c1c1c4e..de04a07 100644
--- 
a/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
+++ 
b/fs_brokers/apache_hdfs_broker/src/main/java/org/apache/doris/broker/hdfs/FileSystemManager.java
@@ -268,7 +268,8 @@ public class FileSystemManager {
                         long currentTime = System.currentTimeMillis();
                         Random random = new Random(currentTime);
                         int randNumber = random.nextInt(10000);
-                        tmpFilePath = "/tmp/." + Long.toString(currentTime) + 
"_" + Integer.toString(randNumber);
+                        // different kerberos account has different file
+                        tmpFilePath = "/tmp/." + principal + "_" + 
Long.toString(currentTime) + "_" + Integer.toString(randNumber);
                         FileOutputStream fileOutputStream = new 
FileOutputStream(tmpFilePath);
                         fileOutputStream.write(base64decodedBytes);
                         fileOutputStream.close();

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to