This is an automated email from the ASF dual-hosted git repository. morningman pushed a commit to branch branch-c108335-hive-sql in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-c108335-hive-sql by this push: new 542a6197f02 [tmp] support for oss-hdfs root policy 542a6197f02 is described below commit 542a6197f028931f34105878428b99348c180213 Author: morningman <yun...@selectdb.com> AuthorDate: Tue Mar 18 21:10:19 2025 +0800 [tmp] support for oss-hdfs root policy --- be/src/io/fs/hdfs_file_reader.cpp | 2 +- .../src/main/java/org/apache/doris/common/util/LocationPath.java | 3 ++- .../main/java/org/apache/doris/httpv2/util/StatementSubmitter.java | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/be/src/io/fs/hdfs_file_reader.cpp b/be/src/io/fs/hdfs_file_reader.cpp index d43cfae1c28..70470e8e5f4 100644 --- a/be/src/io/fs/hdfs_file_reader.cpp +++ b/be/src/io/fs/hdfs_file_reader.cpp @@ -231,7 +231,7 @@ Status HdfsFileReader::read_at_impl(size_t offset, Slice result, size_t* bytes_r void HdfsFileReader::_collect_profile_before_close() { if (_profile != nullptr && is_hdfs(_fs_name)) { -#ifdef USE_HADOOP_HDFS +#ifndef USE_HADOOP_HDFS struct hdfsReadStatistics* hdfs_statistics = nullptr; auto r = hdfsFileGetReadStatistics(_handle->file(), &hdfs_statistics); if (r != 0) { 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 4ca8f9605a0..50f6a719950 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 @@ -391,7 +391,8 @@ public class LocationPath { throw new RuntimeException("Invalid location with empty host: " + location); } else { // Replace 'hdfs://key/' to '/key/', try access local NameNode on BE. - return location.replace(normalizedPrefix, "/"); + // return location.replace(normalizedPrefix, "/"); + return location; } } } diff --git a/fe/fe-core/src/main/java/org/apache/doris/httpv2/util/StatementSubmitter.java b/fe/fe-core/src/main/java/org/apache/doris/httpv2/util/StatementSubmitter.java index 2c9ef15bda0..a4a0f941e7e 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/httpv2/util/StatementSubmitter.java +++ b/fe/fe-core/src/main/java/org/apache/doris/httpv2/util/StatementSubmitter.java @@ -31,7 +31,9 @@ import org.apache.doris.common.ThreadPoolManager; import org.apache.doris.common.util.SqlParserUtils; import org.apache.doris.httpv2.util.streamresponse.JsonStreamResponse; import org.apache.doris.httpv2.util.streamresponse.StreamResponseInf; +import org.apache.doris.qe.AutoCloseConnectContext; import org.apache.doris.qe.ConnectContext; +import org.apache.doris.statistics.util.StatisticsUtil; import com.google.common.collect.Lists; import com.google.common.collect.Maps; @@ -250,7 +252,7 @@ public class StatementSubmitter { public static StatementBase analyzeStmt(String stmtStr) throws Exception { SqlParser parser = new SqlParser(new SqlScanner(new StringReader(stmtStr))); - try { + try (AutoCloseConnectContext a = StatisticsUtil.buildConnectContext(false)) { return SqlParserUtils.getFirstStmt(parser); } catch (AnalysisException e) { String errorMessage = parser.getErrorMsg(stmtStr); @@ -286,3 +288,4 @@ public class StatementSubmitter { } } } + --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org