You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by lohit <lo...@yahoo.com> on 2008/06/02 17:48:01 UTC
Re: About Metrics update
In MetricsIntValue, incrMetrics() was being called on pushMetrics(), instead of setMetrics(). This used to cause the values to be incremented periodically.
Thanks,
Lohit
----- Original Message ----
From: Ion Badita <io...@searchcapital.net>
To: core-user@hadoop.apache.org
Sent: Saturday, May 31, 2008 4:11:00 AM
Subject: Re: About Metrics update
Hi,
I'm using version 0.17.
Do you know how is fixed?
Thanks
Ion
lohit wrote:
> Hi Ion,
>
> Which version of Hadoop are you using? The problem you reported about safeModeTime and fsImageLoadTime keep growing was fixed in 0.18 (or trunk)
>
> Thanks,
> Lohit
>
> ----- Original Message ----
> From: Ion Badita <io...@searchcapital.net>
> To: core-user@hadoop.apache.org
> Sent: Friday, May 30, 2008 8:10:52 AM
> Subject: Re: About Metrics update
>
> Hi,
>
> I found (because of the Metrics behavior reported in the previous
> e-mail) some errors in the metrics reported by the NameNodeMetrics:
> safeModeTime and fsImageLoadTime keep growing (they should be the same
> over time). The mentioned metrics use MetricsIntValue for the values, on
> MetricsIntValue .pushMetric() if "changed" field is marked true then the
> value is "published" in MetricsRecod else the method does nothing.
>
> public synchronized void pushMetric(final MetricsRecord mr) {
> if (changed)
> mr.incrMetric(name, value);
> changed = false;
> }
>
> The problem is in AbstractMetricsContext.update() method, because the
> metricUpdates are not cleared after been merged in the "record's
> internal data".
>
> Ion
>
>
>
> Ion Badita wrote:
>
>> Hi,
>>
>> A looked over the class
>> org.apache.hadoop.metrics.spi.AbstractMetricsContext and i have a
>> question:
>> why in the update(MetricsRecordImpl record) metricUpdates Map is not
>> cleared after the updates are merged in metricMap. Because of this on
>> every update() "old" increments are merged in metricMap. Is this the
>> right behavior?
>> If i want to increment only one metric in the record using current
>> implementation is not possible without modifying other metrics that
>> are incremented rare.
>>
>>
>> Thanks
>> Ion
>>