HADOOP-10441. Namenode metric rpc.RetryCache/NameNodeRetryCache.CacheHit can't be correctly processed by Ganglia. Contributed by Jing Zhao.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1582043 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jing Zhao 2014-03-26 20:32:42 +00:00
parent a126a01fa1
commit d337a5ffc4
3 changed files with 5 additions and 2 deletions

View File

@ -460,6 +460,9 @@ Release 2.4.0 - UNRELEASED
HADOOP-10437. Fix the javac warnings in the conf and the util package. HADOOP-10437. Fix the javac warnings in the conf and the util package.
(szetszwo) (szetszwo)
HADOOP-10441. Namenode metric "rpc.RetryCache/NameNodeRetryCache.CacheHit"
can't be correctly processed by Ganglia. (jing9)
BREAKDOWN OF HADOOP-10184 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HADOOP-10184 SUBTASKS AND RELATED JIRAS
HADOOP-10185. FileSystem API for ACLs. (cnauroth) HADOOP-10185. FileSystem API for ACLs. (cnauroth)

View File

@ -40,7 +40,7 @@ public class RetryCacheMetrics {
final String name; final String name;
RetryCacheMetrics(RetryCache retryCache) { RetryCacheMetrics(RetryCache retryCache) {
name = "RetryCache/"+ retryCache.getCacheName(); name = "RetryCache."+ retryCache.getCacheName();
registry = new MetricsRegistry(name); registry = new MetricsRegistry(name);
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {
LOG.debug("Initialized "+ registry); LOG.debug("Initialized "+ registry);

View File

@ -51,7 +51,7 @@ public class TestRetryCacheMetrics {
} }
private void checkMetrics(long hit, long cleared, long updated) { private void checkMetrics(long hit, long cleared, long updated) {
MetricsRecordBuilder rb = getMetrics("RetryCache/" + cacheName); MetricsRecordBuilder rb = getMetrics("RetryCache." + cacheName);
assertCounter("CacheHit", hit, rb); assertCounter("CacheHit", hit, rb);
assertCounter("CacheCleared", cleared, rb); assertCounter("CacheCleared", cleared, rb);
assertCounter("CacheUpdated", updated, rb); assertCounter("CacheUpdated", updated, rb);