This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
doris-doris-dispatch/server/doris_server_main.h
2021-07-19 17:21:38 +08:00

88 lines
1.9 KiB
C

#ifndef __DORIS_SERVER_MAIN_H__
#define __DORIS_SERVER_MAIN_H__
#include <openssl/ssl.h>
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <openssl/rsa.h>
#include <pthread.h>
#include <event.h>
#include <evhttp.h>
#include <MESA/field_stat2.h>
#include <MESA/MESA_htable.h>
#include <MESA/MESA_handle_logger.h>
#include "MESA_Monitor.h"
#include "doris_server_receive.h"
#ifndef __FILENAME__
#define __FILENAME__ __FILE__
#endif
#define MESA_RUNTIME_LOGV3(handle, lv, fmt, args...) \
MESA_handle_runtime_log((handle), (lv), "DorisServer", "%s:%d, " fmt, __FILENAME__, __LINE__, ##args)
#define NIRVANA_CONFIG_FILE "./conf/doris_main.conf"
#define RECV_WAY_DRS_CLIENT 1
#define RECV_WAY_IDX_FILE 2
struct doris_global_info
{
u_int32_t iothreads;
int32_t server_port;
int32_t manager_port;
int32_t sock_recv_bufsize;
u_int32_t ssl_conn_on;
u_int32_t recv_way;
char recv_path_full[256];
char recv_path_inc[256];
char store_path_root[256];
char store_path_inc[256];
u_int32_t scan_idx_interval;
u_int32_t cache_frag_size;
u_int32_t server_role_sw;
u_int32_t write_file_sw;
char ssl_CA_path[256];
char ssl_cert_file[256];
char ssl_key_file[256];
char ssl_key_passwd[64];
pthread_mutex_t *lock_cs;
SSL_CTX *ssl_instance;
struct version_list_handle *cfgver_head;
evutil_socket_t listener;
evutil_socket_t manager;
pthread_rwlock_t rwlock;
struct MESA_MonitorHandler *monitor;
int32_t mm_latest_ver;
int32_t mm_total_cfgnum;
/*logs*/
u_int32_t log_level;
u_int32_t statistic_period;
char root_log_dir[256];
void *log_runtime;
screen_stat_handle_t fsstat_handle;
char fsstat_dst_ip[64];
char fsstat_appname[16];
char fsstat_filepath[256];
u_int32_t fsstat_period;
int32_t fsstat_print_mode;
int32_t fsstat_dst_port;
int32_t fsstat_field[DRS_FSSTAT_FIELD_NUM];
int32_t fsstat_status[DRS_FSSTAT_STATUS_NUM];
};
int doris_mkdir_according_path(const char * path);
#endif