| <!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 (1.8.0_292) on Tue Jun 15 06:02:23 GMT 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>org.apache.hadoop.fs.statistics (Apache Hadoop Common 3.3.1 API)</title> |
| <meta name="date" content="2021-06-15"> |
| <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="org.apache.hadoop.fs.statistics (Apache Hadoop Common 3.3.1 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| </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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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/fs/shell/find/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/hadoop/ha/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/fs/statistics/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <div class="header"> |
| <p>@InterfaceAudience.Public |
| @InterfaceStability.Unstable |
| </p> |
| <h1 title="Package" class="title">Package org.apache.hadoop.fs.statistics</h1> |
| <div class="docSummary"> |
| <div class="block">This package contains support for statistic collection and reporting.</div> |
| </div> |
| <p>See: <a href="#package.description">Description</a></p> |
| </div> |
| <div class="contentContainer"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation"> |
| <caption><span>Interface Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Interface</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/DurationTracker.html" title="interface in org.apache.hadoop.fs.statistics">DurationTracker</a></td> |
| <td class="colLast"> |
| <div class="block">Interface to be implemented by objects which can track duration.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/DurationTrackerFactory.html" title="interface in org.apache.hadoop.fs.statistics">DurationTrackerFactory</a></td> |
| <td class="colLast"> |
| <div class="block">Interface for a source of duration tracking.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatistics.html" title="interface in org.apache.hadoop.fs.statistics">IOStatistics</a></td> |
| <td class="colLast"> |
| <div class="block">IO Statistics.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsAggregator.html" title="interface in org.apache.hadoop.fs.statistics">IOStatisticsAggregator</a></td> |
| <td class="colLast"> |
| <div class="block">Interface exported by classes which support |
| aggregation of <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatistics.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatistics</code></a>.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html" title="interface in org.apache.hadoop.fs.statistics">IOStatisticsSource</a></td> |
| <td class="colLast"> |
| <div class="block">A source of IO statistics.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| <li class="blockList"> |
| <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> |
| <caption><span>Class Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/BufferedIOStatisticsInputStream.html" title="class in org.apache.hadoop.fs.statistics">BufferedIOStatisticsInputStream</a></td> |
| <td class="colLast"> |
| <div class="block">An extension of <code>BufferedInputStream</code> which implements |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatisticsSource</code></a> and forwards requests for the |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatistics.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatistics</code></a> to the wrapped stream.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/BufferedIOStatisticsOutputStream.html" title="class in org.apache.hadoop.fs.statistics">BufferedIOStatisticsOutputStream</a></td> |
| <td class="colLast"> |
| <div class="block">An extension of <code>BufferedOutputStream</code> which implements |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatisticsSource</code></a> and forwards requests for the |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatistics.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatistics</code></a> to the wrapped stream.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/DurationStatisticSummary.html" title="class in org.apache.hadoop.fs.statistics">DurationStatisticSummary</a></td> |
| <td class="colLast"> |
| <div class="block">Summary of duration tracking statistics |
| as extracted from an IOStatistics instance.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsLogging.html" title="class in org.apache.hadoop.fs.statistics">IOStatisticsLogging</a></td> |
| <td class="colLast"> |
| <div class="block">Utility operations convert IO Statistics sources/instances |
| to strings, especially for robustly logging.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSnapshot.html" title="class in org.apache.hadoop.fs.statistics">IOStatisticsSnapshot</a></td> |
| <td class="colLast"> |
| <div class="block">Snapshot of statistics from a different source.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSupport.html" title="class in org.apache.hadoop.fs.statistics">IOStatisticsSupport</a></td> |
| <td class="colLast"> |
| <div class="block">Support for working with IOStatistics.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/MeanStatistic.html" title="class in org.apache.hadoop.fs.statistics">MeanStatistic</a></td> |
| <td class="colLast"> |
| <div class="block">A mean statistic represented as the sum and the sample count; |
| the mean is calculated on demand.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/StoreStatisticNames.html" title="class in org.apache.hadoop.fs.statistics">StoreStatisticNames</a></td> |
| <td class="colLast"> |
| <div class="block">Common statistic names for object store operations..</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><a href="../../../../../org/apache/hadoop/fs/statistics/StreamStatisticNames.html" title="class in org.apache.hadoop.fs.statistics">StreamStatisticNames</a></td> |
| <td class="colLast"> |
| <div class="block">These are common statistic names.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| <a name="package.description"> |
| <!-- --> |
| </a> |
| <h2 title="Package org.apache.hadoop.fs.statistics Description">Package org.apache.hadoop.fs.statistics Description</h2> |
| <div class="block">This package contains support for statistic collection and reporting. |
| This is the public API; implementation classes are to be kept elsewhere. |
| <p> |
| This package defines two interfaces: |
| <p> |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatisticsSource</code></a>: |
| a source of statistic data, which can be retrieved |
| through a call to |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html#getIOStatistics--"><code>IOStatisticsSource.getIOStatistics()</code></a> . |
| <p> |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatistics.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatistics</code></a> the statistics retrieved |
| from a statistics source. |
| <p> |
| The retrieved statistics may be an immutable snapshot -in which case to get |
| updated statistics another call to |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html#getIOStatistics--"><code>IOStatisticsSource.getIOStatistics()</code></a> |
| must be made. Or they may be dynamic -in which case every time a specific |
| statistic is retrieved, the latest version is returned. Callers should assume |
| that if a statistics instance is dynamic, there is no atomicity when querying |
| multiple statistics. If the statistics source was a closeable object (e.g. a |
| stream), the statistics MUST remain valid after the stream is closed. |
| <p> |
| Use pattern: |
| <p> |
| An application probes an object (filesystem, stream etc) to see if it |
| implements <code>IOStatisticsSource</code>, and, if it is, |
| calls <code>getIOStatistics()</code> to get its statistics. |
| If this is non-null, the client has statistics on the current |
| state of the statistics. |
| <p> |
| The expectation is that a statistics source is dynamic: when a value is |
| looked up the most recent values are returned. |
| When iterating through the set, the values of the iterator SHOULD |
| be frozen at the time the iterator was requested. |
| <p> |
| These statistics can be used to: log operations, profile applications, |
| and make assertions about the state of the output. |
| <p> |
| The names of statistics are a matter of choice of the specific source. |
| However, <a href="../../../../../org/apache/hadoop/fs/statistics/StoreStatisticNames.html" title="class in org.apache.hadoop.fs.statistics"><code>StoreStatisticNames</code></a> |
| contains a |
| set of names recommended for object store operations. |
| <a href="../../../../../org/apache/hadoop/fs/statistics/StreamStatisticNames.html" title="class in org.apache.hadoop.fs.statistics"><code>StreamStatisticNames</code></a> declares |
| recommended names for statistics provided for |
| input and output streams. |
| <p> |
| Utility classes: |
| <ul> |
| <li> |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSupport.html" title="class in org.apache.hadoop.fs.statistics"><code>IOStatisticsSupport</code></a>. |
| General support, including the ability to take a serializable |
| snapshot of the current state of an IOStatistics instance. |
| </li> |
| <li> |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsLogging.html" title="class in org.apache.hadoop.fs.statistics"><code>IOStatisticsLogging</code></a>. |
| Methods for robust/on-demand string conversion, designed |
| for use in logging statements and <code>toString()</code> implementations. |
| </li> |
| <li> |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSnapshot.html" title="class in org.apache.hadoop.fs.statistics"><code>IOStatisticsSnapshot</code></a>. |
| A static snaphot of statistics which can be marshalled via |
| java serialization or as JSON via jackson. It supports |
| aggregation, so can be used to generate aggregate statistics. |
| </li> |
| </ul> |
| |
| <p> |
| Implementors notes: |
| <ol> |
| <li> |
| IOStatistics keys SHOULD be standard names where possible. |
| </li> |
| <li> |
| An IOStatistics instance MUST be unique to that specific instance of |
| <a href="../../../../../org/apache/hadoop/fs/statistics/IOStatisticsSource.html" title="interface in org.apache.hadoop.fs.statistics"><code>IOStatisticsSource</code></a>. |
| (i.e. not shared the way StorageStatistics are) |
| </li> |
| <li> |
| MUST return the same values irrespective of which thread the statistics are |
| retrieved or its keys evaluated. |
| </li> |
| <li> |
| MUST NOT remove keys once a statistic instance has been created. |
| </li> |
| <li> |
| MUST NOT add keys once a statistic instance has been created. |
| </li> |
| <li> |
| MUST NOT block for long periods of time while blocking operations |
| (reads, writes) are taking place in the source. |
| That is: minimal synchronization points (AtomicLongs etc.) may be |
| used to share values, but retrieval of statistics should |
| be fast and return values even while slow/blocking remote IO is underway. |
| </li> |
| <li> |
| MUST support value enumeration and retrieval after the source has been |
| closed. |
| </li> |
| <li> |
| SHOULD NOT have back-references to potentially expensive objects |
| (filesystem instances etc.) |
| </li> |
| <li> |
| SHOULD provide statistics which can be added to generate aggregate |
| statistics. |
| </li> |
| </ol></div> |
| </div> |
| <!-- ======= 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 class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.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/fs/shell/find/package-summary.html">Prev Package</a></li> |
| <li><a href="../../../../../org/apache/hadoop/ha/package-summary.html">Next Package</a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/hadoop/fs/statistics/package-summary.html" target="_top">Frames</a></li> |
| <li><a href="package-summary.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> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2008–2021 <a href="https://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |