github-actions[bot] commented on code in PR #31484:
URL: https://github.com/apache/doris/pull/31484#discussion_r1507455679
##########
be/src/olap/rowset/segment_v2/inverted_index_writer.h:
##########
@@ -66,5 +73,34 @@
DISALLOW_COPY_AND_ASSIGN(InvertedIndexColumnWriter);
};
+class TmpFileDirs {
+public:
+ TmpFileDirs(const std::vector<doris::StorePath>& store_paths) {
+ for (const auto& store_path : store_paths) {
+ _tmp_file_dirs.emplace_back(store_path.path + "/" +
config::tmp_file_dir);
+ }
+ };
+
+ Status init() {
+ for (auto& tmp_file_dir : _tmp_file_dirs) {
+ bool exists = true;
+
RETURN_IF_ERROR(io::global_local_filesystem()->exists(tmp_file_dir, &exists));
+ if (!exists) {
+
RETURN_IF_ERROR(io::global_local_filesystem()->create_directory(tmp_file_dir));
+ }
+ }
+ return Status::OK();
+ };
+
+ io::Path get_tmp_file_dir() {
Review Comment:
warning: method 'get_tmp_file_dir' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static io::Path get_tmp_file_dir() {
```
##########
be/src/olap/rowset/segment_v2/inverted_index_writer.h:
##########
@@ -66,5 +73,34 @@ class InvertedIndexColumnWriter {
DISALLOW_COPY_AND_ASSIGN(InvertedIndexColumnWriter);
};
+class TmpFileDirs {
+public:
+ TmpFileDirs(const std::vector<doris::StorePath>& store_paths) {
+ for (const auto& store_path : store_paths) {
+ _tmp_file_dirs.emplace_back(store_path.path + "/" +
config::tmp_file_dir);
+ }
+ };
+
+ Status init() {
Review Comment:
warning: method 'init' can be made static
[readability-convert-member-functions-to-static]
```suggestion
static Status init() {
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]