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 String
COMMIT_QUEUE_SIZE
static String
COMMIT_TIME
static String
COMMITS_COUNT
static String
QUEUEING_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 CompositeData
getCommitsCount()
TabularData
getCommitsCountForOtherWriters()
TabularData
getCommitsCountPerWriterGroupLastMinute()
CompositeData
getCommitTimes()
@Nullable CompositeData
getCurrentWriter()
int
getNumberOfOtherWritersToDetail()
TabularData
getQueuedWriters()
CompositeData
getQueuingCommitsCount()
CompositeData
getQueuingTimes()
String[]
getWriterGroupsForLastMinuteCounts()
boolean
isCollectStackTraces()
void
onCommit(Thread t, long time)
Notifies the monitor when a new commit was persisted.void
onCommitDequeued(Thread t, long time)
Notifies the monitor when a queued commit was dequeued for processing.void
onCommitQueued(Thread t, Supplier<GCGeneration> gcGeneration)
Notifies the monitor when a new commit couldn't be persisted, but was queued for later retry.void
setCollectStackTraces(boolean flag)
Turns on/off, depending on the value offlag
, the collection of stack traces for each writer.void
setNumberOfOtherWritersToDetail(int otherWritersLimit)
Modifies the maximum number of writers outside already defined groups to be recorded.void
setWriterGroupsForLastMinuteCounts(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:SegmentNodeStoreMonitor
Notifies the monitor when a new commit was persisted.- Specified by:
onCommit
in 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:SegmentNodeStoreMonitor
Notifies the monitor when a new commit couldn't be persisted, but was queued for later retry.- Specified by:
onCommitQueued
in 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:SegmentNodeStoreMonitor
Notifies the monitor when a queued commit was dequeued for processing.- Specified by:
onCommitDequeued
in interfaceSegmentNodeStoreMonitor
- Parameters:
t
- the thread which initiated the writetime
- the time spent in the queue
-
getCommitsCount
public CompositeData getCommitsCount()
- Specified by:
getCommitsCount
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the number of commits
-
getQueuingCommitsCount
public CompositeData getQueuingCommitsCount()
- Specified by:
getQueuingCommitsCount
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the number of commits queuing
-
getCommitTimes
public CompositeData getCommitTimes()
- Specified by:
getCommitTimes
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the commit times
-
getQueuingTimes
public CompositeData getQueuingTimes()
- Specified by:
getQueuingTimes
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the queuing times
-
getCommitsCountPerWriterGroupLastMinute
public TabularData getCommitsCountPerWriterGroupLastMinute() throws OpenDataException
- Specified by:
getCommitsCountPerWriterGroupLastMinute
in 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:
getCommitsCountForOtherWriters
in 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:
getQueuedWriters
in 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:
getCurrentWriter
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- data of the form <writer, writerDetails, queued, dequed, applied>
for the writer currently in committing. @
null
if none. - Throws:
OpenDataException
- if data is not available
-
setCollectStackTraces
public void setCollectStackTraces(boolean flag)
Description copied from interface:SegmentNodeStoreStatsMBean
Turns on/off, depending on the value offlag
, the collection of stack traces for each writer.- Specified by:
setCollectStackTraces
in interfaceSegmentNodeStoreStatsMBean
- Parameters:
flag
-boolean
indicating whether to collect or not
-
isCollectStackTraces
public boolean isCollectStackTraces()
- Specified by:
isCollectStackTraces
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- collectStackTraces status flag
-
getNumberOfOtherWritersToDetail
public int getNumberOfOtherWritersToDetail()
- Specified by:
getNumberOfOtherWritersToDetail
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- maximum number of writers outside already defined groups to be recorded
-
setNumberOfOtherWritersToDetail
public void setNumberOfOtherWritersToDetail(int otherWritersLimit)
Description copied from interface:SegmentNodeStoreStatsMBean
Modifies the maximum number of writers outside already defined groups to be recorded. Changing the default value will reset the overall collection process.- Specified by:
setNumberOfOtherWritersToDetail
in interfaceSegmentNodeStoreStatsMBean
- Parameters:
otherWritersLimit
- the new size
-
getWriterGroupsForLastMinuteCounts
public String[] getWriterGroupsForLastMinuteCounts()
- Specified by:
getWriterGroupsForLastMinuteCounts
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- current groups used for grouping writers.
-
setWriterGroupsForLastMinuteCounts
public void setWriterGroupsForLastMinuteCounts(String[] writerGroups)
Description copied from interface:SegmentNodeStoreStatsMBean
Modifies the groups used for grouping writers. Changing the default value will reset the overall collection process.- Specified by:
setWriterGroupsForLastMinuteCounts
in interfaceSegmentNodeStoreStatsMBean
- Parameters:
writerGroups
- groups defined by regexps
-
-