public abstract class CGroupMetricsBase<T> extends Object implements IMetric
Base class for checking if CGroups are enabled, etc.
Constructor and Description |
---|
CGroupMetricsBase(Map<String,Object> conf,
SubSystemType type) |
Modifier and Type | Method and Description |
---|---|
abstract T |
getDataFrom(CgroupCore core) |
Object |
getValueAndReset() |
public CGroupMetricsBase(Map<String,Object> conf, SubSystemType type)
public Object getValueAndReset()
getValueAndReset
in interface IMetric
IMetricsConsumer#handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer
.TaskInfo,
java.util.Collection)
. If null is returned nothing will be sent. If this value can be reset, like with a counter, a side effect of calling this should be that the value is reset.public abstract T getDataFrom(CgroupCore core) throws Exception
Exception
Copyright © 2019 The Apache Software Foundation. All rights reserved.