类 RaftSysConstants
- java.lang.Object
-
- com.alibaba.nacos.core.distributed.raft.RaftSysConstants
-
public final class RaftSysConstants extends java.lang.Objectjraft system constants.- 作者:
- liaochuntao
-
-
字段概要
字段 修饰符和类型 字段 说明 static java.lang.StringAPPLY_BATCHThe tasks submitted to the leader accumulate the maximum batch size of a batch flush log storage.static intDEFAULT_APPLY_BATCHThe tasks submitted to the leader will accumulate one batch into the maximum batch size stored in the log, and 32 tasks will be assigned by default 向 leader 提交的任务累积一个批次刷入日志存储的最大批次大小,默认 32 个任务static intDEFAULT_DISRUPTOR_BUFFER_SIZEInternal disruptor buffer size, need to be appropriately adjusted for high write throughput applications, default 16384 内部 disruptor buffer 大小,如果是写入吞吐量较高的应用,需要适当调高该值,默认 16384static intDEFAULT_ELECTION_HEARTBEAT_FACTORSpecifies the ratio of the election timeout to the heartbeat interval.static intDEFAULT_ELECTION_TIMEOUTstatic booleanDEFAULT_ENABLE_LOG_ENTRY_CHECKSUMWhether LogEntry checksum is enabled 是否启用 LogEntry checksumstatic intDEFAULT_MAX_APPEND_BUFFER_SIZEThe maximum size of the log storage buffer is 256K by default 日志存储缓冲区最大大小,默认256Kstatic intDEFAULT_MAX_BODY_SIZEThe maximum body size of the log sent from the leader to the followers is 512K by default 从 leader 往 follower 发送日志的最大 body 大小,默认 512Kstatic intDEFAULT_MAX_BYTE_COUNT_PER_RPCThe maximum size of each file RPC (snapshot copy) request between nodes is 128 K by default 节点之间每次文件 RPC (snapshot拷贝)请求的最大大小,默认为 128 Kstatic intDEFAULT_MAX_ELECTION_DELAY_MSThe election timer interval will be a random maximum outside the specified time, 1 second by default 选举定时器间隔会在指定时间之外随机的最大范围,默认1秒static intDEFAULT_MAX_ENTRIES_SIZEThe maximum number of logs sent from the leader to the followers is 1024 by default 从 leader 往 follower 发送的最大日志个数,默认 1024static intDEFAULT_MAX_REPLICATOR_INFLIGHT_MSGSMaximum in-flight requests with pipeline requests enabled, 256 by default 在启用 pipeline 请求情况下,最大 in-flight 请求数,默认256static intDEFAULT_RAFT_CLI_SERVICE_THREAD_NUMstatic intDEFAULT_RAFT_RPC_REQUEST_TIMEOUT_MSstatic intDEFAULT_RAFT_SNAPSHOT_INTERVAL_SECSstatic java.lang.StringDEFAULT_READ_INDEX_TYPEstatic booleanDEFAULT_REPLICATOR_PIPELINEWhether to enable replicated pipeline request optimization by default 是否启用复制的 pipeline 请求优化,默认打开static booleanDEFAULT_SYNCCall fsync when necessary when writing log, meta information, and it should always be true 写入日志、元信息的时候必要的时候调用 fsync,通常都应该为 truestatic booleanDEFAULT_SYNC_METAIf fsync is called by writing snapshot/raft information, the default is false.static java.lang.StringDISRUPTOR_BUFFER_SIZEInternal disruptor buffer size.static java.lang.StringELECTION_HEARTBEAT_FACTORSpecify the ratio between election timeout and heartbeat interval.static java.lang.StringENABLE_LOG_ENTRY_CHECKSUMWhether to enable LogEntry checksumstatic java.lang.StringMAX_APPEND_BUFFER_SIZEMaximum log storage buffer size, default 256Kstatic java.lang.StringMAX_BODY_SIZEMaximum body size for sending logs from leader to follower, default is 512Kstatic java.lang.StringMAX_BYTE_COUNT_PER_RPCMaximum size of each file RPC (snapshot copy) request between nodes, default is 128 Kstatic java.lang.StringMAX_ELECTION_DELAY_MSElection timer interval will be a random maximum outside the specified time, default is 1 secondstatic java.lang.StringMAX_ENTRIES_SIZEMaximum number of logs sent from leader to follower, default is 1024static java.lang.StringMAX_REPLICATOR_INFLIGHT_MSGSMaximum number of in-flight requests with pipeline requests enabled, default is 256static java.lang.StringRAFT_CLI_SERVICE_THREAD_NUMNumber of threads required for raft business request processingstatic java.lang.StringRAFT_CORE_THREAD_NUMraft internal worker threadsstatic java.lang.StringRAFT_ELECTION_TIMEOUT_MSElection timeout in millisecondsstatic java.lang.StringRAFT_READ_INDEX_TYPEraft linear read strategy, defaults to read_index readstatic java.lang.StringRAFT_RPC_REQUEST_TIMEOUT_MSrpc request timeout, default 5 secondsstatic java.lang.StringRAFT_SNAPSHOT_INTERVAL_SECSSnapshot interval in secondsstatic java.lang.StringREPLICATOR_PIPELINEWhether to enable replication of pipeline request optimization, which is enabled by defaultstatic java.lang.StringREQUEST_FAILOVER_RETRIESRequested retriesstatic java.lang.StringSYNCCall fsync when necessary when writing logs and meta information, usually should be truestatic java.lang.StringSYNC_METAWhether to write snapshot / raft meta-information to call fsync.
-
构造器概要
构造器 构造器 说明 RaftSysConstants()
-
-
-
字段详细资料
-
DEFAULT_ELECTION_TIMEOUT
public static final int DEFAULT_ELECTION_TIMEOUT
- 另请参阅:
- 常量字段值
-
DEFAULT_RAFT_SNAPSHOT_INTERVAL_SECS
public static final int DEFAULT_RAFT_SNAPSHOT_INTERVAL_SECS
- 另请参阅:
- 常量字段值
-
DEFAULT_RAFT_CLI_SERVICE_THREAD_NUM
public static final int DEFAULT_RAFT_CLI_SERVICE_THREAD_NUM
- 另请参阅:
- 常量字段值
-
DEFAULT_READ_INDEX_TYPE
public static final java.lang.String DEFAULT_READ_INDEX_TYPE
- 另请参阅:
- 常量字段值
-
DEFAULT_RAFT_RPC_REQUEST_TIMEOUT_MS
public static final int DEFAULT_RAFT_RPC_REQUEST_TIMEOUT_MS
- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_BYTE_COUNT_PER_RPC
public static final int DEFAULT_MAX_BYTE_COUNT_PER_RPC
The maximum size of each file RPC (snapshot copy) request between nodes is 128 K by default 节点之间每次文件 RPC (snapshot拷贝)请求的最大大小,默认为 128 K- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_ENTRIES_SIZE
public static final int DEFAULT_MAX_ENTRIES_SIZE
The maximum number of logs sent from the leader to the followers is 1024 by default 从 leader 往 follower 发送的最大日志个数,默认 1024- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_BODY_SIZE
public static final int DEFAULT_MAX_BODY_SIZE
The maximum body size of the log sent from the leader to the followers is 512K by default 从 leader 往 follower 发送日志的最大 body 大小,默认 512K- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_APPEND_BUFFER_SIZE
public static final int DEFAULT_MAX_APPEND_BUFFER_SIZE
The maximum size of the log storage buffer is 256K by default 日志存储缓冲区最大大小,默认256K- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_ELECTION_DELAY_MS
public static final int DEFAULT_MAX_ELECTION_DELAY_MS
The election timer interval will be a random maximum outside the specified time, 1 second by default 选举定时器间隔会在指定时间之外随机的最大范围,默认1秒- 另请参阅:
- 常量字段值
-
DEFAULT_ELECTION_HEARTBEAT_FACTOR
public static final int DEFAULT_ELECTION_HEARTBEAT_FACTOR
Specifies the ratio of the election timeout to the heartbeat interval. Heartbeat interval is equal to the electionTimeoutMs/electionHeartbeatFactor, default one of 10 points. 指定选举超时时间和心跳间隔时间之间的比值。心跳间隔等于electionTimeoutMs/electionHeartbeatFactor,默认10分之一。- 另请参阅:
- 常量字段值
-
DEFAULT_APPLY_BATCH
public static final int DEFAULT_APPLY_BATCH
The tasks submitted to the leader will accumulate one batch into the maximum batch size stored in the log, and 32 tasks will be assigned by default 向 leader 提交的任务累积一个批次刷入日志存储的最大批次大小,默认 32 个任务- 另请参阅:
- 常量字段值
-
DEFAULT_SYNC
public static final boolean DEFAULT_SYNC
Call fsync when necessary when writing log, meta information, and it should always be true 写入日志、元信息的时候必要的时候调用 fsync,通常都应该为 true- 另请参阅:
- 常量字段值
-
DEFAULT_SYNC_META
public static final boolean DEFAULT_SYNC_META
If fsync is called by writing snapshot/raft information, the default is false. If sync is true, it is better to respect sync 写入 snapshot/raft 元信息是否调用 fsync,默认为 false,在 sync 为 true 的情况下,优选尊重 sync- 另请参阅:
- 常量字段值
-
DEFAULT_DISRUPTOR_BUFFER_SIZE
public static final int DEFAULT_DISRUPTOR_BUFFER_SIZE
Internal disruptor buffer size, need to be appropriately adjusted for high write throughput applications, default 16384 内部 disruptor buffer 大小,如果是写入吞吐量较高的应用,需要适当调高该值,默认 16384- 另请参阅:
- 常量字段值
-
DEFAULT_REPLICATOR_PIPELINE
public static final boolean DEFAULT_REPLICATOR_PIPELINE
Whether to enable replicated pipeline request optimization by default 是否启用复制的 pipeline 请求优化,默认打开- 另请参阅:
- 常量字段值
-
DEFAULT_MAX_REPLICATOR_INFLIGHT_MSGS
public static final int DEFAULT_MAX_REPLICATOR_INFLIGHT_MSGS
Maximum in-flight requests with pipeline requests enabled, 256 by default 在启用 pipeline 请求情况下,最大 in-flight 请求数,默认256- 另请参阅:
- 常量字段值
-
DEFAULT_ENABLE_LOG_ENTRY_CHECKSUM
public static final boolean DEFAULT_ENABLE_LOG_ENTRY_CHECKSUM
Whether LogEntry checksum is enabled 是否启用 LogEntry checksum- 另请参阅:
- 常量字段值
-
RAFT_ELECTION_TIMEOUT_MS
public static final java.lang.String RAFT_ELECTION_TIMEOUT_MS
Election timeout in milliseconds- 另请参阅:
- 常量字段值
-
RAFT_SNAPSHOT_INTERVAL_SECS
public static final java.lang.String RAFT_SNAPSHOT_INTERVAL_SECS
Snapshot interval in seconds- 另请参阅:
- 常量字段值
-
REQUEST_FAILOVER_RETRIES
public static final java.lang.String REQUEST_FAILOVER_RETRIES
Requested retries- 另请参阅:
- 常量字段值
-
RAFT_CORE_THREAD_NUM
public static final java.lang.String RAFT_CORE_THREAD_NUM
raft internal worker threads- 另请参阅:
- 常量字段值
-
RAFT_CLI_SERVICE_THREAD_NUM
public static final java.lang.String RAFT_CLI_SERVICE_THREAD_NUM
Number of threads required for raft business request processing- 另请参阅:
- 常量字段值
-
RAFT_READ_INDEX_TYPE
public static final java.lang.String RAFT_READ_INDEX_TYPE
raft linear read strategy, defaults to read_index read- 另请参阅:
- 常量字段值
-
RAFT_RPC_REQUEST_TIMEOUT_MS
public static final java.lang.String RAFT_RPC_REQUEST_TIMEOUT_MS
rpc request timeout, default 5 seconds- 另请参阅:
- 常量字段值
-
MAX_BYTE_COUNT_PER_RPC
public static final java.lang.String MAX_BYTE_COUNT_PER_RPC
Maximum size of each file RPC (snapshot copy) request between nodes, default is 128 K- 另请参阅:
- 常量字段值
-
MAX_ENTRIES_SIZE
public static final java.lang.String MAX_ENTRIES_SIZE
Maximum number of logs sent from leader to follower, default is 1024- 另请参阅:
- 常量字段值
-
MAX_BODY_SIZE
public static final java.lang.String MAX_BODY_SIZE
Maximum body size for sending logs from leader to follower, default is 512K- 另请参阅:
- 常量字段值
-
MAX_APPEND_BUFFER_SIZE
public static final java.lang.String MAX_APPEND_BUFFER_SIZE
Maximum log storage buffer size, default 256K- 另请参阅:
- 常量字段值
-
MAX_ELECTION_DELAY_MS
public static final java.lang.String MAX_ELECTION_DELAY_MS
Election timer interval will be a random maximum outside the specified time, default is 1 second- 另请参阅:
- 常量字段值
-
ELECTION_HEARTBEAT_FACTOR
public static final java.lang.String ELECTION_HEARTBEAT_FACTOR
Specify the ratio between election timeout and heartbeat interval. Heartbeat interval is equal to electionTimeoutMs/electionHeartbeatFactor,One tenth by default.- 另请参阅:
- 常量字段值
-
APPLY_BATCH
public static final java.lang.String APPLY_BATCH
The tasks submitted to the leader accumulate the maximum batch size of a batch flush log storage. The default is 32 tasks.- 另请参阅:
- 常量字段值
-
SYNC
public static final java.lang.String SYNC
Call fsync when necessary when writing logs and meta information, usually should be true- 另请参阅:
- 常量字段值
-
SYNC_META
public static final java.lang.String SYNC_META
Whether to write snapshot / raft meta-information to call fsync. The default is false. When sync is true, it is preferred to respect sync.- 另请参阅:
- 常量字段值
-
DISRUPTOR_BUFFER_SIZE
public static final java.lang.String DISRUPTOR_BUFFER_SIZE
Internal disruptor buffer size. For applications with high write throughput, you need to increase this value. The default value is 16384.- 另请参阅:
- 常量字段值
-
REPLICATOR_PIPELINE
public static final java.lang.String REPLICATOR_PIPELINE
Whether to enable replication of pipeline request optimization, which is enabled by default- 另请参阅:
- 常量字段值
-
MAX_REPLICATOR_INFLIGHT_MSGS
public static final java.lang.String MAX_REPLICATOR_INFLIGHT_MSGS
Maximum number of in-flight requests with pipeline requests enabled, default is 256- 另请参阅:
- 常量字段值
-
ENABLE_LOG_ENTRY_CHECKSUM
public static final java.lang.String ENABLE_LOG_ENTRY_CHECKSUM
Whether to enable LogEntry checksum- 另请参阅:
- 常量字段值
-
-