Skip to content

Commit

Permalink
Fix cmake statobj for standalone version (#3574)
Browse files Browse the repository at this point in the history
* Fix cmake statobj for standalone version

* Fix counters

* fix logging

Co-authored-by: jie.wang <38901892+jievince@users.noreply.github.com>
  • Loading branch information
SuperYoko and jievince authored Dec 28, 2021
1 parent a89e5b3 commit 74464bf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/daemons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ nebula_add_executable(
SetupLogging.cpp
SetupBreakpad.cpp
OBJECTS
$<TARGET_OBJECTS:stats_def_obj>
$<TARGET_OBJECTS:graph_stats_obj>
$<TARGET_OBJECTS:meta_client_stats_obj>
$<TARGET_OBJECTS:storage_client_stats_obj>
$<TARGET_OBJECTS:util_obj>
$<TARGET_OBJECTS:service_obj>
$<TARGET_OBJECTS:graph_session_obj>
Expand Down
14 changes: 9 additions & 5 deletions src/daemons/StandAloneDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@
#include "common/ssl/SSLConfig.h"
#include "common/time/TimezoneInfo.h"
#include "common/utils/MetaKeyUtils.h"
#include "daemons/SetupLogging.h"
#include "folly/ScopeGuard.h"
#include "graph/service/GraphFlags.h"
#include "graph/service/GraphService.h"
#include "graph/stats/StatsDef.h"
#include "graph/stats/GraphStats.h"
#include "meta/MetaServiceHandler.h"
#include "meta/MetaVersionMan.h"
#include "meta/RootUserMan.h"
#include "meta/http/MetaHttpDownloadHandler.h"
#include "meta/http/MetaHttpIngestHandler.h"
#include "meta/http/MetaHttpReplaceHostHandler.h"
#include "meta/processors/job/JobManager.h"
#include "meta/stats/MetaStats.h"
#include "storage/StorageServer.h"
#include "storage/stats/StorageStats.h"
#include "version/Version.h"
#include "webservice/WebService.h"

Expand All @@ -50,7 +53,6 @@ void printHelp(const char *prog);
void stopAllDaemon();
static void signalHandler(int sig);
static Status setupSignalHandler();
extern Status setupLogging();
#if defined(__x86_64__)
extern Status setupBreakpad();
#endif
Expand Down Expand Up @@ -105,10 +107,12 @@ int main(int argc, char *argv[]) {
if (FLAGS_enable_ssl || FLAGS_enable_graph_ssl || FLAGS_enable_meta_ssl) {
folly::ssl::init();
}
nebula::initCounters();
nebula::initGraphStats();
nebula::initMetaStats();
nebula::initStorageStats();

// Setup logging
auto status = setupLogging();
auto status = setupLogging(argv[0]);
if (!status.ok()) {
LOG(ERROR) << status;
return EXIT_FAILURE;
Expand Down Expand Up @@ -437,7 +441,7 @@ void setupThreadManager() {
int numThreads =
FLAGS_num_worker_threads > 0 ? FLAGS_num_worker_threads : gServer->getNumIOWorkerThreads();
std::shared_ptr<apache::thrift::concurrency::ThreadManager> threadManager(
PriorityThreadManager::newPriorityThreadManager(numThreads, false /*stats*/));
PriorityThreadManager::newPriorityThreadManager(numThreads));
threadManager->setNamePrefix("executor");
threadManager->start();
gServer->setThreadManager(threadManager);
Expand Down

0 comments on commit 74464bf

Please sign in to comment.