You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/05/12 07:43:34 UTC
[incubator-doris] branch master updated: [Bug] (load) Broker load kerberos auth fail (#9494)
This is an automated email from the ASF dual-hosted git repository.
yiguolei 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 4ccaa0dfc5 [Bug] (load) Broker load kerberos auth fail (#9494)
4ccaa0dfc5 is described below
commit 4ccaa0dfc5a95c19f3e4618f4e2fa7df8b392ec9
Author: Hui Tian <82...@qq.com>
AuthorDate: Thu May 12 15:43:29 2022 +0800
[Bug] (load) Broker load kerberos auth fail (#9494)
---
.../main/java/org/apache/doris/broker/hdfs/FileSystemManager.java | 6 +++++-
1 file changed, 5 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 dc94720465..b522d21819 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
@@ -45,6 +45,7 @@ import java.net.InetAddress;
import java.net.URISyntaxException;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
+import java.nio.channels.FileLock;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.PrivilegedExceptionAction;
@@ -288,10 +289,13 @@ public class FileSystemManager {
tmpFilePath ="/tmp/." +
principal.replace('/', '_') +
"_" + Long.toString(currentTime) +
- "_" + Integer.toString(randNumber);
+ "_" + Integer.toString(randNumber) +
+ "_" + Thread.currentThread().getId();
logger.info("create kerberos tmp file" + tmpFilePath);
FileOutputStream fileOutputStream = new FileOutputStream(tmpFilePath);
+ FileLock lock = fileOutputStream.getChannel().lock();
fileOutputStream.write(base64decodedBytes);
+ lock.release();
fileOutputStream.close();
keytab = tmpFilePath;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org