hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From git-site-r...@apache.org
Subject [07/33] hbase-site git commit: Published site at d5ea926321d8339dbbb761b32bcdc043aed576ee.
Date Fri, 01 Jun 2018 14:48:56 GMT
http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.html
index b680a68..3314dcf 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/DynamicMetricsRegistry.html
@@ -29,15 +29,15 @@
 <span class="sourceLineNo">021</span>import java.util.Collection;<a name="line.21"></a>
 <span class="sourceLineNo">022</span>import java.util.concurrent.ConcurrentMap;<a name="line.22"></a>
 <span class="sourceLineNo">023</span><a name="line.23"></a>
-<span class="sourceLineNo">024</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.slf4j.Logger;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.slf4j.LoggerFactory;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.metrics2.MetricsException;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.29"></a>
-<span class="sourceLineNo">030</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.30"></a>
-<span class="sourceLineNo">031</span>import org.apache.hadoop.metrics2.MetricsTag;<a name="line.31"></a>
-<span class="sourceLineNo">032</span>import org.apache.hadoop.metrics2.impl.MsInfo;<a name="line.32"></a>
+<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.metrics2.MetricsException;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.metrics2.MetricsTag;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.hadoop.metrics2.impl.MsInfo;<a name="line.29"></a>
+<span class="sourceLineNo">030</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.30"></a>
+<span class="sourceLineNo">031</span>import org.slf4j.Logger;<a name="line.31"></a>
+<span class="sourceLineNo">032</span>import org.slf4j.LoggerFactory;<a name="line.32"></a>
 <span class="sourceLineNo">033</span><a name="line.33"></a>
 <span class="sourceLineNo">034</span>import org.apache.hbase.thirdparty.com.google.common.base.MoreObjects;<a name="line.34"></a>
 <span class="sourceLineNo">035</span>import org.apache.hbase.thirdparty.com.google.common.collect.Maps;<a name="line.35"></a>
