From 77f2bb08a8baeca28a706a17851f9a31383be3bd Mon Sep 17 00:00:00 2001 From: "xiaolei.zl" Date: Thu, 13 Jun 2024 13:15:55 +0000 Subject: [PATCH] fixing ci --- flex/engines/http_server/service/hqps_service.cc | 3 ++- flex/storages/metadata/graph_meta_store.cc | 10 ++++++++++ flex/storages/metadata/graph_meta_store.h | 2 ++ flex/tests/interactive/modern_graph_schema_v0_0.yaml | 9 ++++++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/flex/engines/http_server/service/hqps_service.cc b/flex/engines/http_server/service/hqps_service.cc index b7dc7e85d28a..e066d0734170 100644 --- a/flex/engines/http_server/service/hqps_service.cc +++ b/flex/engines/http_server/service/hqps_service.cc @@ -252,7 +252,8 @@ bool HQPSService::start_compiler_subprocess( std::stringstream ss; ss << "java -cp " << interactive_class_path; if (!graph_schema_path.empty()) { - ss << " -Dgraph.schema=" << graph_schema_path; + ss << " -Dgraph.schema=http://localhost:" << service_config_.admin_port + << "/v1/service/status"; } ss << " " << COMPILER_SERVER_CLASS_NAME; ss << " " << service_config_.engine_config_path; diff --git a/flex/storages/metadata/graph_meta_store.cc b/flex/storages/metadata/graph_meta_store.cc index d99d17a9817f..7a202c48bfe2 100644 --- a/flex/storages/metadata/graph_meta_store.cc +++ b/flex/storages/metadata/graph_meta_store.cc @@ -337,6 +337,11 @@ CreateGraphMetaRequest CreateGraphMetaRequest::FromJson( } else { request.creation_time = GetCurrentTimeStamp(); } + if (json.contains("stored_procedures")) { + for (auto& plugin : json["stored_procedures"]) { + request.plugin_metas.push_back(PluginMeta::FromJson(plugin)); + } + } return request; } @@ -351,6 +356,11 @@ std::string CreateGraphMetaRequest::ToString() const { json["data_update_time"] = 0; } json["creation_time"] = creation_time; + json["stored_procedures"] = nlohmann::json::array(); + for (auto& plugin_meta : plugin_metas) { + json["stored_procedures"].push_back( + nlohmann::json::parse(plugin_meta.ToJson())); + } return json.dump(); } diff --git a/flex/storages/metadata/graph_meta_store.h b/flex/storages/metadata/graph_meta_store.h index d42337f13895..f9f710c7e23a 100644 --- a/flex/storages/metadata/graph_meta_store.h +++ b/flex/storages/metadata/graph_meta_store.h @@ -130,6 +130,8 @@ struct CreateGraphMetaRequest { std::optional data_update_time; int64_t creation_time; + std::vector plugin_metas; + static CreateGraphMetaRequest FromJson(const std::string& json_str); std::string ToString() const; diff --git a/flex/tests/interactive/modern_graph_schema_v0_0.yaml b/flex/tests/interactive/modern_graph_schema_v0_0.yaml index 252b29c999b8..0c627425fbb1 100644 --- a/flex/tests/interactive/modern_graph_schema_v0_0.yaml +++ b/flex/tests/interactive/modern_graph_schema_v0_0.yaml @@ -20,7 +20,8 @@ schema: - property_id: 1 property_name: name property_type: - primitive_type: DT_STRING + string: + long_text: - property_id: 2 property_name: age property_type: @@ -39,11 +40,13 @@ schema: - property_id: 1 property_name: name property_type: - primitive_type: DT_STRING + string: + long_text: - property_id: 2 property_name: lang property_type: - primitive_type: DT_STRING + string: + long_text: primary_keys: - id edge_types: