From 244d21515e38ed7fbd459c05d508f9662d2e6a3c Mon Sep 17 00:00:00 2001 From: srlch Date: Thu, 2 Jan 2025 12:55:03 +0800 Subject: [PATCH] fix Signed-off-by: srlch --- be/src/exec/schema_scanner.cpp | 6 ++++++ .../schema_cluster_snapshot_jobs_scanner.cpp | 5 ++--- be/src/exec/schema_scanner/schema_helper.cpp | 7 ++++--- .../java/com/starrocks/service/FrontendServiceImpl.java | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/be/src/exec/schema_scanner.cpp b/be/src/exec/schema_scanner.cpp index 6ef5f1e85337a..ab500707945b1 100644 --- a/be/src/exec/schema_scanner.cpp +++ b/be/src/exec/schema_scanner.cpp @@ -31,6 +31,8 @@ #include "exec/schema_scanner/schema_be_threads_scanner.h" #include "exec/schema_scanner/schema_be_txns_scanner.h" #include "exec/schema_scanner/schema_charsets_scanner.h" +#include "exec/schema_scanner/schema_cluster_snapshot_jobs_scanner.h" +#include "exec/schema_scanner/schema_cluster_snapshots_scanner.h" #include "exec/schema_scanner/schema_collations_scanner.h" #include "exec/schema_scanner/schema_column_stats_usage_scanner.h" #include "exec/schema_scanner/schema_columns_scanner.h" @@ -219,6 +221,10 @@ std::unique_ptr SchemaScanner::create(TSchemaTableType::type type return std::make_unique(); case TSchemaTableType::SCH_ANALYZE_STATUS: return std::make_unique(); + case TSchemaTableType::SCH_CLUSTER_SNAPSHOTS: + return std::make_unique(); + case TSchemaTableType::SCH_CLUSTER_SNAPSHOT_JOBS: + return std::make_unique(); default: return std::make_unique(); } diff --git a/be/src/exec/schema_scanner/schema_cluster_snapshot_jobs_scanner.cpp b/be/src/exec/schema_scanner/schema_cluster_snapshot_jobs_scanner.cpp index 4137a970228af..2fcb1b4f7265a 100644 --- a/be/src/exec/schema_scanner/schema_cluster_snapshot_jobs_scanner.cpp +++ b/be/src/exec/schema_scanner/schema_cluster_snapshot_jobs_scanner.cpp @@ -53,9 +53,8 @@ Status SchemaClusterSnapshotJobsScanner::_fill_chunk(ChunkPtr* chunk) { auto& slot_id_map = (*chunk)->get_slot_id_to_index_map(); const TClusterSnapshotJobsItem& info = _result.items[_index]; DatumArray datum_array{ - Slice(info.snapshot_name), info.job_id, - info.created_time, info.finished_time, - Slice(info.state), Slice(info.detail_info), + Slice(info.snapshot_name), info.job_id, info.created_time, + info.finished_time, Slice(info.state), Slice(info.detail_info), Slice(info.error_message), }; for (const auto& [slot_id, index] : slot_id_map) { diff --git a/be/src/exec/schema_scanner/schema_helper.cpp b/be/src/exec/schema_scanner/schema_helper.cpp index f395f4bf7f131..9e32c7dfa4d83 100644 --- a/be/src/exec/schema_scanner/schema_helper.cpp +++ b/be/src/exec/schema_scanner/schema_helper.cpp @@ -230,13 +230,14 @@ Status SchemaHelper::get_analyze_status(const SchemaScannerState& state, const T Status SchemaHelper::get_cluster_snapshots_info(const SchemaScannerState& state, const TClusterSnapshotsRequest& req, TClusterSnapshotsResponse* res) { return _call_rpc(state, - [&req, &res](FrontendServiceConnection& client) { client->getClusterSnapshotsInfo(*res, req); }); + [&req, &res](FrontendServiceConnection& client) { client->getClusterSnapshotsInfo(*res, req); }); } -Status SchemaHelper::get_cluster_snapshot_jobs_info(const SchemaScannerState& state, const TClusterSnapshotJobsRequest& req, +Status SchemaHelper::get_cluster_snapshot_jobs_info(const SchemaScannerState& state, + const TClusterSnapshotJobsRequest& req, TClusterSnapshotJobsResponse* res) { return _call_rpc( - state, [&req, &res](FrontendServiceConnection& client) { client->getClusterSnapshotJobsInfo(*res, req); }); + state, [&req, &res](FrontendServiceConnection& client) { client->getClusterSnapshotJobsInfo(*res, req); }); } void fill_data_column_with_null(Column* data_column) { diff --git a/fe/fe-core/src/main/java/com/starrocks/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/com/starrocks/service/FrontendServiceImpl.java index a4ef1f865a182..3fec691bc3ddd 100644 --- a/fe/fe-core/src/main/java/com/starrocks/service/FrontendServiceImpl.java +++ b/fe/fe-core/src/main/java/com/starrocks/service/FrontendServiceImpl.java @@ -3181,4 +3181,5 @@ public TClusterSnapshotsResponse getClusterSnapshotsInfo(TClusterSnapshotsReques @Override public TClusterSnapshotJobsResponse getClusterSnapshotJobsInfo(TClusterSnapshotJobsRequest params) { return new TClusterSnapshotJobsResponse(); + } }