OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
/home/jenkins-slave/workspace/core-os-doxygen/HeavyDB.cpp File Reference
#include "DataMgr/ForeignStorage/ForeignStorageInterface.h"
#include "ThriftHandler/DBHandler.h"
#include <thrift/concurrency/PlatformThreadFactory.h>
#include <thrift/concurrency/ThreadManager.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TThreadedServer.h>
#include <thrift/transport/TBufferTransports.h>
#include <thrift/transport/THttpServer.h>
#include <thrift/transport/TSSLServerSocket.h>
#include <thrift/transport/TSSLSocket.h>
#include <thrift/transport/TServerSocket.h>
#include "Shared/ThriftJSONProtocolInclude.h"
#include "Logger/Logger.h"
#include "Shared/SystemParameters.h"
#include "Shared/file_delete.h"
#include "Shared/heavyai_shared_mutex.h"
#include "Shared/scope.h"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/filesystem.hpp>
#include <boost/locale/generator.hpp>
#include <boost/make_shared.hpp>
#include <boost/program_options.hpp>
#include <csignal>
#include <cstdlib>
#include <sstream>
#include <thread>
#include <vector>
#include "MapDRelease.h"
#include "MigrationMgr/MigrationMgr.h"
#include "Shared/Compressor.h"
#include "ThriftHandler/ForeignTableRefreshScheduler.h"
+ Include dependency graph for HeavyDB.cpp:

Go to the source code of this file.

Namespaces

 anonymous_namespace{HeavyDB.cpp}
 

Functions

void anonymous_namespace{HeavyDB.cpp}::register_signal_handler (int signum, void(*handler)(int))
 
void anonymous_namespace{HeavyDB.cpp}::heavydb_signal_handler (int signum)
 
void anonymous_namespace{HeavyDB.cpp}::register_signal_handlers ()
 
void start_server (std::shared_ptr< TThreadedServer > server, const int port)
 
void releaseWarmupSession (TSessionId &sessionId, std::ifstream &query_file) noexcept
 
void run_warmup_queries (std::shared_ptr< DBHandler > handler, std::string base_path, std::string query_file_path)
 
void thrift_stop ()
 
void heartbeat ()
 
int startHeavyDBServer (CommandLineOptions &prog_config_opts, bool start_http_server=true)
 
int main (int argc, char **argv)
 

Variables

bool g_enable_thrift_logs
 
std::atomic< bool > g_running {true}
 
bool g_enable_http_binary_server
 
std::atomic< int > anonymous_namespace{HeavyDB.cpp}::g_saw_signal {-1}
 
std::shared_ptr< TThreadedServer > anonymous_namespace{HeavyDB.cpp}::g_thrift_http_server
 
std::shared_ptr< TThreadedServer > anonymous_namespace{HeavyDB.cpp}::g_thrift_http_binary_server
 
std::shared_ptr< TThreadedServer > anonymous_namespace{HeavyDB.cpp}::g_thrift_tcp_server
 
std::shared_ptr< DBHandleranonymous_namespace{HeavyDB.cpp}::g_warmup_handler
 
std::shared_ptr< DBHandleranonymous_namespace{HeavyDB.cpp}::g_db_handler
 
bool g_enable_fsi
 

Function Documentation

void heartbeat ( )

Definition at line 310 of file HeavyDB.cpp.

References g_running, anonymous_namespace{HeavyDB.cpp}::g_saw_signal, logger::INFO, LOG, run_benchmark_import::result, logger::shutdown(), thrift_stop(), and VLOG.

Referenced by startHeavyDBServer().

310  {
311 #ifndef _WIN32
312  // Block all signals for this heartbeat thread, only.
313  sigset_t set;
314  sigfillset(&set);
315  int result = pthread_sigmask(SIG_BLOCK, &set, NULL);
316  if (result != 0) {
317  throw std::runtime_error("heartbeat() thread startup failed");
318  }
319 #endif
320 
321  // Sleep until heavydb_signal_handler or anything clears the g_running flag.
322  VLOG(1) << "heartbeat thread starting";
323  while (::g_running) {
324  using namespace std::chrono;
325  std::this_thread::sleep_for(1s);
326  }
327  VLOG(1) << "heartbeat thread exiting";
328 
329  // Get the signal number if there was a signal.
330  int signum = g_saw_signal;
331  if (signum >= 1 && signum != SIGTERM) {
332  LOG(INFO) << "Interrupt signal (" << signum << ") received.";
333  }
334 
335  // If dumping core, try to do some quick stuff.
336  if (signum == SIGABRT || signum == SIGSEGV || signum == SIGFPE
337 #ifndef _WIN32
338  || signum == SIGQUIT
339 #endif
340  ) {
341  // Need to shut down calcite.
342  if (auto db_handler = g_db_handler; db_handler) {
343  db_handler->emergency_shutdown();
344  }
345  // Need to flush the logs for debugging.
347  return;
348  // Core dump should begin soon after this. See heavydb_signal_handler().
349  // We leave the rest of the server process as is for the core dump image.
350  }
351 
352  // Stopping the Thrift thread(s) will allow main() to return.
353  thrift_stop();
354 }
std::shared_ptr< DBHandler > g_db_handler
Definition: HeavyDB.cpp:94
#define LOG(tag)
Definition: Logger.h:216
std::atomic< int > g_saw_signal
Definition: HeavyDB.cpp:84
void shutdown()
Definition: Logger.cpp:344
std::atomic< bool > g_running
Definition: HeavyDB.cpp:78
#define VLOG(n)
Definition: Logger.h:316
void thrift_stop()
Definition: HeavyDB.cpp:292

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int main ( int  argc,
char **  argv 
)

Definition at line 612 of file HeavyDB.cpp.

References CommandLineOptions::parse_command_line(), startHeavyDBServer(), CommandLineOptions::validate(), and CommandLineOptions::validate_base_path().

612  {
613  bool has_clust_topo = false;
614 
615  CommandLineOptions prog_config_opts(argv[0], has_clust_topo);
616 
617  try {
618  if (auto return_code =
619  prog_config_opts.parse_command_line(argc, argv, !has_clust_topo)) {
620  return *return_code;
621  }
622 
623  if (!has_clust_topo) {
624  prog_config_opts.validate_base_path();
625  prog_config_opts.validate();
626  return (startHeavyDBServer(prog_config_opts));
627  }
628  } catch (std::runtime_error& e) {
629  std::cerr << "Server Error: " << e.what() << std::endl;
630  return 1;
631  } catch (boost::program_options::error& e) {
632  std::cerr << "Usage Error: " << e.what() << std::endl;
633  return 1;
634  }
635 }
int startHeavyDBServer(CommandLineOptions &prog_config_opts, bool start_http_server=true)
Definition: HeavyDB.cpp:380

+ Here is the call graph for this function:

void releaseWarmupSession ( TSessionId &  sessionId,
std::ifstream &  query_file 
)
noexcept

Definition at line 194 of file HeavyDB.cpp.

References logger::ERROR, and LOG.

Referenced by run_warmup_queries().

194  {
195  query_file.close();
196  if (sessionId != g_warmup_handler->getInvalidSessionId()) {
197  try {
198  g_warmup_handler->disconnect(sessionId);
199  } catch (...) {
200  LOG(ERROR) << "Failed to disconnect warmup session, possible failure to run warmup "
201  "queries.";
202  }
203  }
204 }
#define LOG(tag)
Definition: Logger.h:216
std::shared_ptr< DBHandler > g_warmup_handler
Definition: HeavyDB.cpp:90

+ Here is the caller graph for this function:

void run_warmup_queries ( std::shared_ptr< DBHandler handler,
std::string  base_path,
std::string  query_file_path 
)

Definition at line 206 of file HeavyDB.cpp.

