OmniSciDB
a5dc49c757
|
#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/misc.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 "Catalog/AlterColumnRecovery.h"
#include "MigrationMgr/MigrationMgr.h"
#include "Shared/Compressor.h"
#include "ThriftHandler/ForeignTableRefreshScheduler.h"
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) |
void | log_startup_info () |
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< DBHandler > | anonymous_namespace{HeavyDB.cpp}::g_warmup_handler |
std::shared_ptr< DBHandler > | anonymous_namespace{HeavyDB.cpp}::g_db_handler |
bool | g_enable_fsi |
bool | g_enable_foreign_table_scheduled_refresh |
void heartbeat | ( | ) |
Definition at line 320 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().
void log_startup_info | ( | ) |
Definition at line 643 of file HeavyDB.cpp.
References VLOG.
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 651 of file HeavyDB.cpp.
References log_startup_info(), CommandLineOptions::parse_command_line(), startHeavyDBServer(), CommandLineOptions::validate(), and CommandLineOptions::validate_base_path().
|
noexcept |
Definition at line 203 of file HeavyDB.cpp.
References logger::ERROR, and LOG.
Referenced by run_warmup_queries().
void run_warmup_queries | ( | std::shared_ptr< DBHandler > | handler, |
std::string | base_path, | ||
std::string | query_file_path | ||
) |
Definition at line 215 of file HeavyDB.cpp.
References logger::INFO, LOG, releaseWarmupSession(), and logger::WARNING.
Referenced by startHeavyDBServer().
void start_server | ( | std::shared_ptr< TThreadedServer > | server, |
const int | port | ||
) |
Definition at line 191 of file HeavyDB.cpp.
References logger::ERROR, and LOG.
Referenced by startHeavyDBServer().
int startHeavyDBServer | ( | CommandLineOptions & | prog_config_opts, |
bool | start_http_server = true |
||
) |
Definition at line 390 of file HeavyDB.cpp.
References CommandLineOptions::allow_loop_joins, CommandLineOptions::allow_multifrag, CommandLineOptions::authMetadata, CommandLineOptions::base_path, Catalog_Namespace::SysCatalog::checkDropRenderGroupColumnsMigration(), cpu_threads(), 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, threading_tbb::g_tbb_arena, heartbeat(), CommandLineOptions::http_binary_port, CommandLineOptions::http_port, CommandLineOptions::idle_session_duration, logger::INFO, heavydb_aws_sdk::init_sdk(), Catalog_Namespace::SysCatalog::instance(), 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_enable_slab_allocation, CommandLineOptions::renderer_prefer_igpu, CommandLineOptions::renderer_use_parallel_executors, CommandLineOptions::renderer_vulkan_timeout_ms, CommandLineOptions::reserved_gpu_mem, AlterTableAlterColumnCommandRecoveryMgr::resolveIncompleteAlterColumnCommandsForAllCatalogs(), run_warmup_queries(), logger::shutdown(), heavydb_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().
void thrift_stop | ( | ) |
Definition at line 302 of file HeavyDB.cpp.
Referenced by heartbeat(), and startHeavyDBServer().
bool g_enable_foreign_table_scheduled_refresh |
Definition at line 23 of file ForeignTableRefreshScheduler.cpp.
Referenced by CommandLineOptions::fillDeveloperOptions(), and CommandLineOptions::validate().
bool g_enable_fsi |
Definition at line 96 of file Catalog.cpp.
bool g_enable_http_binary_server |
Definition at line 94 of file CommandLineOptions.cpp.
Referenced by CommandLineOptions::fillDeveloperOptions(), and startHeavyDBServer().
bool g_enable_thrift_logs |
Definition at line 298 of file HeavyDB.cpp.
std::atomic<bool> g_running {true} |
Definition at line 87 of file HeavyDB.cpp.
Referenced by heartbeat(), anonymous_namespace{HeavyDB.cpp}::heavydb_signal_handler(), and startHeavyDBServer().