This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new ee761ff31c8 branch-3.1: [fix](http) support show backend config when
BE enable http auth #51887 (#52471)
ee761ff31c8 is described below
commit ee761ff31c831a213601400162656e5f04ccba71
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Mon Jun 30 10:41:18 2025 +0800
branch-3.1: [fix](http) support show backend config when BE enable http
auth #51887 (#52471)
bp #51887
---
.../apache/doris/nereids/trees/plans/commands/ShowConfigCommand.java | 4 +++-
fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowConfigCommand.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowConfigCommand.java
index 77bb5ee83d3..a53f8febe12 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowConfigCommand.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ShowConfigCommand.java
@@ -129,6 +129,7 @@ public class ShowConfigCommand extends Command implements
NoForward {
try {
URL url = new URL(urlString);
URLConnection urlConnection = url.openConnection();
+ urlConnection.setRequestProperty("Auth-Token",
Env.getCurrentEnv().getTokenManager().acquireToken());
InputStream inputStream = urlConnection.getInputStream();
BufferedReader reader = new BufferedReader(new
InputStreamReader(inputStream));
while (reader.ready()) {
@@ -152,7 +153,8 @@ public class ShowConfigCommand extends Command implements
NoForward {
}
} catch (Exception e) {
throw new AnalysisException(
- String.format("Can’t get backend config, backendId: %d,
host: %s", beId, host));
+ String.format("Can’t get backend config, backendId:
%d, host: %s. error: %s",
+ beId, host, e.getMessage()), e);
}
}
return new ShowResultSet(getMetaData(BE_TITLE_NAMES), results);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
index 3d7a0b61174..070e268b279 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java
@@ -1681,6 +1681,7 @@ public class ShowExecutor {
List<List<String>> rows = Lists.newArrayList();
try {
URLConnection urlConnection = url.openConnection();
+ urlConnection.setRequestProperty("Auth-Token",
Env.getCurrentEnv().getTokenManager().acquireToken());
InputStream inputStream = urlConnection.getInputStream();
try (BufferedReader reader = new BufferedReader(new
InputStreamReader(inputStream))) {
int limit = 100;
@@ -2518,6 +2519,7 @@ public class ShowExecutor {
try {
URL url = new URL(urlString);
URLConnection urlConnection = url.openConnection();
+ urlConnection.setRequestProperty("Auth-Token",
Env.getCurrentEnv().getTokenManager().acquireToken());
InputStream inputStream = urlConnection.getInputStream();
BufferedReader reader = new BufferedReader(new
InputStreamReader(inputStream));
while (reader.ready()) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]