Class StoreConfig


  • public class StoreConfig
    extends java.lang.Object
    The configs for the store
    • Field Detail

      • storeKeyFactory

        @Config("store.key.factory")
        @Default("com.github.ambry.commons.BlobIdFactory")
        public final java.lang.String storeKeyFactory
        The factory class the store uses to creates its keys
      • storeDataFlushIntervalSeconds

        @Config("store.data.flush.interval.seconds")
        @Default("60")
        public final long storeDataFlushIntervalSeconds
        The frequency at which the data gets flushed to disk
      • storeIndexMaxMemorySizeBytes

        @Config("store.index.max.memory.size.bytes")
        @Default("20971520")
        public final int storeIndexMaxMemorySizeBytes
        The max size of the index that can reside in memory in bytes for a single store
      • storeDataFlushDelaySeconds

        @Config("store.data.flush.delay.seconds")
        @Default("5")
        public final int storeDataFlushDelaySeconds
        The delay after which the data flush thread starts on startup
      • storeIndexMaxNumberOfInmemElements

        @Config("store.index.max.number.of.inmem.elements")
        @Default("10000")
        public final int storeIndexMaxNumberOfInmemElements
        The max number of the elements in the index that can be in memory for a single store
      • storeMaxNumberOfEntriesToReturnFromJournal

        @Config("store.max.number.of.entries.to.return.from.journal")
        @Default("5000")
        public final int storeMaxNumberOfEntriesToReturnFromJournal
        The max number of entries that the journal will return each time it is queried for entries
      • storeIndexBloomMaxFalsePositiveProbability

        @Config("store.index.bloom.max.false.positive.probability")
        @Default("0.01")
        public final double storeIndexBloomMaxFalsePositiveProbability
        The max probability of a false positive for the index bloom filter
      • storeDeletedMessageRetentionHours

        @Config("store.deleted.message.retention.hours")
        @Default("168")
        public final int storeDeletedMessageRetentionHours
        How long (in hours) a key must be in deleted state before it is hard deleted. Minimum value: 1 hour.
      • storeCompactionPolicySwitchTimestampDays

        @Config("store.compaction.policy.switch.timestamp.days")
        @Default("7")
        public final int storeCompactionPolicySwitchTimestampDays
        How often the HybridCompactionPolicy switch from StatsBasedCompactionPolicy to CompactAllPolicy based on timestamp.
      • storeCompactionPolicySwitchCounterDays

        @Config("store.compaction.policy.switch.counter.days")
        @Default("7")
        public final int storeCompactionPolicySwitchCounterDays
        How often the HybridCompactionPolicy switch from StatsBasedCompactionPolicy to CompactAllPolicy based on counter value.
      • storeContainerDeletionRetentionDays

        @Config("store.container.deletion.retention.days")
        @Default("14")
        public final int storeContainerDeletionRetentionDays
        How long (in days) a container must be in DELETE_IN_PROGRESS state before it's been deleted during compaction.
      • storeHardDeleteOperationsBytesPerSec

        @Config("store.hard.delete.operations.bytes.per.sec")
        @Default("100*1024")
        public final int storeHardDeleteOperationsBytesPerSec
        The rate of I/O allowed per disk for hard deletes.
      • storeCompactionOperationsBytesPerSec

        @Config("store.compaction.operations.bytes.per.sec")
        @Default("1*1024*1024")
        public final int storeCompactionOperationsBytesPerSec
        The rate of I/O allowed per disk for compaction.
      • storeCompactionEnableDirectIO

        @Config("store.compaction.enable.direct.io")
        @Default("false")
        public final boolean storeCompactionEnableDirectIO
        Whether direct IO are to be enable or not for compaction. This is only supported on > Linux 2.6
      • storeCompactionMinBufferSize

        @Config("store.compaction.min.buffer.size")
        @Default("10*1024*1024")
        public final int storeCompactionMinBufferSize
        The minimum buffer size for compaction copy phase.
      • storeCompactionFilter

        @Config("store.compaction.filter")
        @Default("IndexSegmentValidEntryFilterWithoutUndelete")
        public final java.lang.String storeCompactionFilter
        The IndexSegmentValidEntryFilter type to use for compaction.
      • storeEnableHardDelete

        @Config("store.enable.hard.delete")
        @Default("false")
        public final boolean storeEnableHardDelete
        Whether hard deletes are to be enabled or not
      • storeSegmentSizeInBytes

        @Config("store.segment.size.in.bytes")
        @Default("9223372036854775807")
        public final long storeSegmentSizeInBytes
        The size of a single segment in the log. Only relevant for first startup of a Store.
      • storeCompactionTriggers

        @Config("store.compaction.triggers")
        @Default("")
        public final java.lang.String[] storeCompactionTriggers
        Comma separated list of the compaction triggers that should be enabled. If this config is an empty string, compaction will not be enabled. The valid triggers are: Periodic,Admin
      • storeCompactionCheckFrequencyInHours

        @Config("store.compaction.check.frequency.in.hours")
        @Default("7*24")
        public final int storeCompactionCheckFrequencyInHours
        The frequency (in hours) at which a store is checked to see whether it is ready for compaction.
      • storeMinUsedCapacityToTriggerCompactionInPercentage

        @Config("store.min.used.capacity.to.trigger.compaction.in.percentage")
        @Default("50")
        public final int storeMinUsedCapacityToTriggerCompactionInPercentage
        The minimum capacity that has to be used (as a percentage of the total capacity) for the store to trigger compaction
      • storeCompactionPolicyFactory

        @Config("store.compaction.policy.factory")
        @Default("com.github.ambry.store.CompactAllPolicyFactory")
        public final java.lang.String storeCompactionPolicyFactory
        The factory class used to get the compaction policy
      • storeMinLogSegmentCountToReclaimToTriggerCompaction

        @Config("store.min.log.segment.count.to.reclaim.to.trigger.compaction")
        @Default("1")
        public final int storeMinLogSegmentCountToReclaimToTriggerCompaction
        The minimum number of log segments to be reclaimed to trigger compaction. It is up to the compaction policy implementation to honor this config if need be.
      • storeStatsBucketCount

        @Config("store.stats.bucket.count")
        @Default("0")
        public final int storeStatsBucketCount
        The number of buckets for stats bucketing, a value of 0 will disable bucketing.
      • storeStatsBucketSpanInMinutes

        @Config("store.stats.bucket.span.in.minutes")
        @Default("60")
        public final long storeStatsBucketSpanInMinutes
        The time span of each bucket in minutes.
      • storeStatsRecentEntryProcessingIntervalInMinutes

        @Config("store.stats.recent.entry.processing.interval.in.minutes")
        @Default("2")
        public final long storeStatsRecentEntryProcessingIntervalInMinutes
        Period in minutes to specify how frequent is the queue processor executed.
      • storeStatsWaitTimeoutInSecs

        @Config("store.stats.wait.timeout.in.secs")
        @Default("2*60")
        public final long storeStatsWaitTimeoutInSecs
        The upper limit in seconds for requests to wait for a ongoing construction of buckets (that contains the answer) to complete.
      • storeStatsIndexEntriesPerSecond

        @Config("store.stats.index.entries.per.second")
        @Default("240000")
        public final int storeStatsIndexEntriesPerSecond
        Specifies the number of index entries that can be read per second for stats collection.
      • storeIndexPersistedEntryMinBytes

        @Config("store.index.persisted.entry.min.bytes")
        @Default("115")
        public final int storeIndexPersistedEntryMinBytes
        Specifies the minimum size that index entries should occupy when they get persisted. If the number of bytes for constituting keys and values fall short of this size, the entries will be padded with dummy bytes to amount to this number. Setting this value to N bytes ensures that even if the size of keys put to the store changes at runtime, as long as the total entry size is still N bytes, the key size change will not cause the active index segment to roll over.
      • storeValidateAuthorization

        @Config("store.validate.authorization")
        @Default("false")
        public final boolean storeValidateAuthorization
        Enables or disables accountId and containerId validation for GET/DELETE request.
      • storeReplicaStatusDelegateEnable

        @Config("store.replica.status.delegate.enable")
        @Default("false")
        public final boolean storeReplicaStatusDelegateEnable
        Enables or disables ReplicaStatusDelegate to dynamically set the replica sealed/stopped status
      • storeReplicaStatusDelegateEnableName

        public static final java.lang.String storeReplicaStatusDelegateEnableName
        See Also:
        Constant Field Values
      • storeReadOnlyEnableSizeThresholdPercentage

        @Config("store.read.only.enable.size.threshold.percentage")
        @Default("95")
        public final int storeReadOnlyEnableSizeThresholdPercentage
        Specifies the size threshold (as percentage of maximum size) of a store for converting the chunk to RO from RW
      • storeReadOnlyEnableSizeThresholdPercentageName

        public static final java.lang.String storeReadOnlyEnableSizeThresholdPercentageName
        See Also:
        Constant Field Values
      • storeReadWriteEnableSizeThresholdPercentageDelta

        @Config("store.read.write.enable.size.threshold.percentage.delta")
        @Default("5")
        public final int storeReadWriteEnableSizeThresholdPercentageDelta
        Specifies the size threshold delta below storeReadOnlyEnableSizeThresholdPercentageName that a store will be converted from RO to RW
      • storeReadWriteEnableSizeThresholdPercentageDeltaName

        public static final java.lang.String storeReadWriteEnableSizeThresholdPercentageDeltaName
        See Also:
        Constant Field Values
      • storeTtlUpdateBufferTimeSeconds

        @Config("store.ttl.update.buffer.time.seconds")
        @Default("60 * 60 * 24")
        public final int storeTtlUpdateBufferTimeSeconds
        Specifies the minimum number of seconds before a blob's current expiry time (creation time + TTL) that the current time has to be in order for a TTL update operation on the blob to succeed.
      • storeTtlUpdateBufferTimeSecondsName

        public static final java.lang.String storeTtlUpdateBufferTimeSecondsName
        See Also:
        Constant Field Values
      • storeIndexMemState

        @Config("store.index.mem.state")
        @Default("MMAP_WITHOUT_FORCE_LOAD")
        public final IndexMemState storeIndexMemState
        Provides a hint for how indexes should be treated w.r.t memory
      • storeIndexMemStateName

        public static final java.lang.String storeIndexMemStateName
        See Also:
        Constant Field Values
      • storeIoErrorCountToTriggerShutdown

        @Config("store.io.error.count.to.trigger.shutdown")
        @Default("Integer.MAX_VALUE")
        public final int storeIoErrorCountToTriggerShutdown
        Specifies the threshold I/O error count of store to trigger shutdown operation on the store.
      • storeSetFilePermissionEnabled

        @Config("store.set.file.permission.enabled")
        @Default("false")
        public final boolean storeSetFilePermissionEnabled
        Whether to set certain permissions for files in store.
      • storeDataFilePermission

        @Config("store.data.file.permission")
        @Default("rw-rw----")
        public final java.util.Set<java.nio.file.attribute.PosixFilePermission> storeDataFilePermission
        Specifies the permissions for data files in store. (Data files are user data related files for example, log segment, index segment and bloom filter etc)
      • storeOperationFilePermission

        @Config("store.operation.file.permission")
        @Default("rw-rw-r--")
        public final java.util.Set<java.nio.file.attribute.PosixFilePermission> storeOperationFilePermission
        Specifies the permissions for operation files in store. (Operation files are usually generated by ambry to keep track of store state like compaction log, clean shutdown file, etc)
      • storeUuidBasedBloomFilterEnabled

        @Config("store.uuid.based.bloom.filter.enabled")
        @Default("false")
        public final boolean storeUuidBasedBloomFilterEnabled
        Whether to populate bloom filter with UUID only for index segment.
      • storeIndexRebuildBloomFilterEnabled

        @Config("store.index.rebuild.bloom.filter.enabled")
        @Default("false")
        public final boolean storeIndexRebuildBloomFilterEnabled
        Whether to rebuild index bloom filter during startup. If true, store will cleanup existing bloom files and rebuild them based on index segments when server restarts.
      • storeContainerDeletionEnabled

        @Config("store.container.deletion.enabled")
        @Default("false")
        public final boolean storeContainerDeletionEnabled
        True to enable container deletion in store.
      • storeSetLocalPartitionStateEnabled

        @Config("store.set.local.partition.state.enabled")
        @Default("false")
        public final boolean storeSetLocalPartitionStateEnabled
        Whether to set local partition state through InstanceConfig in Helix. If true, store is allowed to enable/disable partition on local node by calling InstanceConfig API.
      • storeEnableBucketForLogSegmentReports

        @Config("store.enable.bucket.for.log.segment.reports")
        @Default("false")
        public final boolean storeEnableBucketForLogSegmentReports
        True to enable bucket reports for log segment. This is only effective when the bucket count is greater than 0.
      • storeAlwaysEnableTargetIndexDuplicateChecking

        @Config("store.always.enable.target.index.duplicate.checking")
        @Default("false")
        public final boolean storeAlwaysEnableTargetIndexDuplicateChecking
      • storeAlwaysEnableTargetIndexDuplicateCheckingName

        public static final java.lang.String storeAlwaysEnableTargetIndexDuplicateCheckingName
        See Also:
        Constant Field Values