Interface SegmentRevisionGC
-
- All Known Implementing Classes:
SegmentRevisionGCMBean
public interface SegmentRevisionGC
This MBean exposes the settings fromSegmentGCOptions
and reflects the GC status as reported by theGCMonitor
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancelRevisionGC()
Cancel a running revision garbage collection operation.long
getCompactedNodes()
long
getEstimatedCompactableNodes()
int
getEstimatedRevisionGCCompletion()
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.long
getGcSizeDeltaEstimation()
String
getGCType()
long
getLastCleanup()
long
getLastCompaction()
@Nullable String
getLastError()
@NotNull String
getLastLogMessage()
long
getLastReclaimedSize()
long
getLastRepositorySize()
int
getMemoryThreshold()
Get the available memory threshold beyond which revision gc will be canceled.int
getRetainedGenerations()
Number of segment generations to retain.int
getRetryCount()
Get the number of tries to compact concurrent commits on top of already compacted commitslong
getRevisionGCProgressLog()
@NotNull String
getStatus()
boolean
isEstimationDisabled()
boolean
isPausedCompaction()
boolean
isRevisionGCRunning()
void
setEstimationDisabled(boolean disabled)
Disables the estimation phase, thus allowing GC to run every time.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.void
setGcSizeDeltaEstimation(long gcSizeDeltaEstimation)
void
setGCType(String gcType)
void
setMemoryThreshold(int memoryThreshold)
Set the available memory threshold beyond which revision gc will be canceled.void
setPausedCompaction(boolean paused)
Set revision gc to paused.void
setRetainedGenerations(int retainedGenerations)
Set the number of segment generations to retain: each compaction run creates a new segment generation.void
setRetryCount(int retryCount)
Set the number of tries to compact concurrent commits on top of already compacted commitsvoid
setRevisionGCProgressLog(long gcProgressLog)
Set the size of the logging interval,-1
means disabledvoid
startRevisionGC()
Initiate a revision garbage collection operation
-
-
-
Field Detail
-
TYPE
static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
isPausedCompaction
boolean isPausedCompaction()
- Returns:
true
iff 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.retainGenerations
determines 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
null
if none.
-
getLastLogMessage
@NotNull @NotNull String getLastLogMessage()
- Returns:
- last log message or
null
if 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 between0
and100
is expected. Setting this to0
will disable the check.- Parameters:
memoryThreshold
-
-
isRevisionGCRunning
boolean isRevisionGCRunning()
- Returns:
true
if 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
-1
if the estimation can't be performed
-
getEstimatedRevisionGCCompletion
int getEstimatedRevisionGCCompletion()
- Returns:
- percentage of progress for the current compaction cycle. Can be
-1
if the estimation can't be performed.
-
getRevisionGCProgressLog
long getRevisionGCProgressLog()
- Returns:
- Number of nodes the monitor will log a message,
-1
means disabled
-
setRevisionGCProgressLog
void setRevisionGCProgressLog(long gcProgressLog)
Set the size of the logging interval,-1
means disabled- Parameters:
gcProgressLog
- number of nodes
-
-