be/src/kudu/rpc/messenger.cc
Status Messenger::RegisterService(const string& service_name,
                                  const scoped_refptr<RpcService>& service) {
  DCHECK(service);
  std::lock_guard<percpu_rwlock> guard(lock_);
  if (InsertIfNotPresent(&rpc_services_, service_name, service)) {
    return Status::OK();
  } else {
    return Status::AlreadyPresent("This service is already present");
  }
}
// Register a new RpcService to handle inbound requests.
Register a new RpcService to handle inbound requests.
Register a new RpcService to handle inbound requests .
Status Messenger::RegisterService(const string& service_name,
                                  const scoped_refptr<RpcService>& service) {
  DCHECK(service);
  std::lock_guard<percpu_rwlock> guard(lock_);
  if (InsertIfNotPresent(&rpc_services_, service_name, service)) {
    return Status::OK();
  } else {
    return Status::AlreadyPresent("This service is already present");
  }
}
Status Messenger :: RegisterService ( const string & service_name , const scoped_refptr < RpcService > & service ) { DCHECK ( service ) ; std :: lock_guard < percpu_rwlock > guard ( lock_ ) ; if ( InsertIfNotPresent ( & rpc_services_ , service_name , service ) ) { return Status :: OK ( ) ; } else { return Status :: AlreadyPresent ( " " ) ; } }
Register a new RpcService to handle inbound requests.
Register a new RpcService to handle inbound requests .