支持多业务系统的配置并发进行同步
This commit is contained in:
@@ -18,8 +18,14 @@
|
||||
|
||||
#include "MESA_Monitor.h"
|
||||
|
||||
#include "doris_client.h"
|
||||
#include "doris_server_receive.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
#ifndef __FILENAME__
|
||||
#define __FILENAME__ __FILE__
|
||||
#endif
|
||||
@@ -27,9 +33,30 @@
|
||||
MESA_handle_runtime_log((handle), (lv), "DorisServer", "%s:%d, " fmt, __FILENAME__, __LINE__, ##args)
|
||||
|
||||
#define NIRVANA_CONFIG_FILE "./conf/doris_main.conf"
|
||||
#define MAX_BUSINESS_NUM 64
|
||||
|
||||
#define RECV_WAY_DRS_CLIENT 1
|
||||
#define RECV_WAY_IDX_FILE 2
|
||||
#define RECV_WAY_HTTP_POST 3
|
||||
|
||||
struct doris_business
|
||||
{
|
||||
char bizname[32];
|
||||
u_int32_t recv_way;
|
||||
u_int32_t write_file_sw;
|
||||
char recv_path_full[256];
|
||||
char recv_path_inc[256];
|
||||
char store_path_root[256];
|
||||
struct version_list_handle *cfgver_head;
|
||||
struct doris_parameter *param;
|
||||
|
||||
int64_t total_cfgnum;
|
||||
int32_t mm_latest_ver;
|
||||
int32_t mm_total_cfgnum;
|
||||
u_int32_t mm_status_codeid; //MM<4D>ڲ<EFBFBD><DAB2>쳣״̬id
|
||||
u_int32_t fs_lineid;
|
||||
pthread_rwlock_t rwlock;
|
||||
};
|
||||
|
||||
struct doris_global_info
|
||||
{
|
||||
@@ -38,15 +65,9 @@ struct doris_global_info
|
||||
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];
|
||||
@@ -55,15 +76,16 @@ struct doris_global_info
|
||||
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 doris_business business[MAX_BUSINESS_NUM];
|
||||
u_int32_t business_num;
|
||||
map<string, struct doris_business*> *name2business;
|
||||
map<string, struct doris_parameter *> *confile2param;
|
||||
|
||||
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;
|
||||
@@ -79,6 +101,7 @@ struct doris_global_info
|
||||
int32_t fsstat_dst_port;
|
||||
int32_t fsstat_field[DRS_FSSTAT_FIELD_NUM];
|
||||
int32_t fsstat_status[DRS_FSSTAT_STATUS_NUM];
|
||||
int32_t fsstat_column[DRS_FSSTAT_CLUMN_NUM];
|
||||
};
|
||||
|
||||
int doris_mkdir_according_path(const char * path);
|
||||
|
||||
Reference in New Issue
Block a user