You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by Apache Wiki <wi...@apache.org> on 2011/05/12 20:14:12 UTC
[Hadoop Wiki] Update of "HADOOP-6728-MetricsV2" by LukeLu
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification.
The "HADOOP-6728-MetricsV2" page has been changed by LukeLu.
The comment on this change is: Update doc to reflect patches committed to trunk.
http://wiki.apache.org/hadoop/HADOOP-6728-MetricsV2?action=diff&rev1=3&rev2=4
--------------------------------------------------
''This page keeps the design notes for [[https://issues.apache.org/jira/browse/HADOOP-6728|HADOOP-6728]] only. Current dev/user documentation for metrics system should be kept elsewhere (say, package.html and/or package-info.java in respective packages).''
+
+ <<TableOfContents(3)>>
== Scope ==
@@ -128, +130 @@
DefaultMetricsSystem.initialize("JobTracker");
// Create the metrics source object
- MyMetrics myMetrics = new MyMetrics().registerWith(DefaultMetricsSystem.INSTANCE);
+ MyMetrics myMetrics = new MyMetrics().registerWith(DefaultMetricsSystem.instance());
// Update the metrics
myMetrics.foo.set(someValue);
@@ -180, +182 @@
for (MetricTag tag : rec.tags())
echoTag(tag.getName(), tag.getValue());
- for (Metric metric : rec.metrics())
+ for (AbstractMetric metric : rec.metrics())
metric.visit(this);
}