Package com.github.ambry.config
Class MySqlAccountServiceConfig
- java.lang.Object
-
- com.github.ambry.config.AccountServiceConfig
-
- com.github.ambry.config.MySqlAccountServiceConfig
-
public class MySqlAccountServiceConfig extends AccountServiceConfig
Configs for MySqlAccountService
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BACKUP_DIRECTORY_KEY
java.lang.String
backupDir
The directory on the local machine where account data backups will be stored before updating accounts.static java.lang.String
DB_EXECUTE_BATCH_SIZE
static java.lang.String
DB_INFO
int
dbExecuteBatchSize
The number of mysql insert/update statements that can be batched together for execution.java.lang.String
dbInfo
Serialized json array containing the information about all mysql end points.int
maxBackupFileCount
The maximum number of local backup files kept in disk.static java.lang.String
MYSQL_ACCOUNT_SERVICE_PREFIX
static java.lang.String
UPDATE_DISABLED
boolean
updateDisabled
If true, MySqlAccountService would reject all the requests to update accounts.static java.lang.String
UPDATER_POLLING_INTERVAL_SECONDS
static java.lang.String
UPDATER_SHUT_DOWN_TIMEOUT_MINUTES
int
updaterPollingIntervalSeconds
The time interval in seconds between two consecutive account pulling for the background account updater ofMySqlAccountService
.int
updaterShutDownTimeoutMinutes
The timeout in minutes to shut down the account updater ofMySqlAccountService
.-
Fields inherited from class com.github.ambry.config.AccountServiceConfig
ACCOUNT_SERVICE_PREFIX, CONTAINER_DEPRECATION_RETENTION_DAYS, CONTAINER_ID_START_NUMBER, containerDeprecationRetentionDays, containerIdStartNumber, IGNORE_VERSION_MISMATCH, ignoreVersionMismatch, MAX_RETRY_COUNT_ON_UPDATE_FAILURE, maxRetryCountOnUpdateFailure, RETRY_DELAY_MS, retryDelayMs
-
-
Constructor Summary
Constructors Constructor Description MySqlAccountServiceConfig(VerifiableProperties verifiableProperties)
-
-
-
Field Detail
-
MYSQL_ACCOUNT_SERVICE_PREFIX
public static final java.lang.String MYSQL_ACCOUNT_SERVICE_PREFIX
- See Also:
- Constant Field Values
-
DB_INFO
public static final java.lang.String DB_INFO
- See Also:
- Constant Field Values
-
UPDATER_POLLING_INTERVAL_SECONDS
public static final java.lang.String UPDATER_POLLING_INTERVAL_SECONDS
- See Also:
- Constant Field Values
-
UPDATER_SHUT_DOWN_TIMEOUT_MINUTES
public static final java.lang.String UPDATER_SHUT_DOWN_TIMEOUT_MINUTES
- See Also:
- Constant Field Values
-
BACKUP_DIRECTORY_KEY
public static final java.lang.String BACKUP_DIRECTORY_KEY
- See Also:
- Constant Field Values
-
UPDATE_DISABLED
public static final java.lang.String UPDATE_DISABLED
- See Also:
- Constant Field Values
-
DB_EXECUTE_BATCH_SIZE
public static final java.lang.String DB_EXECUTE_BATCH_SIZE
- See Also:
- Constant Field Values
-
dbInfo
@Config("mysql.account.service.db.info") @Default("") public final java.lang.String dbInfo
Serialized json array containing the information about all mysql end points. This information should be of the following form:[ { "url":"mysql-host1" "datacenter":"dc1", "isWriteable": "true", "username":"root", "password":"password" }, { "url":"mysql-host2" "datacenter":"dc2", "isWriteable": "false", "username":"root", "password":"password" }, { "url":"mysql-host3" "datacenter":"dc3", "isWriteable": "false", "username":"root", "password":"password" } ]
-
updaterPollingIntervalSeconds
@Config("mysql.account.service.updater.polling.interval.seconds") @Default("60") public final int updaterPollingIntervalSeconds
The time interval in seconds between two consecutive account pulling for the background account updater ofMySqlAccountService
. Setting to 0 will disable it. Default value is 60 seconds.
-
updaterShutDownTimeoutMinutes
@Config("mysql.account.service.updater.shut.down.timeout.minutes") @Default("2") public final int updaterShutDownTimeoutMinutes
The timeout in minutes to shut down the account updater ofMySqlAccountService
. Default value is 2 minutes.
-
backupDir
@Config("mysql.account.service.backup.dir") @Default("") public final java.lang.String backupDir
The directory on the local machine where account data backups will be stored before updating accounts. If this string is empty, backups will be disabled.
-
maxBackupFileCount
@Config("mysql.account.service.max.backup.file.count") @Default("10") public final int maxBackupFileCount
The maximum number of local backup files kept in disk. When account service exceeds this count, every time it creates a new backup file, it will remove the oldest one.
-
updateDisabled
@Config("mysql.account.service.update.disabled") @Default("false") public final boolean updateDisabled
If true, MySqlAccountService would reject all the requests to update accounts.
-
-
Constructor Detail
-
MySqlAccountServiceConfig
public MySqlAccountServiceConfig(VerifiableProperties verifiableProperties)
-
-