branch-2.1: [bugfix](chdfs) fix hash collision in chdfs file system cache #49486 (#50545)

Cherry-picked from #49486

Co-authored-by: zhangyuan <ayuanzhang@tencent.com>
This commit is contained in:
github-actions[bot]
2025-04-30 09:16:37 +08:00
committed by GitHub
parent 4b3dd6c10a
commit dfc1dbfb59

View File

@ -662,7 +662,7 @@ public class FileSystemManager {
*/
public BrokerFileSystem getChdfsFileSystem(String path, Map<String, String> properties) {
WildcardURI pathUri = new WildcardURI(path);
String host = CHDFS_SCHEME;
String host = CHDFS_SCHEME + "://" + pathUri.getAuthority();
String authentication = properties.getOrDefault(CommonConfigurationKeysPublic.HADOOP_SECURITY_AUTHENTICATION,
AUTHENTICATION_SIMPLE);
if (Strings.isNullOrEmpty(authentication) || (!authentication.equals(AUTHENTICATION_SIMPLE)