diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/util/LocationPath.java b/fe/fe-core/src/main/java/org/apache/doris/common/util/LocationPath.java index 798e13d321fe88..ad16ce1c74c079 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/common/util/LocationPath.java +++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/LocationPath.java @@ -137,19 +137,7 @@ public LocationPath(String originLocation, Map props, boolean co tmpLocation = convertPath ? convertToS3(tmpLocation) : tmpLocation; break; case FeConstants.FS_PREFIX_OSS: - String endpoint = ""; - if (props.containsKey(OssProperties.ENDPOINT)) { - endpoint = props.get(OssProperties.ENDPOINT); - if (endpoint.startsWith(OssProperties.OSS_PREFIX)) { - // may use oss.oss-cn-beijing.aliyuncs.com - endpoint = endpoint.replace(OssProperties.OSS_PREFIX, ""); - } - } else if (props.containsKey(S3Properties.ENDPOINT)) { - endpoint = props.get(S3Properties.ENDPOINT); - } else if (props.containsKey(S3Properties.Env.ENDPOINT)) { - endpoint = props.get(S3Properties.Env.ENDPOINT); - } - if (isHdfsOnOssEndpoint(endpoint)) { + if (isHdfsOnOssEndpoint(originLocation)) { this.scheme = Scheme.OSS_HDFS; } else { if (useS3EndPoint(props)) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/fs/remote/RemoteFileSystemTest.java b/fe/fe-core/src/test/java/org/apache/doris/fs/remote/RemoteFileSystemTest.java index 3fc15ab8e374fa..2b94dbf8bad92e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/fs/remote/RemoteFileSystemTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/fs/remote/RemoteFileSystemTest.java @@ -68,7 +68,7 @@ public void testFilesystemAndAuthType() throws UserException { dfsPaths.add("ofs://a/b/c"); dfsPaths.add("gfs://a/b/c"); dfsPaths.add("hdfs://a/b/c"); - dfsPaths.add("oss://a/b/c"); // if endpoint contains 'oss-dls.aliyuncs', will use dfs filesystem + dfsPaths.add("oss://emr-ssss-oss.cn-beijing.oss-dls.aliyuncs.com/tmp/"); // if endpoint contains 'oss-dls.aliyuncs', will use dfs filesystem new MockUp(UserGroupInformation.class) { @Mock