diff --git a/core/channel/channel_store_base.cpp b/core/channel/channel_store_base.cpp index 8ec0935..b180617 100644 --- a/core/channel/channel_store_base.cpp +++ b/core/channel/channel_store_base.cpp @@ -52,7 +52,7 @@ void ChannelStoreBase::drop_channel(const size_t id) { void ChannelStoreBase::drop_channel(const std::string& channel_name) { ChannelNameMap& channel_map = get_channel_name_map(); if (channel_map.find(channel_name) == channel_map.end()) - throw base::HuskyException("ChannelStoreBase::drop_channel: Channel name "+channel_name+" doesn't exist"); + throw base::HuskyException("ChannelStoreBase::drop_channel: Channel name " + channel_name + " doesn't exist"); drop_channel(channel_map.at(channel_name)->get_channel_id()); channel_map.erase(channel_name); @@ -84,9 +84,7 @@ void ChannelStoreBase::free_channel_map() { s_channel_name_map = nullptr; } -ChannelIdMap& ChannelStoreBase::get_channel_map() { - return get_channel_id_map(); -} +ChannelIdMap& ChannelStoreBase::get_channel_map() { return get_channel_id_map(); } ChannelIdMap& ChannelStoreBase::get_channel_id_map() { init_channel_map(); diff --git a/core/channel/channel_store_base.hpp b/core/channel/channel_store_base.hpp index 70331b9..bca7d3c 100644 --- a/core/channel/channel_store_base.hpp +++ b/core/channel/channel_store_base.hpp @@ -42,9 +42,10 @@ class ChannelStoreBase { } template - static PushChannel& create_push_channel(ChannelSource& src_list, ObjList& dst_list, const std::string& channel_name) { + static PushChannel& create_push_channel(ChannelSource& src_list, ObjList& dst_list, + const std::string& channel_name) { if (has_channel(channel_name)) { - throw base::HuskyException("A Channel named "+channel_name+" already exists."); + throw base::HuskyException("A Channel named " + channel_name + " already exists."); } auto& channel = create_push_channel(src_list, dst_list); get_channel_name_map().insert({channel_name, &channel}); @@ -70,7 +71,7 @@ class ChannelStoreBase { ObjList& dst_list, const std::string& channel_name) { if (has_channel(channel_name)) { - throw base::HuskyException("A Channel named "+channel_name+" already exists."); + throw base::HuskyException("A Channel named " + channel_name + " already exists."); } auto& channel = create_push_combined_channel(src_list, dst_list); get_channel_name_map().insert({channel_name, &channel}); diff --git a/core/objlist_store.cpp b/core/objlist_store.cpp index e6cc088..9b1b33d 100644 --- a/core/objlist_store.cpp +++ b/core/objlist_store.cpp @@ -86,9 +86,7 @@ void ObjListStore::free_objlist_map() { s_objlist_name_map = nullptr; } -ObjListIdMap& ObjListStore::get_objlist_map() { - return get_objlist_id_map(); -} +ObjListIdMap& ObjListStore::get_objlist_map() { return get_objlist_id_map(); } ObjListIdMap& ObjListStore::get_objlist_id_map() { init_objlist_map(); diff --git a/core/objlist_store.hpp b/core/objlist_store.hpp index 97dfd65..2a9d1ab 100644 --- a/core/objlist_store.hpp +++ b/core/objlist_store.hpp @@ -41,7 +41,7 @@ class ObjListStore { static ObjList& create_objlist(const std::string& list_name) { ObjListNameMap& objlist_name_map = get_objlist_name_map(); if (has_objlist(list_name)) { - throw base::HuskyException("A ObjList named "+list_name+" already exists."); + throw base::HuskyException("A ObjList named " + list_name + " already exists."); } auto& objlist = create_objlist(); objlist_name_map.insert({list_name, &objlist}); diff --git a/examples/wc_mr.cpp b/examples/wc_mr.cpp index a0674aa..98db3ef 100644 --- a/examples/wc_mr.cpp +++ b/examples/wc_mr.cpp @@ -12,7 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include #include +#include #include #include "boost/tokenizer.hpp" diff --git a/io/input/flume_inputformat.cpp b/io/input/flume_inputformat.cpp index 90cc093..208197c 100644 --- a/io/input/flume_inputformat.cpp +++ b/io/input/flume_inputformat.cpp @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "io/input/flume_inputformat.hpp" + #include #include #include @@ -30,12 +32,11 @@ #include "base/log.hpp" #include "boost/utility/string_ref.hpp" #include "core/context.hpp" -#include "io/input/flume_inputformat.hpp" -using namespace ::apache::thrift; -using namespace ::apache::thrift::protocol; -using namespace ::apache::thrift::transport; -using namespace ::apache::thrift::server; +using namespace ::apache::thrift; // NOLINT(build/namespaces) +using namespace ::apache::thrift::protocol; // NOLINT(build/namespaces) +using namespace ::apache::thrift::transport; // NOLINT(build/namespaces) +using namespace ::apache::thrift::server; // NOLINT(build/namespaces) using boost::shared_ptr; diff --git a/io/input/flume_inputformat.hpp b/io/input/flume_inputformat.hpp index 936e7ae..1750f43 100644 --- a/io/input/flume_inputformat.hpp +++ b/io/input/flume_inputformat.hpp @@ -28,10 +28,10 @@ #include "boost/utility/string_ref.hpp" #include "io/input/inputformat_base.hpp" -using namespace ::apache::thrift; -using namespace ::apache::thrift::protocol; -using namespace ::apache::thrift::transport; -using namespace ::apache::thrift::server; +using namespace ::apache::thrift; // NOLINT(build/namespaces) +using namespace ::apache::thrift::protocol; // NOLINT(build/namespaces) +using namespace ::apache::thrift::transport; // NOLINT(build/namespaces) +using namespace ::apache::thrift::server; // NOLINT(build/namespaces) using boost::shared_ptr; diff --git a/lib/aggregator_factory.cpp b/lib/aggregator_factory.cpp index 99df0db..fc4e2fd 100644 --- a/lib/aggregator_factory.cpp +++ b/lib/aggregator_factory.cpp @@ -96,9 +96,7 @@ AggregatorFactory::InnerSharedData* AggregatorFactory::create_shared_data() { re void AggregatorFactory::wait_for_others() { shared_->barrier.wait(get_num_local_factory()); } -void AggregatorFactory::call_once(const std::function& lambda) { - shared_->call_once_each_time(lambda); -} +void AggregatorFactory::call_once(const std::function& lambda) { shared_->call_once_each_time(lambda); } void AggregatorFactory::init_factory() { AggregatorFactoryBase::init_factory();