|
CUBRID Engine
latest
|


Go to the source code of this file.
Macros | |
| #define | PROXY_INVALID_ID (-1) |
| #define | PROXY_INVALID_SHARD (PROXY_INVALID_ID) |
| #define | PROXY_INVALID_CAS (PROXY_INVALID_ID) |
| #define | SHARD_INVALID_ID (PROXY_INVALID_SHARD) |
| #define | CAS_INVALID_ID (PROXY_INVALID_CAS) |
| #define | SERVICE_READY_WAIT_COUNT 6000 |
| #define | MAKE_FILEPATH(dest, src, dest_len) |
Functions | |
| int | ut_kill_process (int pid) |
| int | ut_kill_broker_process (int pid, char *br_name) |
| int | ut_kill_proxy_process (int pid, char *br_name, int proxy_id) |
| int | ut_kill_as_process (int pid, char *br_name, int as_id, int shard_flag) |
| void | ut_cd_work_dir (void) |
| void | ut_cd_root_dir (void) |
| int | ut_set_keepalive (int sock) |
| void | as_pid_file_create (char *br_name, int as_index) |
| void | as_db_err_log_set (char *br_name, int proxy_index, int shard_id, int shard_cas_id, int as_index, int shard_flag) |
| void | ut_get_as_pid_name (char *pid_name, char *br_name, int as_index, int len) |
| int | ut_time_string (char *buf, struct timeval *log_time) |
| char * | ut_get_ipv4_string (char *ip_str, int len, const unsigned char *ip_addr) |
| float | ut_get_avg_from_array (int array[], int size) |
| bool | ut_is_appl_server_ready (int pid, char *ready_flag) |
| void | ut_get_broker_port_name (char *port_name, char *broker_name, int len) |
| void | ut_get_proxy_port_name (char *port_name, char *broker_name, int proxy_id, int len) |
| void | ut_get_as_port_name (char *port_name, char *broker_name, int as_id, int len) |
| double | ut_size_string_to_kbyte (const char *size_str, const char *default_unit) |
| double | ut_time_string_to_sec (const char *time_str, const char *default_unit) |
| #define CAS_INVALID_ID (PROXY_INVALID_CAS) |
Definition at line 45 of file broker_util.h.
| #define MAKE_FILEPATH | ( | dest, | |
| src, | |||
| dest_len | |||
| ) |
Definition at line 49 of file broker_util.h.
Referenced by access_control_repath_file(), admin_conf_change(), and broker_config_read_internal().
| #define PROXY_INVALID_CAS (PROXY_INVALID_ID) |
Definition at line 41 of file broker_util.h.
Referenced by proxy_context_clear(), proxy_context_set_out_tran(), proxy_context_timeout(), proxy_event_new(), proxy_process_cas_register(), proxy_socket_io_add(), proxy_socket_io_clear(), and proxy_socket_io_destroy().
| #define PROXY_INVALID_ID (-1) |
Definition at line 35 of file broker_util.h.
Referenced by broker_add_proxy_conn(), broker_delete_proxy_conn_by_proxy_id(), and broker_register_proxy_conn().
| #define PROXY_INVALID_SHARD (PROXY_INVALID_ID) |
Definition at line 38 of file broker_util.h.
Referenced by fn_proxy_client_prepare(), fn_proxy_client_prepare_and_execute(), fn_proxy_client_schema_info(), proxy_client_execute_internal(), proxy_context_clear(), proxy_context_set_out_tran(), proxy_context_timeout(), proxy_event_new(), proxy_get_shard_id(), proxy_process_cas_register(), proxy_socket_io_add(), proxy_socket_io_clear(), proxy_socket_io_destroy(), and proxy_update_shard_stats().
| #define SERVICE_READY_WAIT_COUNT 6000 |
Definition at line 47 of file broker_util.h.
Referenced by check_shard_as_conn(), and ut_is_appl_server_ready().
| #define SHARD_INVALID_ID (PROXY_INVALID_SHARD) |
Definition at line 44 of file broker_util.h.
| void as_db_err_log_set | ( | char * | br_name, |
| int | proxy_index, | ||
| int | shard_id, | ||
| int | shard_cas_id, | ||
| int | as_index, | ||
| int | shard_flag | ||
| ) |
Definition at line 401 of file broker_util.c.
References BROKER_PATH_MAX, db_err_log_file, FID_CUBRID_ERR_DIR, get_cubrid_file(), and ON.
Referenced by cas_init(), and cas_main().

| void as_pid_file_create | ( | char * | br_name, |
| int | as_index | ||
| ) |
Definition at line 385 of file broker_util.c.
References BROKER_PATH_MAX, and ut_get_as_pid_name().
Referenced by cas_init().

| void ut_cd_root_dir | ( | void | ) |
Definition at line 343 of file broker_util.c.
References envvar_root(), and pid.
Referenced by admin_conf_change(), and main().

