| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>MetricSampleQuantiles (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="MetricSampleQuantiles (Apache HBase 3.0.0-alpha-2-SNAPSHOT API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MetricSampleQuantiles.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.SampleItem.html" title="class in org.apache.hadoop.metrics2.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html" target="_top">Frames</a></li> |
| <li><a href="MetricSampleQuantiles.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.hadoop.metrics2.util</div> |
| <h2 title="Class MetricSampleQuantiles" class="title">Class MetricSampleQuantiles</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.hadoop.metrics2.util.MetricSampleQuantiles</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>@InterfaceAudience.Private |
| public class <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.47">MetricSampleQuantiles</a> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Implementation of the Cormode, Korn, Muthukrishnan, and Srivastava algorithm |
| for streaming calculation of targeted high-percentile epsilon-approximate |
| quantiles. |
| |
| This is a generalization of the earlier work by Greenwald and Khanna (GK), |
| which essentially allows different error bounds on the targeted quantiles, |
| which allows for far more efficient calculation of high-percentiles. |
| |
| See: Cormode, Korn, Muthukrishnan, and Srivastava |
| "Effective Computation of Biased Quantiles over Data Streams" in ICDE 2005 |
| |
| Greenwald and Khanna, |
| "Space-efficient online computation of quantile summaries" in SIGMOD 2001</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Class and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private static class </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.SampleItem.html" title="class in org.apache.hadoop.metrics2.util">MetricSampleQuantiles.SampleItem</a></span></code> |
| <div class="block">Describes a measured value passed to the estimator, tracking additional |
| metadata required by the CKMS algorithm.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private long[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#buffer">buffer</a></span></code> |
| <div class="block">Buffers incoming items to be inserted in batch.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#bufferCount">bufferCount</a></span></code> </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#count">count</a></span></code> |
| <div class="block">Total number of items in stream</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>private <a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#quantiles">quantiles</a></span></code> |
| <div class="block">Array of Quantiles that we care about, along with desired error.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.SampleItem.html" title="class in org.apache.hadoop.metrics2.util">MetricSampleQuantiles.SampleItem</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#samples">samples</a></span></code> |
| <div class="block">Current list of sampled items, maintained in sorted order with error bounds</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#MetricSampleQuantiles-org.apache.hadoop.metrics2.util.MetricQuantile:A-">MetricSampleQuantiles</a></span>(<a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>[] quantiles)</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>private double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#allowableError-int-">allowableError</a></span>(int rank)</code> |
| <div class="block">Specifies the allowable error for this rank, depending on which quantiles |
| are being targeted.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#clear--">clear</a></span>()</code> |
| <div class="block">Resets the estimator, clearing out all previously inserted items</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#compress--">compress</a></span>()</code> |
| <div class="block">Try to remove extraneous items from the set of sampled items.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#getCount--">getCount</a></span>()</code> |
| <div class="block">Returns the number of items that the estimator has processed</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#getSampleCount--">getSampleCount</a></span>()</code> |
| <div class="block">Returns the number of samples kept by the estimator</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#insert-long-">insert</a></span>(long v)</code> |
| <div class="block">Add a new value from the stream.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>private void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#insertBatch--">insertBatch</a></span>()</code> |
| <div class="block">Merges items from buffer into the samples array in one pass.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>private long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#query-double-">query</a></span>(double quantile)</code> |
| <div class="block">Get the estimated value at the specified quantile.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#snapshot--">snapshot</a></span>()</code> |
| <div class="block">Get a snapshot of the current values of all the tracked quantiles.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="count"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>count</h4> |
| <pre>private long <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.52">count</a></pre> |
| <div class="block">Total number of items in stream</div> |
| </li> |
| </ul> |
| <a name="samples"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>samples</h4> |
| <pre>private <a href="https://docs.oracle.com/javase/8/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util">LinkedList</a><<a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.SampleItem.html" title="class in org.apache.hadoop.metrics2.util">MetricSampleQuantiles.SampleItem</a>> <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.57">samples</a></pre> |
| <div class="block">Current list of sampled items, maintained in sorted order with error bounds</div> |
| </li> |
| </ul> |
| <a name="buffer"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>buffer</h4> |
| <pre>private long[] <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.64">buffer</a></pre> |
| <div class="block">Buffers incoming items to be inserted in batch. Items are inserted into |
| the buffer linearly. When the buffer fills, it is flushed into the samples |
| array in its entirety.</div> |
| </li> |
| </ul> |
| <a name="bufferCount"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>bufferCount</h4> |
| <pre>private int <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.65">bufferCount</a></pre> |
| </li> |
| </ul> |
| <a name="quantiles"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>quantiles</h4> |
| <pre>private final <a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>[] <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.70">quantiles</a></pre> |
| <div class="block">Array of Quantiles that we care about, along with desired error.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="MetricSampleQuantiles-org.apache.hadoop.metrics2.util.MetricQuantile:A-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>MetricSampleQuantiles</h4> |
| <pre>public <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.72">MetricSampleQuantiles</a>(<a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>[] quantiles)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="allowableError-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>allowableError</h4> |
| <pre>private double <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.87">allowableError</a>(int rank)</pre> |
| <div class="block">Specifies the allowable error for this rank, depending on which quantiles |
| are being targeted. |
| |
| This is the f(r_i, n) function from the CKMS paper. It's basically how wide |
| the range of this rank can be.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the index in the list of samples</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="insert-long-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>insert</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.110">insert</a>(long v)</pre> |
| <div class="block">Add a new value from the stream.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>v</code> - the value to insert</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="insertBatch--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>insertBatch</h4> |
| <pre>private void <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.126">insertBatch</a>()</pre> |
| <div class="block">Merges items from buffer into the samples array in one pass. |
| This is more efficient than doing an insert on every item.</div> |
| </li> |
| </ul> |
| <a name="compress--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>compress</h4> |
| <pre>private void <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.173">compress</a>()</pre> |
| <div class="block">Try to remove extraneous items from the set of sampled items. This checks |
| if an item is unnecessary based on the desired error bounds, and merges it |
| with the adjacent item if it is.</div> |
| </li> |
| </ul> |
| <a name="query-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>query</h4> |
| <pre>private long <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.203">query</a>(double quantile) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Get the estimated value at the specified quantile.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>quantile</code> - Queried quantile, e.g. 0.50 or 0.99.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Estimated value at that quantile.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="snapshot--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>snapshot</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util">MetricQuantile</a>,<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html?is-external=true" title="class or interface in java.lang">Long</a>> <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.233">snapshot</a>() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Get a snapshot of the current values of all the tracked quantiles.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>snapshot of the tracked quantiles</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if no items have been added to the estimator</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCount</h4> |
| <pre>public long <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.249">getCount</a>()</pre> |
| <div class="block">Returns the number of items that the estimator has processed</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>count total number of items processed</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSampleCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSampleCount</h4> |
| <pre>public int <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.258">getSampleCount</a>()</pre> |
| <div class="block">Returns the number of samples kept by the estimator</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>count current number of samples</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clear--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>clear</h4> |
| <pre>public void <a href="../../../../../src-html/org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html#line.265">clear</a>()</pre> |
| <div class="block">Resets the estimator, clearing out all previously inserted items</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/MetricSampleQuantiles.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/hadoop/metrics2/util/MetricQuantile.html" title="class in org.apache.hadoop.metrics2.util"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/hadoop/metrics2/util/MetricSampleQuantiles.SampleItem.html" title="class in org.apache.hadoop.metrics2.util"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/metrics2/util/MetricSampleQuantiles.html" target="_top">Frames</a></li> |
| <li><a href="MetricSampleQuantiles.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2007–2021 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |