diff --git a/src/datacollector/data_collector.cc b/src/datacollector/data_collector.cc index 7e32bba4e9e..b5dbedc35c4 100644 --- a/src/datacollector/data_collector.cc +++ b/src/datacollector/data_collector.cc @@ -22,8 +22,8 @@ #include #include +#include "absl/strings/match.h" #include "absl/strings/str_join.h" -#include "boost/algorithm/string/predicate.hpp" #include "gflags/gflags.h" #include "google/protobuf/util/message_differencer.h" @@ -415,7 +415,7 @@ bool DataCollectorImpl::FetchBinlogUnlocked(const std::string& name, const std:: for (auto& p : fs::directory_iterator(binlog_dir)) { if (fs::is_regular_file(p)) { auto file_name = p.path().filename().string(); - if (!boost::ends_with(file_name, ".log")) { + if (!absl::EndsWith(file_name, ".log")) { continue; } auto src = binlog_path + file_name; diff --git a/src/tablet/file_sender.cc b/src/tablet/file_sender.cc index 851b28539c2..53890b4fcef 100644 --- a/src/tablet/file_sender.cc +++ b/src/tablet/file_sender.cc @@ -19,9 +19,9 @@ #include // NOLINT #include +#include "absl/strings/match.h" #include "base/file_util.h" #include "base/glog_wrapper.h" -#include "boost/algorithm/string/predicate.hpp" #include "common/timer.h" #include "gflags/gflags.h" #include "nameserver/system_table.h" @@ -124,7 +124,7 @@ int FileSender::SendFile(const std::string& file_name, const std::string& full_p } int FileSender::SendFile(const std::string& file_name, const std::string& dir_name, const std::string& full_path) { - if (!boost::ends_with(full_path, file_name)) { + if (!absl::EndsWith(full_path, file_name)) { PDLOG(WARNING, "invalid file[%s] path[%s]", file_name.c_str(), full_path.c_str()); return -1; }