2424#include < memory>
2525#include < random>
2626
27+ #include " absl/strings/strip.h"
28+ #include " absl/strings/str_split.h"
2729#include " base/file_util.h"
2830#include " base/glog_wrapper.h"
2931#include " base/hash.h"
3840#endif
3941#include " apiserver/api_server_impl.h"
4042#include " auth/brpc_authenticator.h"
41- #include " boost/algorithm/string.hpp"
4243#include " boost/lexical_cast.hpp"
4344#include " brpc/server.h"
4445#include " client/ns_client.h"
@@ -371,8 +372,7 @@ int SplitPidGroup(const std::string& pid_group, std::set<uint32_t>& pid_set) {
371372 if (::openmldb::base::IsNumber (pid_group)) {
372373 pid_set.insert (boost::lexical_cast<uint32_t >(pid_group));
373374 } else if (pid_group.find (' -' ) != std::string::npos) {
374- std::vector<std::string> vec;
375- boost::split (vec, pid_group, boost::is_any_of (" -" ));
375+ std::vector<std::string> vec = absl::StrSplit (pid_group, " -" );
376376 if (vec.size () != 2 || !::openmldb::base::IsNumber (vec[0 ]) || !::openmldb::base::IsNumber (vec[1 ])) {
377377 return -1 ;
378378 }
@@ -383,8 +383,7 @@ int SplitPidGroup(const std::string& pid_group, std::set<uint32_t>& pid_set) {
383383 start_index++;
384384 }
385385 } else if (pid_group.find (' ,' ) != std::string::npos) {
386- std::vector<std::string> vec;
387- boost::split (vec, pid_group, boost::is_any_of (" ," ));
386+ std::vector<std::string> vec = absl::StrSplit (pid_group, " ," );
388387 for (const auto & pid_str : vec) {
389388 if (!::openmldb::base::IsNumber (pid_str)) {
390389 return -1 ;
@@ -3630,7 +3629,7 @@ void StartClient() {
36303629 }
36313630 if (line[0 ] != ' \0 ' && line[0 ] != ' /' ) {
36323631 buffer.assign (line);
3633- boost::trim ( buffer);
3632+ absl::StripAsciiWhitespace (& buffer);
36343633 if (!buffer.empty ()) {
36353634 ::openmldb::base::linenoiseHistoryAdd (line);
36363635 }
@@ -3780,7 +3779,7 @@ void StartNsClient() {
37803779
37813780 if (line[0 ] != ' \0 ' && line[0 ] != ' /' ) {
37823781 buffer.assign (line);
3783- boost::trim ( buffer);
3782+ absl::StripAsciiWhitespace (& buffer);
37843783 if (!buffer.empty ()) {
37853784 ::openmldb::base::linenoiseHistoryAdd (line);
37863785 }
@@ -3909,8 +3908,7 @@ void StartAPIServer() {
39093908
39103909 auto api_service = std::make_unique<::openmldb::apiserver::APIServerImpl>(real_endpoint);
39113910 if (!FLAGS_nameserver.empty ()) {
3912- std::vector<std::string> vec;
3913- boost::split (vec, FLAGS_nameserver, boost::is_any_of (" :" ));
3911+ std::vector<std::string> vec = absl::StrSplit (FLAGS_nameserver, " :" );
39143912 if (vec.size () != 2 ) {
39153913 PDLOG (WARNING, " Invalid nameserver format" );
39163914 exit (1 );
0 commit comments