Class MetricsRecord
- java.lang.Object
-
- org.apache.heron.spi.metricsmgr.metrics.MetricsRecord
-
public class MetricsRecord extends Object
An immutable snapshot of metrics and exception log with a timestamp and other meta data.
-
-
Constructor Summary
Constructors Constructor Description MetricsRecord(long timestamp, String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions, String context)
MetricsRecord(String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions)
MetricsRecord(String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions, String context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContext()
Get the context of the metrics recordIterable<ExceptionInfo>
getExceptions()
Get the exception logs of the recordIterable<MetricsInfo>
getMetrics()
Get the metrics of the recordString
getSource()
Get the name of source generating metricslong
getTimestamp()
Get the timestamp of the metricsString
toString()
-
-
-
Constructor Detail
-
MetricsRecord
public MetricsRecord(String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions)
-
MetricsRecord
public MetricsRecord(String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions, String context)
-
MetricsRecord
public MetricsRecord(long timestamp, String source, Iterable<MetricsInfo> metrics, Iterable<ExceptionInfo> exceptions, String context)
-
-
Method Detail
-
getTimestamp
public long getTimestamp()
Get the timestamp of the metrics- Returns:
- the timestamp
-
getSource
public String getSource()
Get the name of source generating metrics- Returns:
- the name of source
-
getMetrics
public Iterable<MetricsInfo> getMetrics()
Get the metrics of the record- Returns:
- an immutable iterable interface for MetricInfo
-
getExceptions
public Iterable<ExceptionInfo> getExceptions()
Get the exception logs of the record- Returns:
- an immutable iterable interface for ExceptionInfo
-
getContext
public String getContext()
Get the context of the metrics record- Returns:
- the context name of the metrics record
-
-