Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ private ShowResultSet handShowBackendConfig() throws AnalysisException {
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()) {
Expand All @@ -152,7 +153,8 @@ private ShowResultSet handShowBackendConfig() throws AnalysisException {
}
} 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,7 @@ private void handleShowLoadWarningsFromURL(ShowLoadWarningsStmt showWarningsStmt
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;
Expand Down Expand Up @@ -2518,6 +2519,7 @@ private void handShowBackendConfig(ShowConfigStmt stmt) throws AnalysisException
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()) {
Expand Down