source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/mapred/lib/MultipleOutputFormat.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: 33.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:57 UTC 2009 -->
6<TITLE>
7MultipleOutputFormat (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="MultipleOutputFormat (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/MultipleOutputFormat.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/mapred/lib/MultipleInputs.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputs.html" title="class in org.apache.hadoop.mapred.lib"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="MultipleOutputFormat.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.mapred.lib</FONT>
92<BR>
93Class MultipleOutputFormat&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/mapred/FileOutputFormat.html" title="class in org.apache.hadoop.mapred">org.apache.hadoop.mapred.FileOutputFormat</A>&lt;K,V&gt;
97      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.mapred.lib.MultipleOutputFormat&lt;K,V&gt;</B>
98</PRE>
99<DL>
100<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/hadoop/mapred/OutputFormat.html" title="interface in org.apache.hadoop.mapred">OutputFormat</A>&lt;K,V&gt;</DD>
101</DL>
102<DL>
103<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleSequenceFileOutputFormat.html" title="class in org.apache.hadoop.mapred.lib">MultipleSequenceFileOutputFormat</A>, <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleTextOutputFormat.html" title="class in org.apache.hadoop.mapred.lib">MultipleTextOutputFormat</A></DD>
104</DL>
105<HR>
106<DL>
107<DT><PRE>public abstract class <B>MultipleOutputFormat&lt;K,V&gt;</B><DT>extends <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html" title="class in org.apache.hadoop.mapred">FileOutputFormat</A>&lt;K,V&gt;</DL>
108</PRE>
109
110<P>
111This abstract class extends the FileOutputFormat, allowing to write the
112 output data to different output files. There are three basic use cases for
113 this class.
114 
115 Case one: This class is used for a map reduce job with at least one reducer.
116 The reducer wants to write data to different files depending on the actual
117 keys. It is assumed that a key (or value) encodes the actual key (value)
118 and the desired location for the actual key (value).
119 
120 Case two: This class is used for a map only job. The job wants to use an
121 output file name that is either a part of the input file name of the input
122 data, or some derivation of it.
123 
124 Case three: This class is used for a map only job. The job wants to use an
125 output file name that depends on both the keys and the input file name,
126<P>
127
128<P>
129<HR>
130
131<P>
132
133<!-- ======== CONSTRUCTOR SUMMARY ======== -->
134
135<A NAME="constructor_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Constructor Summary</B></FONT></TH>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#MultipleOutputFormat()">MultipleOutputFormat</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;
149<!-- ========== METHOD SUMMARY =========== -->
150
151<A NAME="method_summary"><!-- --></A>
152<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
153<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
154<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
155<B>Method Summary</B></FONT></TH>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
159<CODE>protected &nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A></CODE></FONT></TD>
160<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#generateActualKey(K, V)">generateActualKey</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
161                  <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value)</CODE>
162
163<BR>
164&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the actual key from the given key/value.</TD>
165</TR>
166<TR BGCOLOR="white" CLASS="TableRowColor">
167<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
168<CODE>protected &nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A></CODE></FONT></TD>
169<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#generateActualValue(K, V)">generateActualValue</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
170                    <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value)</CODE>
171
172<BR>
173&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the actual value from the given key and value.</TD>
174</TR>
175<TR BGCOLOR="white" CLASS="TableRowColor">
176<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
177<CODE>protected &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>
178<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#generateFileNameForKeyValue(K, V, java.lang.String)">generateFileNameForKeyValue</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
179                            <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value,
180                            <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)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the file output file name based on the given key and the leaf file
184 name.</TD>
185</TR>
186<TR BGCOLOR="white" CLASS="TableRowColor">
187<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
188<CODE>protected &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>
189<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#generateLeafFileName(java.lang.String)">generateLeafFileName</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;name)</CODE>
190
191<BR>
192&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the leaf name for the output file name.</TD>
193</TR>
194<TR BGCOLOR="white" CLASS="TableRowColor">
195<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
196<CODE>protected abstract &nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt;</CODE></FONT></TD>
197<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#getBaseRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)">getBaseRecordWriter</A></B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
198                    <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
199                    <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,
200                    <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A>&nbsp;arg3)</CODE>
201
202<BR>
203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
204</TR>
205<TR BGCOLOR="white" CLASS="TableRowColor">
206<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
207<CODE>protected &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>
208<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#getInputFileBasedOutputFileName(org.apache.hadoop.mapred.JobConf, java.lang.String)">getInputFileBasedOutputFileName</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
209                                <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)</CODE>
210
211<BR>
212&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the outfile name based on a given anme and the input file name.</TD>
213</TR>
214<TR BGCOLOR="white" CLASS="TableRowColor">
215<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
216<CODE>&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt;</CODE></FONT></TD>
217<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html#getRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)">getRecordWriter</A></B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
218                <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
219                <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,
220                <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A>&nbsp;arg3)</CODE>
221
222<BR>
223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a composite record writer that can write key/value data to different
224 output files</TD>
225</TR>
226</TABLE>
227&nbsp;<A NAME="methods_inherited_from_class_org.apache.hadoop.mapred.FileOutputFormat"><!-- --></A>
228<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
229<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
230<TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.mapred.<A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html" title="class in org.apache.hadoop.mapred">FileOutputFormat</A></B></TH>
231</TR>
232<TR BGCOLOR="white" CLASS="TableRowColor">
233<TD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#checkOutputSpecs(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf)">checkOutputSpecs</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getCompressOutput(org.apache.hadoop.mapred.JobConf)">getCompressOutput</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getOutputCompressorClass(org.apache.hadoop.mapred.JobConf, java.lang.Class)">getOutputCompressorClass</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getOutputPath(org.apache.hadoop.mapred.JobConf)">getOutputPath</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getPathForCustomFile(org.apache.hadoop.mapred.JobConf, java.lang.String)">getPathForCustomFile</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getTaskOutputPath(org.apache.hadoop.mapred.JobConf, java.lang.String)">getTaskOutputPath</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getUniqueName(org.apache.hadoop.mapred.JobConf, java.lang.String)">getUniqueName</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getWorkOutputPath(org.apache.hadoop.mapred.JobConf)">getWorkOutputPath</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#setCompressOutput(org.apache.hadoop.mapred.JobConf, boolean)">setCompressOutput</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#setOutputCompressorClass(org.apache.hadoop.mapred.JobConf, java.lang.Class)">setOutputCompressorClass</A>, <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#setOutputPath(org.apache.hadoop.mapred.JobConf, org.apache.hadoop.fs.Path)">setOutputPath</A></CODE></TD>
234</TR>
235</TABLE>
236&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></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 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>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<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>
243</TR>
244</TABLE>
245&nbsp;
246<P>
247
248<!-- ========= CONSTRUCTOR DETAIL ======== -->
249
250<A NAME="constructor_detail"><!-- --></A>
251<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
252<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
253<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
254<B>Constructor Detail</B></FONT></TH>
255</TR>
256</TABLE>
257
258<A NAME="MultipleOutputFormat()"><!-- --></A><H3>
259MultipleOutputFormat</H3>
260<PRE>
261public <B>MultipleOutputFormat</B>()</PRE>
262<DL>
263</DL>
264
265<!-- ============ METHOD DETAIL ========== -->
266
267<A NAME="method_detail"><!-- --></A>
268<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
269<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
270<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
271<B>Method Detail</B></FONT></TH>
272</TR>
273</TABLE>
274
275<A NAME="getRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)"><!-- --></A><H3>
276getRecordWriter</H3>
277<PRE>
278public <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt; <B>getRecordWriter</B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
279                                         <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
280                                         <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,
281                                         <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A>&nbsp;arg3)
282                                  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>
283<DL>
284<DD>Create a composite record writer that can write key/value data to different
285 output files
286<P>
287<DD><DL>
288<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/OutputFormat.html#getRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)">getRecordWriter</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/mapred/OutputFormat.html" title="interface in org.apache.hadoop.mapred">OutputFormat</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt;</CODE><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html#getRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)">getRecordWriter</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html" title="class in org.apache.hadoop.mapred">FileOutputFormat</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt;</CODE></DL>
289</DD>
290<DD><DL>
291<DT><B>Parameters:</B><DD><CODE>fs</CODE> - the file system to use<DD><CODE>job</CODE> - the job conf for the job<DD><CODE>name</CODE> - the leaf file name for the output file (such as part-00000")<DD><CODE>arg3</CODE> - a progressable for reporting progress.
292<DT><B>Returns:</B><DD>a composite record writer
293<DT><B>Throws:</B>
294<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>
295</DD>
296</DL>
297<HR>
298
299<A NAME="generateLeafFileName(java.lang.String)"><!-- --></A><H3>
300generateLeafFileName</H3>
301<PRE>
302protected <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>generateLeafFileName</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;name)</PRE>
303<DL>
304<DD>Generate the leaf name for the output file name. The default behavior does
305 not change the leaf file name (such as part-00000)
306<P>
307<DD><DL>
308<DT><B>Parameters:</B><DD><CODE>name</CODE> - the leaf file name for the output file
309<DT><B>Returns:</B><DD>the given leaf file name</DL>
310</DD>
311</DL>
312<HR>
313
314<A NAME="generateFileNameForKeyValue(java.lang.Object,java.lang.Object,java.lang.String)"><!-- --></A><A NAME="generateFileNameForKeyValue(K, V, java.lang.String)"><!-- --></A><H3>
315generateFileNameForKeyValue</H3>
316<PRE>
317protected <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>generateFileNameForKeyValue</B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
318                                             <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value,
319                                             <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)</PRE>
320<DL>
321<DD>Generate the file output file name based on the given key and the leaf file
322 name. The default behavior is that the file name does not depend on the
323 key.
324<P>
325<DD><DL>
326<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the output data<DD><CODE>name</CODE> - the leaf file name
327<DT><B>Returns:</B><DD>generated file name</DL>
328</DD>
329</DL>
330<HR>
331
332<A NAME="generateActualKey(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="generateActualKey(K, V)"><!-- --></A><H3>
333generateActualKey</H3>
334<PRE>
335protected <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A> <B>generateActualKey</B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
336                              <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value)</PRE>
337<DL>
338<DD>Generate the actual key from the given key/value. The default behavior is that
339 the actual key is equal to the given key
340<P>
341<DD><DL>
342<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the output data<DD><CODE>value</CODE> - the value of the output data
343<DT><B>Returns:</B><DD>the actual key derived from the given key/value</DL>
344</DD>
345</DL>
346<HR>
347
348<A NAME="generateActualValue(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="generateActualValue(K, V)"><!-- --></A><H3>
349generateActualValue</H3>
350<PRE>
351protected <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> <B>generateActualValue</B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>&nbsp;key,
352                                <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&nbsp;value)</PRE>
353<DL>
354<DD>Generate the actual value from the given key and value. The default behavior is that
355 the actual value is equal to the given value
356<P>
357<DD><DL>
358<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key of the output data<DD><CODE>value</CODE> - the value of the output data
359<DT><B>Returns:</B><DD>the actual value derived from the given key/value</DL>
360</DD>
361</DL>
362<HR>
363
364<A NAME="getInputFileBasedOutputFileName(org.apache.hadoop.mapred.JobConf, java.lang.String)"><!-- --></A><H3>
365getInputFileBasedOutputFileName</H3>
366<PRE>
367protected <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>getInputFileBasedOutputFileName</B>(<A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
368                                                 <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)</PRE>
369<DL>
370<DD>Generate the outfile name based on a given anme and the input file name. If
371 the map input file does not exists (i.e. this is not for a map only job),
372 the given name is returned unchanged. If the config value for
373 "num.of.trailing.legs.to.use" is not set, or set 0 or negative, the given
374 name is returned unchanged. Otherwise, return a file name consisting of the
375 N trailing legs of the input file name where N is the config value for
376 "num.of.trailing.legs.to.use".
377<P>
378<DD><DL>
379<DT><B>Parameters:</B><DD><CODE>job</CODE> - the job config<DD><CODE>name</CODE> - the output file name
380<DT><B>Returns:</B><DD>the outfile name based on a given anme and the input file name.</DL>
381</DD>
382</DL>
383<HR>
384
385<A NAME="getBaseRecordWriter(org.apache.hadoop.fs.FileSystem, org.apache.hadoop.mapred.JobConf, java.lang.String, org.apache.hadoop.util.Progressable)"><!-- --></A><H3>
386getBaseRecordWriter</H3>
387<PRE>
388protected abstract <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A>&gt; <B>getBaseRecordWriter</B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A>&nbsp;fs,
389                                                         <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job,
390                                                         <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,
391                                                         <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A>&nbsp;arg3)
392                                                  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>
393<DL>
394<DD><DL>
395<DT><B>Parameters:</B><DD><CODE>fs</CODE> - the file system to use<DD><CODE>job</CODE> - a job conf object<DD><CODE>name</CODE> - the name of the file over which a record writer object will be
396          constructed<DD><CODE>arg3</CODE> - a progressable object
397<DT><B>Returns:</B><DD>A RecordWriter object over the given file
398<DT><B>Throws:</B>
399<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>
400</DD>
401</DL>
402<!-- ========= END OF CLASS DATA ========= -->
403<HR>
404
405
406<!-- ======= START OF BOTTOM NAVBAR ====== -->
407<A NAME="navbar_bottom"><!-- --></A>
408<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
409<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
410<TR>
411<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
412<A NAME="navbar_bottom_firstrow"><!-- --></A>
413<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
414  <TR ALIGN="center" VALIGN="top">
415  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
416  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
417  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
418  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/MultipleOutputFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
419  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
420  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
421  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
422  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
423  </TR>
424</TABLE>
425</TD>
426<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
427</EM>
428</TD>
429</TR>
430
431<TR>
432<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
433&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleInputs.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A>&nbsp;
434&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputs.html" title="class in org.apache.hadoop.mapred.lib"><B>NEXT CLASS</B></A></FONT></TD>
435<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
436  <A HREF="../../../../../index.html?org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" target="_top"><B>FRAMES</B></A>  &nbsp;
437&nbsp;<A HREF="MultipleOutputFormat.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
438&nbsp;<SCRIPT type="text/javascript">
439  <!--
440  if(window==top) {
441    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
442  }
443  //-->
444</SCRIPT>
445<NOSCRIPT>
446  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
447</NOSCRIPT>
448
449
450</FONT></TD>
451</TR>
452<TR>
453<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
454  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
455<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
456DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
457</TR>
458</TABLE>
459<A NAME="skip-navbar_bottom"></A>
460<!-- ======== END OF BOTTOM NAVBAR ======= -->
461
462<HR>
463Copyright &copy; 2009 The Apache Software Foundation
464</BODY>
465</HTML>
Note: See TracBrowser for help on using the repository browser.