@@ -64,14 +64,14 @@
 <span class="sourceLineNo">056</span>  private final MetricsInfo metricsInfo;<a name="line.56"></a>
 <span class="sourceLineNo">057</span>  private final DefaultMetricsSystemHelper helper = new DefaultMetricsSystemHelper();<a name="line.57"></a>
 <span class="sourceLineNo">058</span>  private final static String[] histogramSuffixes = new String[]{<a name="line.58"></a>
-<span class="sourceLineNo">059</span>      "_num_ops",<a name="line.59"></a>
-<span class="sourceLineNo">060</span>      "_min",<a name="line.60"></a>
-<span class="sourceLineNo">061</span>      "_max",<a name="line.61"></a>
-<span class="sourceLineNo">062</span>      "_median",<a name="line.62"></a>
-<span class="sourceLineNo">063</span>      "_75th_percentile",<a name="line.63"></a>
-<span class="sourceLineNo">064</span>      "_90th_percentile",<a name="line.64"></a>
-<span class="sourceLineNo">065</span>      "_95th_percentile",<a name="line.65"></a>
-<span class="sourceLineNo">066</span>      "_99th_percentile"};<a name="line.66"></a>
+<span class="sourceLineNo">059</span>    "_num_ops",<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    "_min",<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    "_max",<a name="line.61"></a>
+<span class="sourceLineNo">062</span>    "_median",<a name="line.62"></a>
+<span class="sourceLineNo">063</span>    "_75th_percentile",<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    "_90th_percentile",<a name="line.64"></a>
+<span class="sourceLineNo">065</span>    "_95th_percentile",<a name="line.65"></a>
+<span class="sourceLineNo">066</span>    "_99th_percentile"};<a name="line.66"></a>
 <span class="sourceLineNo">067</span><a name="line.67"></a>
 <span class="sourceLineNo">068</span>  /**<a name="line.68"></a>
 <span class="sourceLineNo">069</span>   * Construct the registry with a record name<a name="line.69"></a>
@@ -223,322 +223,323 @@
 <span class="sourceLineNo">215</span>    if (returnExisting) {<a name="line.215"></a>
 <span class="sourceLineNo">216</span>      MutableMetric rate = metricsMap.get(name);<a name="line.216"></a>
 <span class="sourceLineNo">217</span>      if (rate != null) {<a name="line.217"></a>
-<span class="sourceLineNo">218</span>        if (rate instanceof MutableRate) return (MutableRate) rate;<a name="line.218"></a>
-<span class="sourceLineNo">219</span>        throw new MetricsException("Unexpected metrics type "+ rate.getClass()<a name="line.219"></a>
-<span class="sourceLineNo">220</span>                                   +" for "+ name);<a name="line.220"></a>
-<span class="sourceLineNo">221</span>      }<a name="line.221"></a>
-<span class="sourceLineNo">222</span>    }<a name="line.222"></a>
-<span class="sourceLineNo">223</span>    MutableRate ret = new MutableRate(name, desc, extended);<a name="line.223"></a>
-<span class="sourceLineNo">224</span>    return addNewMetricIfAbsent(name, ret, MutableRate.class);<a name="line.224"></a>
-<span class="sourceLineNo">225</span>  }<a name="line.225"></a>
-<span class="sourceLineNo">226</span><a name="line.226"></a>
-<span class="sourceLineNo">227</span>  /**<a name="line.227"></a>
-<span class="sourceLineNo">228</span>   * Create a new histogram.<a name="line.228"></a>
-<span class="sourceLineNo">229</span>   * @param name Name of the histogram.<a name="line.229"></a>
-<span class="sourceLineNo">230</span>   * @return A new MutableHistogram<a name="line.230"></a>
-<span class="sourceLineNo">231</span>   */<a name="line.231"></a>
-<span class="sourceLineNo">232</span>  public MutableHistogram newHistogram(String name) {<a name="line.232"></a>
-<span class="sourceLineNo">233</span>     return newHistogram(name, "");<a name="line.233"></a>
-<span class="sourceLineNo">234</span>  }<a name="line.234"></a>
-<span class="sourceLineNo">235</span><a name="line.235"></a>
-<span class="sourceLineNo">236</span>  /**<a name="line.236"></a>
-<span class="sourceLineNo">237</span>   * Create a new histogram.<a name="line.237"></a>
-<span class="sourceLineNo">238</span>   * @param name The name of the histogram<a name="line.238"></a>
-<span class="sourceLineNo">239</span>   * @param desc The description of the data in the histogram.<a name="line.239"></a>
-<span class="sourceLineNo">240</span>   * @return A new MutableHistogram<a name="line.240"></a>
-<span class="sourceLineNo">241</span>   */<a name="line.241"></a>
-<span class="sourceLineNo">242</span>  public MutableHistogram newHistogram(String name, String desc) {<a name="line.242"></a>
-<span class="sourceLineNo">243</span>    MutableHistogram histo = new MutableHistogram(name, desc);<a name="line.243"></a>
-<span class="sourceLineNo">244</span>    return addNewMetricIfAbsent(name, histo, MutableHistogram.class);<a name="line.244"></a>
-<span class="sourceLineNo">245</span>  }<a name="line.245"></a>
-<span class="sourceLineNo">246</span>  <a name="line.246"></a>
-<span class="sourceLineNo">247</span>  /**<a name="line.247"></a>
-<span class="sourceLineNo">248</span>   * Create a new histogram with time range counts.<a name="line.248"></a>
-<span class="sourceLineNo">249</span>   * @param name Name of the histogram.<a name="line.249"></a>
-<span class="sourceLineNo">250</span>   * @return A new MutableTimeHistogram<a name="line.250"></a>
-<span class="sourceLineNo">251</span>   */<a name="line.251"></a>
-<span class="sourceLineNo">252</span>  public MutableTimeHistogram newTimeHistogram(String name) {<a name="line.252"></a>
-<span class="sourceLineNo">253</span>     return newTimeHistogram(name, "");<a name="line.253"></a>
-<span class="sourceLineNo">254</span>  }<a name="line.254"></a>
-<span class="sourceLineNo">255</span><a name="line.255"></a>
-<span class="sourceLineNo">256</span>  /**<a name="line.256"></a>
-<span class="sourceLineNo">257</span>   * Create a new histogram with time range counts.<a name="line.257"></a>
-<span class="sourceLineNo">258</span>   * @param name The name of the histogram<a name="line.258"></a>
-<span class="sourceLineNo">259</span>   * @param desc The description of the data in the histogram.<a name="line.259"></a>
-<span class="sourceLineNo">260</span>   * @return A new MutableTimeHistogram<a name="line.260"></a>
-<span class="sourceLineNo">261</span>   */<a name="line.261"></a>
-<span class="sourceLineNo">262</span>  public MutableTimeHistogram newTimeHistogram(String name, String desc) {<a name="line.262"></a>
-<span class="sourceLineNo">263</span>    MutableTimeHistogram histo = new MutableTimeHistogram(name, desc);<a name="line.263"></a>
-<span class="sourceLineNo">264</span>    return addNewMetricIfAbsent(name, histo, MutableTimeHistogram.class);<a name="line.264"></a>
-<span class="sourceLineNo">265</span>  }<a name="line.265"></a>
-<span class="sourceLineNo">266</span>  <a name="line.266"></a>
-<span class="sourceLineNo">267</span>  /**<a name="line.267"></a>
-<span class="sourceLineNo">268</span>   * Create a new histogram with size range counts.<a name="line.268"></a>
-<span class="sourceLineNo">269</span>   * @param name Name of the histogram.<a name="line.269"></a>
-<span class="sourceLineNo">270</span>   * @return A new MutableSizeHistogram<a name="line.270"></a>
-<span class="sourceLineNo">271</span>   */<a name="line.271"></a>
-<span class="sourceLineNo">272</span>  public MutableSizeHistogram newSizeHistogram(String name) {<a name="line.272"></a>
-<span class="sourceLineNo">273</span>     return newSizeHistogram(name, "");<a name="line.273"></a>
-<span class="sourceLineNo">274</span>  }<a name="line.274"></a>
-<span class="sourceLineNo">275</span><a name="line.275"></a>
-<span class="sourceLineNo">276</span>  /**<a name="line.276"></a>
-<span class="sourceLineNo">277</span>   * Create a new histogram with size range counts.<a name="line.277"></a>
-<span class="sourceLineNo">278</span>   * @param name The name of the histogram<a name="line.278"></a>
-<span class="sourceLineNo">279</span>   * @param desc The description of the data in the histogram.<a name="line.279"></a>
-<span class="sourceLineNo">280</span>   * @return A new MutableSizeHistogram<a name="line.280"></a>
-<span class="sourceLineNo">281</span>   */<a name="line.281"></a>
-<span class="sourceLineNo">282</span>  public MutableSizeHistogram newSizeHistogram(String name, String desc) {<a name="line.282"></a>
-<span class="sourceLineNo">283</span>    MutableSizeHistogram histo = new MutableSizeHistogram(name, desc);<a name="line.283"></a>
-<span class="sourceLineNo">284</span>    return addNewMetricIfAbsent(name, histo, MutableSizeHistogram.class);<a name="line.284"></a>
-<span class="sourceLineNo">285</span>  }<a name="line.285"></a>
-<span class="sourceLineNo">286</span><a name="line.286"></a>
-<span class="sourceLineNo">287</span><a name="line.287"></a>
-<span class="sourceLineNo">288</span>  synchronized void add(String name, MutableMetric metric) {<a name="line.288"></a>
-<span class="sourceLineNo">289</span>    addNewMetricIfAbsent(name, metric, MutableMetric.class);<a name="line.289"></a>
-<span class="sourceLineNo">290</span>  }<a name="line.290"></a>
-<span class="sourceLineNo">291</span><a name="line.291"></a>
-<span class="sourceLineNo">292</span>  /**<a name="line.292"></a>
-<span class="sourceLineNo">293</span>   * Add sample to a stat metric by name.<a name="line.293"></a>
-<span class="sourceLineNo">294</span>   * @param name  of the metric<a name="line.294"></a>
-<span class="sourceLineNo">295</span>   * @param value of the snapshot to add<a name="line.295"></a>
-<span class="sourceLineNo">296</span>   */<a name="line.296"></a>
-<span class="sourceLineNo">297</span>  public void add(String name, long value) {<a name="line.297"></a>
-<span class="sourceLineNo">298</span>    MutableMetric m = metricsMap.get(name);<a name="line.298"></a>
-<span class="sourceLineNo">299</span><a name="line.299"></a>
-<span class="sourceLineNo">300</span>    if (m != null) {<a name="line.300"></a>
-<span class="sourceLineNo">301</span>      if (m instanceof MutableStat) {<a name="line.301"></a>
-<span class="sourceLineNo">302</span>        ((MutableStat) m).add(value);<a name="line.302"></a>
-<span class="sourceLineNo">303</span>      }<a name="line.303"></a>
-<span class="sourceLineNo">304</span>      else {<a name="line.304"></a>
-<span class="sourceLineNo">305</span>        throw new MetricsException("Unsupported add(value) for metric "+ name);<a name="line.305"></a>
+<span class="sourceLineNo">218</span>        if (rate instanceof MutableRate) {<a name="line.218"></a>
+<span class="sourceLineNo">219</span>          return (MutableRate) rate;<a name="line.219"></a>
+<span class="sourceLineNo">220</span>        }<a name="line.220"></a>
+<span class="sourceLineNo">221</span><a name="line.221"></a>
+<span class="sourceLineNo">222</span>        throw new MetricsException("Unexpected metrics type "+ rate.getClass()<a name="line.222"></a>
+<span class="sourceLineNo">223</span>                                   +" for "+ name);<a name="line.223"></a>
+<span class="sourceLineNo">224</span>      }<a name="line.224"></a>
+<span class="sourceLineNo">225</span>    }<a name="line.225"></a>
+<span class="sourceLineNo">226</span>    MutableRate ret = new MutableRate(name, desc, extended);<a name="line.226"></a>
+<span class="sourceLineNo">227</span>    return addNewMetricIfAbsent(name, ret, MutableRate.class);<a name="line.227"></a>
+<span class="sourceLineNo">228</span>  }<a name="line.228"></a>
+<span class="sourceLineNo">229</span><a name="line.229"></a>
+<span class="sourceLineNo">230</span>  /**<a name="line.230"></a>
+<span class="sourceLineNo">231</span>   * Create a new histogram.<a name="line.231"></a>
+<span class="sourceLineNo">232</span>   * @param name Name of the histogram.<a name="line.232"></a>
+<span class="sourceLineNo">233</span>   * @return A new MutableHistogram<a name="line.233"></a>
+<span class="sourceLineNo">234</span>   */<a name="line.234"></a>
+<span class="sourceLineNo">235</span>  public MutableHistogram newHistogram(String name) {<a name="line.235"></a>
+<span class="sourceLineNo">236</span>    return newHistogram(name, "");<a name="line.236"></a>
+<span class="sourceLineNo">237</span>  }<a name="line.237"></a>
+<span class="sourceLineNo">238</span><a name="line.238"></a>
+<span class="sourceLineNo">239</span>  /**<a name="line.239"></a>
+<span class="sourceLineNo">240</span>   * Create a new histogram.<a name="line.240"></a>
+<span class="sourceLineNo">241</span>   * @param name The name of the histogram<a name="line.241"></a>
+<span class="sourceLineNo">242</span>   * @param desc The description of the data in the histogram.<a name="line.242"></a>
+<span class="sourceLineNo">243</span>   * @return A new MutableHistogram<a name="line.243"></a>
+<span class="sourceLineNo">244</span>   */<a name="line.244"></a>
+<span class="sourceLineNo">245</span>  public MutableHistogram newHistogram(String name, String desc) {<a name="line.245"></a>
+<span class="sourceLineNo">246</span>    MutableHistogram histo = new MutableHistogram(name, desc);<a name="line.246"></a>
+<span class="sourceLineNo">247</span>    return addNewMetricIfAbsent(name, histo, MutableHistogram.class);<a name="line.247"></a>
+<span class="sourceLineNo">248</span>  }<a name="line.248"></a>
+<span class="sourceLineNo">249</span>  <a name="line.249"></a>
+<span class="sourceLineNo">250</span>  /**<a name="line.250"></a>
+<span class="sourceLineNo">251</span>   * Create a new histogram with time range counts.<a name="line.251"></a>
+<span class="sourceLineNo">252</span>   * @param name Name of the histogram.<a name="line.252"></a>
+<span class="sourceLineNo">253</span>   * @return A new MutableTimeHistogram<a name="line.253"></a>
+<span class="sourceLineNo">254</span>   */<a name="line.254"></a>
+<span class="sourceLineNo">255</span>  public MutableTimeHistogram newTimeHistogram(String name) {<a name="line.255"></a>
+<span class="sourceLineNo">256</span>    return newTimeHistogram(name, "");<a name="line.256"></a>
+<span class="sourceLineNo">257</span>  }<a name="line.257"></a>
+<span class="sourceLineNo">258</span><a name="line.258"></a>
+<span class="sourceLineNo">259</span>  /**<a name="line.259"></a>
+<span class="sourceLineNo">260</span>   * Create a new histogram with time range counts.<a name="line.260"></a>
+<span class="sourceLineNo">261</span>   * @param name The name of the histogram<a name="line.261"></a>
+<span class="sourceLineNo">262</span>   * @param desc The description of the data in the histogram.<a name="line.262"></a>
+<span class="sourceLineNo">263</span>   * @return A new MutableTimeHistogram<a name="line.263"></a>
+<span class="sourceLineNo">264</span>   */<a name="line.264"></a>
+<span class="sourceLineNo">265</span>  public MutableTimeHistogram newTimeHistogram(String name, String desc) {<a name="line.265"></a>
+<span class="sourceLineNo">266</span>    MutableTimeHistogram histo = new MutableTimeHistogram(name, desc);<a name="line.266"></a>
+<span class="sourceLineNo">267</span>    return addNewMetricIfAbsent(name, histo, MutableTimeHistogram.class);<a name="line.267"></a>
+<span class="sourceLineNo">268</span>  }<a name="line.268"></a>
+<span class="sourceLineNo">269</span>  <a name="line.269"></a>
+<span class="sourceLineNo">270</span>  /**<a name="line.270"></a>
+<span class="sourceLineNo">271</span>   * Create a new histogram with size range counts.<a name="line.271"></a>
+<span class="sourceLineNo">272</span>   * @param name Name of the histogram.<a name="line.272"></a>
+<span class="sourceLineNo">273</span>   * @return A new MutableSizeHistogram<a name="line.273"></a>
+<span class="sourceLineNo">274</span>   */<a name="line.274"></a>
+<span class="sourceLineNo">275</span>  public MutableSizeHistogram newSizeHistogram(String name) {<a name="line.275"></a>
+<span class="sourceLineNo">276</span>    return newSizeHistogram(name, "");<a name="line.276"></a>
+<span class="sourceLineNo">277</span>  }<a name="line.277"></a>
+<span class="sourceLineNo">278</span><a name="line.278"></a>
+<span class="sourceLineNo">279</span>  /**<a name="line.279"></a>
+<span class="sourceLineNo">280</span>   * Create a new histogram with size range counts.<a name="line.280"></a>
+<span class="sourceLineNo">281</span>   * @param name The name of the histogram<a name="line.281"></a>
+<span class="sourceLineNo">282</span>   * @param desc The description of the data in the histogram.<a name="line.282"></a>
+<span class="sourceLineNo">283</span>   * @return A new MutableSizeHistogram<a name="line.283"></a>
+<span class="sourceLineNo">284</span>   */<a name="line.284"></a>
+<span class="sourceLineNo">285</span>  public MutableSizeHistogram newSizeHistogram(String name, String desc) {<a name="line.285"></a>
+<span class="sourceLineNo">286</span>    MutableSizeHistogram histo = new MutableSizeHistogram(name, desc);<a name="line.286"></a>
+<span class="sourceLineNo">287</span>    return addNewMetricIfAbsent(name, histo, MutableSizeHistogram.class);<a name="line.287"></a>
+<span class="sourceLineNo">288</span>  }<a name="line.288"></a>
+<span class="sourceLineNo">289</span><a name="line.289"></a>
+<span class="sourceLineNo">290</span><a name="line.290"></a>
+<span class="sourceLineNo">291</span>  synchronized void add(String name, MutableMetric metric) {<a name="line.291"></a>
+<span class="sourceLineNo">292</span>    addNewMetricIfAbsent(name, metric, MutableMetric.class);<a name="line.292"></a>
+<span class="sourceLineNo">293</span>  }<a name="line.293"></a>
+<span class="sourceLineNo">294</span><a name="line.294"></a>
+<span class="sourceLineNo">295</span>  /**<a name="line.295"></a>
+<span class="sourceLineNo">296</span>   * Add sample to a stat metric by name.<a name="line.296"></a>
+<span class="sourceLineNo">297</span>   * @param name  of the metric<a name="line.297"></a>
+<span class="sourceLineNo">298</span>   * @param value of the snapshot to add<a name="line.298"></a>
+<span class="sourceLineNo">299</span>   */<a name="line.299"></a>
+<span class="sourceLineNo">300</span>  public void add(String name, long value) {<a name="line.300"></a>
+<span class="sourceLineNo">301</span>    MutableMetric m = metricsMap.get(name);<a name="line.301"></a>
+<span class="sourceLineNo">302</span><a name="line.302"></a>
+<span class="sourceLineNo">303</span>    if (m != null) {<a name="line.303"></a>
+<span class="sourceLineNo">304</span>      if (m instanceof MutableStat) {<a name="line.304"></a>
+<span class="sourceLineNo">305</span>        ((MutableStat) m).add(value);<a name="line.305"></a>
 <span class="sourceLineNo">306</span>      }<a name="line.306"></a>
-<span class="sourceLineNo">307</span>    }<a name="line.307"></a>
-<span class="sourceLineNo">308</span>    else {<a name="line.308"></a>
-<span class="sourceLineNo">309</span>      metricsMap.put(name, newRate(name)); // default is a rate metric<a name="line.309"></a>
-<span class="sourceLineNo">310</span>      add(name, value);<a name="line.310"></a>
-<span class="sourceLineNo">311</span>    }<a name="line.311"></a>
-<span class="sourceLineNo">312</span>  }<a name="line.312"></a>
-<span class="sourceLineNo">313</span><a name="line.313"></a>
-<span class="sourceLineNo">314</span>  /**<a name="line.314"></a>
-<span class="sourceLineNo">315</span>   * Set the metrics context tag<a name="line.315"></a>
-<span class="sourceLineNo">316</span>   * @param name of the context<a name="line.316"></a>
-<span class="sourceLineNo">317</span>   * @return the registry itself as a convenience<a name="line.317"></a>
-<span class="sourceLineNo">318</span>   */<a name="line.318"></a>
-<span class="sourceLineNo">319</span>  public DynamicMetricsRegistry setContext(String name) {<a name="line.319"></a>
-<span class="sourceLineNo">320</span>    return tag(MsInfo.Context, name, true);<a name="line.320"></a>
-<span class="sourceLineNo">321</span>  }<a name="line.321"></a>
-<span class="sourceLineNo">322</span><a name="line.322"></a>
-<span class="sourceLineNo">323</span>  /**<a name="line.323"></a>
-<span class="sourceLineNo">324</span>   * Add a tag to the metrics<a name="line.324"></a>
-<span class="sourceLineNo">325</span>   * @param name  of the tag<a name="line.325"></a>
-<span class="sourceLineNo">326</span>   * @param description of the tag<a name="line.326"></a>
-<span class="sourceLineNo">327</span>   * @param value of the tag<a name="line.327"></a>
-<span class="sourceLineNo">328</span>   * @return the registry (for keep adding tags)<a name="line.328"></a>
-<span class="sourceLineNo">329</span>   */<a name="line.329"></a>
-<span class="sourceLineNo">330</span>  public DynamicMetricsRegistry tag(String name, String description, String value) {<a name="line.330"></a>
-<span class="sourceLineNo">331</span>    return tag(name, description, value, false);<a name="line.331"></a>
-<span class="sourceLineNo">332</span>  }<a name="line.332"></a>
-<span class="sourceLineNo">333</span><a name="line.333"></a>
-<span class="sourceLineNo">334</span>  /**<a name="line.334"></a>
-<span class="sourceLineNo">335</span>   * Add a tag to the metrics<a name="line.335"></a>
-<span class="sourceLineNo">336</span>   * @param name  of the tag<a name="line.336"></a>
-<span class="sourceLineNo">337</span>   * @param description of the tag<a name="line.337"></a>
-<span class="sourceLineNo">338</span>   * @param value of the tag<a name="line.338"></a>
-<span class="sourceLineNo">339</span>   * @param override  existing tag if true<a name="line.339"></a>
-<span class="sourceLineNo">340</span>   * @return the registry (for keep adding tags)<a name="line.340"></a>
-<span class="sourceLineNo">341</span>   */<a name="line.341"></a>
-<span class="sourceLineNo">342</span>  public DynamicMetricsRegistry tag(String name, String description, String value,<a name="line.342"></a>
-<span class="sourceLineNo">343</span>                             boolean override) {<a name="line.343"></a>
-<span class="sourceLineNo">344</span>    return tag(new MetricsInfoImpl(name, description), value, override);<a name="line.344"></a>
-<span class="sourceLineNo">345</span>  }<a name="line.345"></a>
-<span class="sourceLineNo">346</span><a name="line.346"></a>
-<span class="sourceLineNo">347</span>  /**<a name="line.347"></a>
-<span class="sourceLineNo">348</span>   * Add a tag to the metrics<a name="line.348"></a>
-<span class="sourceLineNo">349</span>   * @param info  metadata of the tag<a name="line.349"></a>
-<span class="sourceLineNo">350</span>   * @param value of the tag<a name="line.350"></a>
-<span class="sourceLineNo">351</span>   * @param override existing tag if true<a name="line.351"></a>
-<span class="sourceLineNo">352</span>   * @return the registry (for keep adding tags etc.)<a name="line.352"></a>
-<span class="sourceLineNo">353</span>   */<a name="line.353"></a>
-<span class="sourceLineNo">354</span>  public DynamicMetricsRegistry tag(MetricsInfo info, String value, boolean override) {<a name="line.354"></a>
-<span class="sourceLineNo">355</span>    MetricsTag tag = Interns.tag(info, value);<a name="line.355"></a>
-<span class="sourceLineNo">356</span><a name="line.356"></a>
-<span class="sourceLineNo">357</span>    if (!override) {<a name="line.357"></a>
-<span class="sourceLineNo">358</span>      MetricsTag existing = tagsMap.putIfAbsent(info.name(), tag);<a name="line.358"></a>
-<span class="sourceLineNo">359</span>      if (existing != null) {<a name="line.359"></a>
-<span class="sourceLineNo">360</span>        throw new MetricsException("Tag "+ info.name() +" already exists!");<a name="line.360"></a>
-<span class="sourceLineNo">361</span>      }<a name="line.361"></a>
-<span class="sourceLineNo">362</span>      return this;<a name="line.362"></a>
-<span class="sourceLineNo">363</span>    }<a name="line.363"></a>
-<span class="sourceLineNo">364</span><a name="line.364"></a>
-<span class="sourceLineNo">365</span>    tagsMap.put(info.name(), tag);<a name="line.365"></a>
-<span class="sourceLineNo">366</span><a name="line.366"></a>
-<span class="sourceLineNo">367</span>    return this;<a name="line.367"></a>
-<span class="sourceLineNo">368</span>  }<a name="line.368"></a>
+<span class="sourceLineNo">307</span>      else {<a name="line.307"></a>
+<span class="sourceLineNo">308</span>        throw new MetricsException("Unsupported add(value) for metric "+ name);<a name="line.308"></a>
+<span class="sourceLineNo">309</span>      }<a name="line.309"></a>
+<span class="sourceLineNo">310</span>    }<a name="line.310"></a>
+<span class="sourceLineNo">311</span>    else {<a name="line.311"></a>
+<span class="sourceLineNo">312</span>      metricsMap.put(name, newRate(name)); // default is a rate metric<a name="line.312"></a>
+<span class="sourceLineNo">313</span>      add(name, value);<a name="line.313"></a>
+<span class="sourceLineNo">314</span>    }<a name="line.314"></a>
+<span class="sourceLineNo">315</span>  }<a name="line.315"></a>
+<span class="sourceLineNo">316</span><a name="line.316"></a>
+<span class="sourceLineNo">317</span>  /**<a name="line.317"></a>
+<span class="sourceLineNo">318</span>   * Set the metrics context tag<a name="line.318"></a>
+<span class="sourceLineNo">319</span>   * @param name of the context<a name="line.319"></a>
+<span class="sourceLineNo">320</span>   * @return the registry itself as a convenience<a name="line.320"></a>
+<span class="sourceLineNo">321</span>   */<a name="line.321"></a>
+<span class="sourceLineNo">322</span>  public DynamicMetricsRegistry setContext(String name) {<a name="line.322"></a>
+<span class="sourceLineNo">323</span>    return tag(MsInfo.Context, name, true);<a name="line.323"></a>
+<span class="sourceLineNo">324</span>  }<a name="line.324"></a>
+<span class="sourceLineNo">325</span><a name="line.325"></a>
+<span class="sourceLineNo">326</span>  /**<a name="line.326"></a>
+<span class="sourceLineNo">327</span>   * Add a tag to the metrics<a name="line.327"></a>
+<span class="sourceLineNo">328</span>   * @param name  of the tag<a name="line.328"></a>
+<span class="sourceLineNo">329</span>   * @param description of the tag<a name="line.329"></a>
+<span class="sourceLineNo">330</span>   * @param value of the tag<a name="line.330"></a>
+<span class="sourceLineNo">331</span>   * @return the registry (for keep adding tags)<a name="line.331"></a>
+<span class="sourceLineNo">332</span>   */<a name="line.332"></a>
+<span class="sourceLineNo">333</span>  public DynamicMetricsRegistry tag(String name, String description, String value) {<a name="line.333"></a>
+<span class="sourceLineNo">334</span>    return tag(name, description, value, false);<a name="line.334"></a>
+<span class="sourceLineNo">335</span>  }<a name="line.335"></a>
+<span class="sourceLineNo">336</span><a name="line.336"></a>
+<span class="sourceLineNo">337</span>  /**<a name="line.337"></a>
+<span class="sourceLineNo">338</span>   * Add a tag to the metrics<a name="line.338"></a>
+<span class="sourceLineNo">339</span>   * @param name  of the tag<a name="line.339"></a>
+<span class="sourceLineNo">340</span>   * @param description of the tag<a name="line.340"></a>
+<span class="sourceLineNo">341</span>   * @param value of the tag<a name="line.341"></a>
+<span class="sourceLineNo">342</span>   * @param override  existing tag if true<a name="line.342"></a>
+<span class="sourceLineNo">343</span>   * @return the registry (for keep adding tags)<a name="line.343"></a>
+<span class="sourceLineNo">344</span>   */<a name="line.344"></a>
+<span class="sourceLineNo">345</span>  public DynamicMetricsRegistry tag(String name, String description, String value,<a name="line.345"></a>
+<span class="sourceLineNo">346</span>                             boolean override) {<a name="line.346"></a>
+<span class="sourceLineNo">347</span>    return tag(new MetricsInfoImpl(name, description), value, override);<a name="line.347"></a>
+<span class="sourceLineNo">348</span>  }<a name="line.348"></a>
+<span class="sourceLineNo">349</span><a name="line.349"></a>
+<span class="sourceLineNo">350</span>  /**<a name="line.350"></a>
+<span class="sourceLineNo">351</span>   * Add a tag to the metrics<a name="line.351"></a>
+<span class="sourceLineNo">352</span>   * @param info  metadata of the tag<a name="line.352"></a>
+<span class="sourceLineNo">353</span>   * @param value of the tag<a name="line.353"></a>
+<span class="sourceLineNo">354</span>   * @param override existing tag if true<a name="line.354"></a>
+<span class="sourceLineNo">355</span>   * @return the registry (for keep adding tags etc.)<a name="line.355"></a>
+<span class="sourceLineNo">356</span>   */<a name="line.356"></a>
+<span class="sourceLineNo">357</span>  public DynamicMetricsRegistry tag(MetricsInfo info, String value, boolean override) {<a name="line.357"></a>
+<span class="sourceLineNo">358</span>    MetricsTag tag = Interns.tag(info, value);<a name="line.358"></a>
+<span class="sourceLineNo">359</span><a name="line.359"></a>
+<span class="sourceLineNo">360</span>    if (!override) {<a name="line.360"></a>
+<span class="sourceLineNo">361</span>      MetricsTag existing = tagsMap.putIfAbsent(info.name(), tag);<a name="line.361"></a>
+<span class="sourceLineNo">362</span>      if (existing != null) {<a name="line.362"></a>
+<span class="sourceLineNo">363</span>        throw new MetricsException("Tag "+ info.name() +" already exists!");<a name="line.363"></a>
+<span class="sourceLineNo">364</span>      }<a name="line.364"></a>
+<span class="sourceLineNo">365</span>      return this;<a name="line.365"></a>
+<span class="sourceLineNo">366</span>    }<a name="line.366"></a>
+<span class="sourceLineNo">367</span><a name="line.367"></a>
+<span class="sourceLineNo">368</span>    tagsMap.put(info.name(), tag);<a name="line.368"></a>
 <span class="sourceLineNo">369</span><a name="line.369"></a>
-<span class="sourceLineNo">370</span>  public DynamicMetricsRegistry tag(MetricsInfo info, String value) {<a name="line.370"></a>
-<span class="sourceLineNo">371</span>    return tag(info, value, false);<a name="line.371"></a>
-<span class="sourceLineNo">372</span>  }<a name="line.372"></a>
-<span class="sourceLineNo">373</span><a name="line.373"></a>
-<span class="sourceLineNo">374</span>  Collection&lt;MetricsTag&gt; tags() {<a name="line.374"></a>
-<span class="sourceLineNo">375</span>    return tagsMap.values();<a name="line.375"></a>
-<span class="sourceLineNo">376</span>  }<a name="line.376"></a>
-<span class="sourceLineNo">377</span><a name="line.377"></a>
-<span class="sourceLineNo">378</span>  Collection&lt;MutableMetric&gt; metrics() {<a name="line.378"></a>
-<span class="sourceLineNo">379</span>    return metricsMap.values();<a name="line.379"></a>
-<span class="sourceLineNo">380</span>  }<a name="line.380"></a>
-<span class="sourceLineNo">381</span><a name="line.381"></a>
-<span class="sourceLineNo">382</span>  /**<a name="line.382"></a>
-<span class="sourceLineNo">383</span>   * Sample all the mutable metrics and put the snapshot in the builder<a name="line.383"></a>
-<span class="sourceLineNo">384</span>   * @param builder to contain the metrics snapshot<a name="line.384"></a>
-<span class="sourceLineNo">385</span>   * @param all get all the metrics even if the values are not changed.<a name="line.385"></a>
-<span class="sourceLineNo">386</span>   */<a name="line.386"></a>
-<span class="sourceLineNo">387</span>  public void snapshot(MetricsRecordBuilder builder, boolean all) {<a name="line.387"></a>
-<span class="sourceLineNo">388</span>    for (MetricsTag tag : tags()) {<a name="line.388"></a>
-<span class="sourceLineNo">389</span>      builder.add(tag);<a name="line.389"></a>
-<span class="sourceLineNo">390</span>    }<a name="line.390"></a>
-<span class="sourceLineNo">391</span>    for (MutableMetric metric : metrics()) {<a name="line.391"></a>
-<span class="sourceLineNo">392</span>      metric.snapshot(builder, all);<a name="line.392"></a>
+<span class="sourceLineNo">370</span>    return this;<a name="line.370"></a>
+<span class="sourceLineNo">371</span>  }<a name="line.371"></a>
+<span class="sourceLineNo">372</span><a name="line.372"></a>
+<span class="sourceLineNo">373</span>  public DynamicMetricsRegistry tag(MetricsInfo info, String value) {<a name="line.373"></a>
+<span class="sourceLineNo">374</span>    return tag(info, value, false);<a name="line.374"></a>
+<span class="sourceLineNo">375</span>  }<a name="line.375"></a>
+<span class="sourceLineNo">376</span><a name="line.376"></a>
+<span class="sourceLineNo">377</span>  Collection&lt;MetricsTag&gt; tags() {<a name="line.377"></a>
+<span class="sourceLineNo">378</span>    return tagsMap.values();<a name="line.378"></a>
+<span class="sourceLineNo">379</span>  }<a name="line.379"></a>
+<span class="sourceLineNo">380</span><a name="line.380"></a>
+<span class="sourceLineNo">381</span>  Collection&lt;MutableMetric&gt; metrics() {<a name="line.381"></a>
+<span class="sourceLineNo">382</span>    return metricsMap.values();<a name="line.382"></a>
+<span class="sourceLineNo">383</span>  }<a name="line.383"></a>
+<span class="sourceLineNo">384</span><a name="line.384"></a>
+<span class="sourceLineNo">385</span>  /**<a name="line.385"></a>
+<span class="sourceLineNo">386</span>   * Sample all the mutable metrics and put the snapshot in the builder<a name="line.386"></a>
+<span class="sourceLineNo">387</span>   * @param builder to contain the metrics snapshot<a name="line.387"></a>
+<span class="sourceLineNo">388</span>   * @param all get all the metrics even if the values are not changed.<a name="line.388"></a>
+<span class="sourceLineNo">389</span>   */<a name="line.389"></a>
+<span class="sourceLineNo">390</span>  public void snapshot(MetricsRecordBuilder builder, boolean all) {<a name="line.390"></a>
+<span class="sourceLineNo">391</span>    for (MetricsTag tag : tags()) {<a name="line.391"></a>
+<span class="sourceLineNo">392</span>      builder.add(tag);<a name="line.392"></a>
 <span class="sourceLineNo">393</span>    }<a name="line.393"></a>
-<span class="sourceLineNo">394</span>  }<a name="line.394"></a>
-<span class="sourceLineNo">395</span><a name="line.395"></a>
-<span class="sourceLineNo">396</span>  @Override public String toString() {<a name="line.396"></a>
-<span class="sourceLineNo">397</span>    return MoreObjects.toStringHelper(this)<a name="line.397"></a>
-<span class="sourceLineNo">398</span>        .add("info", metricsInfo).add("tags", tags()).add("metrics", metrics())<a name="line.398"></a>
-<span class="sourceLineNo">399</span>        .toString();<a name="line.399"></a>
-<span class="sourceLineNo">400</span>  }<a name="line.400"></a>
-<span class="sourceLineNo">401</span><a name="line.401"></a>
-<span class="sourceLineNo">402</span>  /**<a name="line.402"></a>
-<span class="sourceLineNo">403</span>   * Removes metric by name<a name="line.403"></a>
-<span class="sourceLineNo">404</span>   * @param name name of the metric to remove<a name="line.404"></a>
-<span class="sourceLineNo">405</span>   */<a name="line.405"></a>
-<span class="sourceLineNo">406</span>  public void removeMetric(String name) {<a name="line.406"></a>
-<span class="sourceLineNo">407</span>    helper.removeObjectName(name);<a name="line.407"></a>
-<span class="sourceLineNo">408</span>    metricsMap.remove(name);<a name="line.408"></a>
-<span class="sourceLineNo">409</span>  }<a name="line.409"></a>
-<span class="sourceLineNo">410</span><a name="line.410"></a>
-<span class="sourceLineNo">411</span>  public void removeHistogramMetrics(String baseName) {<a name="line.411"></a>
-<span class="sourceLineNo">412</span>    for (String suffix:histogramSuffixes) {<a name="line.412"></a>
-<span class="sourceLineNo">413</span>      removeMetric(baseName+suffix);<a name="line.413"></a>
-<span class="sourceLineNo">414</span>    }<a name="line.414"></a>
-<span class="sourceLineNo">415</span>  }<a name="line.415"></a>
-<span class="sourceLineNo">416</span><a name="line.416"></a>
-<span class="sourceLineNo">417</span>  /**<a name="line.417"></a>
-<span class="sourceLineNo">418</span>   * Get a MetricMutableGaugeLong from the storage.  If it is not there atomically put it.<a name="line.418"></a>
-<span class="sourceLineNo">419</span>   *<a name="line.419"></a>
-<span class="sourceLineNo">420</span>   * @param gaugeName              name of the gauge to create or get.<a name="line.420"></a>
-<span class="sourceLineNo">421</span>   * @param potentialStartingValue value of the new gauge if we have to create it.<a name="line.421"></a>
-<span class="sourceLineNo">422</span>   */<a name="line.422"></a>
-<span class="sourceLineNo">423</span>  public MutableGaugeLong getGauge(String gaugeName, long potentialStartingValue) {<a name="line.423"></a>
-<span class="sourceLineNo">424</span>    //Try and get the guage.<a name="line.424"></a>
-<span class="sourceLineNo">425</span>    MutableMetric metric = metricsMap.get(gaugeName);<a name="line.425"></a>
-<span class="sourceLineNo">426</span><a name="line.426"></a>
-<span class="sourceLineNo">427</span>    //If it's not there then try and put a new one in the storage.<a name="line.427"></a>
-<span class="sourceLineNo">428</span>    if (metric == null) {<a name="line.428"></a>
+<span class="sourceLineNo">394</span>    for (MutableMetric metric : metrics()) {<a name="line.394"></a>
+<span class="sourceLineNo">395</span>      metric.snapshot(builder, all);<a name="line.395"></a>
+<span class="sourceLineNo">396</span>    }<a name="line.396"></a>
+<span class="sourceLineNo">397</span>  }<a name="line.397"></a>
+<span class="sourceLineNo">398</span><a name="line.398"></a>
+<span class="sourceLineNo">399</span>  @Override public String toString() {<a name="line.399"></a>
+<span class="sourceLineNo">400</span>    return MoreObjects.toStringHelper(this)<a name="line.400"></a>
+<span class="sourceLineNo">401</span>        .add("info", metricsInfo).add("tags", tags()).add("metrics", metrics())<a name="line.401"></a>
+<span class="sourceLineNo">402</span>        .toString();<a name="line.402"></a>
+<span class="sourceLineNo">403</span>  }<a name="line.403"></a>
+<span class="sourceLineNo">404</span><a name="line.404"></a>
+<span class="sourceLineNo">405</span>  /**<a name="line.405"></a>
+<span class="sourceLineNo">406</span>   * Removes metric by name<a name="line.406"></a>
+<span class="sourceLineNo">407</span>   * @param name name of the metric to remove<a name="line.407"></a>
+<span class="sourceLineNo">408</span>   */<a name="line.408"></a>
+<span class="sourceLineNo">409</span>  public void removeMetric(String name) {<a name="line.409"></a>
+<span class="sourceLineNo">410</span>    helper.removeObjectName(name);<a name="line.410"></a>
+<span class="sourceLineNo">411</span>    metricsMap.remove(name);<a name="line.411"></a>
+<span class="sourceLineNo">412</span>  }<a name="line.412"></a>
+<span class="sourceLineNo">413</span><a name="line.413"></a>
+<span class="sourceLineNo">414</span>  public void removeHistogramMetrics(String baseName) {<a name="line.414"></a>
+<span class="sourceLineNo">415</span>    for (String suffix:histogramSuffixes) {<a name="line.415"></a>
+<span class="sourceLineNo">416</span>      removeMetric(baseName+suffix);<a name="line.416"></a>
+<span class="sourceLineNo">417</span>    }<a name="line.417"></a>
+<span class="sourceLineNo">418</span>  }<a name="line.418"></a>
+<span class="sourceLineNo">419</span><a name="line.419"></a>
+<span class="sourceLineNo">420</span>  /**<a name="line.420"></a>
+<span class="sourceLineNo">421</span>   * Get a MetricMutableGaugeLong from the storage.  If it is not there atomically put it.<a name="line.421"></a>
+<span class="sourceLineNo">422</span>   *<a name="line.422"></a>
+<span class="sourceLineNo">423</span>   * @param gaugeName              name of the gauge to create or get.<a name="line.423"></a>
+<span class="sourceLineNo">424</span>   * @param potentialStartingValue value of the new gauge if we have to create it.<a name="line.424"></a>
+<span class="sourceLineNo">425</span>   */<a name="line.425"></a>
+<span class="sourceLineNo">426</span>  public MutableGaugeLong getGauge(String gaugeName, long potentialStartingValue) {<a name="line.426"></a>
+<span class="sourceLineNo">427</span>    //Try and get the guage.<a name="line.427"></a>
+<span class="sourceLineNo">428</span>    MutableMetric metric = metricsMap.get(gaugeName);<a name="line.428"></a>
 <span class="sourceLineNo">429</span><a name="line.429"></a>
-<span class="sourceLineNo">430</span>      //Create the potential new gauge.<a name="line.430"></a>
-<span class="sourceLineNo">431</span>      MutableGaugeLong newGauge = new MutableGaugeLong(new MetricsInfoImpl(gaugeName, ""),<a name="line.431"></a>
-<span class="sourceLineNo">432</span>              potentialStartingValue);<a name="line.432"></a>
-<span class="sourceLineNo">433</span><a name="line.433"></a>
-<span class="sourceLineNo">434</span>      // Try and put the gauge in.  This is atomic.<a name="line.434"></a>
-<span class="sourceLineNo">435</span>      metric = metricsMap.putIfAbsent(gaugeName, newGauge);<a name="line.435"></a>
+<span class="sourceLineNo">430</span>    //If it's not there then try and put a new one in the storage.<a name="line.430"></a>
+<span class="sourceLineNo">431</span>    if (metric == null) {<a name="line.431"></a>
+<span class="sourceLineNo">432</span><a name="line.432"></a>
+<span class="sourceLineNo">433</span>      //Create the potential new gauge.<a name="line.433"></a>
+<span class="sourceLineNo">434</span>      MutableGaugeLong newGauge = new MutableGaugeLong(new MetricsInfoImpl(gaugeName, ""),<a name="line.434"></a>
+<span class="sourceLineNo">435</span>              potentialStartingValue);<a name="line.435"></a>
 <span class="sourceLineNo">436</span><a name="line.436"></a>
-<span class="sourceLineNo">437</span>      //If the value we get back is null then the put was successful and we will return that.<a name="line.437"></a>
-<span class="sourceLineNo">438</span>      //otherwise gaugeLong should contain the thing that was in before the put could be completed.<a name="line.438"></a>
-<span class="sourceLineNo">439</span>      if (metric == null) {<a name="line.439"></a>
-<span class="sourceLineNo">440</span>        return newGauge;<a name="line.440"></a>
-<span class="sourceLineNo">441</span>      }<a name="line.441"></a>
-<span class="sourceLineNo">442</span>    }<a name="line.442"></a>
-<span class="sourceLineNo">443</span><a name="line.443"></a>
-<span class="sourceLineNo">444</span>    if (!(metric instanceof MutableGaugeLong)) {<a name="line.444"></a>
-<span class="sourceLineNo">445</span>      throw new MetricsException("Metric already exists in registry for metric name: " + gaugeName +<a name="line.445"></a>
-<span class="sourceLineNo">446</span>              " and not of type MetricMutableGaugeLong");<a name="line.446"></a>
-<span class="sourceLineNo">447</span>    }<a name="line.447"></a>
-<span class="sourceLineNo">448</span><a name="line.448"></a>
-<span class="sourceLineNo">449</span>    return (MutableGaugeLong) metric;<a name="line.449"></a>
-<span class="sourceLineNo">450</span>  }<a name="line.450"></a>
+<span class="sourceLineNo">437</span>      // Try and put the gauge in.  This is atomic.<a name="line.437"></a>
+<span class="sourceLineNo">438</span>      metric = metricsMap.putIfAbsent(gaugeName, newGauge);<a name="line.438"></a>
+<span class="sourceLineNo">439</span><a name="line.439"></a>
+<span class="sourceLineNo">440</span>      //If the value we get back is null then the put was successful and we will return that.<a name="line.440"></a>
+<span class="sourceLineNo">441</span>      //otherwise gaugeLong should contain the thing that was in before the put could be completed.<a name="line.441"></a>
+<span class="sourceLineNo">442</span>      if (metric == null) {<a name="line.442"></a>
+<span class="sourceLineNo">443</span>        return newGauge;<a name="line.443"></a>
+<span class="sourceLineNo">444</span>      }<a name="line.444"></a>
+<span class="sourceLineNo">445</span>    }<a name="line.445"></a>
+<span class="sourceLineNo">446</span><a name="line.446"></a>
+<span class="sourceLineNo">447</span>    if (!(metric instanceof MutableGaugeLong)) {<a name="line.447"></a>
+<span class="sourceLineNo">448</span>      throw new MetricsException("Metric already exists in registry for metric name: " + gaugeName +<a name="line.448"></a>
+<span class="sourceLineNo">449</span>              " and not of type MetricMutableGaugeLong");<a name="line.449"></a>
+<span class="sourceLineNo">450</span>    }<a name="line.450"></a>
 <span class="sourceLineNo">451</span><a name="line.451"></a>
-<span class="sourceLineNo">452</span>  /**<a name="line.452"></a>
-<span class="sourceLineNo">453</span>   * Get a MetricMutableCounterLong from the storage.  If it is not there atomically put it.<a name="line.453"></a>
-<span class="sourceLineNo">454</span>   *<a name="line.454"></a>
-<span class="sourceLineNo">455</span>   * @param counterName            Name of the counter to get<a name="line.455"></a>
-<span class="sourceLineNo">456</span>   * @param potentialStartingValue starting value if we have to create a new counter<a name="line.456"></a>
-<span class="sourceLineNo">457</span>   */<a name="line.457"></a>
-<span class="sourceLineNo">458</span>  public MutableFastCounter getCounter(String counterName, long potentialStartingValue) {<a name="line.458"></a>
-<span class="sourceLineNo">459</span>    //See getGauge for description on how this works.<a name="line.459"></a>
-<span class="sourceLineNo">460</span>    MutableMetric counter = metricsMap.get(counterName);<a name="line.460"></a>
-<span class="sourceLineNo">461</span>    if (counter == null) {<a name="line.461"></a>
-<span class="sourceLineNo">462</span>      MutableFastCounter newCounter =<a name="line.462"></a>
-<span class="sourceLineNo">463</span>              new MutableFastCounter(new MetricsInfoImpl(counterName, ""), potentialStartingValue);<a name="line.463"></a>
-<span class="sourceLineNo">464</span>      counter = metricsMap.putIfAbsent(counterName, newCounter);<a name="line.464"></a>
-<span class="sourceLineNo">465</span>      if (counter == null) {<a name="line.465"></a>
-<span class="sourceLineNo">466</span>        return newCounter;<a name="line.466"></a>
-<span class="sourceLineNo">467</span>      }<a name="line.467"></a>
-<span class="sourceLineNo">468</span>    }<a name="line.468"></a>
-<span class="sourceLineNo">469</span><a name="line.469"></a>
-<span class="sourceLineNo">470</span><a name="line.470"></a>
-<span class="sourceLineNo">471</span>    if (!(counter instanceof MutableCounter)) {<a name="line.471"></a>
-<span class="sourceLineNo">472</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.472"></a>
-<span class="sourceLineNo">473</span>              counterName + " and not of type MutableCounter");<a name="line.473"></a>
-<span class="sourceLineNo">474</span>    }<a name="line.474"></a>
-<span class="sourceLineNo">475</span><a name="line.475"></a>
-<span class="sourceLineNo">476</span>    return (MutableFastCounter) counter;<a name="line.476"></a>
-<span class="sourceLineNo">477</span>  }<a name="line.477"></a>
+<span class="sourceLineNo">452</span>    return (MutableGaugeLong) metric;<a name="line.452"></a>
+<span class="sourceLineNo">453</span>  }<a name="line.453"></a>
+<span class="sourceLineNo">454</span><a name="line.454"></a>
+<span class="sourceLineNo">455</span>  /**<a name="line.455"></a>
+<span class="sourceLineNo">456</span>   * Get a MetricMutableCounterLong from the storage.  If it is not there atomically put it.<a name="line.456"></a>
+<span class="sourceLineNo">457</span>   *<a name="line.457"></a>
+<span class="sourceLineNo">458</span>   * @param counterName            Name of the counter to get<a name="line.458"></a>
+<span class="sourceLineNo">459</span>   * @param potentialStartingValue starting value if we have to create a new counter<a name="line.459"></a>
+<span class="sourceLineNo">460</span>   */<a name="line.460"></a>
+<span class="sourceLineNo">461</span>  public MutableFastCounter getCounter(String counterName, long potentialStartingValue) {<a name="line.461"></a>
+<span class="sourceLineNo">462</span>    //See getGauge for description on how this works.<a name="line.462"></a>
+<span class="sourceLineNo">463</span>    MutableMetric counter = metricsMap.get(counterName);<a name="line.463"></a>
+<span class="sourceLineNo">464</span>    if (counter == null) {<a name="line.464"></a>
+<span class="sourceLineNo">465</span>      MutableFastCounter newCounter =<a name="line.465"></a>
+<span class="sourceLineNo">466</span>              new MutableFastCounter(new MetricsInfoImpl(counterName, ""), potentialStartingValue);<a name="line.466"></a>
+<span class="sourceLineNo">467</span>      counter = metricsMap.putIfAbsent(counterName, newCounter);<a name="line.467"></a>
+<span class="sourceLineNo">468</span>      if (counter == null) {<a name="line.468"></a>
+<span class="sourceLineNo">469</span>        return newCounter;<a name="line.469"></a>
+<span class="sourceLineNo">470</span>      }<a name="line.470"></a>
+<span class="sourceLineNo">471</span>    }<a name="line.471"></a>
+<span class="sourceLineNo">472</span><a name="line.472"></a>
+<span class="sourceLineNo">473</span><a name="line.473"></a>
+<span class="sourceLineNo">474</span>    if (!(counter instanceof MutableCounter)) {<a name="line.474"></a>
+<span class="sourceLineNo">475</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.475"></a>
+<span class="sourceLineNo">476</span>              counterName + " and not of type MutableCounter");<a name="line.476"></a>
+<span class="sourceLineNo">477</span>    }<a name="line.477"></a>
 <span class="sourceLineNo">478</span><a name="line.478"></a>
