Interface SegmentRevisionGC
- All Known Implementing Classes:
SegmentRevisionGCMBean
public interface SegmentRevisionGC
This MBean exposes the settings from
SegmentGCOptions and
reflects the GC status as reported by the GCMonitor.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCancel a running revision garbage collection operation.longlongintintGet 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.longlonglong@Nullable String@NotNull StringlonglongintGet the available memory threshold beyond which revision gc will be canceled.intNumber of segment generations to retain.intGet the number of tries to compact concurrent commits on top of already compacted commitslong@NotNull StringbooleanbooleanbooleanvoidsetEstimationDisabled(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) voidvoidsetMemoryThreshold(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 disabledvoidInitiate a revision garbage collection operation
-
Field Details
-
TYPE
- See Also:
-
-
Method Details
-
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
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
-
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
- Returns:
- last error or
nullif none.
-
getLastLogMessage
- Returns:
- last log message or
nullif none.
-
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
-