@InterfaceAudience.Public @InterfaceStability.Evolving public class MetricsCache extends Object
Constructor and Description |
---|
MetricsCache() |
MetricsCache(int maxRecsPerName)
Construct a metrics cache
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.metrics2.util.MetricsCache.Record |
get(String name,
Collection<MetricsTag> tags)
Get the cached record
|
org.apache.hadoop.metrics2.util.MetricsCache.Record |
update(MetricsRecord mr)
Update the cache and return the current cache record
|
org.apache.hadoop.metrics2.util.MetricsCache.Record |
update(MetricsRecord mr,
boolean includingTags)
Update the cache and return the current cached record
|
public MetricsCache()
public MetricsCache(int maxRecsPerName)
maxRecsPerName
- limit of the number records per record namepublic org.apache.hadoop.metrics2.util.MetricsCache.Record update(MetricsRecord mr, boolean includingTags)
mr
- the update recordincludingTags
- cache tag values (for later lookup by name) if truepublic org.apache.hadoop.metrics2.util.MetricsCache.Record update(MetricsRecord mr)
mr
- the update recordpublic org.apache.hadoop.metrics2.util.MetricsCache.Record get(String name, Collection<MetricsTag> tags)
name
- of the recordtags
- of the recordCopyright © 2018 Apache Software Foundation. All rights reserved.