| void ut_cd_work_dir | ( | void | ) |
Definition at line 335 of file broker_util.c.
References BROKER_PATH_MAX, and envvar_bindir_file().
Referenced by admin_common(), admin_conf_change(), and main().

| void ut_get_as_pid_name | ( | char * | pid_name, |
| char * | br_name, | ||
| int | as_index, | ||
| int | len | ||
| ) |
Definition at line 702 of file broker_util.c.
References assert, BROKER_PATH_MAX, FID_AS_PID_DIR, and get_cubrid_file().
Referenced by as_pid_file_create(), restart_appl_server(), and ut_kill_as_process().

| void ut_get_as_port_name | ( | char * | port_name, |
| char * | broker_name, | ||
| int | as_id, | ||
| int | len | ||
| ) |
Definition at line 570 of file broker_util.c.
References assert, BROKER_PATH_MAX, FID_SOCK_DIR, and get_cubrid_file().
Referenced by as_activate(), cas_main(), connect_srv(), run_appl_server(), and ut_kill_as_process().

| float ut_get_avg_from_array | ( | int | array[], |
| int | size | ||
| ) |
Definition at line 486 of file broker_util.c.
References i.
Referenced by hang_check_thr_f().

| void ut_get_broker_port_name | ( | char * | port_name, |
| char * | broker_name, | ||
| int | len | ||
| ) |
Definition at line 542 of file broker_util.c.
References assert, BROKER_PATH_MAX, FID_SOCK_DIR, and get_cubrid_file().
Referenced by broker_shm_initialize_shm_as(), and ut_kill_broker_process().

| char* ut_get_ipv4_string | ( | char * | ip_str, |
| int | len, | ||
| const unsigned char * | ip_addr | ||
| ) |
Definition at line 474 of file broker_util.c.
Referenced by appl_info_display(), cas_access_log(), cas_log_query_cancel(), cas_log_write_client_ip(), cas_main(), and uc_as_info().

| void ut_get_proxy_port_name | ( | char * | port_name, |
| char * | broker_name, | ||
| int | proxy_id, | ||
| int | len | ||
| ) |
Definition at line 556 of file broker_util.c.
References assert, BROKER_PATH_MAX, FID_SOCK_DIR, and get_cubrid_file().
Referenced by net_connect_proxy(), proxy_activate_internal(), and ut_kill_proxy_process().

| bool ut_is_appl_server_ready | ( | int | pid, |
| char * | ready_flag | ||
| ) |
Definition at line 498 of file broker_util.c.
References FALSE, i, NULL, SERVICE_READY_WAIT_COUNT, and SLEEP_MILISEC.
Referenced by admin_restart_cmd(), as_activate(), br_activate(), and run_appl_server().

| int ut_kill_as_process | ( | int | pid, |
| char * | br_name, | ||
| int | as_id, | ||
| int | shard_flag | ||
| ) |
Definition at line 260 of file broker_util.c.
References BROKER_PATH_MAX, NULL, OFF, ut_get_as_pid_name(), ut_get_as_port_name(), and ut_kill_process().
Referenced by admin_restart_cmd(), as_inactivate(), connect_srv(), restart_appl_server(), and stop_appl_server().

| int ut_kill_broker_process | ( | int | pid, |
| char * | br_name | ||
| ) |
Definition at line 224 of file broker_util.c.
References BROKER_PATH_MAX, NULL, ut_get_broker_port_name(), and ut_kill_process().
Referenced by br_inactivate().

| int ut_kill_process | ( | int | pid | ) |
Definition at line 195 of file broker_util.c.
References i, and SLEEP_MILISEC.
Referenced by ut_kill_as_process(), ut_kill_broker_process(), and ut_kill_proxy_process().

| int ut_kill_proxy_process | ( | int | pid, |
| char * | br_name, | ||
| int | proxy_id | ||
| ) |
Definition at line 242 of file broker_util.c.
References BROKER_PATH_MAX, NULL, ut_get_proxy_port_name(), and ut_kill_process().
Referenced by proxy_inactivate(), and stop_proxy_server().

| int ut_set_keepalive | ( | int | sock | ) |
Definition at line 289 of file broker_util.c.
Referenced by cas_main(), and receiver_thr_f().

Definition at line 584 of file broker_util.c.
References assert, NULL, ONE_K, and ONE_M.
Referenced by admin_conf_change(), and broker_config_read_internal().

| int ut_time_string | ( | char * | buf, |
| struct timeval * | log_time | ||
| ) |
Definition at line 421 of file broker_util.c.
References NULL, and util_get_second_and_ms_since_epoch().
Referenced by cas_log_debug(), cas_log_write_internal(), and proxy_log_write_internal().

Definition at line 643 of file broker_util.c.
References assert, NULL, ONE_HOUR, ONE_MIN, and ONE_SEC.
Referenced by admin_conf_change(), and broker_config_read_internal().
