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
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
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 -
Method Summary
Modifier and TypeMethodDescription@Nullable CompositeData
int
String[]
boolean
void
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 Details
-
COMMITS_COUNT
- See Also:
-
COMMIT_QUEUE_SIZE
- See Also:
-
COMMIT_TIME
- See Also:
-
QUEUEING_TIME
- See Also:
-
-
Constructor Details
-
SegmentNodeStoreStats
-
-
Method Details
-
onCommit
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
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
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
- Specified by:
getCommitsCount
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the number of commits
-
getQueuingCommitsCount
- Specified by:
getQueuingCommitsCount
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the number of commits queuing
-
getCommitTimes
- Specified by:
getCommitTimes
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the commit times
-
getQueuingTimes
- Specified by:
getQueuingTimes
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- time series of the queuing times
-
getCommitsCountPerWriterGroupLastMinute
- 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
- 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
- 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
- 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
- Specified by:
getWriterGroupsForLastMinuteCounts
in interfaceSegmentNodeStoreStatsMBean
- Returns:
- current groups used for grouping writers.
-
setWriterGroupsForLastMinuteCounts
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
-