Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
|
#include <memory-metrics.h>
Static Public Member Functions | |
static Status | InitMetrics (MetricGroup *metrics) |
Protected Member Functions | |
virtual void | CalculateValue () |
Private Types | |
enum | JvmMetricType { MAX, INIT, COMMITTED, CURRENT, PEAK_MAX, PEAK_INIT, PEAK_COMMITTED, PEAK_CURRENT } |
Each names one of the fields in TJvmMemoryPool. More... | |
Private Member Functions | |
JvmMetric (const std::string &key, const std::string &mempool_name, JvmMetricType type) | |
Private constructor to ensure only InitMetrics() can create JvmMetrics. More... | |
Private Attributes | |
std::string | mempool_name_ |
The name of the memory pool, defined by the Jvm. More... | |
JvmMetricType | metric_type_ |
A JvmMetric corresponds to one value drawn from one 'memory pool' in the JVM. A memory pool is an area of memory assigned for one particular aspect of memory management. For example Hotspot has pools for the permanent generation, the old generation, survivor space, code cache and permanently tenured objects.
Definition at line 84 of file memory-metrics.h.
|
private |
Each names one of the fields in TJvmMemoryPool.
Enumerator | |
---|---|
MAX | |
INIT | |
COMMITTED | |
CURRENT | |
PEAK_MAX | |
PEAK_INIT | |
PEAK_COMMITTED | |
PEAK_CURRENT |
Definition at line 97 of file memory-metrics.h.
|
private |
Private constructor to ensure only InitMetrics() can create JvmMetrics.
Definition at line 58 of file memory-metrics.cc.
References mempool_name_, and metric_type_.
Referenced by InitMetrics().
|
protectedvirtual |
Searches through jvm_metrics_response_ for a matching memory pool and pulls out the right value from that structure according to metric_type_.
Definition at line 102 of file memory-metrics.cc.
References COMMITTED, CURRENT, impala::JniUtil::GetJvmMetrics(), INIT, MAX, mempool_name_, metric_type_, PEAK_COMMITTED, PEAK_CURRENT, PEAK_INIT, PEAK_MAX, and pool.
|
static |
Registers many Jvm memory metrics: one for every member of JvmMetricType for each pool (usually ~5 pools plus a synthetic 'total' pool).
Definition at line 65 of file memory-metrics.cc.
References COMMITTED, CURRENT, impala::JniUtil::GetJvmMetrics(), INIT, JvmMetric(), MAX, impala::name, impala::Status::OK, PEAK_COMMITTED, PEAK_CURRENT, PEAK_INIT, PEAK_MAX, impala::MetricGroup::RegisterMetric(), and RETURN_IF_ERROR.
Referenced by impala::RegisterMemoryMetrics().
|
private |
The name of the memory pool, defined by the Jvm.
Definition at line 112 of file memory-metrics.h.
Referenced by CalculateValue(), and JvmMetric().
|
private |
Each metric corresponds to one value; this tells us which value from the memory pool that is.
Definition at line 116 of file memory-metrics.h.
Referenced by CalculateValue(), and JvmMetric().