source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.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: 46.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:58 UTC 2009 -->
6<TITLE>
7FileOutputFormat (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="FileOutputFormat (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/FileOutputFormat.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;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.html" title="class in org.apache.hadoop.mapreduce.lib.output"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/NullOutputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.output"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="FileOutputFormat.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;FIELD&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;FIELD&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.mapreduce.lib.output</FONT>
92<BR>
93Class FileOutputFormat&lt;K,V&gt;</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/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce">org.apache.hadoop.mapreduce.OutputFormat</A>&lt;K,V&gt;
97      <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.mapreduce.lib.output.FileOutputFormat&lt;K,V&gt;</B>
98</PRE>
99<DL>
100<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/SequenceFileOutputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.output">SequenceFileOutputFormat</A>, <A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/TextOutputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.output">TextOutputFormat</A></DD>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public abstract class <B>FileOutputFormat&lt;K,V&gt;</B><DT>extends <A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce">OutputFormat</A>&lt;K,V&gt;</DL>
105</PRE>
106
107<P>
108A base class for <A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce"><CODE>OutputFormat</CODE></A>s that read from <A HREF="../../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs"><CODE>FileSystem</CODE></A>s.
109<P>
110
111<P>
112<HR>
113
114<P>
115
116<!-- ======== CONSTRUCTOR SUMMARY ======== -->
117
118<A NAME="constructor_summary"><!-- --></A>
119<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
120<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
121<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
122<B>Constructor Summary</B></FONT></TH>
123</TR>
124<TR BGCOLOR="white" CLASS="TableRowColor">
125<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#FileOutputFormat()">FileOutputFormat</A></B>()</CODE>
126
127<BR>
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
129</TR>
130</TABLE>
131&nbsp;
132<!-- ========== METHOD SUMMARY =========== -->
133
134<A NAME="method_summary"><!-- --></A>
135<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
136<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
137<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
138<B>Method Summary</B></FONT></TH>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142<CODE>&nbsp;void</CODE></FONT></TD>
143<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext)">checkOutputSpecs</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)</CODE>
144
145<BR>
146&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Check for validity of the output-specification for the job.</TD>
147</TR>
148<TR BGCOLOR="white" CLASS="TableRowColor">
149<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
150<CODE>static&nbsp;boolean</CODE></FONT></TD>
151<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getCompressOutput(org.apache.hadoop.mapreduce.JobContext)">getCompressOutput</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)</CODE>
152
153<BR>
154&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is the job output compressed?</TD>
155</TR>
156<TR BGCOLOR="white" CLASS="TableRowColor">
157<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
158<CODE>&nbsp;<A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
159<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getDefaultWorkFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String)">getDefaultWorkFile</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context,
160                   <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;extension)</CODE>
161
162<BR>
163&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default path and filename for the output format.</TD>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
167<CODE>&nbsp;<A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputCommitter.html" title="class in org.apache.hadoop.mapreduce">OutputCommitter</A></CODE></FONT></TD>
168<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext)">getOutputCommitter</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context)</CODE>
169
170<BR>
171&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the output committer for this output format.</TD>
172</TR>
173<TR BGCOLOR="white" CLASS="TableRowColor">
174<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
175<CODE>static&nbsp;<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt;</CODE></FONT></TD>
176<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getOutputCompressorClass(org.apache.hadoop.mapreduce.JobContext, java.lang.Class)">getOutputCompressorClass</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job,
177                         <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt;&nbsp;defaultValue)</CODE>
178
179<BR>
180&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> for compressing the job outputs.</TD>
181</TR>
182<TR BGCOLOR="white" CLASS="TableRowColor">
183<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
184<CODE>static&nbsp;<A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
185<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getOutputPath(org.apache.hadoop.mapreduce.JobContext)">getOutputPath</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)</CODE>
186
187<BR>
188&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the output directory for the map-reduce job.</TD>
189</TR>
190<TR BGCOLOR="white" CLASS="TableRowColor">
191<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
192<CODE>static&nbsp;<A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
193<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getPathForWorkFile(org.apache.hadoop.mapreduce.TaskInputOutputContext, java.lang.String, java.lang.String)">getPathForWorkFile</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskInputOutputContext.html" title="class in org.apache.hadoop.mapreduce">TaskInputOutputContext</A>&lt;?,?,?,?&gt;&nbsp;context,
194                   <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;name,
195                   <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;extension)</CODE>
196
197<BR>
198&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Helper function to generate a <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> for a file that is unique for
199 the task within the job output directory.</TD>
200</TR>
201<TR BGCOLOR="white" CLASS="TableRowColor">
202<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203<CODE>abstract &nbsp;<A HREF="../../../../../../org/apache/hadoop/mapreduce/RecordWriter.html" title="class in org.apache.hadoop.mapreduce">RecordWriter</A>&lt;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">K</A>,<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">V</A>&gt;</CODE></FONT></TD>
204<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext)">getRecordWriter</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;job)</CODE>
205
206<BR>
207&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the <A HREF="../../../../../../org/apache/hadoop/mapreduce/RecordWriter.html" title="class in org.apache.hadoop.mapreduce"><CODE>RecordWriter</CODE></A> for the given task.</TD>
208</TR>
209<TR BGCOLOR="white" CLASS="TableRowColor">
210<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211<CODE>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>
212<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getUniqueFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String, java.lang.String)">getUniqueFile</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context,
213              <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;name,
214              <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;extension)</CODE>
215
216<BR>
217&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a unique filename, based on the task id, name, and extension</TD>
218</TR>
219<TR BGCOLOR="white" CLASS="TableRowColor">
220<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
221<CODE>static&nbsp;<A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A></CODE></FONT></TD>
222<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getWorkOutputPath(org.apache.hadoop.mapreduce.TaskInputOutputContext)">getWorkOutputPath</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskInputOutputContext.html" title="class in org.apache.hadoop.mapreduce">TaskInputOutputContext</A>&lt;?,?,?,?&gt;&nbsp;context)</CODE>
223
224<BR>
225&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the task's temporary output directory
226  for the map-reduce job
227 
228 <h4 id="SideEffectFiles">Tasks' Side-Effect Files</TD>
229</TR>
230<TR BGCOLOR="white" CLASS="TableRowColor">
231<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
232<CODE>static&nbsp;void</CODE></FONT></TD>
233<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#setCompressOutput(org.apache.hadoop.mapreduce.Job, boolean)">setCompressOutput</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
234                  boolean&nbsp;compress)</CODE>
235
236<BR>
237&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set whether the output of the job is compressed.</TD>
238</TR>
239<TR BGCOLOR="white" CLASS="TableRowColor">
240<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
241<CODE>static&nbsp;void</CODE></FONT></TD>
242<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#setOutputCompressorClass(org.apache.hadoop.mapreduce.Job, java.lang.Class)">setOutputCompressorClass</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
243                         <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt;&nbsp;codecClass)</CODE>
244
245<BR>
246&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> to be used to compress job outputs.</TD>
247</TR>
248<TR BGCOLOR="white" CLASS="TableRowColor">
249<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
250<CODE>static&nbsp;void</CODE></FONT></TD>
251<TD><CODE><B><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#setOutputPath(org.apache.hadoop.mapreduce.Job, org.apache.hadoop.fs.Path)">setOutputPath</A></B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
252              <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;outputDir)</CODE>
253
254<BR>
255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> of the output directory for the map-reduce job.</TD>
256</TR>
257</TABLE>
258&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
259<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
260<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
261<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>
262</TR>
263<TR BGCOLOR="white" CLASS="TableRowColor">
264<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>
265</TR>
266</TABLE>
267&nbsp;
268<P>
269
270<!-- ========= CONSTRUCTOR DETAIL ======== -->
271
272<A NAME="constructor_detail"><!-- --></A>
273<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
274<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
275<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
276<B>Constructor Detail</B></FONT></TH>
277</TR>
278</TABLE>
279
280<A NAME="FileOutputFormat()"><!-- --></A><H3>
281FileOutputFormat</H3>
282<PRE>
283public <B>FileOutputFormat</B>()</PRE>
284<DL>
285</DL>
286
287<!-- ============ METHOD DETAIL ========== -->
288
289<A NAME="method_detail"><!-- --></A>
290<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
291<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
292<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
293<B>Method Detail</B></FONT></TH>
294</TR>
295</TABLE>
296
297<A NAME="setCompressOutput(org.apache.hadoop.mapreduce.Job, boolean)"><!-- --></A><H3>
298setCompressOutput</H3>
299<PRE>
300public static void <B>setCompressOutput</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
301                                     boolean&nbsp;compress)</PRE>
302<DL>
303<DD>Set whether the output of the job is compressed.
304<P>
305<DD><DL>
306<DT><B>Parameters:</B><DD><CODE>job</CODE> - the job to modify<DD><CODE>compress</CODE> - should the output of the job be compressed?</DL>
307</DD>
308</DL>
309<HR>
310
311<A NAME="getCompressOutput(org.apache.hadoop.mapreduce.JobContext)"><!-- --></A><H3>
312getCompressOutput</H3>
313<PRE>
314public static boolean <B>getCompressOutput</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)</PRE>
315<DL>
316<DD>Is the job output compressed?
317<P>
318<DD><DL>
319<DT><B>Parameters:</B><DD><CODE>job</CODE> - the Job to look in
320<DT><B>Returns:</B><DD><code>true</code> if the job output should be compressed,
321         <code>false</code> otherwise</DL>
322</DD>
323</DL>
324<HR>
325
326<A NAME="setOutputCompressorClass(org.apache.hadoop.mapreduce.Job, java.lang.Class)"><!-- --></A><H3>
327setOutputCompressorClass</H3>
328<PRE>
329public static void <B>setOutputCompressorClass</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
330                                            <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt;&nbsp;codecClass)</PRE>
331<DL>
332<DD>Set the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> to be used to compress job outputs.
333<P>
334<DD><DL>
335<DT><B>Parameters:</B><DD><CODE>job</CODE> - the job to modify<DD><CODE>codecClass</CODE> - the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> to be used to
336                   compress the job outputs</DL>
337</DD>
338</DL>
339<HR>
340
341<A NAME="getOutputCompressorClass(org.apache.hadoop.mapreduce.JobContext, java.lang.Class)"><!-- --></A><H3>
342getOutputCompressorClass</H3>
343<PRE>
344public static <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt; <B>getOutputCompressorClass</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job,
345                                                                         <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;? extends <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress">CompressionCodec</A>&gt;&nbsp;defaultValue)</PRE>
346<DL>
347<DD>Get the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> for compressing the job outputs.
348<P>
349<DD><DL>
350<DT><B>Parameters:</B><DD><CODE>job</CODE> - the <A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce"><CODE>Job</CODE></A> to look in<DD><CODE>defaultValue</CODE> - the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> to return if not set
351<DT><B>Returns:</B><DD>the <A HREF="../../../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A> to be used to compress the
352         job outputs
353<DT><B>Throws:</B>
354<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if the class was specified, but not found</DL>
355</DD>
356</DL>
357<HR>
358
359<A NAME="getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext)"><!-- --></A><H3>
360getRecordWriter</H3>
361<PRE>
362public abstract <A HREF="../../../../../../org/apache/hadoop/mapreduce/RecordWriter.html" title="class in org.apache.hadoop.mapreduce">RecordWriter</A>&lt;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">K</A>,<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">V</A>&gt; <B>getRecordWriter</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;job)
363                                           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>,
364                                                  <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></PRE>
365<DL>
366<DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext)">OutputFormat</A></CODE></B></DD>
367<DD>Get the <A HREF="../../../../../../org/apache/hadoop/mapreduce/RecordWriter.html" title="class in org.apache.hadoop.mapreduce"><CODE>RecordWriter</CODE></A> for the given task.
368<P>
369<DD><DL>
370<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext)">getRecordWriter</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce">OutputFormat</A>&lt;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">K</A>,<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">V</A>&gt;</CODE></DL>
371</DD>
372<DD><DL>
373<DT><B>Parameters:</B><DD><CODE>job</CODE> - the information about the current task.
374<DT><B>Returns:</B><DD>a <A HREF="../../../../../../org/apache/hadoop/mapreduce/RecordWriter.html" title="class in org.apache.hadoop.mapreduce"><CODE>RecordWriter</CODE></A> to write the output for the job.
375<DT><B>Throws:</B>
376<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>
377<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></CODE></DL>
378</DD>
379</DL>
380<HR>
381
382<A NAME="checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext)"><!-- --></A><H3>
383checkOutputSpecs</H3>
384<PRE>
385public void <B>checkOutputSpecs</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)
386                      throws <A HREF="../../../../../../org/apache/hadoop/mapred/FileAlreadyExistsException.html" title="class in org.apache.hadoop.mapred">FileAlreadyExistsException</A>,
387                             <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>
388<DL>
389<DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext)">OutputFormat</A></CODE></B></DD>
390<DD>Check for validity of the output-specification for the job.
391 
392 <p>This is to validate the output specification for the job when it is
393 a job is submitted.  Typically checks that it does not already exist,
394 throwing an exception when it already exists, so that output is not
395 overwritten.</p>
396<P>
397<DD><DL>
398<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext)">checkOutputSpecs</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce">OutputFormat</A>&lt;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">K</A>,<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">V</A>&gt;</CODE></DL>
399</DD>
400<DD><DL>
401<DT><B>Parameters:</B><DD><CODE>job</CODE> - information about the job
402<DT><B>Throws:</B>
403<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> - when output should not be attempted
404<DD><CODE><A HREF="../../../../../../org/apache/hadoop/mapred/FileAlreadyExistsException.html" title="class in org.apache.hadoop.mapred">FileAlreadyExistsException</A></CODE></DL>
405</DD>
406</DL>
407<HR>
408
409<A NAME="setOutputPath(org.apache.hadoop.mapreduce.Job, org.apache.hadoop.fs.Path)"><!-- --></A><H3>
410setOutputPath</H3>
411<PRE>
412public static void <B>setOutputPath</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/Job.html" title="class in org.apache.hadoop.mapreduce">Job</A>&nbsp;job,
413                                 <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A>&nbsp;outputDir)</PRE>
414<DL>
415<DD>Set the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> of the output directory for the map-reduce job.
416<P>
417<DD><DL>
418<DT><B>Parameters:</B><DD><CODE>job</CODE> - The job to modify<DD><CODE>outputDir</CODE> - the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> of the output directory for
419 the map-reduce job.</DL>
420</DD>
421</DL>
422<HR>
423
424<A NAME="getOutputPath(org.apache.hadoop.mapreduce.JobContext)"><!-- --></A><H3>
425getOutputPath</H3>
426<PRE>
427public static <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getOutputPath</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce">JobContext</A>&nbsp;job)</PRE>
428<DL>
429<DD>Get the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the output directory for the map-reduce job.
430<P>
431<DD><DL>
432
433<DT><B>Returns:</B><DD>the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the output directory for the map-reduce job.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getWorkOutputPath(org.apache.hadoop.mapreduce.TaskInputOutputContext)"><CODE>getWorkOutputPath(TaskInputOutputContext)</CODE></A></DL>
434</DD>
435</DL>
436<HR>
437
438<A NAME="getWorkOutputPath(org.apache.hadoop.mapreduce.TaskInputOutputContext)"><!-- --></A><H3>
439getWorkOutputPath</H3>
440<PRE>
441public static <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getWorkOutputPath</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskInputOutputContext.html" title="class in org.apache.hadoop.mapreduce">TaskInputOutputContext</A>&lt;?,?,?,?&gt;&nbsp;context)
442                              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>,
443                                     <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></PRE>
444<DL>
445<DD>Get the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the task's temporary output directory
446  for the map-reduce job
447 
448 <h4 id="SideEffectFiles">Tasks' Side-Effect Files</h4>
449 
450 <p>Some applications need to create/write-to side-files, which differ from
451 the actual job-outputs.
452 
453 <p>In such cases there could be issues with 2 instances of the same TIP
454 (running simultaneously e.g. speculative tasks) trying to open/write-to the
455 same file (path) on HDFS. Hence the application-writer will have to pick
456 unique names per task-attempt (e.g. using the attemptid, say
457 <tt>attempt_200709221812_0001_m_000000_0</tt>), not just per TIP.</p> 
458 
459 <p>To get around this the Map-Reduce framework helps the application-writer
460 out by maintaining a special
461 <tt>${mapred.output.dir}/_temporary/_${taskid}</tt> 
462 sub-directory for each task-attempt on HDFS where the output of the
463 task-attempt goes. On successful completion of the task-attempt the files
464 in the <tt>${mapred.output.dir}/_temporary/_${taskid}</tt> (only)
465 are <i>promoted</i> to <tt>${mapred.output.dir}</tt>. Of course, the
466 framework discards the sub-directory of unsuccessful task-attempts. This
467 is completely transparent to the application.</p>
468 
469 <p>The application-writer can take advantage of this by creating any
470 side-files required in a work directory during execution
471 of his task i.e. via
472 <A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getWorkOutputPath(org.apache.hadoop.mapreduce.TaskInputOutputContext)"><CODE>getWorkOutputPath(TaskInputOutputContext)</CODE></A>, and
473 the framework will move them out similarly - thus she doesn't have to pick
474 unique paths per task-attempt.</p>
475 
476 <p>The entire discussion holds true for maps of jobs with
477 reducer=NONE (i.e. 0 reduces) since output of the map, in that case,
478 goes directly to HDFS.</p>
479<P>
480<DD><DL>
481
482<DT><B>Returns:</B><DD>the <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> to the task's temporary output directory
483 for the map-reduce job.
484<DT><B>Throws:</B>
485<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>
486<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></CODE></DL>
487</DD>
488</DL>
489<HR>
490
491<A NAME="getPathForWorkFile(org.apache.hadoop.mapreduce.TaskInputOutputContext, java.lang.String, java.lang.String)"><!-- --></A><H3>
492getPathForWorkFile</H3>
493<PRE>
494public static <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getPathForWorkFile</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskInputOutputContext.html" title="class in org.apache.hadoop.mapreduce">TaskInputOutputContext</A>&lt;?,?,?,?&gt;&nbsp;context,
495                                      <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;name,
496                                      <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;extension)
497                               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>,
498                                      <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></PRE>
499<DL>
500<DD>Helper function to generate a <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs"><CODE>Path</CODE></A> for a file that is unique for
501 the task within the job output directory.
502
503 <p>The path can be used to create custom files from within the map and
504 reduce tasks. The path name will be unique for each task. The path parent
505 will be the job output directory.</p>ls
506
507 <p>This method uses the <A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html#getUniqueFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String, java.lang.String)"><CODE>getUniqueFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String, java.lang.String)</CODE></A> method to make the file name
508 unique for the task.</p>
509<P>
510<DD><DL>
511<DT><B>Parameters:</B><DD><CODE>context</CODE> - the context for the task.<DD><CODE>name</CODE> - the name for the file.<DD><CODE>extension</CODE> - the extension for the file
512<DT><B>Returns:</B><DD>a unique path accross all tasks of the job.
513<DT><B>Throws:</B>
514<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>
515<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/InterruptedException.html?is-external=true" title="class or interface in java.lang">InterruptedException</A></CODE></DL>
516</DD>
517</DL>
518<HR>
519
520<A NAME="getUniqueFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String, java.lang.String)"><!-- --></A><H3>
521getUniqueFile</H3>
522<PRE>
523public static <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>getUniqueFile</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context,
524                                   <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;name,
525                                   <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;extension)</PRE>
526<DL>
527<DD>Generate a unique filename, based on the task id, name, and extension
528<P>
529<DD><DL>
530<DT><B>Parameters:</B><DD><CODE>context</CODE> - the task that is calling this<DD><CODE>name</CODE> - the base filename<DD><CODE>extension</CODE> - the filename extension
531<DT><B>Returns:</B><DD>a string like $name-[mr]-$id$extension</DL>
532</DD>
533</DL>
534<HR>
535
536<A NAME="getDefaultWorkFile(org.apache.hadoop.mapreduce.TaskAttemptContext, java.lang.String)"><!-- --></A><H3>
537getDefaultWorkFile</H3>
538<PRE>
539public <A HREF="../../../../../../org/apache/hadoop/fs/Path.html" title="class in org.apache.hadoop.fs">Path</A> <B>getDefaultWorkFile</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context,
540                               <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;extension)
541                        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>
542<DL>
543<DD>Get the default path and filename for the output format.
544<P>
545<DD><DL>
546<DT><B>Parameters:</B><DD><CODE>context</CODE> - the task context<DD><CODE>extension</CODE> - an extension to add to the filename
547<DT><B>Returns:</B><DD>a full path $output/_temporary/$taskid/part-[mr]-$id
548<DT><B>Throws:</B>
549<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>
550</DD>
551</DL>
552<HR>
553
554<A NAME="getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext)"><!-- --></A><H3>
555getOutputCommitter</H3>
556<PRE>
557public <A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputCommitter.html" title="class in org.apache.hadoop.mapreduce">OutputCommitter</A> <B>getOutputCommitter</B>(<A HREF="../../../../../../org/apache/hadoop/mapreduce/TaskAttemptContext.html" title="class in org.apache.hadoop.mapreduce">TaskAttemptContext</A>&nbsp;context)
558                                   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>
559<DL>
560<DD><B>Description copied from class: <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext)">OutputFormat</A></CODE></B></DD>
561<DD>Get the output committer for this output format. This is responsible
562 for ensuring the output is committed correctly.
563<P>
564<DD><DL>
565<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html#getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext)">getOutputCommitter</A></CODE> in class <CODE><A HREF="../../../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce">OutputFormat</A>&lt;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">K</A>,<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" title="type parameter in FileOutputFormat">V</A>&gt;</CODE></DL>
566</DD>
567<DD><DL>
568<DT><B>Parameters:</B><DD><CODE>context</CODE> - the task context
569<DT><B>Returns:</B><DD>an output committer
570<DT><B>Throws:</B>
571<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>
572</DD>
573</DL>
574<!-- ========= END OF CLASS DATA ========= -->
575<HR>
576
577
578<!-- ======= START OF BOTTOM NAVBAR ====== -->
579<A NAME="navbar_bottom"><!-- --></A>
580<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
581<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
582<TR>
583<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
584<A NAME="navbar_bottom_firstrow"><!-- --></A>
585<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
586  <TR ALIGN="center" VALIGN="top">
587  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
588  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
589  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
590  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/FileOutputFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
591  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
592  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
593  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
594  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
595  </TR>
596</TABLE>
597</TD>
598<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
599</EM>
600</TD>
601</TR>
602
603<TR>
604<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
605&nbsp;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/FileOutputCommitter.html" title="class in org.apache.hadoop.mapreduce.lib.output"><B>PREV CLASS</B></A>&nbsp;
606&nbsp;<A HREF="../../../../../../org/apache/hadoop/mapreduce/lib/output/NullOutputFormat.html" title="class in org.apache.hadoop.mapreduce.lib.output"><B>NEXT CLASS</B></A></FONT></TD>
607<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
608  <A HREF="../../../../../../index.html?org/apache/hadoop/mapreduce/lib/output/FileOutputFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
609&nbsp;<A HREF="FileOutputFormat.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
610&nbsp;<SCRIPT type="text/javascript">
611  <!--
612  if(window==top) {
613    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
614  }
615  //-->
616</SCRIPT>
617<NOSCRIPT>
618  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
619</NOSCRIPT>
620
621
622</FONT></TD>
623</TR>
624<TR>
625<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
626  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
627<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
628DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
629</TR>
630</TABLE>
631<A NAME="skip-navbar_bottom"></A>
632<!-- ======== END OF BOTTOM NAVBAR ======= -->
633
634<HR>
635Copyright &copy; 2009 The Apache Software Foundation
636</BODY>
637</HTML>
Note: See TracBrowser for help on using the repository browser.