Skip to content

Commit

Permalink
docs: add time units to comments & docs of zk (4paradigm#2021)
Browse files Browse the repository at this point in the history
1. Add time units to comment
2. Add time units to user doc
3. Correct the typo
  • Loading branch information
liuceyi committed Aug 1, 2022
1 parent 2a0faaa commit 6746f53
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 44 deletions.
22 changes: 11 additions & 11 deletions docs/en/deploy/conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
#--thread_pool_size=16
# Configure the number of retry attempts, the default is 3
#--request_max_retry=3
# Configure the request timeout, the default is 12 seconds
# Configure the request timeout in milliseconds, the default is 12 seconds
#--request_timeout_ms=12000
# Configure the retry interval when the request is unreachable, generally do not need to be modified
# Configure the retry interval when the request is unreachable, generally do not need to be modified, in milliseconds
#--request_sleep_time=1000
# Configure the zookeeper session timeout in milliseconds
--zk_session_timeout=10000
# Configure the zookeeper health check interval, the unit is milliseconds, generally do not need to be modified
#--zk_keep_alive_check_interval=15000
# Configure the timeout period for tablet heartbeat detection, the default is 1 minute. If the tablet is still unreachable after this time, the nameserver considers that the tablet is unavailable and will perform the operation of offline the node
# Configure the timeout period for tablet heartbeat detection in milliseconds, the default is 1 minute. If the tablet is still unreachable after this time, the nameserver considers that the tablet is unavailable and will perform the operation of offline the node
--tablet_heartbeat_timeout=60000
# Configure the tablet health check interval, in milliseconds
#--tablet_offline_check_interval=1000
Expand All @@ -39,13 +39,13 @@
#--name_server_task_concurrency=2
# The maximum number of concurrent execution of high-availability tasks
#--name_server_task_max_concurrency=8
# Check the waiting time of the task when executing the task
# Check the waiting time of the task when executing the task in milliseconds
#--name_server_task_wait_time=1000
# The maximum time to execute the task, if it exceeds, it will log
# The maximum time to execute the task, if it exceeds, it will log. The unit is milliseconds
#--name_server_op_execute_timeout=7200000
# The time interval of receiving the status of the next task
# The time interval of receiving the status of the next task in milliseconds
#--get_task_status_interval=2000
# The time interval of receiving the status of the next table
# The time interval of receiving the status of the next table in milliseconds
#--get_table_status_interval=2000
# Check the minimum difference of binlog synchronization progress, if the master-slave offset is less than this value, the task has been successfully synchronized
#--check_binlog_sync_progress_delta=100000
Expand Down Expand Up @@ -88,9 +88,9 @@
--openmldb_log_dir=./logs
# binlog conf
# Binlog wait time when no new data is added
# Binlog wait time when no new data is added, in milliseconds
#--binlog_coffee_time=1000
# Master-slave matching offset waiting time
# Master-slave matching offset waiting time, in milliseconds
#--binlog_match_logoffset_interval=1000
# Whether to notify the follower to synchronize immediately when data is written
--binlog_notify_on_put=true
Expand Down Expand Up @@ -121,9 +121,9 @@
# snapshot conf
# Configure the time to do snapshots, the time of day. For example, 23 means taking a snapshot at 23 o'clock every day.
--make_snapshot_time=23
# Check interval for snapshots
# Check interval for snapshots, in milliseconds
#--make_snapshot_check_interval=600000
# Set the offset threshold of the snapshot, if the offset difference from the last snapshot is less than this value, no new snapshot will be generated
# Set the offset threshold of the snapshot, if the offset difference from the last snapshot is less than this value, no new snapshot will be generated, in milliseconds
#--make_snapshot_threshold_offset=100000
# snapshot thread pool size
#--snapshot_pool_size=1
Expand Down
22 changes: 11 additions & 11 deletions docs/zh/deploy/conf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
#--thread_pool_size=16
# 配置失败重试次数,默认是3
#--request_max_retry=3
# 配置请求超时时间,默认是12妙
# 配置请求超时时间,单位是毫秒,默认是12秒
#--request_timeout_ms=12000
# 配置请求不可达时的重试间隔,一般不需要修改
#--request_sleep_time=1000
# 配置zookeeper session超时时间,单位是毫秒
--zk_session_timeout=10000
# 配置zookeeper健康检查间隔,单位是毫秒,一般不需要修改
#--zk_keep_alive_check_interval=15000
# 配置tablet心跳检测超时时间,默认是1分钟。如果tablet超过这个时间还没连接上,nameserver就认为此tablet不可用,会执行下线该节点的操作
# 配置tablet心跳检测超时时间,单位是毫秒,默认是1分钟。如果tablet超过这个时间还没连接上,nameserver就认为此tablet不可用,会执行下线该节点的操作
--tablet_heartbeat_timeout=60000
# 配置tablet健康检查间隔,单位是毫秒
#--tablet_offline_check_interval=1000
Expand All @@ -39,13 +39,13 @@
#--name_server_task_concurrency=2
# 执行高可用任务的最大并发数
#--name_server_task_max_concurrency=8
# 执行任务时检查任务的等待时间
# 执行任务时检查任务的等待时间,单位是毫秒
#--name_server_task_wait_time=1000
# 执行任务的最大时间,如果超过后就会打日志
# 执行任务的最大时间,如果超过后就会打日志,单位是毫秒
#--name_server_op_execute_timeout=7200000
# 获取任务的时间间隔
# 获取任务的时间间隔,单位是毫秒
#--get_task_status_interval=2000
# 获取表状态的时间间隔
# 获取表状态的时间间隔,单位是毫秒
#--get_table_status_interval=2000
# 检查binlog同步进度的最小差值,如果主从offset小于这个值任务已同步成功
#--check_binlog_sync_progress_delta=100000
Expand Down Expand Up @@ -88,23 +88,23 @@
--openmldb_log_dir=./logs
# binlog conf
# binlog没有新数据添加时的等待时间
# binlog没有新数据添加时的等待时间,单位是毫秒
#--binlog_coffee_time=1000
# 主从匹配offset的等待时间
# 主从匹配offset的等待时间,单位是毫秒
#--binlog_match_logoffset_interval=1000
# 有数据写入时是否通知立马同步到follower
--binlog_notify_on_put=true
# binlog文件的最大大小,单位时M
--binlog_single_file_max_size=2048
# 主从同步的batch大小
#--binlog_sync_batch_size=32
# binlog sync到磁盘的时间间隔,单位时毫秒
# binlog sync到磁盘的时间间隔,单位是毫秒
--binlog_sync_to_disk_interval=5000
# 如果没有新数据同步时的wait时间,单位为毫秒
#--binlog_sync_wait_time=100
# binlog文件名长度
#--binlog_name_length=8
# 删除binlog文件的时间间隔,单位时毫秒
# 删除binlog文件的时间间隔,单位是毫秒
#--binlog_delete_interval=60000
# binlog是否开启crc校验
#--binlog_enable_crc=false
Expand Down Expand Up @@ -139,7 +139,7 @@
# snapshot conf
# 配置做snapshot的时间,配置为一天中的几点。如23就表示每天23点做snapshot
--make_snapshot_time=23
# 做snapshot的检查时间间隔
# 做snapshot的检查时间间隔,单位是毫秒
#--make_snapshot_check_interval=600000
# 做snapshot的offset阈值,如果和上次snapshot的offset差值小于这个值就不会生成新的snapshot
#--make_snapshot_threshold_offset=100000
Expand Down
44 changes: 22 additions & 22 deletions src/flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@
// cluster config
DEFINE_string(endpoint, "", "ip:port, config the ip and port that openmldb serves for");
DEFINE_string(openmldb_log_dir, "./logs", "config the log dir");
DEFINE_int32(zk_session_timeout, 2000, "config the zk session timeout of cli, apiserver, tablet or nameserver");
DEFINE_uint32(tablet_heartbeat_timeout, 5 * 60 * 1000, "config the heartbeat of tablet offline");
DEFINE_uint32(tablet_offline_check_interval, 1000, "config the check interval of tablet offline");
DEFINE_int32(zk_session_timeout, 2000, "config the zk session timeout of cli in milliseconds, apiserver, tablet or nameserver");
DEFINE_uint32(tablet_heartbeat_timeout, 5 * 60 * 1000, "config the heartbeat of tablet offline. unit is milliseconds");
DEFINE_uint32(tablet_offline_check_interval, 1000, "config the check interval of tablet offline. unit is milliseconds");
DEFINE_string(zk_cluster, "", "config the zookeeper cluster eg ip:2181,ip2:2181,ip3:2181");
DEFINE_string(zk_root_path, "/openmldb", "config the root path of zookeeper");
DEFINE_string(tablet, "", "config the endpoint of tablet");
DEFINE_string(nameserver, "", "config the endpoint of nameserver");
DEFINE_int32(zk_keep_alive_check_interval, 15000, "config the interval of keep alive check");
DEFINE_int32(zk_keep_alive_check_interval, 15000, "config the interval of keep alive check. unit is milliseconds");
DEFINE_uint32(zk_log_level, 0,
"CLI: set level integer, DISABLE_LOGGING=0, "
"ZOO_LOG_LEVEL_ERROR=1,ZOO_LOG_LEVEL_WARN=2,ZOO_LOG_LEVEL_INFO=3,ZOO_LOG_LEVEL_DEBUG=4");
DEFINE_string(zk_log_file, "", "CLI: set zk log file, empty means stderr(default in zk)");
DEFINE_string(host, "", "used in stand-alone mode, config the name server ip");
DEFINE_int32(port, 0, "used in stand-alone mode, config the name server port");
DEFINE_int32(get_task_status_interval, 2000, "config the interval of get task status");
DEFINE_uint32(get_table_status_interval, 2000, "config the interval of get table status");
DEFINE_uint32(get_table_diskused_interval, 600000, "config the interval of get table diskused");
DEFINE_int32(get_task_status_interval, 2000, "config the interval of get task status. unit is milliseconds");
DEFINE_uint32(get_table_status_interval, 2000, "config the interval of get table status. unit is milliseconds");
DEFINE_uint32(get_table_diskused_interval, 600000, "config the interval of get table diskused. unit is milliseconds");
DEFINE_int32(name_server_task_pool_size, 8, "config the size of name server task pool");
DEFINE_uint32(name_server_task_concurrency, 2, "config the concurrency of name_server_task");
DEFINE_uint32(name_server_task_concurrency_for_replica_cluster, 2,
"config the concurrency of name_server_task for replica cluster");
DEFINE_uint32(name_server_task_max_concurrency, 8, "config the max concurrency of name_server_task");
DEFINE_int32(name_server_task_wait_time, 1000, "config the time of task wait");
DEFINE_uint32(name_server_op_execute_timeout, 2 * 60 * 60 * 1000, "config the timeout of nameserver op");
DEFINE_int32(name_server_task_wait_time, 1000, "config the time of task wait. unit is milliseconds");
DEFINE_uint32(name_server_op_execute_timeout, 2 * 60 * 60 * 1000, "config the timeout of nameserver op. unit is milliseconds");
DEFINE_bool(auto_failover, false, "enable or disable auto failover");
DEFINE_int32(max_op_num, 10000, "config the max op num");
DEFINE_uint32(partition_num, 8, "config the default partition_num");
Expand Down Expand Up @@ -72,11 +72,11 @@ DEFINE_int32(binlog_single_file_max_size, 1024 * 4, "the max size of single binl
DEFINE_int32(binlog_sync_batch_size, 32, "the batch size of sync binlog");
DEFINE_bool(binlog_notify_on_put, false, "config the sync log to follower strategy");
DEFINE_bool(binlog_enable_crc, false, "enable crc");
DEFINE_int32(binlog_coffee_time, 1000, "config the coffee time");
DEFINE_int32(binlog_sync_wait_time, 100, "config the sync log wait time");
DEFINE_int32(binlog_sync_to_disk_interval, 20000, "config the interval of sync binlog to disk time");
DEFINE_int32(binlog_delete_interval, 60000, "config the interval of delete binlog");
DEFINE_int32(binlog_match_logoffset_interval, 1000, "config the interval of match log offset ");
DEFINE_int32(binlog_coffee_time, 1000, "config the coffee time. unit is milliseconds");
DEFINE_int32(binlog_sync_wait_time, 100, "config the sync log wait time. unit is milliseconds");
DEFINE_int32(binlog_sync_to_disk_interval, 20000, "config the interval of sync binlog to disk time. unit is milliseconds");
DEFINE_int32(binlog_delete_interval, 60000, "config the interval of delete binlog. unit is milliseconds");
DEFINE_int32(binlog_match_logoffset_interval, 1000, "config the interval of match log offset. unit is milliseconds");
DEFINE_int32(binlog_name_length, 8, "binlog name length");
DEFINE_uint32(check_binlog_sync_progress_delta, 100000, "config the delta of check binlog sync progress");
DEFINE_uint32(go_back_max_try_cnt, 10, "config max try time of go back");
Expand All @@ -92,25 +92,25 @@ DEFINE_int32(put_concurrency_limit, 0, "the limit of put concurrency");
DEFINE_int32(thread_pool_size, 16, "the size of thread pool for other api");
DEFINE_int32(get_concurrency_limit, 0, "the limit of get concurrency");
DEFINE_int32(request_max_retry, 3, "max retry time when request error");
DEFINE_int32(request_timeout_ms, 20000, "request timeout(except the requests sent to taskmanager)");
DEFINE_int32(request_sleep_time, 1000, "the sleep time when request error");
DEFINE_int32(request_timeout_ms, 20000, "request timeout(except the requests sent to taskmanager). unit is milliseconds");
DEFINE_int32(request_sleep_time, 1000, "the sleep time when request error. unit is milliseconds");

DEFINE_uint32(max_traverse_cnt, 50000, "max traverse iter loop cnt");
DEFINE_uint32(traverse_cnt_limit, 1000, "limit traverse cnt");
DEFINE_string(ssd_root_path, "", "the root ssd path of db");
DEFINE_string(hdd_root_path, "", "the root hdd path of db");

DEFINE_uint32(task_check_interval, 1000, "config the check interval of task");
DEFINE_uint32(task_check_interval, 1000, "config the check interval of task. unit is milliseconds");

DEFINE_int32(send_file_max_try, 3, "the max retry time when send file failed");
DEFINE_int32(retry_send_file_wait_time_ms, 3000, "conf the wait time when retry send file");
DEFINE_int32(stream_close_wait_time_ms, 1000, "the wait time before close stream");
DEFINE_int32(retry_send_file_wait_time_ms, 3000, "conf the wait time when retry send file. unit is milliseconds");
DEFINE_int32(stream_close_wait_time_ms, 1000, "the wait time before close stream. unit is milliseconds");
DEFINE_uint32(stream_block_size, 1 * 1204 * 1024, "config the write/read block size in streaming");
DEFINE_int32(stream_bandwidth_limit, 10 * 1204 * 1024, "the limit bandwidth. Byte/Second");

// if set 23, the task will execute 23:00 every day
DEFINE_int32(make_snapshot_time, 23, "config the time to make snapshot");
DEFINE_int32(make_snapshot_check_interval, 1000 * 60 * 10, "config the interval to check making snapshot time");
DEFINE_int32(make_snapshot_check_interval, 1000 * 60 * 10, "config the interval to check making snapshot time. unit is milliseconds");
DEFINE_int32(make_snapshot_threshold_offset, 100000, "config the offset to reach the threshold");
DEFINE_uint32(make_snapshot_max_deleted_keys, 1000000, "config the max deleted keys store when make snapshot");
DEFINE_uint32(make_snapshot_offline_interval, 60 * 60 * 24,
Expand All @@ -119,7 +119,7 @@ DEFINE_uint32(make_snapshot_offline_interval, 60 * 60 * 24,
DEFINE_string(snapshot_compression, "off", "Type of snapshot compression, can be off, snappy, zlib");
DEFINE_int32(snapshot_pool_size, 1, "the size of tablet thread pool for making snapshot");

DEFINE_uint32(load_index_max_wait_time, 120 * 60 * 1000, "config the max wait time of load index");
DEFINE_uint32(load_index_max_wait_time, 120 * 60 * 1000, "config the max wait time of load index. unit is milliseconds");

DEFINE_string(recycle_bin_root_path, "/tmp/recycle", "specify the root path of recycle bin");
DEFINE_string(recycle_bin_ssd_root_path, "", "specify the root path of recycle bin in ssd");
Expand Down Expand Up @@ -151,7 +151,7 @@ DEFINE_uint32(load_table_thread_num, 3, "set load tabale thread pool size");
DEFINE_uint32(load_table_queue_size, 1000, "set load tabale queue size");

// multiple data center
DEFINE_uint32(get_replica_status_interval, 10000, "config the interval to sync replica cluster status time");
DEFINE_uint32(get_replica_status_interval, 10000, "config the interval to sync replica cluster status time. unit is milliseconds");

DEFINE_uint32(sync_deploy_stats_timeout, 10000,
"time interval in milliseconds to sync deploy response time stats into table");

0 comments on commit 6746f53

Please sign in to comment.