Class InternalCacheMetricGroup
- java.lang.Object
-
- org.apache.flink.runtime.metrics.groups.ProxyMetricGroup<MetricGroup>
-
- org.apache.flink.runtime.metrics.groups.InternalCacheMetricGroup
-
- All Implemented Interfaces:
CacheMetricGroup
,MetricGroup
@Internal public class InternalCacheMetricGroup extends ProxyMetricGroup<MetricGroup> implements CacheMetricGroup
ACacheMetricGroup
which register all cache related metrics under a subgroup of the parent metric group.
-
-
Field Summary
Fields Modifier and Type Field Description static long
UNINITIALIZED
-
Fields inherited from class org.apache.flink.runtime.metrics.groups.ProxyMetricGroup
parentMetricGroup
-
-
Constructor Summary
Constructors Constructor Description InternalCacheMetricGroup(MetricGroup parentMetricGroup, String subGroupName)
Creates a subgroup with the specified subgroup name under the parent group.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
hitCounter(Counter hitCounter)
The number of cache hits.void
latestLoadTimeGauge(Gauge<Long> latestLoadTimeGauge)
The time spent for the latest load operation.void
loadCounter(Counter loadCounter)
The number of times to load data into cache from external system.void
missCounter(Counter missCounter)
The number of cache misses.void
numCachedBytesGauge(Gauge<Long> numCachedBytesGauge)
The number of bytes used by cache.void
numCachedRecordsGauge(Gauge<Long> numCachedRecordsGauge)
The number of records in cache.void
numLoadFailuresCounter(Counter numLoadFailuresCounter)
The number of load failures.-
Methods inherited from class org.apache.flink.runtime.metrics.groups.ProxyMetricGroup
addGroup, addGroup, addSpan, counter, counter, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, meter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.metrics.MetricGroup
addGroup, addGroup, addGroup, addSpan, counter, counter, counter, counter, gauge, gauge, getAllVariables, getMetricIdentifier, getMetricIdentifier, getScopeComponents, histogram, histogram, meter, meter
-
-
-
-
Field Detail
-
UNINITIALIZED
public static final long UNINITIALIZED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InternalCacheMetricGroup
public InternalCacheMetricGroup(MetricGroup parentMetricGroup, String subGroupName)
Creates a subgroup with the specified subgroup name under the parent group. Metrics will be registered under the new created subgroup.For example the hit counter will be registered as "root.cache.hitCount", with
parentMetricGroup = root
andsubGroupName = "cache"
.- Parameters:
parentMetricGroup
- parent metric group of the subgroupsubGroupName
- name of the subgroup
-
-
Method Detail
-
hitCounter
public void hitCounter(Counter hitCounter)
Description copied from interface:CacheMetricGroup
The number of cache hits.- Specified by:
hitCounter
in interfaceCacheMetricGroup
-
missCounter
public void missCounter(Counter missCounter)
Description copied from interface:CacheMetricGroup
The number of cache misses.- Specified by:
missCounter
in interfaceCacheMetricGroup
-
loadCounter
public void loadCounter(Counter loadCounter)
Description copied from interface:CacheMetricGroup
The number of times to load data into cache from external system.- Specified by:
loadCounter
in interfaceCacheMetricGroup
-
numLoadFailuresCounter
public void numLoadFailuresCounter(Counter numLoadFailuresCounter)
Description copied from interface:CacheMetricGroup
The number of load failures.- Specified by:
numLoadFailuresCounter
in interfaceCacheMetricGroup
-
latestLoadTimeGauge
public void latestLoadTimeGauge(Gauge<Long> latestLoadTimeGauge)
Description copied from interface:CacheMetricGroup
The time spent for the latest load operation.- Specified by:
latestLoadTimeGauge
in interfaceCacheMetricGroup
-
numCachedRecordsGauge
public void numCachedRecordsGauge(Gauge<Long> numCachedRecordsGauge)
Description copied from interface:CacheMetricGroup
The number of records in cache.- Specified by:
numCachedRecordsGauge
in interfaceCacheMetricGroup
-
numCachedBytesGauge
public void numCachedBytesGauge(Gauge<Long> numCachedBytesGauge)
Description copied from interface:CacheMetricGroup
The number of bytes used by cache.- Specified by:
numCachedBytesGauge
in interfaceCacheMetricGroup
-
-