References logger::INFO, LOG, releaseWarmupSession(), and logger::WARNING.

Referenced by startHeavyDBServer().

208  {
209  // run warmup queries to load cache if requested
210  if (query_file_path.empty()) {
211  return;
212  }
213  if (handler->isAggregator()) {
214  LOG(INFO) << "Skipping warmup query execution on the aggregator, queries should be "
215  "run directly on the leaf nodes.";
216  return;
217  }
218 
219  LOG(INFO) << "Running DB warmup with queries from " << query_file_path;
220  try {
221  g_warmup_handler = handler;
222  std::string db_info;
223  std::string user_keyword, user_name, db_name;
224  std::ifstream query_file;
227  TSessionId sessionId = g_warmup_handler->getInvalidSessionId();
228 
229  ScopeGuard session_guard = [&] { releaseWarmupSession(sessionId, query_file); };
230  query_file.open(query_file_path);
231  while (std::getline(query_file, db_info)) {
232  if (db_info.length() == 0) {
233  continue;
234  }
235  std::istringstream iss(db_info);
236  iss >> user_keyword >> user_name >> db_name;
237  if (user_keyword.compare(0, 4, "USER") == 0) {
238  // connect to DB for given user_name/db_name with super_user_rights (without
239  // password), & start session
240  g_warmup_handler->super_user_rights_ = true;
241  g_warmup_handler->connect(sessionId, user_name, "", db_name);
242  g_warmup_handler->super_user_rights_ = false;
243 
244  // read and run one query at a time for the DB with the setup connection
245  TQueryResult ret;
246  std::string single_query;
247  while (std::getline(query_file, single_query)) {
248  boost::algorithm::trim(single_query);
249  if (single_query.length() == 0 || single_query[0] == '-') {
250  continue;
251  }
252  if (single_query[0] == '}') {
253  single_query.clear();
254  break;
255  }
256  if (single_query.find(';') == single_query.npos) {
257  std::string multiline_query;
258  std::getline(query_file, multiline_query, ';');
259  single_query += multiline_query;
260  }
261 
262  try {
263  g_warmup_handler->sql_execute(ret, sessionId, single_query, true, "", -1, -1);
264  } catch (...) {
265  LOG(WARNING) << "Exception while executing '" << single_query
266  << "', ignoring";
267  }
268  single_query.clear();
269  }
270 
271  // stop session and disconnect from the DB
272  g_warmup_handler->disconnect(sessionId);
273  sessionId = g_warmup_handler->getInvalidSessionId();
274  } else {
275  LOG(WARNING) << "\nSyntax error in the file: " << query_file_path.c_str()
276  << " Missing expected keyword USER. Following line will be ignored: "
277  << db_info.c_str() << std::endl;
278  }
279  db_info.clear();
280  }
281  } catch (const std::exception& e) {
282  LOG(WARNING)
283  << "Exception while executing warmup queries. "
284  << "Warmup may not be fully completed. Will proceed nevertheless.\nError was: "
285  << e.what();
286  }
287 }
#define LOG(tag)
Definition: Logger.h:216
std::shared_ptr< DBHandler > g_warmup_handler
Definition: HeavyDB.cpp:90
void releaseWarmupSession(TSessionId &sessionId, std::ifstream &query_file) noexcept
Definition: HeavyDB.cpp:194

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void start_server ( std::shared_ptr< TThreadedServer >  server,
const int  port 
)

Definition at line 182 of file HeavyDB.cpp.

References logger::ERROR, and LOG.

Referenced by startHeavyDBServer().

182  {
183  try {
184  server->serve();
185  if (errno != 0) {
186  throw std::runtime_error(std::string("Thrift server exited: ") +
187  std::strerror(errno));
188  }
189  } catch (std::exception& e) {
190  LOG(ERROR) << "Exception: " << e.what() << ": port " << port << std::endl;
191  }
192 }
#define LOG(tag)
Definition: Logger.h:216

+ Here is the caller graph for this function:

