Package com.github.ambry.config
Class ReplicationConfig
- java.lang.Object
-
- com.github.ambry.config.ReplicationConfig
-
public class ReplicationConfig extends java.lang.Object
The configs for the replication layer "
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
REPLICA_TOKEN_FILE_NAME
short
replicaMetadataRequestVersion
The version of metadata request to be used for replication.static java.lang.String
REPLICATION_CLOUD_TOKEN_FACTORY
static java.lang.String
REPLICATION_MODEL_ACROSS_DATACENTERS
static java.lang.String
REPLICATION_STANDBY_WAIT_TIMEOUT_TO_TRIGGER_CROSS_COLO_FETCH_SECONDS
java.lang.String
replicationCloudTokenFactory
The factory class the replication uses to create cloud tokenint
replicationConnectionPoolCheckoutTimeoutMs
The timeout to get a connection checkout from the connection pool for replicationboolean
replicationContainerDeletionEnabled
True to enable skip deprecated containers in replication.int
replicationContainerDeletionRetentionDays
How long (in days) a container must be replicated before it's been deleted during compaction.boolean
replicationEnabledWithVcrCluster
If set to true, the Ambry data nodes will also replicate from vcr nodes based on vcr helix cluster map.boolean
replicationEnableHttp2
Use http2 connection for replication if this is true.long
replicationFetchSizeInBytes
The fetch size is an approximate total size that a remote server would return on a fetch request.boolean
replicationIncludeAll
If true, replication Get requests asks for deleted and expired blobs as well to succeed in scenarios where blobs get deleted or expired after replication metadata exchange.long
replicationInterReplicaThreadThrottleSleepDurationMs
The time (in ms) to sleep between replication cycles to throttle the replica thread in case the thread handles inter datacenter replicaslong
replicationIntraReplicaThreadThrottleSleepDurationMs
The time (in ms) to sleep between replication cycles to throttle the replica thread in case the thread handles intra datacenter replicasint
replicationMaxPartitionCountPerRequest
The maximum number of partitions on remote node can be replicated within a single replication request.ReplicationModelType
replicationModelAcrossDatacenters
To specify the type of replication to be used for inter colo replication.int
replicationNumOfInterDCReplicaThreads
The number of replica threads on each server that runs the replication protocol for inter dc replicationint
replicationNumOfIntraDCReplicaThreads
The number of replica threads on each server that runs the replication protocol for intra dc replicationboolean
replicationPersistTokenOnShutdownOrReplicaRemove
If true, replication token will be persisted when shutdown or replica remote.long
replicationReplicaThreadIdleSleepDurationMs
The time (in ms) to sleep between replication cycles when the replica thread is not doing any useful workint
replicationStandbyWaitTimeoutToTriggerCrossColoFetchSeconds
The time (in seconds) for standby replicas to wait before fetching missing keys from replicas in cross colo data centers.java.lang.String
replicationStoreTokenFactory
The factory class the replication uses to creates its tokenslong
replicationSyncedReplicaBackoffDurationMs
The time (in ms) to temporarily disable replication for a replica in order to reduce wasteful network callsint
replicationTokenFlushDelaySeconds
The initial delay to start the replica token flush threadint
replicationTokenFlushIntervalSeconds
The flush interval for persisting the replica tokens to diskboolean
replicationTrackPerDatacenterLagFromLocal
If true, register metrics that track remote replica's lag from local at datacenter level.boolean
replicationTrackPerPartitionLagFromRemote
If true, replication will register metric for each partition to track lag between local and remote replicas.java.util.Set<java.lang.String>
replicationVcrRecoveryPartitions
Comma separated list of partitions to recover.
-
Constructor Summary
Constructors Constructor Description ReplicationConfig(VerifiableProperties verifiableProperties)
-
-
-
Field Detail
-
REPLICATION_CLOUD_TOKEN_FACTORY
public static final java.lang.String REPLICATION_CLOUD_TOKEN_FACTORY
- See Also:
- Constant Field Values
-
REPLICA_TOKEN_FILE_NAME
public static final java.lang.String REPLICA_TOKEN_FILE_NAME
- See Also:
- Constant Field Values
-
REPLICATION_MODEL_ACROSS_DATACENTERS
public static final java.lang.String REPLICATION_MODEL_ACROSS_DATACENTERS
- See Also:
- Constant Field Values
-
REPLICATION_STANDBY_WAIT_TIMEOUT_TO_TRIGGER_CROSS_COLO_FETCH_SECONDS
public static final java.lang.String REPLICATION_STANDBY_WAIT_TIMEOUT_TO_TRIGGER_CROSS_COLO_FETCH_SECONDS
- See Also:
- Constant Field Values
-
replicationStoreTokenFactory
@Config("replication.token.factory") @Default("com.github.ambry.store.StoreFindTokenFactory") public final java.lang.String replicationStoreTokenFactory
The factory class the replication uses to creates its tokens
-
replicationCloudTokenFactory
@Config("replication.cloud.token.factory") @Default("com.github.ambry.cloud.azure.CosmosUpdateTimeFindTokenFactory") public final java.lang.String replicationCloudTokenFactory
The factory class the replication uses to create cloud token
-
replicationNumOfIntraDCReplicaThreads
@Config("replication.no.of.intra.dc.replica.threads") @Default("1") public final int replicationNumOfIntraDCReplicaThreads
The number of replica threads on each server that runs the replication protocol for intra dc replication
-
replicationNumOfInterDCReplicaThreads
@Config("replication.no.of.inter.dc.replica.threads") @Default("1") public final int replicationNumOfInterDCReplicaThreads
The number of replica threads on each server that runs the replication protocol for inter dc replication
-
replicationConnectionPoolCheckoutTimeoutMs
@Config("replication.connection.pool.checkout.timeout.ms") @Default("5000") public final int replicationConnectionPoolCheckoutTimeoutMs
The timeout to get a connection checkout from the connection pool for replication
-
replicationTokenFlushIntervalSeconds
@Config("replication.token.flush.interval.seconds") @Default("300") public final int replicationTokenFlushIntervalSeconds
The flush interval for persisting the replica tokens to disk
-
replicationTokenFlushDelaySeconds
@Config("replication.token.flush.delay.seconds") @Default("5") public final int replicationTokenFlushDelaySeconds
The initial delay to start the replica token flush thread
-
replicationIntraReplicaThreadThrottleSleepDurationMs
@Config("replication.intra.replica.thread.throttle.sleep.duration.ms") @Default("0") public final long replicationIntraReplicaThreadThrottleSleepDurationMs
The time (in ms) to sleep between replication cycles to throttle the replica thread in case the thread handles intra datacenter replicas
-
replicationInterReplicaThreadThrottleSleepDurationMs
@Config("replication.inter.replica.thread.throttle.sleep.duration.ms") @Default("0") public final long replicationInterReplicaThreadThrottleSleepDurationMs
The time (in ms) to sleep between replication cycles to throttle the replica thread in case the thread handles inter datacenter replicas
-
replicationReplicaThreadIdleSleepDurationMs
@Config("replication.replica.thread.idle.sleep.duration.ms") @Default("0") public final long replicationReplicaThreadIdleSleepDurationMs
The time (in ms) to sleep between replication cycles when the replica thread is not doing any useful work
-
replicationSyncedReplicaBackoffDurationMs
@Config("replication.synced.replica.backoff.duration.ms") @Default("0") public final long replicationSyncedReplicaBackoffDurationMs
The time (in ms) to temporarily disable replication for a replica in order to reduce wasteful network calls
-
replicationFetchSizeInBytes
@Config("replication.fetch.size.in.bytes") @Default("1048576") public final long replicationFetchSizeInBytes
The fetch size is an approximate total size that a remote server would return on a fetch request. This is not guaranteed to be always obeyed. For example, if a single blob is larger than the fetch size the entire blob would be returned
-
replicationMaxPartitionCountPerRequest
@Config("replication.max.partition.count.per.request") @Default("20") public final int replicationMaxPartitionCountPerRequest
The maximum number of partitions on remote node can be replicated within a single replication request. If local node shares more partitions than this number with peer node, the partitions will be split into several lists (with size <= max partition count) and will be replicated sequentially in separate replication cycles. If set to 0, it means there is no limit.
-
replicationIncludeAll
@Config("replication.include.all") @Default("true") public final boolean replicationIncludeAll
If true, replication Get requests asks for deleted and expired blobs as well to succeed in scenarios where blobs get deleted or expired after replication metadata exchange.
-
replicationPersistTokenOnShutdownOrReplicaRemove
@Config("replication.persist.token.on.shutdown.or.replica.remove") @Default("true") public final boolean replicationPersistTokenOnShutdownOrReplicaRemove
If true, replication token will be persisted when shutdown or replica remote. For CloudBackupManger and ReplicationManager, token is persisted when shutdown if this config is true. For CloudBackupManger, where replica may be removed, token is also persisted if this config is true. ReplicationManager doesn't support replica remove now. This is used for test only as of now.
-
replicationTrackPerPartitionLagFromRemote
@Config("replication.track.per.partition.lag.from.remote") @Default("false") public final boolean replicationTrackPerPartitionLagFromRemote
If true, replication will register metric for each partition to track lag between local and remote replicas. This metric indicates how far local replica is behind remote peer replica.
-
replicationTrackPerDatacenterLagFromLocal
@Config("replication.track.per.datacenter.lag.from.local") @Default("true") public final boolean replicationTrackPerDatacenterLagFromLocal
If true, register metrics that track remote replica's lag from local at datacenter level. These metrics indicate how far remote replicas (in certain dc) are behind local replicas (on current node). If enabled, it records max/min/avg remote replica lag separately in each datacenter.
-
replicaMetadataRequestVersion
@Config("replication.metadata.request.version") @Default("1") public final short replicaMetadataRequestVersion
The version of metadata request to be used for replication.
-
replicationEnabledWithVcrCluster
@Config("replication.enabled.with.vcr.cluster") @Default("false") public final boolean replicationEnabledWithVcrCluster
If set to true, the Ambry data nodes will also replicate from vcr nodes based on vcr helix cluster map.
-
replicationVcrRecoveryPartitions
@Config("replication.vcr.recovery.partitions") @Default("") public final java.util.Set<java.lang.String> replicationVcrRecoveryPartitions
Comma separated list of partitions to recover. This config will ignore the partition leadership information for recovering partitions.
-
replicationModelAcrossDatacenters
@Config("replication.model.across.datacenters") @Default("ALL_TO_ALL") public final ReplicationModelType replicationModelAcrossDatacenters
To specify the type of replication to be used for inter colo replication. It has two values - "ALL_TO_ALL" or "LEADER_BASED". Default value is "ALL_TO_ALL". If set to "LEADER_BASED", inter colo replication between will be limited to the leaders(as elected by Helix) of the partition of each datacenter. If set to "ALL_TO_ALL", inter colo replication will be in an all-to-all fashion, i.e. each replica talks to all other replicas irrespective of their state. Intra colo replication will continue as all-to-all fashion in both the models.
-
replicationEnableHttp2
@Config("replication.enable.http2") @Default("false") public final boolean replicationEnableHttp2
Use http2 connection for replication if this is true. DO NOT enable http2 replication. Not ready.
-
replicationContainerDeletionRetentionDays
@Config("replication.container.deletion.retention.days") @Default("14") public final int replicationContainerDeletionRetentionDays
How long (in days) a container must be replicated before it's been deleted during compaction.
-
replicationContainerDeletionEnabled
@Config("replication.container.deletion.enabled") @Default("false") public final boolean replicationContainerDeletionEnabled
True to enable skip deprecated containers in replication.
-
replicationStandbyWaitTimeoutToTriggerCrossColoFetchSeconds
@Config("replication.standby.wait.timeout.to.trigger.cross.colo.fetch.seconds") @Default("120") public final int replicationStandbyWaitTimeoutToTriggerCrossColoFetchSeconds
The time (in seconds) for standby replicas to wait before fetching missing keys from replicas in cross colo data centers. This is applicable during leader based replication where standby replicas don't fetch the missing keys found in metadata exchange from cross colo replicas and expect them to come from leader replica in local data center via intra-dc replication. This time out ensures that standby replicas are not stuck indefinitely waiting for the missing keys to come via intra-dc replication by doing cross colo fetch themselves. Default value is 120 seconds. If configured to -1, this timeout doesn't take effect, i.e. cross colo fetch for standby replicas is never done.
-
-
Constructor Detail
-
ReplicationConfig
public ReplicationConfig(VerifiableProperties verifiableProperties)
-
-