-<span class="sourceLineNo">479</span>  public MutableHistogram getHistogram(String histoName) {<a name="line.479"></a>
-<span class="sourceLineNo">480</span>    //See getGauge for description on how this works.<a name="line.480"></a>
-<span class="sourceLineNo">481</span>    MutableMetric histo = metricsMap.get(histoName);<a name="line.481"></a>
-<span class="sourceLineNo">482</span>    if (histo == null) {<a name="line.482"></a>
-<span class="sourceLineNo">483</span>      MutableHistogram newCounter =<a name="line.483"></a>
-<span class="sourceLineNo">484</span>          new MutableHistogram(new MetricsInfoImpl(histoName, ""));<a name="line.484"></a>
-<span class="sourceLineNo">485</span>      histo = metricsMap.putIfAbsent(histoName, newCounter);<a name="line.485"></a>
-<span class="sourceLineNo">486</span>      if (histo == null) {<a name="line.486"></a>
-<span class="sourceLineNo">487</span>        return newCounter;<a name="line.487"></a>
-<span class="sourceLineNo">488</span>      }<a name="line.488"></a>
-<span class="sourceLineNo">489</span>    }<a name="line.489"></a>
-<span class="sourceLineNo">490</span><a name="line.490"></a>
-<span class="sourceLineNo">491</span><a name="line.491"></a>
-<span class="sourceLineNo">492</span>    if (!(histo instanceof MutableHistogram)) {<a name="line.492"></a>
-<span class="sourceLineNo">493</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.493"></a>
-<span class="sourceLineNo">494</span>          histoName + " and not of type MutableHistogram");<a name="line.494"></a>
-<span class="sourceLineNo">495</span>    }<a name="line.495"></a>
-<span class="sourceLineNo">496</span><a name="line.496"></a>
-<span class="sourceLineNo">497</span>    return (MutableHistogram) histo;<a name="line.497"></a>
-<span class="sourceLineNo">498</span>  }<a name="line.498"></a>
+<span class="sourceLineNo">479</span>    return (MutableFastCounter) counter;<a name="line.479"></a>
+<span class="sourceLineNo">480</span>  }<a name="line.480"></a>
+<span class="sourceLineNo">481</span><a name="line.481"></a>
+<span class="sourceLineNo">482</span>  public MutableHistogram getHistogram(String histoName) {<a name="line.482"></a>
+<span class="sourceLineNo">483</span>    //See getGauge for description on how this works.<a name="line.483"></a>
+<span class="sourceLineNo">484</span>    MutableMetric histo = metricsMap.get(histoName);<a name="line.484"></a>
+<span class="sourceLineNo">485</span>    if (histo == null) {<a name="line.485"></a>
+<span class="sourceLineNo">486</span>      MutableHistogram newCounter =<a name="line.486"></a>
+<span class="sourceLineNo">487</span>          new MutableHistogram(new MetricsInfoImpl(histoName, ""));<a name="line.487"></a>
+<span class="sourceLineNo">488</span>      histo = metricsMap.putIfAbsent(histoName, newCounter);<a name="line.488"></a>
+<span class="sourceLineNo">489</span>      if (histo == null) {<a name="line.489"></a>
+<span class="sourceLineNo">490</span>        return newCounter;<a name="line.490"></a>
+<span class="sourceLineNo">491</span>      }<a name="line.491"></a>
+<span class="sourceLineNo">492</span>    }<a name="line.492"></a>
+<span class="sourceLineNo">493</span><a name="line.493"></a>
+<span class="sourceLineNo">494</span><a name="line.494"></a>
+<span class="sourceLineNo">495</span>    if (!(histo instanceof MutableHistogram)) {<a name="line.495"></a>
+<span class="sourceLineNo">496</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.496"></a>
+<span class="sourceLineNo">497</span>          histoName + " and not of type MutableHistogram");<a name="line.497"></a>
+<span class="sourceLineNo">498</span>    }<a name="line.498"></a>
 <span class="sourceLineNo">499</span><a name="line.499"></a>