int startHeavyDBServer ( CommandLineOptions prog_config_opts,
bool  start_http_server = true 
)

Definition at line 380 of file HeavyDB.cpp.

References CommandLineOptions::allow_loop_joins, CommandLineOptions::allow_multifrag, CommandLineOptions::authMetadata, CommandLineOptions::base_path, CommandLineOptions::db_leaves, CommandLineOptions::db_query_file, CommandLineOptions::disk_cache_config, CommandLineOptions::enable_auto_clear_render_mem, CommandLineOptions::enable_legacy_syntax, CommandLineOptions::enable_rendering, CommandLineOptions::exit_after_warmup, logger::FATAL, file_delete(), anonymous_namespace{HeavyDB.cpp}::g_db_handler, g_enable_http_binary_server, g_running, anonymous_namespace{HeavyDB.cpp}::g_saw_signal, heartbeat(), CommandLineOptions::http_binary_port, CommandLineOptions::http_port, CommandLineOptions::idle_session_duration, logger::INFO, omnisci_aws_sdk::init_sdk(), CommandLineOptions::intel_jit_profile, CommandLineOptions::jit_debug, shared::kDataDirectoryName, LOG, CommandLineOptions::log_user_origin, SystemParameters::master_address, CommandLineOptions::max_concurrent_render_sessions, CommandLineOptions::max_session_duration, CommandLineOptions::num_reader_threads, SystemParameters::omnisci_server_port, CommandLineOptions::read_only, anonymous_namespace{HeavyDB.cpp}::register_signal_handlers(), CommandLineOptions::render_compositor_use_last_gpu, CommandLineOptions::render_mem_bytes, CommandLineOptions::render_oom_retry_threshold, CommandLineOptions::renderer_prefer_igpu, CommandLineOptions::renderer_use_ppll_polys, CommandLineOptions::renderer_vulkan_timeout_ms, CommandLineOptions::reserved_gpu_mem, run_warmup_queries(), logger::shutdown(), omnisci_aws_sdk::shutdown_sdk(), SystemParameters::ssl_cert_file, SystemParameters::ssl_key_file, SystemParameters::ssl_transport_client_auth, foreign_storage::ForeignTableRefreshScheduler::start(), start_server(), foreign_storage::ForeignTableRefreshScheduler::stop(), CommandLineOptions::string_leaves, CommandLineOptions::system_parameters, thrift_stop(), CommandLineOptions::udf_compiler_options, CommandLineOptions::udf_compiler_path, CommandLineOptions::udf_file_name, and logger::WARNING.

Referenced by main().

