Package com.github.ambry.config
Class HelixAccountServiceConfig
- java.lang.Object
-
- com.github.ambry.config.AccountServiceConfig
-
- com.github.ambry.config.HelixAccountServiceConfig
-
public class HelixAccountServiceConfig extends AccountServiceConfig
Config forHelixAccountServiceConfig
-
-
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
ENABLE_SERVE_FROM_BACKUP
boolean
enableServeFromBackup
If true, HelixAccountService would load the account metadata from local backup file when fetching from helix fails.static java.lang.String
HELIX_ACCOUNT_SERVICE_PREFIX
static java.lang.String
MAX_BACKUP_FILE_COUNT
int
maxBackupFileCount
The maximum number of local backup files kept in disk.static java.lang.String
TOTAL_NUMBER_OF_VERSION_TO_KEEP
int
totalNumberOfVersionToKeep
Total number of previous versions of account metadata to keep in the system.static java.lang.String
UPDATE_DISABLED
boolean
updateDisabled
If true, HelixAccountService would reject all the requests to update accounts.static java.lang.String
UPDATER_POLLING_INTERVAL_MS_KEY
static java.lang.String
UPDATER_SHUT_DOWN_TIMEOUT_MS_KEY
int
updaterPollingIntervalMs
The time interval in second between two consecutive account pulling for the background account updater ofHelixAccountService
.int
updaterShutDownTimeoutMs
The timeout in ms to shut down the account updater ofHelixAccountService
.static java.lang.String
USE_NEW_ZNODE_PATH
boolean
useNewZNodePath
If true, then use the new znode path to store list of blob ids that point to account metadata content.static java.lang.String
ZK_CLIENT_CONNECT_STRING_KEY
java.lang.String
zkClientConnectString
The ZooKeeper server address.-
Fields inherited from class com.github.ambry.config.AccountServiceConfig
ACCOUNT_SERVICE_PREFIX, CONTAINER_ID_START_NUMBER, containerIdStartNumber, IGNORE_VERSION_MISMATCH, ignoreVersionMismatch, MAX_RETRY_COUNT_ON_UPDATE_FAILURE, maxRetryCountOnUpdateFailure, RETRY_DELAY_MS, retryDelayMs
-
-
Constructor Summary
Constructors Constructor Description HelixAccountServiceConfig(VerifiableProperties verifiableProperties)
-
-
-
Field Detail
-
HELIX_ACCOUNT_SERVICE_PREFIX
public static final java.lang.String HELIX_ACCOUNT_SERVICE_PREFIX
- See Also:
- Constant Field Values
-
UPDATER_POLLING_INTERVAL_MS_KEY
public static final java.lang.String UPDATER_POLLING_INTERVAL_MS_KEY
- See Also:
- Constant Field Values
-
UPDATER_SHUT_DOWN_TIMEOUT_MS_KEY
public static final java.lang.String UPDATER_SHUT_DOWN_TIMEOUT_MS_KEY
- See Also:
- Constant Field Values
-
BACKUP_DIRECTORY_KEY
public static final java.lang.String BACKUP_DIRECTORY_KEY
- See Also:
- Constant Field Values
-
MAX_BACKUP_FILE_COUNT
public static final java.lang.String MAX_BACKUP_FILE_COUNT
- See Also:
- Constant Field Values
-
ZK_CLIENT_CONNECT_STRING_KEY
public static final java.lang.String ZK_CLIENT_CONNECT_STRING_KEY
- See Also:
- Constant Field Values
-
USE_NEW_ZNODE_PATH
public static final java.lang.String USE_NEW_ZNODE_PATH
- See Also:
- Constant Field Values
-
UPDATE_DISABLED
public static final java.lang.String UPDATE_DISABLED
- See Also:
- Constant Field Values
-
ENABLE_SERVE_FROM_BACKUP
public static final java.lang.String ENABLE_SERVE_FROM_BACKUP
- See Also:
- Constant Field Values
-
TOTAL_NUMBER_OF_VERSION_TO_KEEP
public static final java.lang.String TOTAL_NUMBER_OF_VERSION_TO_KEEP
- See Also:
- Constant Field Values
-
zkClientConnectString
@Config("helix.account.service.zk.client.connect.string") public final java.lang.String zkClientConnectString
The ZooKeeper server address. This config is required when usingHelixAccountService
.
-
updaterPollingIntervalMs
@Config("helix.account.service.updater.polling.interval.ms") @Default("60 * 60 * 1000") public final int updaterPollingIntervalMs
The time interval in second between two consecutive account pulling for the background account updater ofHelixAccountService
. Setting to 0 to disable it.
-
updaterShutDownTimeoutMs
@Config("helix.account.service.updater.shut.down.timeout.ms") @Default("60 * 1000") public final int updaterShutDownTimeoutMs
The timeout in ms to shut down the account updater ofHelixAccountService
.
-
backupDir
@Config("helix.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("helix.account.service.max.backup.file.count") @Default("100") 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.
-
useNewZNodePath
@Config("helix.account.service.use.new.znode.path") @Default("false") public final boolean useNewZNodePath
If true, then use the new znode path to store list of blob ids that point to account metadata content.
-
updateDisabled
@Config("helix.account.service.update.disabled") @Default("false") public final boolean updateDisabled
If true, HelixAccountService would reject all the requests to update accounts.
-
enableServeFromBackup
@Config("helix.account.service.enable.serve.from.backup") @Default("false") public final boolean enableServeFromBackup
If true, HelixAccountService would load the account metadata from local backup file when fetching from helix fails. Set it to false while transitioning, since the old backup files don't have up-to-date account metadata.
-
totalNumberOfVersionToKeep
@Config("helix.account.service.total.number.of.version.to.keep") @Default("100") public final int totalNumberOfVersionToKeep
Total number of previous versions of account metadata to keep in the system. Every update account http request would generate a new version. And when the number of versions surpasses this number, HelixAccountService will purge the oldest one to make room for the new one.
-
-
Constructor Detail
-
HelixAccountServiceConfig
public HelixAccountServiceConfig(VerifiableProperties verifiableProperties)
-
-