Class SegmentRevisionGCMBean
java.lang.Object
javax.management.StandardMBean
org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGCMBean
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,SegmentRevisionGC
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.oak.segment.compaction.SegmentRevisionGC
TYPE -
Constructor Summary
ConstructorsConstructorDescriptionSegmentRevisionGCMBean(@NotNull FileStore fileStore, @NotNull SegmentGCOptions gcOptions, @NotNull FileStoreGCMonitor fileStoreGCMonitor) -
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 operationMethods inherited from class org.apache.jackrabbit.oak.commons.jmx.AnnotatedStandardMBean
getDescription, getDescription, getDescription, getDescription, getImpact, getParameterNameMethods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
Constructor Details
-
SegmentRevisionGCMBean
public SegmentRevisionGCMBean(@NotNull @NotNull FileStore fileStore, @NotNull @NotNull SegmentGCOptions gcOptions, @NotNull @NotNull FileStoreGCMonitor fileStoreGCMonitor)
-
-
Method Details
-
isPausedCompaction
public boolean isPausedCompaction()- Specified by:
isPausedCompactionin interfaceSegmentRevisionGC- Returns:
trueiff revision gc is paused.
-
setPausedCompaction
public void setPausedCompaction(boolean paused) Description copied from interface:SegmentRevisionGCSet revision gc to paused.- Specified by:
setPausedCompactionin interfaceSegmentRevisionGC
-
getRetryCount
public int getRetryCount()Description copied from interface:SegmentRevisionGCGet the number of tries to compact concurrent commits on top of already compacted commits- Specified by:
getRetryCountin interfaceSegmentRevisionGC- Returns:
- retry count
-
setRetryCount
public void setRetryCount(int retryCount) Description copied from interface:SegmentRevisionGCSet the number of tries to compact concurrent commits on top of already compacted commits- Specified by:
setRetryCountin interfaceSegmentRevisionGC
-
getForceTimeout
public int getForceTimeout()Description copied from interface:SegmentRevisionGCGet 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.- Specified by:
getForceTimeoutin interfaceSegmentRevisionGC- Returns:
- the number of seconds until forced compaction gives up and the exclusive write lock on the node store is released.
-
setForceTimeout
public void setForceTimeout(int timeout) Description copied from interface:SegmentRevisionGCSet 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.- Specified by:
setForceTimeoutin interfaceSegmentRevisionGC- Parameters:
timeout- the number of seconds until forced compaction gives up and the exclusive lock on the node store is released.
-
getRetainedGenerations
public int getRetainedGenerations()Description copied from interface:SegmentRevisionGCNumber of segment generations to retain.- Specified by:
getRetainedGenerationsin interfaceSegmentRevisionGC- Returns:
- number of gc generations.
- See Also:
-
setRetainedGenerations
public void setRetainedGenerations(int retainedGenerations) Description copied from interface:SegmentRevisionGCSet 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.- Specified by:
setRetainedGenerationsin interfaceSegmentRevisionGC- Parameters:
retainedGenerations- number of generations to retain. Must be>= 2.
-
getGcSizeDeltaEstimation
public long getGcSizeDeltaEstimation()- Specified by:
getGcSizeDeltaEstimationin interfaceSegmentRevisionGC
-
setGcSizeDeltaEstimation
public void setGcSizeDeltaEstimation(long gcSizeDeltaEstimation) - Specified by:
setGcSizeDeltaEstimationin interfaceSegmentRevisionGC
-
isEstimationDisabled
public boolean isEstimationDisabled()- Specified by:
isEstimationDisabledin interfaceSegmentRevisionGC
-
setEstimationDisabled
public void setEstimationDisabled(boolean disabled) Description copied from interface:SegmentRevisionGCDisables the estimation phase, thus allowing GC to run every time.- Specified by:
setEstimationDisabledin interfaceSegmentRevisionGC
-
getGCType
- Specified by:
getGCTypein interfaceSegmentRevisionGC
-
setGCType
- Specified by:
setGCTypein interfaceSegmentRevisionGC
-
startRevisionGC
public void startRevisionGC()Description copied from interface:SegmentRevisionGCInitiate a revision garbage collection operation- Specified by:
startRevisionGCin interfaceSegmentRevisionGC
-
cancelRevisionGC
public void cancelRevisionGC()Description copied from interface:SegmentRevisionGCCancel a running revision garbage collection operation. Does nothing if revision garbage collection is not running.- Specified by:
cancelRevisionGCin interfaceSegmentRevisionGC
-
getLastCompaction
public long getLastCompaction()- Specified by:
getLastCompactionin interfaceSegmentRevisionGC- Returns:
- time of the last compaction in milliseconds.
-
getLastCleanup
public long getLastCleanup()- Specified by:
getLastCleanupin interfaceSegmentRevisionGC- Returns:
- time of the last cleanup in milliseconds.
-
getLastRepositorySize
public long getLastRepositorySize()- Specified by:
getLastRepositorySizein interfaceSegmentRevisionGC- Returns:
- repository size after the last cleanup.
-
getLastReclaimedSize
public long getLastReclaimedSize()- Specified by:
getLastReclaimedSizein interfaceSegmentRevisionGC- Returns:
- reclaimed size during the last cleanup.
-
getLastError
- Specified by:
getLastErrorin interfaceSegmentRevisionGC- Returns:
- last error or
nullif none.
-
getLastLogMessage
- Specified by:
getLastLogMessagein interfaceSegmentRevisionGC- Returns:
- last log message or
nullif none.
-
getStatus
- Specified by:
getStatusin interfaceSegmentRevisionGC- Returns:
- current status.
-
getMemoryThreshold
public int getMemoryThreshold()Description copied from interface:SegmentRevisionGCGet 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.- Specified by:
getMemoryThresholdin interfaceSegmentRevisionGC- Returns:
- memory threshold
-
setMemoryThreshold
public void setMemoryThreshold(int memoryThreshold) Description copied from interface:SegmentRevisionGCSet 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.- Specified by:
setMemoryThresholdin interfaceSegmentRevisionGC
-
isRevisionGCRunning
public boolean isRevisionGCRunning()- Specified by:
isRevisionGCRunningin interfaceSegmentRevisionGC- Returns:
trueif there is an online compaction cycle running
-
getCompactedNodes
public long getCompactedNodes()- Specified by:
getCompactedNodesin interfaceSegmentRevisionGC- Returns:
- number of compacted nodes in the current cycle
-
getEstimatedCompactableNodes
public long getEstimatedCompactableNodes()- Specified by:
getEstimatedCompactableNodesin interfaceSegmentRevisionGC- Returns:
- number of estimated nodes to be compacted in the current cycle.
Can be
-1if the estimation can't be performed
-
getEstimatedRevisionGCCompletion
public int getEstimatedRevisionGCCompletion()- Specified by:
getEstimatedRevisionGCCompletionin interfaceSegmentRevisionGC- Returns:
- percentage of progress for the current compaction cycle. Can be
-1if the estimation can't be performed.
-
getRevisionGCProgressLog
public long getRevisionGCProgressLog()- Specified by:
getRevisionGCProgressLogin interfaceSegmentRevisionGC- Returns:
- Number of nodes the monitor will log a message,
-1means disabled
-
setRevisionGCProgressLog
public void setRevisionGCProgressLog(long gcProgressLog) Description copied from interface:SegmentRevisionGCSet the size of the logging interval,-1means disabled- Specified by:
setRevisionGCProgressLogin interfaceSegmentRevisionGC- Parameters:
gcProgressLog- number of nodes
-