381  {
382  // Prepare to launch the Thrift server.
383  LOG(INFO) << "HeavyDB starting up";
385 #ifdef HAVE_AWS_S3
387 #endif // HAVE_AWS_S3
388  std::set<std::unique_ptr<std::thread>> server_threads;
389  auto wait_for_server_threads = [&] {
390  for (auto& th : server_threads) {
391  try {
392  th->join();
393  } catch (const std::system_error& e) {
394  if (e.code() != std::errc::invalid_argument) {
395  LOG(WARNING) << "std::thread join failed: " << e.what();
396  }
397  } catch (const std::exception& e) {
398  LOG(WARNING) << "std::thread join failed: " << e.what();
399  } catch (...) {
400  LOG(WARNING) << "std::thread join failed";
401  }
402  }
403  };
404  ScopeGuard server_shutdown_guard = [&] {
405  // This function will never be called by exit(), but we shouldn't ever be calling
406  // exit(), we should be setting g_running to false instead.
407  LOG(INFO) << "HeavyDB shutting down";
408 
409  g_running = false;
410 
411  thrift_stop();
412 
413  g_db_handler.reset();
414 
415  wait_for_server_threads();
416 
417  if (g_enable_fsi) {
419  }
420 
421 #ifdef HAVE_AWS_S3
423 #endif // HAVE_AWS_S3
424 
425  // Flush the logs last to capture maximum debugging information.
427  };
428 
429  // start background thread to clean up _DELETE_ME files
430  const unsigned int wait_interval =
431  3; // wait time in secs after looking for deleted file before looking again
432  server_threads.insert(std::make_unique<std::thread>(
433  file_delete,
434  std::ref(g_running),
435  wait_interval,
436  prog_config_opts.base_path + "/" + shared::kDataDirectoryName));
437  server_threads.insert(std::make_unique<std::thread>(heartbeat));
438 
439  if (!g_enable_thrift_logs) {
440  apache::thrift::GlobalOutput.setOutputFunction([](const char* msg) {});
441  }
442 
443  // Thrift event handler for database server setup.
444  try {
445  if (prog_config_opts.system_parameters.master_address.empty()) {
446  // Handler for a single database server. (DBHandler)
447  g_db_handler =
448  std::make_shared<DBHandler>(prog_config_opts.db_leaves,
449  prog_config_opts.string_leaves,
450  prog_config_opts.base_path,
451  prog_config_opts.allow_multifrag,
452  prog_config_opts.jit_debug,
453  prog_config_opts.intel_jit_profile,
454  prog_config_opts.read_only,
455  prog_config_opts.allow_loop_joins,
456  prog_config_opts.enable_rendering,
457  prog_config_opts.renderer_use_ppll_polys,
458  prog_config_opts.renderer_prefer_igpu,
459  prog_config_opts.renderer_vulkan_timeout_ms,
460  prog_config_opts.enable_auto_clear_render_mem,
461  prog_config_opts.render_oom_retry_threshold,
462  prog_config_opts.render_mem_bytes,
463  prog_config_opts.max_concurrent_render_sessions,
464  prog_config_opts.reserved_gpu_mem,
465  prog_config_opts.render_compositor_use_last_gpu,
466  prog_config_opts.num_reader_threads,
467  prog_config_opts.authMetadata,
468  prog_config_opts.system_parameters,
469  prog_config_opts.enable_legacy_syntax,
470  prog_config_opts.idle_session_duration,
471  prog_config_opts.max_session_duration,
472  prog_config_opts.udf_file_name,
473  prog_config_opts.udf_compiler_path,
474  prog_config_opts.udf_compiler_options,
475 #ifdef ENABLE_GEOS
476  prog_config_opts.libgeos_so_filename,
477 #endif
478  prog_config_opts.disk_cache_config,
479  false);
480  } else { // running ha server
481  LOG(FATAL)
482  << "No High Availability module available, please contact OmniSci support";
483  }
484  } catch (const std::exception& e) {
485  LOG(FATAL) << "Failed to initialize service handler: " << e.what();
486  }
487 
488  if (g_enable_fsi) {
490  }
491 
492  // TCP port setup. We use Thrift both for a TCP socket and for an optional HTTP socket.
493  std::shared_ptr<TServerSocket> tcp_socket;
494  std::shared_ptr<TServerSocket> http_socket;
495  std::shared_ptr<TServerSocket> http_binary_socket;
496 
497  if (!prog_config_opts.system_parameters.ssl_cert_file.empty() &&
498  !prog_config_opts.system_parameters.ssl_key_file.empty()) {
499  // SSL port setup.
500  auto sslSocketFactory = std::make_shared<TSSLSocketFactory>(SSLProtocol::SSLTLS);
501  sslSocketFactory->loadCertificate(
502  prog_config_opts.system_parameters.ssl_cert_file.c_str());
503  sslSocketFactory->loadPrivateKey(
504  prog_config_opts.system_parameters.ssl_key_file.c_str());
505  if (prog_config_opts.system_parameters.ssl_transport_client_auth) {
506  sslSocketFactory->authenticate(true);
507  } else {
508  sslSocketFactory->authenticate(false);
509  }
510  sslSocketFactory->ciphers("ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH");
511  tcp_socket = std::make_shared<TSSLServerSocket>(
512  prog_config_opts.system_parameters.omnisci_server_port, sslSocketFactory);
513  if (start_http_server) {
514  http_socket = std::make_shared<TSSLServerSocket>(prog_config_opts.http_port,
515  sslSocketFactory);
516  }
518  http_binary_socket = std::make_shared<TSSLServerSocket>(
519  prog_config_opts.http_binary_port, sslSocketFactory);
520  }
521  LOG(INFO) << " HeavyDB server using encrypted connection. Cert file ["
522  << prog_config_opts.system_parameters.ssl_cert_file << "], key file ["
523  << prog_config_opts.system_parameters.ssl_key_file << "]";
524 
525  } else {
526  // Non-SSL port setup.
527  LOG(INFO) << " HeavyDB server using unencrypted connection";
528  tcp_socket = std::make_shared<TServerSocket>(
529  prog_config_opts.system_parameters.omnisci_server_port);
530  if (start_http_server) {
531  http_socket = std::make_shared<TServerSocket>(prog_config_opts.http_port);
532  }
534  http_binary_socket =
535  std::make_shared<TServerSocket>(prog_config_opts.http_binary_port);
536  }
537  }
538 
539  // Thrift uses the same processor for both the TCP port and the HTTP port.
540  std::shared_ptr<TProcessor> processor{std::make_shared<TrackingProcessor>(
541  g_db_handler, prog_config_opts.log_user_origin)};
542 
543  // Thrift TCP server launch.
544  std::shared_ptr<TServerTransport> tcp_st = tcp_socket;
545 #ifdef HAVE_THRIFT_MESSAGE_LIMIT
546  std::shared_ptr<TTransportFactory> tcp_tf{
547  std::make_shared<UnboundedTBufferedTransportFactory>()};
548 #else
549  std::shared_ptr<TTransportFactory> tcp_tf{
550  std::make_shared<TBufferedTransportFactory>()};
551 #endif
552  std::shared_ptr<TProtocolFactory> tcp_pf{std::make_shared<TBinaryProtocolFactory>()};
553  g_thrift_tcp_server.reset(new TThreadedServer(processor, tcp_st, tcp_tf, tcp_pf));
554  server_threads.insert(std::make_unique<std::thread>(
555  start_server,
557  prog_config_opts.system_parameters.omnisci_server_port));
558 
559  // Thrift HTTP server launch.
560  if (start_http_server) {
561  std::shared_ptr<TServerTransport> http_st = http_socket;
562 #ifdef HAVE_THRIFT_MESSAGE_LIMIT
563  std::shared_ptr<TTransportFactory> http_tf{
564  std::make_shared<UnboundedTHttpServerTransportFactory>()};
565 #else
566  std::shared_ptr<TTransportFactory> http_tf{
567  std::make_shared<THttpServerTransportFactory>()};
568 #endif
569  std::shared_ptr<TProtocolFactory> http_pf{std::make_shared<TJSONProtocolFactory>()};
570  g_thrift_http_server.reset(new TThreadedServer(processor, http_st, http_tf, http_pf));
571  server_threads.insert(std::make_unique<std::thread>(
572  start_server, g_thrift_http_server, prog_config_opts.http_port));
573  }
574 
575  // Thrift HTTP binary protocol server launch.
577  std::shared_ptr<TServerTransport> http_binary_st = http_binary_socket;
578 #ifdef HAVE_THRIFT_MESSAGE_LIMIT
579  std::shared_ptr<TTransportFactory> http_binary_tf{
580  std::make_shared<UnboundedTHttpServerTransportFactory>()};
581 #else
582  std::shared_ptr<TTransportFactory> http_binary_tf{
583  std::make_shared<THttpServerTransportFactory>()};
584 #endif
585  std::shared_ptr<TProtocolFactory> http_binary_pf{
586  std::make_shared<TBinaryProtocolFactory>()};
588  new TThreadedServer(processor, http_binary_st, http_binary_tf, http_binary_pf));
589  server_threads.insert(std::make_unique<std::thread>(
591  }
592 
593  // Run warm up queries if any exist.
595  g_db_handler, prog_config_opts.base_path, prog_config_opts.db_query_file);
596  if (prog_config_opts.exit_after_warmup) {
597  g_running = false;
598  }
599 
600  // Main thread blocks for as long as the servers are running.
601  wait_for_server_threads();
602 
603  // Clean shutdown.
604  int signum = g_saw_signal;
605  if (signum <= 0 || signum == SIGTERM) {
606  return 0;
607  } else {
608  return signum;
609  }
610 }
const std::string kDataDirectoryName
void run_warmup_queries(std::shared_ptr< DBHandler > handler, std::string base_path, std::string query_file_path)
Definition: HeavyDB.cpp:206
unsigned renderer_vulkan_timeout_ms
std::vector< LeafHostInfo > string_leaves
std::string udf_compiler_path
std::shared_ptr< DBHandler > g_db_handler
Definition: HeavyDB.cpp:94
#define LOG(tag)
Definition: Logger.h:216
void heartbeat()
Definition: HeavyDB.cpp:310
void start_server(std::shared_ptr< TThreadedServer > server, const int port)
Definition: HeavyDB.cpp:182
std::shared_ptr< TThreadedServer > g_thrift_http_binary_server
Definition: HeavyDB.cpp:87
std::atomic< int > g_saw_signal
Definition: HeavyDB.cpp:84
size_t max_concurrent_render_sessions
std::vector< LeafHostInfo > db_leaves
bool g_enable_http_binary_server
std::shared_ptr< TThreadedServer > g_thrift_http_server
Definition: HeavyDB.cpp:86
std::string ssl_key_file
AuthMetadata authMetadata
static void start(std::atomic< bool > &is_program_running)
void shutdown()
Definition: Logger.cpp:344
std::vector< std::string > udf_compiler_options
std::atomic< bool > g_running
Definition: HeavyDB.cpp:78
File_Namespace::DiskCacheConfig disk_cache_config
void file_delete(std::atomic< bool > &program_is_running, const unsigned int wait_interval_seconds, const std::string base_path)
Definition: File.cpp:289
bool g_enable_fsi
Definition: Catalog.cpp:96
bool g_enable_thrift_logs
Definition: HeavyDB.cpp:289
void thrift_stop()
Definition: HeavyDB.cpp:292
std::string master_address
std::shared_ptr< TThreadedServer > g_thrift_tcp_server
Definition: HeavyDB.cpp:88
SystemParameters system_parameters
std::string ssl_cert_file

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void thrift_stop ( )