-<span class="sourceLineNo">500</span>  private&lt;T extends MutableMetric&gt; T<a name="line.500"></a>
-<span class="sourceLineNo">501</span>  addNewMetricIfAbsent(String name,<a name="line.501"></a>
-<span class="sourceLineNo">502</span>                       T ret,<a name="line.502"></a>
-<span class="sourceLineNo">503</span>                       Class&lt;T&gt; metricClass) {<a name="line.503"></a>
-<span class="sourceLineNo">504</span>    //If the value we get back is null then the put was successful and we will<a name="line.504"></a>
-<span class="sourceLineNo">505</span>    // return that. Otherwise metric should contain the thing that was in<a name="line.505"></a>
-<span class="sourceLineNo">506</span>    // before the put could be completed.<a name="line.506"></a>
-<span class="sourceLineNo">507</span>    MutableMetric metric = metricsMap.putIfAbsent(name, ret);<a name="line.507"></a>
-<span class="sourceLineNo">508</span>    if (metric == null) {<a name="line.508"></a>
-<span class="sourceLineNo">509</span>      return ret;<a name="line.509"></a>
-<span class="sourceLineNo">510</span>    }<a name="line.510"></a>
-<span class="sourceLineNo">511</span><a name="line.511"></a>
-<span class="sourceLineNo">512</span>    return returnExistingWithCast(metric, metricClass, name);<a name="line.512"></a>
-<span class="sourceLineNo">513</span>  }<a name="line.513"></a>
-<span class="sourceLineNo">514</span><a name="line.514"></a>
-<span class="sourceLineNo">515</span>  @SuppressWarnings("unchecked")<a name="line.515"></a>
-<span class="sourceLineNo">516</span>  private&lt;T&gt; T returnExistingWithCast(MutableMetric metric,<a name="line.516"></a>
-<span class="sourceLineNo">517</span>                                      Class&lt;T&gt; metricClass, String name) {<a name="line.517"></a>
-<span class="sourceLineNo">518</span>    if (!metricClass.isAssignableFrom(metric.getClass())) {<a name="line.518"></a>
-<span class="sourceLineNo">519</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.519"></a>
-<span class="sourceLineNo">520</span>              name + " and not of type " + metricClass +<a name="line.520"></a>
-<span class="sourceLineNo">521</span>              " but instead of type " + metric.getClass());<a name="line.521"></a>
-<span class="sourceLineNo">522</span>    }<a name="line.522"></a>
-<span class="sourceLineNo">523</span><a name="line.523"></a>
-<span class="sourceLineNo">524</span>    return (T) metric;<a name="line.524"></a>
-<span class="sourceLineNo">525</span>  }<a name="line.525"></a>
-<span class="sourceLineNo">526</span><a name="line.526"></a>
-<span class="sourceLineNo">527</span>  public void clearMetrics() {<a name="line.527"></a>
-<span class="sourceLineNo">528</span>    for (String name:metricsMap.keySet()) {<a name="line.528"></a>
-<span class="sourceLineNo">529</span>      helper.removeObjectName(name);<a name="line.529"></a>
-<span class="sourceLineNo">530</span>    }<a name="line.530"></a>
-<span class="sourceLineNo">531</span>    metricsMap.clear();<a name="line.531"></a>
-<span class="sourceLineNo">532</span>  }<a name="line.532"></a>
-<span class="sourceLineNo">533</span>}<a name="line.533"></a>
+<span class="sourceLineNo">500</span>    return (MutableHistogram) histo;<a name="line.500"></a>
+<span class="sourceLineNo">501</span>  }<a name="line.501"></a>
+<span class="sourceLineNo">502</span><a name="line.502"></a>
+<span class="sourceLineNo">503</span>  private&lt;T extends MutableMetric&gt; T addNewMetricIfAbsent(String name, T ret,<a name="line.503"></a>
+<span class="sourceLineNo">504</span>      Class&lt;T&gt; metricClass) {<a name="line.504"></a>
+<span class="sourceLineNo">505</span>    //If the value we get back is null then the put was successful and we will<a name="line.505"></a>
+<span class="sourceLineNo">506</span>    // return that. Otherwise metric should contain the thing that was in<a name="line.506"></a>
+<span class="sourceLineNo">507</span>    // before the put could be completed.<a name="line.507"></a>
+<span class="sourceLineNo">508</span>    MutableMetric metric = metricsMap.putIfAbsent(name, ret);<a name="line.508"></a>
+<span class="sourceLineNo">509</span>    if (metric == null) {<a name="line.509"></a>
+<span class="sourceLineNo">510</span>      return ret;<a name="line.510"></a>
+<span class="sourceLineNo">511</span>    }<a name="line.511"></a>
+<span class="sourceLineNo">512</span><a name="line.512"></a>
+<span class="sourceLineNo">513</span>    return returnExistingWithCast(metric, metricClass, name);<a name="line.513"></a>
+<span class="sourceLineNo">514</span>  }<a name="line.514"></a>
+<span class="sourceLineNo">515</span><a name="line.515"></a>
+<span class="sourceLineNo">516</span>  @SuppressWarnings("unchecked")<a name="line.516"></a>
+<span class="sourceLineNo">517</span>  private&lt;T&gt; T returnExistingWithCast(MutableMetric metric,<a name="line.517"></a>
+<span class="sourceLineNo">518</span>                                      Class&lt;T&gt; metricClass, String name) {<a name="line.518"></a>
+<span class="sourceLineNo">519</span>    if (!metricClass.isAssignableFrom(metric.getClass())) {<a name="line.519"></a>
+<span class="sourceLineNo">520</span>      throw new MetricsException("Metric already exists in registry for metric name: " +<a name="line.520"></a>
+<span class="sourceLineNo">521</span>              name + " and not of type " + metricClass +<a name="line.521"></a>
+<span class="sourceLineNo">522</span>              " but instead of type " + metric.getClass());<a name="line.522"></a>
+<span class="sourceLineNo">523</span>    }<a name="line.523"></a>
+<span class="sourceLineNo">524</span><a name="line.524"></a>
+<span class="sourceLineNo">525</span>    return (T) metric;<a name="line.525"></a>
+<span class="sourceLineNo">526</span>  }<a name="line.526"></a>
+<span class="sourceLineNo">527</span><a name="line.527"></a>
+<span class="sourceLineNo">528</span>  public void clearMetrics() {<a name="line.528"></a>
+<span class="sourceLineNo">529</span>    for (String name:metricsMap.keySet()) {<a name="line.529"></a>
+<span class="sourceLineNo">530</span>      helper.removeObjectName(name);<a name="line.530"></a>
+<span class="sourceLineNo">531</span>    }<a name="line.531"></a>
+<span class="sourceLineNo">532</span>    metricsMap.clear();<a name="line.532"></a>
+<span class="sourceLineNo">533</span>  }<a name="line.533"></a>
+<span class="sourceLineNo">534</span>}<a name="line.534"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ExecutorSingleton.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ExecutorSingleton.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ExecutorSingleton.html
index d2bf736..7053469 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ExecutorSingleton.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ExecutorSingleton.html
@@ -31,8 +31,8 @@
 <span class="sourceLineNo">023</span>import java.util.concurrent.ThreadFactory;<a name="line.23"></a>
 <span class="sourceLineNo">024</span>import java.util.concurrent.atomic.AtomicInteger;<a name="line.24"></a>
 <span class="sourceLineNo">025</span><a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.27"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.27"></a>
 <span class="sourceLineNo">028</span><a name="line.28"></a>
 <span class="sourceLineNo">029</span>/**<a name="line.29"></a>
 <span class="sourceLineNo">030</span> *  Class to handle the ScheduledExecutorService{@link ScheduledExecutorService} used by<a name="line.30"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ThreadPoolExecutorThreadFactory.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ThreadPoolExecutorThreadFactory.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ThreadPoolExecutorThreadFactory.html
index d2bf736..7053469 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ThreadPoolExecutorThreadFactory.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.ThreadPoolExecutorThreadFactory.html
@@ -31,8 +31,8 @@
 <span class="sourceLineNo">023</span>import java.util.concurrent.ThreadFactory;<a name="line.23"></a>
 <span class="sourceLineNo">024</span>import java.util.concurrent.atomic.AtomicInteger;<a name="line.24"></a>
 <span class="sourceLineNo">025</span><a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.27"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.27"></a>
 <span class="sourceLineNo">028</span><a name="line.28"></a>
 <span class="sourceLineNo">029</span>/**<a name="line.29"></a>
 <span class="sourceLineNo">030</span> *  Class to handle the ScheduledExecutorService{@link ScheduledExecutorService} used by<a name="line.30"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.html
index d2bf736..7053469 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MetricsExecutorImpl.html
@@ -31,8 +31,8 @@
 <span class="sourceLineNo">023</span>import java.util.concurrent.ThreadFactory;<a name="line.23"></a>
 <span class="sourceLineNo">024</span>import java.util.concurrent.atomic.AtomicInteger;<a name="line.24"></a>
 <span class="sourceLineNo">025</span><a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.27"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricsExecutor;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.27"></a>
 <span class="sourceLineNo">028</span><a name="line.28"></a>
 <span class="sourceLineNo">029</span>/**<a name="line.29"></a>
 <span class="sourceLineNo">030</span> *  Class to handle the ScheduledExecutorService{@link ScheduledExecutorService} used by<a name="line.30"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableHistogram.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableHistogram.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableHistogram.html
index 7ed6fff..eaeadb9 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableHistogram.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableHistogram.html
@@ -27,14 +27,14 @@
 <span class="sourceLineNo">019</span>package org.apache.hadoop.metrics2.lib;<a name="line.19"></a>
 <span class="sourceLineNo">020</span><a name="line.20"></a>
 <span class="sourceLineNo">021</span>import org.apache.commons.lang3.StringUtils;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import org.apache.hadoop.hbase.metrics.Histogram;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.metrics.Snapshot;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.hbase.metrics.impl.HistogramImpl;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricHistogram;<a name="line.27"></a>
-<span class="sourceLineNo">028</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.28"></a>
-<span class="sourceLineNo">029</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.29"></a>
+<span class="sourceLineNo">022</span>import org.apache.hadoop.hbase.metrics.Histogram;<a name="line.22"></a>
+<span class="sourceLineNo">023</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.hadoop.hbase.metrics.Snapshot;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.hbase.metrics.impl.HistogramImpl;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricHistogram;<a name="line.26"></a>
+<span class="sourceLineNo">027</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.27"></a>
+<span class="sourceLineNo">028</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.28"></a>
+<span class="sourceLineNo">029</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.29"></a>
 <span class="sourceLineNo">030</span><a name="line.30"></a>
 <span class="sourceLineNo">031</span>/**<a name="line.31"></a>
 <span class="sourceLineNo">032</span> * A histogram implementation that runs in constant space, and exports to hadoop2's metrics2 system.<a name="line.32"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableRangeHistogram.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableRangeHistogram.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableRangeHistogram.html
index 4ff6d35..a3dc2f7 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableRangeHistogram.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableRangeHistogram.html
@@ -26,76 +26,77 @@
 <span class="sourceLineNo">018</span><a name="line.18"></a>
 <span class="sourceLineNo">019</span>package org.apache.hadoop.metrics2.lib;<a name="line.19"></a>
 <span class="sourceLineNo">020</span><a name="line.20"></a>
-<span class="sourceLineNo">021</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.22"></a>
-<span class="sourceLineNo">023</span>import org.apache.hadoop.hbase.metrics.Snapshot;<a name="line.23"></a>
-<span class="sourceLineNo">024</span>import org.apache.hadoop.metrics2.MetricHistogram;<a name="line.24"></a>
-<span class="sourceLineNo">025</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.25"></a>
-<span class="sourceLineNo">026</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.26"></a>
-<span class="sourceLineNo">027</span>/**<a name="line.27"></a>
-<span class="sourceLineNo">028</span> * Extended histogram implementation with metric range counters.<a name="line.28"></a>
-<span class="sourceLineNo">029</span> */<a name="line.29"></a>
-<span class="sourceLineNo">030</span>@InterfaceAudience.Private<a name="line.30"></a>
-<span class="sourceLineNo">031</span>public abstract class MutableRangeHistogram extends MutableHistogram implements MetricHistogram {<a name="line.31"></a>
-<span class="sourceLineNo">032</span><a name="line.32"></a>
-<span class="sourceLineNo">033</span>  public MutableRangeHistogram(MetricsInfo info) {<a name="line.33"></a>
-<span class="sourceLineNo">034</span>    this(info.name(), info.description());<a name="line.34"></a>
-<span class="sourceLineNo">035</span>  }<a name="line.35"></a>
-<span class="sourceLineNo">036</span><a name="line.36"></a>
-<span class="sourceLineNo">037</span>  public MutableRangeHistogram(String name, String description) {<a name="line.37"></a>
-<span class="sourceLineNo">038</span>    this(name, description, Integer.MAX_VALUE &lt;&lt; 2);<a name="line.38"></a>
-<span class="sourceLineNo">039</span>  }<a name="line.39"></a>
-<span class="sourceLineNo">040</span><a name="line.40"></a>
-<span class="sourceLineNo">041</span>  public MutableRangeHistogram(String name, String description, long expectedMax) {<a name="line.41"></a>
-<span class="sourceLineNo">042</span>    super(name, description, expectedMax);<a name="line.42"></a>
-<span class="sourceLineNo">043</span>  }<a name="line.43"></a>
-<span class="sourceLineNo">044</span><a name="line.44"></a>
-<span class="sourceLineNo">045</span>  /**<a name="line.45"></a>
-<span class="sourceLineNo">046</span>   * Returns the type of range histogram size or time <a name="line.46"></a>
-<span class="sourceLineNo">047</span>   */<a name="line.47"></a>
-<span class="sourceLineNo">048</span>  public abstract String getRangeType();<a name="line.48"></a>
-<span class="sourceLineNo">049</span>  <a name="line.49"></a>
-<span class="sourceLineNo">050</span>  /**<a name="line.50"></a>
-<span class="sourceLineNo">051</span>   * Returns the ranges to be counted <a name="line.51"></a>
-<span class="sourceLineNo">052</span>   */<a name="line.52"></a>
-<span class="sourceLineNo">053</span>  public abstract long[] getRanges();<a name="line.53"></a>
-<span class="sourceLineNo">054</span><a name="line.54"></a>
-<span class="sourceLineNo">055</span>  <a name="line.55"></a>
-<span class="sourceLineNo">056</span>  @Override<a name="line.56"></a>
-<span class="sourceLineNo">057</span>  public synchronized void snapshot(MetricsRecordBuilder metricsRecordBuilder, boolean all) {<a name="line.57"></a>
-<span class="sourceLineNo">058</span>    // Get a reference to the old histogram.<a name="line.58"></a>
-<span class="sourceLineNo">059</span>    Snapshot snapshot = histogram.snapshot();<a name="line.59"></a>
-<span class="sourceLineNo">060</span>    if (snapshot != null) {<a name="line.60"></a>
-<span class="sourceLineNo">061</span>      updateSnapshotMetrics(name, desc, histogram, snapshot, metricsRecordBuilder);<a name="line.61"></a>
-<span class="sourceLineNo">062</span>      updateSnapshotRangeMetrics(metricsRecordBuilder, snapshot);<a name="line.62"></a>
-<span class="sourceLineNo">063</span>    }<a name="line.63"></a>
-<span class="sourceLineNo">064</span>  }<a name="line.64"></a>
-<span class="sourceLineNo">065</span><a name="line.65"></a>
-<span class="sourceLineNo">066</span>  public void updateSnapshotRangeMetrics(MetricsRecordBuilder metricsRecordBuilder,<a name="line.66"></a>
-<span class="sourceLineNo">067</span>                                         Snapshot snapshot) {<a name="line.67"></a>
-<span class="sourceLineNo">068</span>    long priorRange = 0;<a name="line.68"></a>
-<span class="sourceLineNo">069</span>    long cumNum = 0;<a name="line.69"></a>
-<span class="sourceLineNo">070</span><a name="line.70"></a>
-<span class="sourceLineNo">071</span>    final long[] ranges = getRanges();<a name="line.71"></a>
-<span class="sourceLineNo">072</span>    final String rangeType = getRangeType();<a name="line.72"></a>
-<span class="sourceLineNo">073</span>    for (int i = 0; i &lt; ranges.length - 1; i++) {<a name="line.73"></a>
-<span class="sourceLineNo">074</span>      long val = snapshot.getCountAtOrBelow(ranges[i]);<a name="line.74"></a>
-<span class="sourceLineNo">075</span>      if (val - cumNum &gt; 0) {<a name="line.75"></a>
-<span class="sourceLineNo">076</span>        metricsRecordBuilder.addCounter(<a name="line.76"></a>
-<span class="sourceLineNo">077</span>            Interns.info(name + "_" + rangeType + "_" + priorRange + "-" + ranges[i], desc),<a name="line.77"></a>
-<span class="sourceLineNo">078</span>            val - cumNum);<a name="line.78"></a>
-<span class="sourceLineNo">079</span>      }<a name="line.79"></a>
-<span class="sourceLineNo">080</span>      priorRange = ranges[i];<a name="line.80"></a>
-<span class="sourceLineNo">081</span>      cumNum = val;<a name="line.81"></a>
-<span class="sourceLineNo">082</span>    }<a name="line.82"></a>
-<span class="sourceLineNo">083</span>    long val = histogram.getCount();<a name="line.83"></a>
-<span class="sourceLineNo">084</span>    if (val - cumNum &gt; 0) {<a name="line.84"></a>
-<span class="sourceLineNo">085</span>      metricsRecordBuilder.addCounter(<a name="line.85"></a>
-<span class="sourceLineNo">086</span>          Interns.info(name + "_" + rangeType + "_" + ranges[ranges.length - 1] + "-inf", desc),<a name="line.86"></a>
-<span class="sourceLineNo">087</span>          val - cumNum);<a name="line.87"></a>
-<span class="sourceLineNo">088</span>    }<a name="line.88"></a>
-<span class="sourceLineNo">089</span>  }  <a name="line.89"></a>
-<span class="sourceLineNo">090</span>}<a name="line.90"></a>
+<span class="sourceLineNo">021</span>import org.apache.hadoop.hbase.metrics.Interns;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import org.apache.hadoop.hbase.metrics.Snapshot;<a name="line.22"></a>
+<span class="sourceLineNo">023</span>import org.apache.hadoop.metrics2.MetricHistogram;<a name="line.23"></a>
+<span class="sourceLineNo">024</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.24"></a>
+<span class="sourceLineNo">025</span>import org.apache.hadoop.metrics2.MetricsRecordBuilder;<a name="line.25"></a>
+<span class="sourceLineNo">026</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.26"></a>
+<span class="sourceLineNo">027</span><a name="line.27"></a>
+<span class="sourceLineNo">028</span>/**<a name="line.28"></a>
+<span class="sourceLineNo">029</span> * Extended histogram implementation with metric range counters.<a name="line.29"></a>
+<span class="sourceLineNo">030</span> */<a name="line.30"></a>
+<span class="sourceLineNo">031</span>@InterfaceAudience.Private<a name="line.31"></a>
+<span class="sourceLineNo">032</span>public abstract class MutableRangeHistogram extends MutableHistogram implements MetricHistogram {<a name="line.32"></a>
+<span class="sourceLineNo">033</span><a name="line.33"></a>
+<span class="sourceLineNo">034</span>  public MutableRangeHistogram(MetricsInfo info) {<a name="line.34"></a>
+<span class="sourceLineNo">035</span>    this(info.name(), info.description());<a name="line.35"></a>
+<span class="sourceLineNo">036</span>  }<a name="line.36"></a>
+<span class="sourceLineNo">037</span><a name="line.37"></a>
+<span class="sourceLineNo">038</span>  public MutableRangeHistogram(String name, String description) {<a name="line.38"></a>
+<span class="sourceLineNo">039</span>    this(name, description, Integer.MAX_VALUE &lt;&lt; 2);<a name="line.39"></a>
+<span class="sourceLineNo">040</span>  }<a name="line.40"></a>
+<span class="sourceLineNo">041</span><a name="line.41"></a>
+<span class="sourceLineNo">042</span>  public MutableRangeHistogram(String name, String description, long expectedMax) {<a name="line.42"></a>
+<span class="sourceLineNo">043</span>    super(name, description, expectedMax);<a name="line.43"></a>
+<span class="sourceLineNo">044</span>  }<a name="line.44"></a>
+<span class="sourceLineNo">045</span><a name="line.45"></a>
+<span class="sourceLineNo">046</span>  /**<a name="line.46"></a>
+<span class="sourceLineNo">047</span>   * Returns the type of range histogram size or time <a name="line.47"></a>
+<span class="sourceLineNo">048</span>   */<a name="line.48"></a>
+<span class="sourceLineNo">049</span>  public abstract String getRangeType();<a name="line.49"></a>
+<span class="sourceLineNo">050</span>  <a name="line.50"></a>
+<span class="sourceLineNo">051</span>  /**<a name="line.51"></a>
+<span class="sourceLineNo">052</span>   * Returns the ranges to be counted <a name="line.52"></a>
+<span class="sourceLineNo">053</span>   */<a name="line.53"></a>
+<span class="sourceLineNo">054</span>  public abstract long[] getRanges();<a name="line.54"></a>
+<span class="sourceLineNo">055</span><a name="line.55"></a>
+<span class="sourceLineNo">056</span>  <a name="line.56"></a>
+<span class="sourceLineNo">057</span>  @Override<a name="line.57"></a>
+<span class="sourceLineNo">058</span>  public synchronized void snapshot(MetricsRecordBuilder metricsRecordBuilder, boolean all) {<a name="line.58"></a>
+<span class="sourceLineNo">059</span>    // Get a reference to the old histogram.<a name="line.59"></a>
+<span class="sourceLineNo">060</span>    Snapshot snapshot = histogram.snapshot();<a name="line.60"></a>
+<span class="sourceLineNo">061</span>    if (snapshot != null) {<a name="line.61"></a>
+<span class="sourceLineNo">062</span>      updateSnapshotMetrics(name, desc, histogram, snapshot, metricsRecordBuilder);<a name="line.62"></a>
+<span class="sourceLineNo">063</span>      updateSnapshotRangeMetrics(metricsRecordBuilder, snapshot);<a name="line.63"></a>
+<span class="sourceLineNo">064</span>    }<a name="line.64"></a>
+<span class="sourceLineNo">065</span>  }<a name="line.65"></a>
+<span class="sourceLineNo">066</span><a name="line.66"></a>
+<span class="sourceLineNo">067</span>  public void updateSnapshotRangeMetrics(MetricsRecordBuilder metricsRecordBuilder,<a name="line.67"></a>
+<span class="sourceLineNo">068</span>                                         Snapshot snapshot) {<a name="line.68"></a>
+<span class="sourceLineNo">069</span>    long priorRange = 0;<a name="line.69"></a>
+<span class="sourceLineNo">070</span>    long cumNum = 0;<a name="line.70"></a>
+<span class="sourceLineNo">071</span><a name="line.71"></a>
+<span class="sourceLineNo">072</span>    final long[] ranges = getRanges();<a name="line.72"></a>
+<span class="sourceLineNo">073</span>    final String rangeType = getRangeType();<a name="line.73"></a>
+<span class="sourceLineNo">074</span>    for (int i = 0; i &lt; ranges.length - 1; i++) {<a name="line.74"></a>
+<span class="sourceLineNo">075</span>      long val = snapshot.getCountAtOrBelow(ranges[i]);<a name="line.75"></a>
+<span class="sourceLineNo">076</span>      if (val - cumNum &gt; 0) {<a name="line.76"></a>
+<span class="sourceLineNo">077</span>        metricsRecordBuilder.addCounter(<a name="line.77"></a>
+<span class="sourceLineNo">078</span>            Interns.info(name + "_" + rangeType + "_" + priorRange + "-" + ranges[i], desc),<a name="line.78"></a>
+<span class="sourceLineNo">079</span>            val - cumNum);<a name="line.79"></a>
+<span class="sourceLineNo">080</span>      }<a name="line.80"></a>
+<span class="sourceLineNo">081</span>      priorRange = ranges[i];<a name="line.81"></a>
+<span class="sourceLineNo">082</span>      cumNum = val;<a name="line.82"></a>
+<span class="sourceLineNo">083</span>    }<a name="line.83"></a>
+<span class="sourceLineNo">084</span>    long val = histogram.getCount();<a name="line.84"></a>
+<span class="sourceLineNo">085</span>    if (val - cumNum &gt; 0) {<a name="line.85"></a>
+<span class="sourceLineNo">086</span>      metricsRecordBuilder.addCounter(<a name="line.86"></a>
+<span class="sourceLineNo">087</span>          Interns.info(name + "_" + rangeType + "_" + ranges[ranges.length - 1] + "-inf", desc),<a name="line.87"></a>
+<span class="sourceLineNo">088</span>          val - cumNum);<a name="line.88"></a>
+<span class="sourceLineNo">089</span>    }<a name="line.89"></a>
+<span class="sourceLineNo">090</span>  }  <a name="line.90"></a>
+<span class="sourceLineNo">091</span>}<a name="line.91"></a>
 
 
 

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableSizeHistogram.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableSizeHistogram.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableSizeHistogram.html
index 537cba0..e6a6bd0 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableSizeHistogram.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableSizeHistogram.html
@@ -26,8 +26,8 @@
 <span class="sourceLineNo">018</span><a name="line.18"></a>
 <span class="sourceLineNo">019</span>package org.apache.hadoop.metrics2.lib;<a name="line.19"></a>
 <span class="sourceLineNo">020</span><a name="line.20"></a>
