Class SegmentNodeStoreStats
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.SegmentNodeStoreStats
-
- All Implemented Interfaces:
SegmentNodeStoreMonitor,SegmentNodeStoreStatsMBean
public class SegmentNodeStoreStats extends Object implements SegmentNodeStoreStatsMBean, SegmentNodeStoreMonitor
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMIT_QUEUE_SIZEstatic StringCOMMIT_TIMEstatic StringCOMMITS_COUNTstatic StringQUEUEING_TIME-
Fields inherited from interface org.apache.jackrabbit.oak.segment.SegmentNodeStoreMonitor
DEFAULT
-
Fields inherited from interface org.apache.jackrabbit.oak.segment.SegmentNodeStoreStatsMBean
TYPE
-
-
Constructor Summary
Constructors Constructor Description SegmentNodeStoreStats(StatisticsProvider statisticsProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeDatagetCommitsCount()TabularDatagetCommitsCountForOtherWriters()TabularDatagetCommitsCountPerWriterGroupLastMinute()CompositeDatagetCommitTimes()@Nullable CompositeDatagetCurrentWriter()intgetNumberOfOtherWritersToDetail()TabularDatagetQueuedWriters()CompositeDatagetQueuingCommitsCount()CompositeDatagetQueuingTimes()String[]getWriterGroupsForLastMinuteCounts()booleanisCollectStackTraces()voidonCommit(Thread t, long time)Notifies the monitor when a new commit was persisted.voidonCommitDequeued(Thread t, long time)Notifies the monitor when a queued commit was dequeued for processing.voidonCommitQueued(Thread t, Supplier<GCGeneration> gcGeneration)Notifies the monitor when a new commit couldn't be persisted, but was queued for later retry.voidsetCollectStackTraces(boolean flag)Turns on/off, depending on the value offlag, the collection of stack traces for each writer.voidsetNumberOfOtherWritersToDetail(int otherWritersLimit)Modifies the maximum number of writers outside already defined groups to be recorded.voidsetWriterGroupsForLastMinuteCounts(String[] writerGroups)Modifies the groups used for grouping writers.
-
-
-
Field Detail
-
COMMITS_COUNT
public static final String COMMITS_COUNT
- See Also:
- Constant Field Values
-
COMMIT_QUEUE_SIZE
public static final String COMMIT_QUEUE_SIZE
- See Also:
- Constant Field Values
-
COMMIT_TIME
public static final String COMMIT_TIME
- See Also:
- Constant Field Values
-
QUEUEING_TIME
public static final String QUEUEING_TIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SegmentNodeStoreStats
public SegmentNodeStoreStats(StatisticsProvider statisticsProvider)
-
-
Method Detail
-
onCommit
public void onCommit(Thread t, long time)
Description copied from interface:SegmentNodeStoreMonitorNotifies the monitor when a new commit was persisted.- Specified by:
onCommitin interfaceSegmentNodeStoreMonitor- Parameters:
t- the thread which initiated the writetime- the time spent for persisting the commit
-
onCommitQueued
public void onCommitQueued(Thread t, Supplier<GCGeneration> gcGeneration)
Description copied from interface:SegmentNodeStoreMonitorNotifies the monitor when a new commit couldn't be persisted, but was queued for later retry.- Specified by:
onCommitQueuedin interfaceSegmentNodeStoreMonitor- Parameters:
t- the thread which initiated the writegcGeneration- the commit's gc generation
-
onCommitDequeued
public void onCommitDequeued(Thread t, long time)
Description copied from interface:SegmentNodeStoreMonitorNotifies the monitor when a queued commit was dequeued for processing.- Specified by:
onCommitDequeuedin interfaceSegmentNodeStoreMonitor- Parameters:
t- the thread which initiated the writetime- the time spent in the queue
-
getCommitsCount
public CompositeData getCommitsCount()
- Specified by:
getCommitsCountin interfaceSegmentNodeStoreStatsMBean- Returns:
- time series of the number of commits
-
getQueuingCommitsCount
public CompositeData getQueuingCommitsCount()
- Specified by:
getQueuingCommitsCountin interfaceSegmentNodeStoreStatsMBean- Returns:
- time series of the number of commits queuing
-
getCommitTimes
public CompositeData getCommitTimes()
- Specified by:
getCommitTimesin interfaceSegmentNodeStoreStatsMBean- Returns:
- time series of the commit times
-
getQueuingTimes
public CompositeData getQueuingTimes()
- Specified by:
getQueuingTimesin interfaceSegmentNodeStoreStatsMBean- Returns:
- time series of the queuing times
-
getCommitsCountPerWriterGroupLastMinute
public TabularData getCommitsCountPerWriterGroupLastMinute() throws OpenDataException
- Specified by:
getCommitsCountPerWriterGroupLastMinutein interfaceSegmentNodeStoreStatsMBean- Returns:
- tabular data of the form <commits,writerGroup> collected in the last minute
- Throws:
OpenDataException- if data is not available
-
getCommitsCountForOtherWriters
public TabularData getCommitsCountForOtherWriters() throws OpenDataException
- Specified by:
getCommitsCountForOtherWritersin interfaceSegmentNodeStoreStatsMBean- Returns:
- tabular data of the form <commits,writer> for writers not included in groups
- Throws:
OpenDataException- if data is not available
-
getQueuedWriters
public TabularData getQueuedWriters() throws OpenDataException
- Specified by:
getQueuedWritersin interfaceSegmentNodeStoreStatsMBean- Returns:
- tabular data of the form <writer, writerDetails, queued, dequed, applied> for each writer currently in the queue
- Throws:
OpenDataException- if data is not available
-
getCurrentWriter
@Nullable public @Nullable CompositeData getCurrentWriter() throws OpenDataException
- Specified by:
getCurrentWriterin interfaceSegmentNodeStoreStatsMBean- Returns:
- data of the form <writer, writerDetails, queued, dequed, applied>
for the writer currently in committing. @
nullif none. - Throws:
OpenDataException- if data is not available
-
setCollectStackTraces
public void setCollectStackTraces(boolean flag)
Description copied from interface:SegmentNodeStoreStatsMBeanTurns on/off, depending on the value offlag, the collection of stack traces for each writer.- Specified by:
setCollectStackTracesin interfaceSegmentNodeStoreStatsMBean- Parameters:
flag-booleanindicating whether to collect or not
-
isCollectStackTraces
public boolean isCollectStackTraces()
- Specified by:
isCollectStackTracesin interfaceSegmentNodeStoreStatsMBean- Returns:
- collectStackTraces status flag
-
getNumberOfOtherWritersToDetail
public int getNumberOfOtherWritersToDetail()
- Specified by:
getNumberOfOtherWritersToDetailin interfaceSegmentNodeStoreStatsMBean- Returns:
- maximum number of writers outside already defined groups to be recorded
-
setNumberOfOtherWritersToDetail
public void setNumberOfOtherWritersToDetail(int otherWritersLimit)
Description copied from interface:SegmentNodeStoreStatsMBeanModifies the maximum number of writers outside already defined groups to be recorded. Changing the default value will reset the overall collection process.- Specified by:
setNumberOfOtherWritersToDetailin interfaceSegmentNodeStoreStatsMBean- Parameters:
otherWritersLimit- the new size
-
getWriterGroupsForLastMinuteCounts
public String[] getWriterGroupsForLastMinuteCounts()
- Specified by:
getWriterGroupsForLastMinuteCountsin interfaceSegmentNodeStoreStatsMBean- Returns:
- current groups used for grouping writers.
-
setWriterGroupsForLastMinuteCounts
public void setWriterGroupsForLastMinuteCounts(String[] writerGroups)
Description copied from interface:SegmentNodeStoreStatsMBeanModifies the groups used for grouping writers. Changing the default value will reset the overall collection process.- Specified by:
setWriterGroupsForLastMinuteCountsin interfaceSegmentNodeStoreStatsMBean- Parameters:
writerGroups- groups defined by regexps
-
-