Definition at line 292 of file HeavyDB.cpp.

Referenced by heartbeat(), and startHeavyDBServer().

292  {
293  if (auto thrift_http_server = g_thrift_http_server; thrift_http_server) {
294  thrift_http_server->stop();
295  }
296  g_thrift_http_server.reset();
297 
298  if (auto thrift_http_binary_server = g_thrift_http_binary_server;
299  thrift_http_binary_server) {
300  thrift_http_binary_server->stop();
301  }
303 
304  if (auto thrift_tcp_server = g_thrift_tcp_server; thrift_tcp_server) {
305  thrift_tcp_server->stop();
306  }
307  g_thrift_tcp_server.reset();
308 }
std::shared_ptr< TThreadedServer > g_thrift_http_binary_server
Definition: HeavyDB.cpp:87
std::shared_ptr< TThreadedServer > g_thrift_http_server
Definition: HeavyDB.cpp:86
std::shared_ptr< TThreadedServer > g_thrift_tcp_server
Definition: HeavyDB.cpp:88

+ Here is the caller graph for this function:

Variable Documentation

bool g_enable_fsi

Definition at line 96 of file Catalog.cpp.

bool g_enable_http_binary_server
bool g_enable_thrift_logs

Definition at line 289 of file HeavyDB.cpp.

std::atomic<bool> g_running {true}