source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/metrics/file/FileContext.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 26.4 KB
Line 
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>
7FileContext (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">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="FileContext (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>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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&nbsp;PREV CLASS&nbsp;
59&nbsp;NEXT CLASS</FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/metrics/file/FileContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="FileContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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">
91org.apache.hadoop.metrics.file</FONT>
92<BR>
93Class FileContext</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 "><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">org.apache.hadoop.metrics.spi.AbstractMetricsContext</A>
97      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.metrics.file.FileContext</B>
98</PRE>
99<DL>
100<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>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public class <B>FileContext</B><DT>extends <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></DL>
105</PRE>
106
107<P>
108Metrics context for writing metrics to a file.<p/>
109
110 This class is configured by setting ContextFactory attributes which in turn
111 are usually configured through a properties file.  All the attributes are
112 prefixed by the contextName. For example, the properties file might contain:
113 <pre>
114 myContextName.fileName=/tmp/metrics.log
115 myContextName.period=5
116 </pre>
117<P>
118
119<P>
120<HR>
121
122<P>
123<!-- =========== FIELD SUMMARY =========== -->
124
125<A NAME="field_summary"><!-- --></A>
126<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
127<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
128<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
129<B>Field Summary</B></FONT></TH>
130</TR>
131<TR BGCOLOR="white" CLASS="TableRowColor">
132<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
133<CODE>protected static&nbsp;<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>
134<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#FILE_NAME_PROPERTY">FILE_NAME_PROPERTY</A></B></CODE>
135
136<BR>
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
138</TR>
139<TR BGCOLOR="white" CLASS="TableRowColor">
140<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
141<CODE>protected static&nbsp;<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>
142<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#PERIOD_PROPERTY">PERIOD_PROPERTY</A></B></CODE>
143
144<BR>
145&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
146</TR>
147</TABLE>
148&nbsp;<A NAME="fields_inherited_from_class_org.apache.hadoop.metrics.MetricsContext"><!-- --></A>
149<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
150<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
151<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>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/MetricsContext.html#DEFAULT_PERIOD">DEFAULT_PERIOD</A></CODE></TD>
155</TR>
156</TABLE>
157&nbsp;
158<!-- ======== CONSTRUCTOR SUMMARY ======== -->
159
160<A NAME="constructor_summary"><!-- --></A>
161<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
162<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
163<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
164<B>Constructor Summary</B></FONT></TH>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#FileContext()">FileContext</A></B>()</CODE>
168
169<BR>
170&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new instance of FileContext</TD>
171</TR>
172</TABLE>
173&nbsp;
174<!-- ========== METHOD SUMMARY =========== -->
175
176<A NAME="method_summary"><!-- --></A>
177<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
178<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
179<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
180<B>Method Summary</B></FONT></TH>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>&nbsp;void</CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.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>&nbsp;contextName,
186           <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>&nbsp;recordName,
187           <A HREF="../../../../../org/apache/hadoop/metrics/spi/OutputRecord.html" title="class in org.apache.hadoop.metrics.spi">OutputRecord</A>&nbsp;outRec)</CODE>
188
189<BR>
190&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Emits a metrics record to a file.</TD>
191</TR>
192<TR BGCOLOR="white" CLASS="TableRowColor">
193<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
194<CODE>&nbsp;void</CODE></FONT></TD>
195<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#flush()">flush</A></B>()</CODE>
196
197<BR>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Flushes the output writer, forcing updates to disk.</TD>
199</TR>
200<TR BGCOLOR="white" CLASS="TableRowColor">
201<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
202<CODE>&nbsp;<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>
203<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#getFileName()">getFileName</A></B>()</CODE>
204
205<BR>
206&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the configured file name, or null.</TD>
207</TR>
208<TR BGCOLOR="white" CLASS="TableRowColor">
209<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
210<CODE>&nbsp;void</CODE></FONT></TD>
211<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.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>&nbsp;contextName,
212     <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A>&nbsp;factory)</CODE>
213
214<BR>
215&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the context.</TD>
216</TR>
217<TR BGCOLOR="white" CLASS="TableRowColor">
218<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219<CODE>&nbsp;void</CODE></FONT></TD>
220<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#startMonitoring()">startMonitoring</A></B>()</CODE>
221
222<BR>
223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts or restarts monitoring, by opening in append-mode, the
224 file specified by the <code>fileName</code> attribute,
225 if specified.</TD>
226</TR>
227<TR BGCOLOR="white" CLASS="TableRowColor">
228<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
229<CODE>&nbsp;void</CODE></FONT></TD>
230<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/metrics/file/FileContext.html#stopMonitoring()">stopMonitoring</A></B>()</CODE>
231
232<BR>
233&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stops monitoring, closing the file.</TD>
234</TR>
235</TABLE>
236&nbsp;<A NAME="methods_inherited_from_class_org.apache.hadoop.metrics.spi.AbstractMetricsContext"><!-- --></A>
237<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
238<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
239<TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.metrics.spi.<A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></B></TH>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<TD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#close()">close</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#createRecord(java.lang.String)">createRecord</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getAttribute(java.lang.String)">getAttribute</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getAttributeTable(java.lang.String)">getAttributeTable</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getContextFactory()">getContextFactory</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getContextName()">getContextName</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#getPeriod()">getPeriod</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#isMonitoring()">isMonitoring</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#newRecord(java.lang.String)">newRecord</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#registerUpdater(org.apache.hadoop.metrics.Updater)">registerUpdater</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#remove(org.apache.hadoop.metrics.spi.MetricsRecordImpl)">remove</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#setPeriod(int)">setPeriod</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#unregisterUpdater(org.apache.hadoop.metrics.Updater)">unregisterUpdater</A>, <A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#update(org.apache.hadoop.metrics.spi.MetricsRecordImpl)">update</A></CODE></TD>
243</TR>
244</TABLE>
245&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
246<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
247<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
248<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>
249</TR>
250<TR BGCOLOR="white" CLASS="TableRowColor">
251<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>
252</TR>
253</TABLE>
254&nbsp;
255<P>
256
257<!-- ============ FIELD DETAIL =========== -->
258
259<A NAME="field_detail"><!-- --></A>
260<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
261<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
262<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
263<B>Field Detail</B></FONT></TH>
264</TR>
265</TABLE>
266
267<A NAME="FILE_NAME_PROPERTY"><!-- --></A><H3>
268FILE_NAME_PROPERTY</H3>
269<PRE>
270protected static final <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>FILE_NAME_PROPERTY</B></PRE>
271<DL>
272<DL>
273<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.metrics.file.FileContext.FILE_NAME_PROPERTY">Constant Field Values</A></DL>
274</DL>
275<HR>
276
277<A NAME="PERIOD_PROPERTY"><!-- --></A><H3>
278PERIOD_PROPERTY</H3>
279<PRE>
280protected static final <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>PERIOD_PROPERTY</B></PRE>
281<DL>
282<DL>
283<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.hadoop.metrics.file.FileContext.PERIOD_PROPERTY">Constant Field Values</A></DL>
284</DL>
285
286<!-- ========= CONSTRUCTOR DETAIL ======== -->
287
288<A NAME="constructor_detail"><!-- --></A>
289<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
290<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
291<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
292<B>Constructor Detail</B></FONT></TH>
293</TR>
294</TABLE>
295
296<A NAME="FileContext()"><!-- --></A><H3>
297FileContext</H3>
298<PRE>
299public <B>FileContext</B>()</PRE>
300<DL>
301<DD>Creates a new instance of FileContext
302<P>
303</DL>
304
305<!-- ============ METHOD DETAIL ========== -->
306
307<A NAME="method_detail"><!-- --></A>
308<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
309<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
310<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
311<B>Method Detail</B></FONT></TH>
312</TR>
313</TABLE>
314
315<A NAME="init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)"><!-- --></A><H3>
316init</H3>
317<PRE>
318public 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>&nbsp;contextName,
319                 <A HREF="../../../../../org/apache/hadoop/metrics/ContextFactory.html" title="class in org.apache.hadoop.metrics">ContextFactory</A>&nbsp;factory)</PRE>
320<DL>
321<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)">AbstractMetricsContext</A></CODE></B></DD>
322<DD>Initializes the context.
323<P>
324<DD><DL>
325<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#init(java.lang.String, org.apache.hadoop.metrics.ContextFactory)">init</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></CODE></DL>
326</DD>
327<DD><DL>
328<DT><B>Parameters:</B><DD><CODE>contextName</CODE> - The given name for this context<DD><CODE>factory</CODE> - The creator of this context</DL>
329</DD>
330</DL>
331<HR>
332
333<A NAME="getFileName()"><!-- --></A><H3>
334getFileName</H3>
335<PRE>
336public <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>getFileName</B>()</PRE>
337<DL>
338<DD>Returns the configured file name, or null.
339<P>
340<DD><DL>
341</DL>
342</DD>
343</DL>
344<HR>
345
346<A NAME="startMonitoring()"><!-- --></A><H3>
347startMonitoring</H3>
348<PRE>
349public void <B>startMonitoring</B>()
350                     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>
351<DL>
352<DD>Starts or restarts monitoring, by opening in append-mode, the
353 file specified by the <code>fileName</code> attribute,
354 if specified. Otherwise the data will be written to standard
355 output.
356<P>
357<DD><DL>
358<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#startMonitoring()">startMonitoring</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></CODE></DL>
359</DD>
360<DD><DL>
361
362<DT><B>Throws:</B>
363<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>
364</DD>
365</DL>
366<HR>
367
368<A NAME="stopMonitoring()"><!-- --></A><H3>
369stopMonitoring</H3>
370<PRE>
371public void <B>stopMonitoring</B>()</PRE>
372<DL>
373<DD>Stops monitoring, closing the file.
374<P>
375<DD><DL>
376<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><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#stopMonitoring()">stopMonitoring</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></CODE></DL>
377</DD>
378<DD><DL>
379<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#close()"><CODE>AbstractMetricsContext.close()</CODE></A></DL>
380</DD>
381</DL>
382<HR>
383
384<A NAME="emitRecord(java.lang.String, java.lang.String, org.apache.hadoop.metrics.spi.OutputRecord)"><!-- --></A><H3>
385emitRecord</H3>
386<PRE>
387public 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>&nbsp;contextName,
388                       <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>&nbsp;recordName,
389                       <A HREF="../../../../../org/apache/hadoop/metrics/spi/OutputRecord.html" title="class in org.apache.hadoop.metrics.spi">OutputRecord</A>&nbsp;outRec)</PRE>
390<DL>
391<DD>Emits a metrics record to a file.
392<P>
393<DD><DL>
394<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#emitRecord(java.lang.String, java.lang.String, org.apache.hadoop.metrics.spi.OutputRecord)">emitRecord</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></CODE></DL>
395</DD>
396<DD><DL>
397</DL>
398</DD>
399</DL>
400<HR>
401
402<A NAME="flush()"><!-- --></A><H3>
403flush</H3>
404<PRE>
405public void <B>flush</B>()</PRE>
406<DL>
407<DD>Flushes the output writer, forcing updates to disk.
408<P>
409<DD><DL>
410<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html#flush()">flush</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/metrics/spi/AbstractMetricsContext.html" title="class in org.apache.hadoop.metrics.spi">AbstractMetricsContext</A></CODE></DL>
411</DD>
412<DD><DL>
413</DL>
414</DD>
415</DL>
416<!-- ========= END OF CLASS DATA ========= -->
417<HR>
418
419
420<!-- ======= START OF BOTTOM NAVBAR ====== -->
421<A NAME="navbar_bottom"><!-- --></A>
422<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
423<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
424<TR>
425<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
426<A NAME="navbar_bottom_firstrow"><!-- --></A>
427<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
428  <TR ALIGN="center" VALIGN="top">
429  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
430  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
431  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
432  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileContext.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
433  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
434  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
435  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
436  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
437  </TR>
438</TABLE>
439</TD>
440<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
441</EM>
442</TD>
443</TR>
444
445<TR>
446<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
447&nbsp;PREV CLASS&nbsp;
448&nbsp;NEXT CLASS</FONT></TD>
449<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
450  <A HREF="../../../../../index.html?org/apache/hadoop/metrics/file/FileContext.html" target="_top"><B>FRAMES</B></A>  &nbsp;
451&nbsp;<A HREF="FileContext.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
452&nbsp;<SCRIPT type="text/javascript">
453  <!--
454  if(window==top) {
455    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
456  }
457  //-->
458</SCRIPT>
459<NOSCRIPT>
460  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
461</NOSCRIPT>
462
463
464</FONT></TD>
465</TR>
466<TR>
467<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
468  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
469<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
470DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
471</TR>
472</TABLE>
473<A NAME="skip-navbar_bottom"></A>
474<!-- ======== END OF BOTTOM NAVBAR ======= -->
475
476<HR>
477Copyright &copy; 2009 The Apache Software Foundation
478</BODY>
479</HTML>
Note: See TracBrowser for help on using the repository browser.