-<span class="sourceLineNo">021</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.22"></a>
+<span class="sourceLineNo">021</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.22"></a>
 <span class="sourceLineNo">023</span><a name="line.23"></a>
 <span class="sourceLineNo">024</span>/**<a name="line.24"></a>
 <span class="sourceLineNo">025</span> * Extended histogram implementation with counters for metric size ranges.<a name="line.25"></a>

http://git-wip-us.apache.org/repos/asf/hbase-site/blob/8ad0fa3b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.html
----------------------------------------------------------------------
diff --git a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.html b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.html
index 57c7cc5..78cba9f 100644
--- a/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.html
+++ b/devapidocs/src-html/org/apache/hadoop/metrics2/lib/MutableTimeHistogram.html
@@ -26,8 +26,8 @@
 <span class="sourceLineNo">018</span><a name="line.18"></a>
 <span class="sourceLineNo">019</span>package org.apache.hadoop.metrics2.lib;<a name="line.19"></a>
 <span class="sourceLineNo">020</span><a name="line.20"></a>
-<span class="sourceLineNo">021</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.21"></a>
-<span class="sourceLineNo">022</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.22"></a>
+<span class="sourceLineNo">021</span>import org.apache.hadoop.metrics2.MetricsInfo;<a name="line.21"></a>
+<span class="sourceLineNo">022</span>import org.apache.yetus.audience.InterfaceAudience;<a name="line.22"></a>
 <span class="sourceLineNo">023</span><a name="line.23"></a>
 <span class="sourceLineNo">024</span>/**<a name="line.24"></a>
 <span class="sourceLineNo">025</span> * Extended histogram implementation with counters for metric time ranges.<a name="line.25"></a>
@@ -36,7 +36,7 @@
 <span class="sourceLineNo">028</span>public class MutableTimeHistogram extends MutableRangeHistogram {<a name="line.28"></a>
 <span class="sourceLineNo">029</span>  private final static String RANGE_TYPE = "TimeRangeCount";<a name="line.29"></a>
 <span class="sourceLineNo">030</span>  private final static long[] RANGES =<a name="line.30"></a>
-<span class="sourceLineNo">031</span>      { 1, 3, 10, 30, 100, 300, 1000, 3000, 10000, 30000, 60000, 120000, 300000, 600000 };<a name="line.31"></a>
+<span class="sourceLineNo">031</span>    { 1, 3, 10, 30, 100, 300, 1000, 3000, 10000, 30000, 60000, 120000, 300000, 600000 };<a name="line.31"></a>
 <span class="sourceLineNo">032</span><a name="line.32"></a>
 <span class="sourceLineNo">033</span>  public MutableTimeHistogram(MetricsInfo info) {<a name="line.33"></a>
 <span class="sourceLineNo">034</span>    this(info.name(), info.description());<a name="line.34"></a>


Mime
View raw message