From 02159d96498181e138f0219ca56b822dbad309b1 Mon Sep 17 00:00:00 2001 From: Abigail Matthews Date: Thu, 5 Dec 2024 10:24:51 -0500 Subject: [PATCH] error when hitting compression of kv-ir until functionality is added --- components/core/src/clp_s/CommandLineArguments.cpp | 11 +++++------ components/core/src/clp_s/clp-s.cpp | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/core/src/clp_s/CommandLineArguments.cpp b/components/core/src/clp_s/CommandLineArguments.cpp index f7b46bc97..9527f6c99 100644 --- a/components/core/src/clp_s/CommandLineArguments.cpp +++ b/components/core/src/clp_s/CommandLineArguments.cpp @@ -148,7 +148,9 @@ CommandLineArguments::parse_arguments(int argc, char const** argv) { po::options_description compression_options("Compression options"); std::string metadata_db_config_file_path; std::string input_path_list_file_path; - std::string file_type; + constexpr std::string_view cJsonFileType{"json"}; + constexpr std::string_view cKeyValueIrFileType{"kv-ir"}; + std::string file_type{cJsonFileType}; // clang-format off compression_options.add_options()( "compression-level", @@ -205,8 +207,8 @@ CommandLineArguments::parse_arguments(int argc, char const** argv) { "Do not record log order at ingestion time." )( "file-type", - po::value(&file_type)->value_name("FILE_TYPE"), - "The type of file that is to be compressed to archive (e.g json or kv-ir)" + po::value(&file_type)->value_name("FILE_TYPE")->default_value(file_type), + "The type of file being compressed (json or kv-ir)" ); // clang-format on @@ -260,9 +262,6 @@ CommandLineArguments::parse_arguments(int argc, char const** argv) { throw std::invalid_argument("No input paths specified."); } - constexpr std::string_view cJsonFileType{"json"}; - constexpr std::string_view cKeyValueIrFileType{"kv-ir"}; - if (parsed_command_line_options.count("file-type") > 0) { if (cJsonFileType == file_type) { m_file_type = FileType::Json; diff --git a/components/core/src/clp_s/clp-s.cpp b/components/core/src/clp_s/clp-s.cpp index d6d46aaac..41acdc6ad 100644 --- a/components/core/src/clp_s/clp-s.cpp +++ b/components/core/src/clp_s/clp-s.cpp @@ -118,6 +118,8 @@ bool compress(CommandLineArguments const& command_line_arguments) { // Functionality Coming in later PR // -->Call new parsing function in Json Parser to parse IRv2 to archive // -->Check for error from parsing function + SPDLOG_ERROR("Compressing Key Valur IR Files is not yet supported"); + return false; } else { if (false == parser.parse()) { SPDLOG_ERROR("Encountered error while parsing input");