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");