Interface SegmentRevisionGC
-
- All Known Implementing Classes:
SegmentRevisionGCMBean
public interface SegmentRevisionGCThis MBean exposes the settings fromSegmentGCOptionsand reflects the GC status as reported by theGCMonitor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancelRevisionGC()Cancel a running revision garbage collection operation.longgetCompactedNodes()longgetEstimatedCompactableNodes()intgetEstimatedRevisionGCCompletion()intgetForceTimeout()Get the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached.longgetGcSizeDeltaEstimation()StringgetGCType()longgetLastCleanup()longgetLastCompaction()@Nullable StringgetLastError()@NotNull StringgetLastLogMessage()longgetLastReclaimedSize()longgetLastRepositorySize()intgetMemoryThreshold()Get the available memory threshold beyond which revision gc will be canceled.intgetRetainedGenerations()Number of segment generations to retain.intgetRetryCount()Get the number of tries to compact concurrent commits on top of already compacted commitslonggetRevisionGCProgressLog()@NotNull StringgetStatus()booleanisEstimationDisabled()booleanisPausedCompaction()booleanisRevisionGCRunning()voidsetEstimationDisabled(boolean disabled)Disables the estimation phase, thus allowing GC to run every time.voidsetForceTimeout(int timeout)Set the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached.voidsetGcSizeDeltaEstimation(long gcSizeDeltaEstimation)voidsetGCType(String gcType)voidsetMemoryThreshold(int memoryThreshold)Set the available memory threshold beyond which revision gc will be canceled.voidsetPausedCompaction(boolean paused)Set revision gc to paused.voidsetRetainedGenerations(int retainedGenerations)Set the number of segment generations to retain: each compaction run creates a new segment generation.voidsetRetryCount(int retryCount)Set the number of tries to compact concurrent commits on top of already compacted commitsvoidsetRevisionGCProgressLog(long gcProgressLog)Set the size of the logging interval,-1means disabledvoidstartRevisionGC()Initiate a revision garbage collection operation
-
-
-
Field Detail
-
TYPE
static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPausedCompaction
boolean isPausedCompaction()
- Returns:
trueiff revision gc is paused.
-
setPausedCompaction
void setPausedCompaction(boolean paused)
Set revision gc to paused.- Parameters:
paused-
-
getRetryCount
int getRetryCount()
Get the number of tries to compact concurrent commits on top of already compacted commits- Returns:
- retry count
-
setRetryCount
void setRetryCount(int retryCount)
Set the number of tries to compact concurrent commits on top of already compacted commits- Parameters:
retryCount-
-
getForceTimeout
int getForceTimeout()
Get the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached. Forced compaction acquires an exclusive write lock on the node store.- Returns:
- the number of seconds until forced compaction gives up and the exclusive write lock on the node store is released.
-
setForceTimeout
void setForceTimeout(int timeout)
Set the number of seconds to attempt to force compact concurrent commits on top of already compacted commits after the maximum number of retries has been reached. Forced compaction acquires an exclusively write lock on the node store.- Parameters:
timeout- the number of seconds until forced compaction gives up and the exclusive lock on the node store is released.
-
getRetainedGenerations
int getRetainedGenerations()
Number of segment generations to retain.- Returns:
- number of gc generations.
- See Also:
setRetainedGenerations(int)
-
setRetainedGenerations
void setRetainedGenerations(int retainedGenerations)
Set the number of segment generations to retain: each compaction run creates a new segment generation.retainGenerationsdetermines how many of those generations are retained during cleanup.- Parameters:
retainedGenerations- number of generations to retain. Must be>= 2.- Throws:
IllegalArgumentException- ifretainGenerations < 2
-
getGcSizeDeltaEstimation
long getGcSizeDeltaEstimation()
-
setGcSizeDeltaEstimation
void setGcSizeDeltaEstimation(long gcSizeDeltaEstimation)
-
isEstimationDisabled
boolean isEstimationDisabled()
-
setEstimationDisabled
void setEstimationDisabled(boolean disabled)
Disables the estimation phase, thus allowing GC to run every time.- Parameters:
disabled-
-
getGCType
String getGCType()
-
setGCType
void setGCType(String gcType)
-
startRevisionGC
void startRevisionGC()
Initiate a revision garbage collection operation
-
cancelRevisionGC
void cancelRevisionGC()
Cancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.
-
getLastCompaction
long getLastCompaction()
- Returns:
- time of the last compaction in milliseconds.
-
getLastCleanup
long getLastCleanup()
- Returns:
- time of the last cleanup in milliseconds.
-
getLastRepositorySize
long getLastRepositorySize()
- Returns:
- repository size after the last cleanup.
-
getLastReclaimedSize
long getLastReclaimedSize()
- Returns:
- reclaimed size during the last cleanup.
-
getLastError
@Nullable @Nullable String getLastError()
- Returns:
- last error or
nullif none.
-
getLastLogMessage
@NotNull @NotNull String getLastLogMessage()
- Returns:
- last log message or
nullif none.
-
getStatus
@NotNull @NotNull String getStatus()
- Returns:
- current status.
-
getMemoryThreshold
int getMemoryThreshold()
Get the available memory threshold beyond which revision gc will be canceled. Value represents a percentage so an value between 0 and 100 will be returned.- Returns:
- memory threshold
-
setMemoryThreshold
void setMemoryThreshold(int memoryThreshold)
Set the available memory threshold beyond which revision gc will be canceled. Value represents a percentage so an input between0and100is expected. Setting this to0will disable the check.- Parameters:
memoryThreshold-
-
isRevisionGCRunning
boolean isRevisionGCRunning()
- Returns:
trueif there is an online compaction cycle running
-
getCompactedNodes
long getCompactedNodes()
- Returns:
- number of compacted nodes in the current cycle
-
getEstimatedCompactableNodes
long getEstimatedCompactableNodes()
- Returns:
- number of estimated nodes to be compacted in the current cycle.
Can be
-1if the estimation can't be performed
-
getEstimatedRevisionGCCompletion
int getEstimatedRevisionGCCompletion()
- Returns:
- percentage of progress for the current compaction cycle. Can be
-1if the estimation can't be performed.
-
getRevisionGCProgressLog
long getRevisionGCProgressLog()
- Returns:
- Number of nodes the monitor will log a message,
-1means disabled
-
setRevisionGCProgressLog
void setRevisionGCProgressLog(long gcProgressLog)
Set the size of the logging interval,-1means disabled- Parameters:
gcProgressLog- number of nodes
-
-