public class MetricsIOMonitor extends IOMonitorAdapter
IOMonitor
implementations registers the following monitoring endpoints
with the Metrics library if available:
OAK_SEGMENT_SEGMENT_READ_BYTES
:
a meter metrics for the number of bytes read from tar filesOAK_SEGMENT_SEGMENT_WRITE_BYTES
:
a meter metrics for the number of bytes written to tar filesOAK_SEGMENT_SEGMENT_READ_TIME
:
a timer metrics for the time spent reading from tar filesOAK_SEGMENT_SEGMENT_WRITE_TIME
:
a timer metrics for the time spent writing to tar filesModifier and Type | Field and Description |
---|---|
static String |
OAK_SEGMENT_SEGMENT_READ_BYTES |
static String |
OAK_SEGMENT_SEGMENT_READ_TIME |
static String |
OAK_SEGMENT_SEGMENT_WRITE_BYTES |
static String |
OAK_SEGMENT_SEGMENT_WRITE_TIME |
Constructor and Description |
---|
MetricsIOMonitor(@NotNull org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider) |
Modifier and Type | Method and Description |
---|---|
void |
afterSegmentRead(File file,
long msb,
long lsb,
int length,
long elapsed)
Called after a segment is read from the file system.
|
void |
afterSegmentWrite(File file,
long msb,
long lsb,
int length,
long elapsed)
Called after a segment is written to the file system.
|
beforeSegmentRead, beforeSegmentWrite
public static final String OAK_SEGMENT_SEGMENT_READ_BYTES
public static final String OAK_SEGMENT_SEGMENT_WRITE_BYTES
public static final String OAK_SEGMENT_SEGMENT_READ_TIME
public static final String OAK_SEGMENT_SEGMENT_WRITE_TIME
public MetricsIOMonitor(@NotNull @NotNull org.apache.jackrabbit.oak.stats.StatisticsProvider statisticsProvider)
public void afterSegmentRead(File file, long msb, long lsb, int length, long elapsed)
IOMonitor
afterSegmentRead
in interface IOMonitor
afterSegmentRead
in class IOMonitorAdapter
file
- File containing the segment.msb
- Most significant bits of the segment ID.lsb
- Least significant bits of the segment ID.length
- Size of the segment.elapsed
- Time spent by the read operation, in nanoseconds.public void afterSegmentWrite(File file, long msb, long lsb, int length, long elapsed)
IOMonitor
afterSegmentWrite
in interface IOMonitor
afterSegmentWrite
in class IOMonitorAdapter
file
- File containing the segment.msb
- Most significant bits of the segment ID.lsb
- Least significant bits of the segment ID.length
- Size of the segment.elapsed
- Time spent by the write operation, in nanoseconds.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.