diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 60 |
1 files changed, 30 insertions, 30 deletions
@@ -70,20 +70,20 @@ void frag_rssb_history() //2017.03.03 v1.0 1, monitor: data_flag, not hitservice //2017.03.06 v1.0 1. av_dedup , set media_len //2017.03.09 v2.0 use redis to query - //2017.03.14 v2.0 1. mulit-bizman ���bizman��������,���߳�������һ�£������˿�BizmanPort->BizmanPort+thread_num-1 - //2. json to kafka ����ƿװ��Ϣ��JSON�ļ��ش���KAFKA������ý����� - //3. redis connect bug ���redis �δ�������� - //4. send mateinfo add localIP �ش���Ԫ��Ϣ����IPѡ�� - //2017.03.15 v2.0 �ϲ������ڴ�汾 + //2017.03.14 v2.0 1. mulit-bizman ���bizman��������,���߳�������һ�£������˿�BizmanPort->BizmanPort+thread_num-1 + //2. json to kafka ����ƿװ��Ϣ��JSON�ļ��ش���KAFKA������ý����� + //3. redis connect bug ���redis �δ�������� + //4. send mateinfo add localIP �ش���Ԫ��Ϣ����IPѡ�� + //2017.03.15 v2.0 �ϲ������ڴ�汾 //2017.02.14 v1.0 alter unix socket to usm by dumeijie //2017.03.09 v1.0 add lqnum opt by dumeijie //2017.03.14 v1.0 support switch usm or unix socket //2017.03.16 V2.0 - //fuzzy_hash���ӿ���FuzzyDigestSwitch - //û��Ԫ��Ϣ������frag_unit + //fuzzy_hash���ӿ���FuzzyDigestSwitch + //û��Ԫ��Ϣ������frag_unit //hash thread_safe = 512 //2017.03.17 V2.0 - //JSON���ӿ��� + //JSON���ӿ��� //2017.03.28 V2.0 //log file open and close thread safe //query fail or succ when once and twice @@ -268,7 +268,6 @@ int dedup_read_conf_and_init(const char* filename) return -1; } - MESA_load_profile_short_def(filename, "DEDUP", "AVDedupSwitch", (short*)&g_frag_cfg.av_dedup_switch,0); MESA_load_profile_short_def(filename, "DEDUP", "AVDedupInvalid", (short*)&g_frag_cfg.dedup_invalid,0); MESA_load_profile_uint_def(filename, "DEDUP", "DedupTdDataSize", (uint32_t*)&g_frag_cfg.td_data_maxsize, 1024); MESA_load_profile_short_def(filename, "DEDUP", "MultiWaitTimeout", (short*)&g_frag_cfg.multisrc_wait_timeout, 30); @@ -299,7 +298,7 @@ int dedup_read_conf_and_init(const char* filename) } } /*LocalIP for thrift*/ - g_frag_run.dedup_hd = soqav_dedup_plug_init(addr_array, dedup_ipnum, g_frag_cfg.local_ip_nr, g_frag_cfg.fwd_ip_nr, g_frag_cfg.thread_num, g_frag_run.dedup_logger); + //g_frag_run.dedup_hd = soqav_dedup_plug_init(addr_array, dedup_ipnum, g_frag_cfg.local_ip_nr, g_frag_cfg.fwd_ip_nr, g_frag_cfg.thread_num, g_frag_run.dedup_logger); if(NULL!=dedup_ip_serial) { free(dedup_ip_serial); @@ -310,6 +309,7 @@ int dedup_read_conf_and_init(const char* filename) free(addr_array); addr_array = NULL; } + /* value = 0; MESA_load_profile_int_def(filename, "DEDUP", "DedupBalanceNum", &value, 1000); soqav_dedup_set_opt(g_frag_run.dedup_hd, DEDUP_TYPE_BALANCE_NUM, &value, sizeof(value)); @@ -321,7 +321,7 @@ int dedup_read_conf_and_init(const char* filename) soqav_dedup_set_opt(g_frag_run.dedup_hd, DEDUP_TYPE_THRIFT_TIME, &value, sizeof(value)); MESA_load_profile_int_def(filename, "DEDUP", "DedupHtableArg", &value, 1000); soqav_dedup_set_opt(g_frag_run.dedup_hd, DEDUP_TYPE_HTABLE_ARG, &value, sizeof(value)); - +*/ g_frag_run.cpz_send_bizman = bizman_get_handle(); bizman_set_handle(g_frag_run.cpz_send_bizman, BIZMAN_SENDER_ACTIVE); bizman_init_handle(g_frag_run.cpz_send_bizman); @@ -331,7 +331,7 @@ int dedup_read_conf_and_init(const char* filename) int multimedia_read_conf_and_init(const char* filename) { MESA_load_profile_short_def(filename, "MULTIMEDIA", "MediaJSONSwitch", (short*)&g_frag_cfg.media_json_switch,0); - // Kafka��ʼ�� + // Kafka��ʼ�� if(MESA_load_profile_string_nodef(filename, "MULTIMEDIA", "MediaJSONKafkaBrokers", g_frag_cfg.kafka_brokers, sizeof(g_frag_cfg.kafka_brokers))<0) { printf("get [NETWORK]KafkaBrokers error.\n"); @@ -361,7 +361,7 @@ int multimedia_read_conf_and_init(const char* filename) "{%s:%d} KafkaConnection %s succ.", __FILE__,__LINE__, g_frag_cfg.kafka_brokers); } - //����topic + //����topic if((g_frag_run.kafka_producer->CreateTopicHandle(TOPIC_MEDIA_CREATE_JSON)) == NULL) { printf("Kafka CreateTopicHandle %s failed.", TOPIC_MEDIA_CREATE_JSON); @@ -571,7 +571,7 @@ int read_conf_and_init(const char* filename) /*stat log*/ rssb_stats_init(filename); - /*���� 0:AV_PIC 1:voip*/ + /*���� 0:AV_PIC 1:voip*/ MESA_load_profile_short_def(filename, "SYSTEM", "CPZTpye", (short*)&g_frag_cfg.cpz_type, 0); /*thread_num*/ @@ -619,10 +619,10 @@ int read_conf_and_init(const char* filename) g_frag_run.special_media_table[special_media_type[i]] = 1; } - /*ģ��hashժҪ���㿪��*/ + /*ģ��hashժҪ���㿪��*/ MESA_load_profile_short_def(filename, "SYSTEM", "FuzzyDigestSwitch", (short*)&g_frag_cfg.fuzzy_digest_switch,0); - /*��Ԫ��ϢcapIP*/ + /*��Ԫ��ϢcapIP*/ MESA_load_profile_short_def(filename, "SYSTEM", "ModifyCapIPSwitch", (short*)&g_frag_cfg.modify_capIP_switch,1); /*media hash param*/ @@ -702,7 +702,7 @@ int read_conf_and_init(const char* filename) MESA_load_profile_short_def(filename, "SYSTEM", "MonitorFileDay", (short*)&g_frag_cfg.monitor_file_days,0); mkdir_r(g_frag_cfg.monitor_file_root_dir); - /*maat��ʼ��*/ + /*maat��ʼ��*/ MESA_load_profile_short_def(filename, "SYSTEM", "FragForecastSwitch", (short*)&g_frag_cfg.forecast_switch,0); if(g_frag_cfg.forecast_switch) { @@ -733,17 +733,17 @@ int read_conf_and_init(const char* filename) g_frag_run.expr_tableid = Maat_table_register(g_frag_run.feather,"FRAG_MONITOR_KEYWORDS"); } - /*������*/ + /*������*/ memset(conf_buf,0,sizeof(conf_buf)); MESA_load_profile_string_nodef(filename, "NETWORK", "LocalIP", conf_buf, sizeof(conf_buf)); g_frag_cfg.local_ip_nr = get_ip_by_ifname(conf_buf); - /*���ؿ�*/ + /*���ؿ�*/ memset(conf_buf,0,sizeof(conf_buf)); MESA_load_profile_string_nodef(filename, "NETWORK", "FwdIP", conf_buf, sizeof(conf_buf)); g_frag_cfg.fwd_ip_nr = get_ip_by_ifname(conf_buf); - /*recv_bizman init:��ƴװ��������*/ + /*recv_bizman init:��ƴװ��������*/ MESA_load_profile_short_def(filename, "NETWORK", "BizmanPort", (short*)&g_frag_cfg.bizman_port,22082); MESA_load_profile_uint_def(filename, "NETWORK", "BizmanAckSmoothTime", &front_bizman_smooth_msec,10); MESA_load_profile_uint_def(filename, "NETWORK", "BizmanAckAccumulateTime", &front_bizman_acc_msec,10); @@ -759,7 +759,7 @@ int read_conf_and_init(const char* filename) bizman_init_handle(g_frag_run.recv_bizman[i]); } - /*���ؾ���*/ + /*���ؾ���*/ MESA_load_profile_short_def(filename, "WLB", "wlb_on", (short*)&g_frag_cfg.wlb_on,1); MESA_load_profile_string_def(filename, "WLB", "wlb_topic", g_frag_cfg.wlb_topic, sizeof(g_frag_cfg.wlb_topic),"AV"); MESA_load_profile_string_def(filename, "WLB", "wlb_group_name", g_frag_cfg.wlb_group_name, sizeof(g_frag_cfg.wlb_group_name),"group1"); @@ -774,7 +774,7 @@ int read_conf_and_init(const char* filename) MESA_load_profile_short_def(filename, "WLB", "down_threshold", (short*)&g_frag_cfg.bfd_threshold,90); MESA_load_profile_short_def(filename, "WLB", "down_num", (short*)&g_frag_cfg.bfd_down_num,20); - /*send bizman :��ƴװ��ǰ�˷����ݣ�������Ӧ�˿�*/ + /*send bizman :��ƴװ��ǰ�˷����ݣ�������Ӧ�˿�*/ MESA_load_profile_short_def(filename, "NETWORK", "BizmanAckPort", (short*)&g_frag_cfg.bizman_ack_port,22084); g_frag_run.answer_sapp_bizman = bizman_get_handle(); bizman_set_handle(g_frag_run.answer_sapp_bizman, BIZMAN_SENDER_ACTIVE); @@ -876,7 +876,7 @@ int read_conf_and_init(const char* filename) } } - /*msg port:��ƴװ���ս���Ķ˿ڣ�ǰ�˽��ս���Ķ˿�*/ + /*msg port:��ƴװ���ս���Ķ˿ڣ�ǰ�˽��ս���Ķ˿�*/ MESA_load_profile_short_def(filename, "NETWORK", "CPZMsgPort", (short*)&g_frag_cfg.cpz_msg_port, 22080); MESA_load_profile_short_def(filename, "NETWORK", "QDMsgPort", (short*)&g_frag_cfg.qd_msg_port, 22080); @@ -1010,30 +1010,30 @@ int read_conf_and_init(const char* filename) MESA_load_profile_short_def(filename, "DEBUG", "HlsAboffsetInMode", (short*)&g_frag_cfg.hls_in_aboffset_mode,1); MESA_load_profile_short_def(filename, "DEBUG", "JSONLocalSwitch", (short*)&g_frag_cfg.json_local_switch,0); - /*��Ƭ����ʧЧ����*/ + /*��Ƭ����ʧЧ����*/ MESA_load_profile_short_def(filename, "DEBUG", "FragSurveyInvalid", (short*)&g_frag_cfg.frag_survey_invalid,0); /*trace path*/ MESA_load_profile_string_def(filename, "DEBUG", "TracePath", g_frag_cfg.trace_filepath, sizeof(g_frag_cfg.trace_filepath),"./log/"); - /*JSON��Ϣ�ش���ý��ҵ��*/ + /*JSON��Ϣ�ش���ý��ҵ��*/ if(-1==multimedia_read_conf_and_init(filename)) { return -1; } - /*����Ƶ����ҵ��td_data*/ + /*����Ƶ����ҵ��td_data*/ if(-1==dedup_read_conf_and_init(filename)) { return -1; } - /*VOIP ��־����ҵ��*/ + /*VOIP ��־����ҵ��*/ if(-1==voip_read_conf_and_init(filename)) { return -1; } - /* APP����ҵ��*/ + /* APP����ҵ��*/ #ifdef APP_FUNC if(-1==app_read_conf_and_init(filename)) { @@ -1279,7 +1279,7 @@ int main(int argc, char **argv) } /* bizman recv data from papp*/ - /*bizman��������ģʽ*/ + /*bizman��������ģʽ*/ if(0==g_frag_cfg.bizman_queue_mode) { for(i=0;i<g_frag_cfg.thread_num;i++) @@ -1292,7 +1292,7 @@ int main(int argc, char **argv) } } } - /*bizman���ն���ģʽ*/ + /*bizman���ն���ģʽ*/ else { g_frag_run.recv_bizman_lq = (MESA_lqueue_head*)calloc(1, g_frag_cfg.thread_num*sizeof(MESA_lqueue_head)); |
