spaces-X commented on code in PR #15839: URL: https://github.com/apache/doris/pull/15839#discussion_r1067650287
########## be/src/tools/builder_helper.cpp: ########## @@ -0,0 +1,295 @@ +#include "tools/builder_helper.h" + +#include <cstdlib> +#include <filesystem> +#include <fstream> +#include <iostream> +#include <set> +#include <sstream> +#include <string> + +#include "common/object_pool.h" +#include "common/status.h" +#include "env/env.h" +#include "exec/parquet_scanner.h" +#include "exprs/cast_functions.h" +#include "gen_cpp/Descriptors_types.h" +#include "gen_cpp/PaloInternalService_types.h" +#include "gen_cpp/PlanNodes_types.h" +#include "gen_cpp/olap_file.pb.h" +#include "gen_cpp/segment_v2.pb.h" +#include "gutil/strings/numbers.h" +#include "gutil/strings/split.h" +#include "gutil/strings/substitute.h" +#include "io/buffered_reader.h" +#include "io/file_factory.h" +#include "io/file_reader.h" +#include "io/local_file_reader.h" +#include "json2pb/pb_to_json.h" +#include "olap/data_dir.h" +#include "olap/file_helper.h" +#include "olap/olap_define.h" +#include "olap/options.h" +#include "olap/row.h" +#include "olap/rowset/beta_rowset.h" +#include "olap/rowset/rowset_id_generator.h" +#include "olap/rowset/rowset_meta_manager.h" +#include "olap/rowset/segment_v2/binary_plain_page.h" +#include "olap/rowset/segment_v2/column_reader.h" +#include "olap/schema_change.h" +#include "olap/storage_engine.h" +#include "olap/storage_policy_mgr.h" +#include "olap/tablet.h" +#include "olap/tablet_meta.h" +#include "olap/tablet_meta_manager.h" +#include "olap/tablet_schema.h" +#include "olap/tablet_schema_cache.h" +#include "olap/utils.h" +#include "runtime/descriptors.h" +#include "runtime/exec_env.h" +#include "runtime/row_batch.h" +#include "runtime/runtime_state.h" +#include "runtime/tuple.h" +#include "runtime/user_function_cache.h" +#include "tools/builder_scanner.h" +#include "tools/builder_scanner_memtable.h" +#include "util/coding.h" +#include "util/crc32c.h" +#include "util/disk_info.h" +#include "util/file_utils.h" +#include "util/runtime_profile.h" +#include "util/time.h" +#include "vec/exec/format/parquet/vparquet_file_metadata.h" +#include "vec/exec/vbroker_scan_node.h" + +namespace doris { +#define BUFFER_SIZE 1048576 + +BuilderHelper* BuilderHelper::_s_instance = nullptr; + +BuilderHelper* BuilderHelper::init_instance() { + // DCHECK(_s_instance == nullptr); + static BuilderHelper instance; + _s_instance = &instance; + return _s_instance; +} + +void BuilderHelper::initial_build_env() { + char doris_home[] = "DORIS_HOME=/tmp"; + putenv(doris_home); + + if (!doris::config::init(nullptr, true, false, true)) { + LOG(FATAL) << "init config fail"; + exit(-1); + } + CpuInfo::init(); + DiskInfo::init(); + MemInfo::init(); + + // write buffer size before flush + config::write_buffer_size = 14097152000; Review Comment: why need to redefine these config variable here? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org