[120] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
| 2 | <!--NewPage--> |
---|
| 3 | <HTML> |
---|
| 4 | <HEAD> |
---|
| 5 | <!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:54 UTC 2009 --> |
---|
| 6 | <TITLE> |
---|
| 7 | AbstractMetricsContext (Hadoop 0.20.1 API) |
---|
| 8 | </TITLE> |
---|
| 9 | |
---|
| 10 | <META NAME="date" CONTENT="2009-09-01"> |
---|
| 11 | |
---|
| 12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
---|
| 13 | |
---|
| 14 | <SCRIPT type="text/javascript"> |
---|
| 15 | function windowTitle() |
---|
| 16 | { |
---|
| 17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
| 18 | parent.document.title="AbstractMetricsContext (Hadoop 0.20.1 API)"; |
---|
| 19 | } |
---|
| 20 | } |
---|
| 21 | </SCRIPT> |
---|
| 22 | <NOSCRIPT> |
---|
| 23 | </NOSCRIPT> |
---|
| 24 | |
---|
| 25 | </HEAD> |
---|
| 26 | |
---|
| 27 | <BODY BGCOLOR="white" onload="windowTitle();"> |
---|
| 28 | <HR> |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | <!-- ========= START OF TOP NAVBAR ======= --> |
---|
| 32 | <A NAME="navbar_top"><!-- --></A> |
---|
| 33 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
---|
| 34 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 35 | <TR> |
---|
| 36 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 37 | <A NAME="navbar_top_firstrow"><!-- --></A> |
---|
| 38 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 39 | <TR ALIGN="center" VALIGN="top"> |
---|
| 40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractMetricsContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 48 | </TR> |
---|
| 49 | </TABLE> |
---|
| 50 | </TD> |
---|
| 51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 52 | </EM> |
---|
| 53 | </TD> |
---|
| 54 | </TR> |
---|
| 55 | |
---|
| 56 | <TR> |
---|
| 57 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 58 | PREV CLASS |
---|
| 59 | <A HREF="../../../../../org/apache/hadoop/metrics/spi/CompositeContext.html" title="class in org.apache.hadoop.metrics.spi"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 60 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 61 | <A HREF="../../../../../index.html?org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" target="_top"><B>FRAMES</B></A> |
---|
| 62 | <A HREF="AbstractMetricsContext.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 63 | <SCRIPT type="text/javascript"> |
---|
| 64 | <!-- |
---|
| 65 | if(window==top) { |
---|
| 66 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 67 | } |
---|
| 68 | //--> |
---|
| 69 | </SCRIPT> |
---|
| 70 | <NOSCRIPT> |
---|
| 71 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 72 | </NOSCRIPT> |
---|
| 73 | |
---|
| 74 | |
---|
| 75 | </FONT></TD> |
---|
| 76 | </TR> |
---|
| 77 | <TR> |
---|
| 78 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 79 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 81 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 82 | </TR> |
---|
| 83 | </TABLE> |
---|
| 84 | <A NAME="skip-navbar_top"></A> |
---|
| 85 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
| 86 | |
---|
| 87 | <HR> |
---|
| 88 | <!-- ======== START OF CLASS DATA ======== --> |
---|
| 89 | <H2> |
---|
| 90 | <FONT SIZE="-1"> |
---|
| 91 | org.apache.hadoop.metrics.spi</FONT> |
---|
| 92 | <BR> |
---|
| 93 | Class AbstractMetricsContext</H2> |
---|
| 94 | <PRE> |
---|
| 95 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
---|
| 96 | <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.metrics.spi.AbstractMetricsContext</B> |
---|
| 97 | </PRE> |
---|
| 98 | <DL> |
---|
| 99 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></DD> |
---|
| 100 | </DL> |
---|
| 101 | <DL> |
---|
| 102 | <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/hadoop/metrics/spi/CompositeContext.html" title="class in org.apache.hadoop.metrics.spi">CompositeContext</A>, <A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html" title="class in org.apache.hadoop.metrics.file">FileContext</A>, <A HREF="../../../../../org/apache/hadoop/metrics/ganglia/GangliaContext.html" title="class in org.apache.hadoop.metrics.ganglia">GangliaContext</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/NullContext.html" title="class in org.apache.hadoop.metrics.spi">NullContext</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/NullContextWithUpdateThread.html" title="class in org.apache.hadoop.metrics.spi">NullContextWithUpdateThread</A></DD> |
---|
| 103 | </DL> |
---|
| 104 | <HR> |
---|
| 105 | <DL> |
---|
| 106 | <DT><PRE>public abstract class <B>AbstractMetricsContext</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></DL> |
---|
| 107 | </PRE> |
---|
| 108 | |
---|
| 109 | <P> |
---|
| 110 | The main class of the Service Provider Interface. This class should be |
---|
| 111 | extended in order to integrate the Metrics API with a specific metrics |
---|
| 112 | client library. <p/> |
---|
| 113 | |
---|
| 114 | This class implements the internal table of metric data, and the timer |
---|
| 115 | on which data is to be sent to the metrics system. Subclasses must |
---|
| 116 | override the abstract <code>emitRecord</code> method in order to transmit |
---|
| 117 | the data. <p/> |
---|
| 118 | <P> |
---|
| 119 | |
---|
| 120 | <P> |
---|
| 121 | <HR> |
---|
| 122 | |
---|
| 123 | <P> |
---|
| 124 | <!-- =========== FIELD SUMMARY =========== --> |
---|
| 125 | |
---|
| 126 | <A NAME="field_summary"><!-- --></A> |
---|
| 127 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 128 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 129 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 130 | <B>Field Summary</B></FONT></TH> |
---|
| 131 | </TR> |
---|
| 132 | </TABLE> |
---|
| 133 | <A NAME="fields_inherited_from_class_org.apache.hadoop.metrics.MetricsContext"><!-- --></A> |
---|
| 134 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 135 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 136 | <TH ALIGN="left"><B>Fields inherited from interface org.apache.hadoop.metrics.<A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></B></TH> |
---|
| 137 | </TR> |
---|
| 138 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 139 | <TD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#DEFAULT_PERIOD">DEFAULT_PERIOD</A></CODE></TD> |
---|
| 140 | </TR> |
---|
| 141 | </TABLE> |
---|
| 142 | |
---|
| 143 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
| 144 | |
---|
| 145 | <A NAME="constructor_summary"><!-- --></A> |
---|
| 146 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 147 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 148 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 149 | <B>Constructor Summary</B></FONT></TH> |
---|
| 150 | </TR> |
---|
| 151 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 152 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 153 | <CODE>protected </CODE></FONT></TD> |
---|
| 154 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#AbstractMetricsContext()">AbstractMetricsContext</A></B>()</CODE> |
---|
| 155 | |
---|
| 156 | <BR> |
---|
| 157 | Creates a new instance of AbstractMetricsContext</TD> |
---|
| 158 | </TR> |
---|
| 159 | </TABLE> |
---|
| 160 | |
---|
| 161 | <!-- ========== METHOD SUMMARY =========== --> |
---|
| 162 | |
---|
| 163 | <A NAME="method_summary"><!-- --></A> |
---|
| 164 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 165 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 166 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
| 167 | <B>Method Summary</B></FONT></TH> |
---|
| 168 | </TR> |
---|
| 169 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 170 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 171 | <CODE> void</CODE></FONT></TD> |
---|
| 172 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#close()">close</A></B>()</CODE> |
---|
| 173 | |
---|
| 174 | <BR> |
---|
| 175 | Stops monitoring and frees buffered data, returning this |
---|
| 176 | object to its initial state.</TD> |
---|
| 177 | </TR> |
---|
| 178 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 179 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 180 | <CODE> <A HREF="../../../../../org/apache/hadoop/metrics/MetricsRecord.html" title="interface in org.apache.hadoop.metrics">MetricsRecord</A></CODE></FONT></TD> |
---|
| 181 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#createRecord(java.lang.String)">createRecord</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName)</CODE> |
---|
| 182 | |
---|
| 183 | <BR> |
---|
| 184 | Creates a new AbstractMetricsRecord instance with the given <code>recordName</code>.</TD> |
---|
| 185 | </TR> |
---|
| 186 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 187 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 188 | <CODE>protected abstract void</CODE></FONT></TD> |
---|
| 189 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#emitRecord(java.lang.String, java.lang.String, org.apache.hadoop.metrics.spi.OutputRecord)">emitRecord</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> contextName, |
---|
| 190 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName, |
---|
| 191 | <A HREF="../../../../../org/apache/hadoop/metrics/spi/OutputRecord.html" title="class in org.apache.hadoop.metrics.spi">OutputRecord</A> outRec)</CODE> |
---|
| 192 | |
---|
| 193 | <BR> |
---|
| 194 | Sends a record to the metrics system.</TD> |
---|
| 195 | </TR> |
---|
| 196 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 197 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 198 | <CODE>protected void</CODE></FONT></TD> |
---|
| 199 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#flush()">flush</A></B>()</CODE> |
---|
| 200 | |
---|
| 201 | <BR> |
---|
| 202 | Called each period after all records have been emitted, this method does nothing.</TD> |
---|
| 203 | </TR> |
---|
| 204 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 205 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 206 | <CODE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 207 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getAttribute(java.lang.String)">getAttribute</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> attributeName)</CODE> |
---|
| 208 | |
---|
| 209 | <BR> |
---|
| 210 | Convenience method for subclasses to access factory attributes.</TD> |
---|
| 211 | </TR> |
---|
| 212 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 213 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 214 | <CODE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>></CODE></FONT></TD> |
---|
| 215 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getAttributeTable(java.lang.String)">getAttributeTable</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> tableName)</CODE> |
---|
| 216 | |
---|
| 217 | <BR> |
---|
| 218 | Returns an attribute-value map derived from the factory attributes |
---|
| 219 | by finding all factory attributes that begin with |
---|
| 220 | <i>contextName</i>.<i>tableName</i>.</TD> |
---|
| 221 | </TR> |
---|
| 222 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 223 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 224 | <CODE> <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A></CODE></FONT></TD> |
---|
| 225 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getContextFactory()">getContextFactory</A></B>()</CODE> |
---|
| 226 | |
---|
| 227 | <BR> |
---|
| 228 | Returns the factory by which this context was created.</TD> |
---|
| 229 | </TR> |
---|
| 230 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 231 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 232 | <CODE> <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
| 233 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getContextName()">getContextName</A></B>()</CODE> |
---|
| 234 | |
---|
| 235 | <BR> |
---|
| 236 | Returns the context name.</TD> |
---|
| 237 | </TR> |
---|
| 238 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 239 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 240 | <CODE> int</CODE></FONT></TD> |
---|
| 241 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getPeriod()">getPeriod</A></B>()</CODE> |
---|
| 242 | |
---|
| 243 | <BR> |
---|
| 244 | Returns the timer period.</TD> |
---|
| 245 | </TR> |
---|
| 246 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 247 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 248 | <CODE> void</CODE></FONT></TD> |
---|
| 249 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)">init</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> contextName, |
---|
| 250 | <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A> factory)</CODE> |
---|
| 251 | |
---|
| 252 | <BR> |
---|
| 253 | Initializes the context.</TD> |
---|
| 254 | </TR> |
---|
| 255 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 256 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 257 | <CODE> boolean</CODE></FONT></TD> |
---|
| 258 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#isMonitoring()">isMonitoring</A></B>()</CODE> |
---|
| 259 | |
---|
| 260 | <BR> |
---|
| 261 | Returns true if monitoring is currently in progress.</TD> |
---|
| 262 | </TR> |
---|
| 263 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 264 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 265 | <CODE>protected <A HREF="../../../../../org/apache/hadoop/metrics/MetricsRecord.html" title="interface in org.apache.hadoop.metrics">MetricsRecord</A></CODE></FONT></TD> |
---|
| 266 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#newRecord(java.lang.String)">newRecord</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName)</CODE> |
---|
| 267 | |
---|
| 268 | <BR> |
---|
| 269 | Subclasses should override this if they subclass MetricsRecordImpl.</TD> |
---|
| 270 | </TR> |
---|
| 271 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 272 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 273 | <CODE> void</CODE></FONT></TD> |
---|
| 274 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#registerUpdater(org.apache.hadoop.metrics.Updater)">registerUpdater</A></B>(<A HREF="../../../../../org/apache/hadoop/metrics/Updater.html" title="interface in org.apache.hadoop.metrics">Updater</A> updater)</CODE> |
---|
| 275 | |
---|
| 276 | <BR> |
---|
| 277 | Registers a callback to be called at time intervals determined by |
---|
| 278 | the configuration.</TD> |
---|
| 279 | </TR> |
---|
| 280 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 281 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 282 | <CODE>protected void</CODE></FONT></TD> |
---|
| 283 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#remove(org.apache.hadoop.metrics.spi.MetricsRecordImpl)">remove</A></B>(<A HREF="../../../../../org/apache/hadoop/metrics/spi/MetricsRecordImpl.html" title="class in org.apache.hadoop.metrics.spi">MetricsRecordImpl</A> record)</CODE> |
---|
| 284 | |
---|
| 285 | <BR> |
---|
| 286 | Called by MetricsRecordImpl.remove().</TD> |
---|
| 287 | </TR> |
---|
| 288 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 289 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 290 | <CODE>protected void</CODE></FONT></TD> |
---|
| 291 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#setPeriod(int)">setPeriod</A></B>(int period)</CODE> |
---|
| 292 | |
---|
| 293 | <BR> |
---|
| 294 | Sets the timer period</TD> |
---|
| 295 | </TR> |
---|
| 296 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 297 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 298 | <CODE> void</CODE></FONT></TD> |
---|
| 299 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#startMonitoring()">startMonitoring</A></B>()</CODE> |
---|
| 300 | |
---|
| 301 | <BR> |
---|
| 302 | Starts or restarts monitoring, the emitting of metrics records.</TD> |
---|
| 303 | </TR> |
---|
| 304 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 305 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 306 | <CODE> void</CODE></FONT></TD> |
---|
| 307 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#stopMonitoring()">stopMonitoring</A></B>()</CODE> |
---|
| 308 | |
---|
| 309 | <BR> |
---|
| 310 | Stops monitoring.</TD> |
---|
| 311 | </TR> |
---|
| 312 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 313 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 314 | <CODE> void</CODE></FONT></TD> |
---|
| 315 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#unregisterUpdater(org.apache.hadoop.metrics.Updater)">unregisterUpdater</A></B>(<A HREF="../../../../../org/apache/hadoop/metrics/Updater.html" title="interface in org.apache.hadoop.metrics">Updater</A> updater)</CODE> |
---|
| 316 | |
---|
| 317 | <BR> |
---|
| 318 | Removes a callback, if it exists.</TD> |
---|
| 319 | </TR> |
---|
| 320 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 321 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
| 322 | <CODE>protected void</CODE></FONT></TD> |
---|
| 323 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#update(org.apache.hadoop.metrics.spi.MetricsRecordImpl)">update</A></B>(<A HREF="../../../../../org/apache/hadoop/metrics/spi/MetricsRecordImpl.html" title="class in org.apache.hadoop.metrics.spi">MetricsRecordImpl</A> record)</CODE> |
---|
| 324 | |
---|
| 325 | <BR> |
---|
| 326 | Called by MetricsRecordImpl.update().</TD> |
---|
| 327 | </TR> |
---|
| 328 | </TABLE> |
---|
| 329 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
| 330 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 331 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
| 332 | <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> |
---|
| 333 | </TR> |
---|
| 334 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
| 335 | <TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
---|
| 336 | </TR> |
---|
| 337 | </TABLE> |
---|
| 338 | |
---|
| 339 | <P> |
---|
| 340 | |
---|
| 341 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
| 342 | |
---|
| 343 | <A NAME="constructor_detail"><!-- --></A> |
---|
| 344 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 345 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 346 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 347 | <B>Constructor Detail</B></FONT></TH> |
---|
| 348 | </TR> |
---|
| 349 | </TABLE> |
---|
| 350 | |
---|
| 351 | <A NAME="AbstractMetricsContext()"><!-- --></A><H3> |
---|
| 352 | AbstractMetricsContext</H3> |
---|
| 353 | <PRE> |
---|
| 354 | protected <B>AbstractMetricsContext</B>()</PRE> |
---|
| 355 | <DL> |
---|
| 356 | <DD>Creates a new instance of AbstractMetricsContext |
---|
| 357 | <P> |
---|
| 358 | </DL> |
---|
| 359 | |
---|
| 360 | <!-- ============ METHOD DETAIL ========== --> |
---|
| 361 | |
---|
| 362 | <A NAME="method_detail"><!-- --></A> |
---|
| 363 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
| 364 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
| 365 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
| 366 | <B>Method Detail</B></FONT></TH> |
---|
| 367 | </TR> |
---|
| 368 | </TABLE> |
---|
| 369 | |
---|
| 370 | <A NAME="init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)"><!-- --></A><H3> |
---|
| 371 | init</H3> |
---|
| 372 | <PRE> |
---|
| 373 | public void <B>init</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> contextName, |
---|
| 374 | <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A> factory)</PRE> |
---|
| 375 | <DL> |
---|
| 376 | <DD>Initializes the context. |
---|
| 377 | <P> |
---|
| 378 | <DD><DL> |
---|
| 379 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)">init</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 380 | </DD> |
---|
| 381 | <DD><DL> |
---|
| 382 | <DT><B>Parameters:</B><DD><CODE>contextName</CODE> - The given name for this context<DD><CODE>factory</CODE> - The creator of this context</DL> |
---|
| 383 | </DD> |
---|
| 384 | </DL> |
---|
| 385 | <HR> |
---|
| 386 | |
---|
| 387 | <A NAME="getAttribute(java.lang.String)"><!-- --></A><H3> |
---|
| 388 | getAttribute</H3> |
---|
| 389 | <PRE> |
---|
| 390 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getAttribute</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> attributeName)</PRE> |
---|
| 391 | <DL> |
---|
| 392 | <DD>Convenience method for subclasses to access factory attributes. |
---|
| 393 | <P> |
---|
| 394 | <DD><DL> |
---|
| 395 | </DL> |
---|
| 396 | </DD> |
---|
| 397 | <DD><DL> |
---|
| 398 | </DL> |
---|
| 399 | </DD> |
---|
| 400 | </DL> |
---|
| 401 | <HR> |
---|
| 402 | |
---|
| 403 | <A NAME="getAttributeTable(java.lang.String)"><!-- --></A><H3> |
---|
| 404 | getAttributeTable</H3> |
---|
| 405 | <PRE> |
---|
| 406 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</A><<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>,<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>> <B>getAttributeTable</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> tableName)</PRE> |
---|
| 407 | <DL> |
---|
| 408 | <DD>Returns an attribute-value map derived from the factory attributes |
---|
| 409 | by finding all factory attributes that begin with |
---|
| 410 | <i>contextName</i>.<i>tableName</i>. The returned map consists of |
---|
| 411 | those attributes with the contextName and tableName stripped off. |
---|
| 412 | <P> |
---|
| 413 | <DD><DL> |
---|
| 414 | </DL> |
---|
| 415 | </DD> |
---|
| 416 | <DD><DL> |
---|
| 417 | </DL> |
---|
| 418 | </DD> |
---|
| 419 | </DL> |
---|
| 420 | <HR> |
---|
| 421 | |
---|
| 422 | <A NAME="getContextName()"><!-- --></A><H3> |
---|
| 423 | getContextName</H3> |
---|
| 424 | <PRE> |
---|
| 425 | public <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getContextName</B>()</PRE> |
---|
| 426 | <DL> |
---|
| 427 | <DD>Returns the context name. |
---|
| 428 | <P> |
---|
| 429 | <DD><DL> |
---|
| 430 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#getContextName()">getContextName</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 431 | </DD> |
---|
| 432 | <DD><DL> |
---|
| 433 | |
---|
| 434 | <DT><B>Returns:</B><DD>the context name</DL> |
---|
| 435 | </DD> |
---|
| 436 | </DL> |
---|
| 437 | <HR> |
---|
| 438 | |
---|
| 439 | <A NAME="getContextFactory()"><!-- --></A><H3> |
---|
| 440 | getContextFactory</H3> |
---|
| 441 | <PRE> |
---|
| 442 | public <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A> <B>getContextFactory</B>()</PRE> |
---|
| 443 | <DL> |
---|
| 444 | <DD>Returns the factory by which this context was created. |
---|
| 445 | <P> |
---|
| 446 | <DD><DL> |
---|
| 447 | </DL> |
---|
| 448 | </DD> |
---|
| 449 | <DD><DL> |
---|
| 450 | </DL> |
---|
| 451 | </DD> |
---|
| 452 | </DL> |
---|
| 453 | <HR> |
---|
| 454 | |
---|
| 455 | <A NAME="startMonitoring()"><!-- --></A><H3> |
---|
| 456 | startMonitoring</H3> |
---|
| 457 | <PRE> |
---|
| 458 | public void <B>startMonitoring</B>() |
---|
| 459 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
| 460 | <DL> |
---|
| 461 | <DD>Starts or restarts monitoring, the emitting of metrics records. |
---|
| 462 | <P> |
---|
| 463 | <DD><DL> |
---|
| 464 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#startMonitoring()">startMonitoring</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 465 | </DD> |
---|
| 466 | <DD><DL> |
---|
| 467 | |
---|
| 468 | <DT><B>Throws:</B> |
---|
| 469 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
| 470 | </DD> |
---|
| 471 | </DL> |
---|
| 472 | <HR> |
---|
| 473 | |
---|
| 474 | <A NAME="stopMonitoring()"><!-- --></A><H3> |
---|
| 475 | stopMonitoring</H3> |
---|
| 476 | <PRE> |
---|
| 477 | public void <B>stopMonitoring</B>()</PRE> |
---|
| 478 | <DL> |
---|
| 479 | <DD>Stops monitoring. This does not free buffered data. |
---|
| 480 | <P> |
---|
| 481 | <DD><DL> |
---|
| 482 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#stopMonitoring()">stopMonitoring</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 483 | </DD> |
---|
| 484 | <DD><DL> |
---|
| 485 | <DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#close()"><CODE>close()</CODE></A></DL> |
---|
| 486 | </DD> |
---|
| 487 | </DL> |
---|
| 488 | <HR> |
---|
| 489 | |
---|
| 490 | <A NAME="isMonitoring()"><!-- --></A><H3> |
---|
| 491 | isMonitoring</H3> |
---|
| 492 | <PRE> |
---|
| 493 | public boolean <B>isMonitoring</B>()</PRE> |
---|
| 494 | <DL> |
---|
| 495 | <DD>Returns true if monitoring is currently in progress. |
---|
| 496 | <P> |
---|
| 497 | <DD><DL> |
---|
| 498 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#isMonitoring()">isMonitoring</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 499 | </DD> |
---|
| 500 | <DD><DL> |
---|
| 501 | </DL> |
---|
| 502 | </DD> |
---|
| 503 | </DL> |
---|
| 504 | <HR> |
---|
| 505 | |
---|
| 506 | <A NAME="close()"><!-- --></A><H3> |
---|
| 507 | close</H3> |
---|
| 508 | <PRE> |
---|
| 509 | public void <B>close</B>()</PRE> |
---|
| 510 | <DL> |
---|
| 511 | <DD>Stops monitoring and frees buffered data, returning this |
---|
| 512 | object to its initial state. |
---|
| 513 | <P> |
---|
| 514 | <DD><DL> |
---|
| 515 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#close()">close</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 516 | </DD> |
---|
| 517 | <DD><DL> |
---|
| 518 | </DL> |
---|
| 519 | </DD> |
---|
| 520 | </DL> |
---|
| 521 | <HR> |
---|
| 522 | |
---|
| 523 | <A NAME="createRecord(java.lang.String)"><!-- --></A><H3> |
---|
| 524 | createRecord</H3> |
---|
| 525 | <PRE> |
---|
| 526 | public final <A HREF="../../../../../org/apache/hadoop/metrics/MetricsRecord.html" title="interface in org.apache.hadoop.metrics">MetricsRecord</A> <B>createRecord</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName)</PRE> |
---|
| 527 | <DL> |
---|
| 528 | <DD>Creates a new AbstractMetricsRecord instance with the given <code>recordName</code>. |
---|
| 529 | Throws an exception if the metrics implementation is configured with a fixed |
---|
| 530 | set of record names and <code>recordName</code> is not in that set. |
---|
| 531 | <P> |
---|
| 532 | <DD><DL> |
---|
| 533 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#createRecord(java.lang.String)">createRecord</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 534 | </DD> |
---|
| 535 | <DD><DL> |
---|
| 536 | <DT><B>Parameters:</B><DD><CODE>recordName</CODE> - the name of the record |
---|
| 537 | <DT><B>Throws:</B> |
---|
| 538 | <DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsException.html" title="class in org.apache.hadoop.metrics">MetricsException</A></CODE> - if recordName conflicts with configuration data</DL> |
---|
| 539 | </DD> |
---|
| 540 | </DL> |
---|
| 541 | <HR> |
---|
| 542 | |
---|
| 543 | <A NAME="newRecord(java.lang.String)"><!-- --></A><H3> |
---|
| 544 | newRecord</H3> |
---|
| 545 | <PRE> |
---|
| 546 | protected <A HREF="../../../../../org/apache/hadoop/metrics/MetricsRecord.html" title="interface in org.apache.hadoop.metrics">MetricsRecord</A> <B>newRecord</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName)</PRE> |
---|
| 547 | <DL> |
---|
| 548 | <DD>Subclasses should override this if they subclass MetricsRecordImpl. |
---|
| 549 | <P> |
---|
| 550 | <DD><DL> |
---|
| 551 | </DL> |
---|
| 552 | </DD> |
---|
| 553 | <DD><DL> |
---|
| 554 | <DT><B>Parameters:</B><DD><CODE>recordName</CODE> - the name of the record |
---|
| 555 | <DT><B>Returns:</B><DD>newly created instance of MetricsRecordImpl or subclass</DL> |
---|
| 556 | </DD> |
---|
| 557 | </DL> |
---|
| 558 | <HR> |
---|
| 559 | |
---|
| 560 | <A NAME="registerUpdater(org.apache.hadoop.metrics.Updater)"><!-- --></A><H3> |
---|
| 561 | registerUpdater</H3> |
---|
| 562 | <PRE> |
---|
| 563 | public void <B>registerUpdater</B>(<A HREF="../../../../../org/apache/hadoop/metrics/Updater.html" title="interface in org.apache.hadoop.metrics">Updater</A> updater)</PRE> |
---|
| 564 | <DL> |
---|
| 565 | <DD>Registers a callback to be called at time intervals determined by |
---|
| 566 | the configuration. |
---|
| 567 | <P> |
---|
| 568 | <DD><DL> |
---|
| 569 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#registerUpdater(org.apache.hadoop.metrics.Updater)">registerUpdater</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 570 | </DD> |
---|
| 571 | <DD><DL> |
---|
| 572 | <DT><B>Parameters:</B><DD><CODE>updater</CODE> - object to be run periodically; it should update |
---|
| 573 | some metrics records</DL> |
---|
| 574 | </DD> |
---|
| 575 | </DL> |
---|
| 576 | <HR> |
---|
| 577 | |
---|
| 578 | <A NAME="unregisterUpdater(org.apache.hadoop.metrics.Updater)"><!-- --></A><H3> |
---|
| 579 | unregisterUpdater</H3> |
---|
| 580 | <PRE> |
---|
| 581 | public void <B>unregisterUpdater</B>(<A HREF="../../../../../org/apache/hadoop/metrics/Updater.html" title="interface in org.apache.hadoop.metrics">Updater</A> updater)</PRE> |
---|
| 582 | <DL> |
---|
| 583 | <DD>Removes a callback, if it exists. |
---|
| 584 | <P> |
---|
| 585 | <DD><DL> |
---|
| 586 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#unregisterUpdater(org.apache.hadoop.metrics.Updater)">unregisterUpdater</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 587 | </DD> |
---|
| 588 | <DD><DL> |
---|
| 589 | <DT><B>Parameters:</B><DD><CODE>updater</CODE> - object to be removed from the callback list</DL> |
---|
| 590 | </DD> |
---|
| 591 | </DL> |
---|
| 592 | <HR> |
---|
| 593 | |
---|
| 594 | <A NAME="emitRecord(java.lang.String, java.lang.String, org.apache.hadoop.metrics.spi.OutputRecord)"><!-- --></A><H3> |
---|
| 595 | emitRecord</H3> |
---|
| 596 | <PRE> |
---|
| 597 | protected abstract void <B>emitRecord</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> contextName, |
---|
| 598 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> recordName, |
---|
| 599 | <A HREF="../../../../../org/apache/hadoop/metrics/spi/OutputRecord.html" title="class in org.apache.hadoop.metrics.spi">OutputRecord</A> outRec) |
---|
| 600 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
| 601 | <DL> |
---|
| 602 | <DD>Sends a record to the metrics system. |
---|
| 603 | <P> |
---|
| 604 | <DD><DL> |
---|
| 605 | </DL> |
---|
| 606 | </DD> |
---|
| 607 | <DD><DL> |
---|
| 608 | |
---|
| 609 | <DT><B>Throws:</B> |
---|
| 610 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
| 611 | </DD> |
---|
| 612 | </DL> |
---|
| 613 | <HR> |
---|
| 614 | |
---|
| 615 | <A NAME="flush()"><!-- --></A><H3> |
---|
| 616 | flush</H3> |
---|
| 617 | <PRE> |
---|
| 618 | protected void <B>flush</B>() |
---|
| 619 | throws <A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></PRE> |
---|
| 620 | <DL> |
---|
| 621 | <DD>Called each period after all records have been emitted, this method does nothing. |
---|
| 622 | Subclasses may override it in order to perform some kind of flush. |
---|
| 623 | <P> |
---|
| 624 | <DD><DL> |
---|
| 625 | </DL> |
---|
| 626 | </DD> |
---|
| 627 | <DD><DL> |
---|
| 628 | |
---|
| 629 | <DT><B>Throws:</B> |
---|
| 630 | <DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE></DL> |
---|
| 631 | </DD> |
---|
| 632 | </DL> |
---|
| 633 | <HR> |
---|
| 634 | |
---|
| 635 | <A NAME="update(org.apache.hadoop.metrics.spi.MetricsRecordImpl)"><!-- --></A><H3> |
---|
| 636 | update</H3> |
---|
| 637 | <PRE> |
---|
| 638 | protected void <B>update</B>(<A HREF="../../../../../org/apache/hadoop/metrics/spi/MetricsRecordImpl.html" title="class in org.apache.hadoop.metrics.spi">MetricsRecordImpl</A> record)</PRE> |
---|
| 639 | <DL> |
---|
| 640 | <DD>Called by MetricsRecordImpl.update(). Creates or updates a row in |
---|
| 641 | the internal table of metric data. |
---|
| 642 | <P> |
---|
| 643 | <DD><DL> |
---|
| 644 | </DL> |
---|
| 645 | </DD> |
---|
| 646 | <DD><DL> |
---|
| 647 | </DL> |
---|
| 648 | </DD> |
---|
| 649 | </DL> |
---|
| 650 | <HR> |
---|
| 651 | |
---|
| 652 | <A NAME="remove(org.apache.hadoop.metrics.spi.MetricsRecordImpl)"><!-- --></A><H3> |
---|
| 653 | remove</H3> |
---|
| 654 | <PRE> |
---|
| 655 | protected void <B>remove</B>(<A HREF="../../../../../org/apache/hadoop/metrics/spi/MetricsRecordImpl.html" title="class in org.apache.hadoop.metrics.spi">MetricsRecordImpl</A> record)</PRE> |
---|
| 656 | <DL> |
---|
| 657 | <DD>Called by MetricsRecordImpl.remove(). Removes all matching rows in |
---|
| 658 | the internal table of metric data. A row matches if it has the same |
---|
| 659 | tag names and values as record, but it may also have additional |
---|
| 660 | tags. |
---|
| 661 | <P> |
---|
| 662 | <DD><DL> |
---|
| 663 | </DL> |
---|
| 664 | </DD> |
---|
| 665 | <DD><DL> |
---|
| 666 | </DL> |
---|
| 667 | </DD> |
---|
| 668 | </DL> |
---|
| 669 | <HR> |
---|
| 670 | |
---|
| 671 | <A NAME="getPeriod()"><!-- --></A><H3> |
---|
| 672 | getPeriod</H3> |
---|
| 673 | <PRE> |
---|
| 674 | public int <B>getPeriod</B>()</PRE> |
---|
| 675 | <DL> |
---|
| 676 | <DD>Returns the timer period. |
---|
| 677 | <P> |
---|
| 678 | <DD><DL> |
---|
| 679 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#getPeriod()">getPeriod</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html" title="interface in org.apache.hadoop.metrics">MetricsContext</A></CODE></DL> |
---|
| 680 | </DD> |
---|
| 681 | <DD><DL> |
---|
| 682 | </DL> |
---|
| 683 | </DD> |
---|
| 684 | </DL> |
---|
| 685 | <HR> |
---|
| 686 | |
---|
| 687 | <A NAME="setPeriod(int)"><!-- --></A><H3> |
---|
| 688 | setPeriod</H3> |
---|
| 689 | <PRE> |
---|
| 690 | protected void <B>setPeriod</B>(int period)</PRE> |
---|
| 691 | <DL> |
---|
| 692 | <DD>Sets the timer period |
---|
| 693 | <P> |
---|
| 694 | <DD><DL> |
---|
| 695 | </DL> |
---|
| 696 | </DD> |
---|
| 697 | <DD><DL> |
---|
| 698 | </DL> |
---|
| 699 | </DD> |
---|
| 700 | </DL> |
---|
| 701 | <!-- ========= END OF CLASS DATA ========= --> |
---|
| 702 | <HR> |
---|
| 703 | |
---|
| 704 | |
---|
| 705 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
| 706 | <A NAME="navbar_bottom"><!-- --></A> |
---|
| 707 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
| 708 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
| 709 | <TR> |
---|
| 710 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
| 711 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
| 712 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
| 713 | <TR ALIGN="center" VALIGN="top"> |
---|
| 714 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
| 715 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
| 716 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
| 717 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/AbstractMetricsContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
| 718 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
| 719 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
| 720 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
| 721 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
| 722 | </TR> |
---|
| 723 | </TABLE> |
---|
| 724 | </TD> |
---|
| 725 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
| 726 | </EM> |
---|
| 727 | </TD> |
---|
| 728 | </TR> |
---|
| 729 | |
---|
| 730 | <TR> |
---|
| 731 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 732 | PREV CLASS |
---|
| 733 | <A HREF="../../../../../org/apache/hadoop/metrics/spi/CompositeContext.html" title="class in org.apache.hadoop.metrics.spi"><B>NEXT CLASS</B></A></FONT></TD> |
---|
| 734 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
| 735 | <A HREF="../../../../../index.html?org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" target="_top"><B>FRAMES</B></A> |
---|
| 736 | <A HREF="AbstractMetricsContext.html" target="_top"><B>NO FRAMES</B></A> |
---|
| 737 | <SCRIPT type="text/javascript"> |
---|
| 738 | <!-- |
---|
| 739 | if(window==top) { |
---|
| 740 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
| 741 | } |
---|
| 742 | //--> |
---|
| 743 | </SCRIPT> |
---|
| 744 | <NOSCRIPT> |
---|
| 745 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
| 746 | </NOSCRIPT> |
---|
| 747 | |
---|
| 748 | |
---|
| 749 | </FONT></TD> |
---|
| 750 | </TR> |
---|
| 751 | <TR> |
---|
| 752 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 753 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
| 754 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
| 755 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
| 756 | </TR> |
---|
| 757 | </TABLE> |
---|
| 758 | <A NAME="skip-navbar_bottom"></A> |
---|
| 759 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
| 760 | |
---|
| 761 | <HR> |
---|
| 762 | Copyright © 2009 The Apache Software Foundation |
---|
| 763 | </BODY> |
---|
| 764 | </HTML> |
---|