Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert(core): Remove temporary output directory option from clp and clo. #619

Merged
merged 1 commit into from
Dec 5, 2024
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
8 changes: 0 additions & 8 deletions components/core/src/clp/clo/CommandLineArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,6 @@ auto CommandLineArguments::parse_ir_extraction_arguments(
// clang-format off
options_ir_extraction
.add_options()(
"temp-output-dir",
po::value<string>(&m_ir_temp_output_dir)->value_name("DIR"),
"Temporary output directory for IR chunks while they're being written"
)(
"target-size",
po::value<size_t>(&m_ir_target_size)->value_name("SIZE"),
"Target size (B) for each IR chunk before a new chunk is created"
Expand Down Expand Up @@ -287,10 +283,6 @@ auto CommandLineArguments::parse_ir_extraction_arguments(
if (m_ir_mongodb_collection.empty()) {
throw invalid_argument("COLLECTION not specified or empty.");
}

if (m_ir_temp_output_dir.empty()) {
m_ir_temp_output_dir = m_ir_output_dir;
}
return ParsingResult::Success;
}

Expand Down
5 changes: 0 additions & 5 deletions components/core/src/clp/clo/CommandLineArguments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ class CommandLineArguments : public CommandLineArgumentsBase {

[[nodiscard]] auto get_ir_output_dir() const -> std::string const& { return m_ir_output_dir; }

[[nodiscard]] auto get_ir_temp_output_dir() const -> std::string const& {
return m_ir_temp_output_dir;
}

[[nodiscard]] auto get_ir_mongodb_uri() const -> std::string const& { return m_ir_mongodb_uri; }

[[nodiscard]] auto get_ir_mongodb_collection() const -> std::string const& {
Expand Down Expand Up @@ -187,7 +183,6 @@ class CommandLineArguments : public CommandLineArgumentsBase {
std::string m_file_split_id;
size_t m_ir_target_size{128ULL * 1024 * 1024};
std::string m_ir_output_dir;
std::string m_ir_temp_output_dir;
std::string m_ir_mongodb_uri;
std::string m_ir_mongodb_collection;

Expand Down
2 changes: 1 addition & 1 deletion components/core/src/clp/clo/clo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ bool extract_ir(CommandLineArguments const& command_line_args) {
archive_reader,
*file_metadata_ix_ptr,
command_line_args.get_ir_target_size(),
command_line_args.get_ir_temp_output_dir(),
command_line_args.get_ir_output_dir(),
ir_output_handler
))
{
Expand Down
11 changes: 0 additions & 11 deletions components/core/src/clp/clp/CommandLineArguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,6 @@ CommandLineArguments::parse_arguments(int argc, char const* argv[]) {
->default_value(m_ir_target_size),
"Target size (B) for each IR chunk before a new chunk is created"
);
options_ir.add_options()(
"temp-output-dir",
po::value<string>(&m_ir_temp_output_dir)
->value_name("DIR")
->default_value(m_ir_temp_output_dir),
"Temporary output directory for IR chunks while they're being written"
);

po::options_description all_ir_options;
all_ir_options.add(ir_positional_options);
Expand Down Expand Up @@ -311,10 +304,6 @@ CommandLineArguments::parse_arguments(int argc, char const* argv[]) {
if (m_orig_file_id.empty()) {
throw invalid_argument("ORIG_FILE_ID cannot be empty.");
}

if (m_ir_temp_output_dir.empty()) {
m_ir_temp_output_dir = m_output_dir;
}
} else if (Command::Compress == m_command) {
// Define compression hidden positional options
po::options_description compression_positional_options;
Expand Down
3 changes: 0 additions & 3 deletions components/core/src/clp/clp/CommandLineArguments.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ class CommandLineArguments : public CommandLineArgumentsBase {

std::string const& get_path_prefix_to_remove() const { return m_path_prefix_to_remove; }

std::string const& get_ir_temp_output_dir() const { return m_ir_temp_output_dir; }

std::string const& get_output_dir() const { return m_output_dir; }

std::string const& get_schema_file_path() const { return m_schema_file_path; }
Expand Down Expand Up @@ -91,7 +89,6 @@ class CommandLineArguments : public CommandLineArgumentsBase {
size_t m_ir_msg_ix{0};
size_t m_ir_target_size{128ULL * 1024 * 1024};
bool m_sort_input_files;
std::string m_ir_temp_output_dir;
std::string m_output_dir;
std::string m_schema_file_path;
bool m_show_progress;
Expand Down
2 changes: 1 addition & 1 deletion components/core/src/clp/clp/decompression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ bool decompress_to_ir(CommandLineArguments& command_line_args) {
archive_reader,
*file_metadata_ix_ptr,
command_line_args.get_ir_target_size(),
command_line_args.get_ir_temp_output_dir(),
command_line_args.get_output_dir(),
haiqi96 marked this conversation as resolved.
Show resolved Hide resolved
ir_output_handler
))
{
Expand Down
Loading