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> |
---|
7 | MultipleOutputFormat (Hadoop 0.20.1 API) |
---|
8 | </TITLE> |
---|
9 | |
---|
10 | <META NAME="date" CONTENT="2009-09-01"> |
---|
11 | |
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
---|
13 | |
---|
14 | <SCRIPT type="text/javascript"> |
---|
15 | function windowTitle() |
---|
16 | { |
---|
17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
18 | parent.document.title="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> </TD> |
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultipleOutputFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
47 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
48 | </TR> |
---|
49 | </TABLE> |
---|
50 | </TD> |
---|
51 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
52 | </EM> |
---|
53 | </TD> |
---|
54 | </TR> |
---|
55 | |
---|
56 | <TR> |
---|
57 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
58 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleInputs.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A> |
---|
59 | <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> |
---|
62 | <A HREF="MultipleOutputFormat.html" target="_top"><B>NO FRAMES</B></A> |
---|
63 | <SCRIPT type="text/javascript"> |
---|
64 | <!-- |
---|
65 | if(window==top) { |
---|
66 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
67 | } |
---|
68 | //--> |
---|
69 | </SCRIPT> |
---|
70 | <NOSCRIPT> |
---|
71 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
72 | </NOSCRIPT> |
---|
73 | |
---|
74 | |
---|
75 | </FONT></TD> |
---|
76 | </TR> |
---|
77 | <TR> |
---|
78 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
79 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
80 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
81 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
82 | </TR> |
---|
83 | </TABLE> |
---|
84 | <A NAME="skip-navbar_top"></A> |
---|
85 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
86 | |
---|
87 | <HR> |
---|
88 | <!-- ======== START OF CLASS DATA ======== --> |
---|
89 | <H2> |
---|
90 | <FONT SIZE="-1"> |
---|
91 | org.apache.hadoop.mapred.lib</FONT> |
---|
92 | <BR> |
---|
93 | Class MultipleOutputFormat<K,V></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><K,V> |
---|
97 | <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.mapred.lib.MultipleOutputFormat<K,V></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><K,V></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<K,V></B><DT>extends <A HREF="../../../../../org/apache/hadoop/mapred/FileOutputFormat.html" title="class in org.apache.hadoop.mapred">FileOutputFormat</A><K,V></DL> |
---|
108 | </PRE> |
---|
109 | |
---|
110 | <P> |
---|
111 | This 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 | </TD> |
---|
146 | </TR> |
---|
147 | </TABLE> |
---|
148 | |
---|
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 <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> key, |
---|
161 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> value)</CODE> |
---|
162 | |
---|
163 | <BR> |
---|
164 | 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 <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> key, |
---|
170 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> value)</CODE> |
---|
171 | |
---|
172 | <BR> |
---|
173 | 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 <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> key, |
---|
179 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> 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> name)</CODE> |
---|
181 | |
---|
182 | <BR> |
---|
183 | 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 <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> name)</CODE> |
---|
190 | |
---|
191 | <BR> |
---|
192 | 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 <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A><<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>></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> fs, |
---|
198 | <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> 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> name, |
---|
200 | <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A> arg3)</CODE> |
---|
201 | |
---|
202 | <BR> |
---|
203 | </TD> |
---|
204 | </TR> |
---|
205 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
206 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
207 | <CODE>protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
---|
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> 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> name)</CODE> |
---|
210 | |
---|
211 | <BR> |
---|
212 | 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> <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A><<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>></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> fs, |
---|
218 | <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> 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> name, |
---|
220 | <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A> arg3)</CODE> |
---|
221 | |
---|
222 | <BR> |
---|
223 | Create a composite record writer that can write key/value data to different |
---|
224 | output files</TD> |
---|
225 | </TR> |
---|
226 | </TABLE> |
---|
227 | <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 | <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 | |
---|
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> |
---|
259 | MultipleOutputFormat</H3> |
---|
260 | <PRE> |
---|
261 | public <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> |
---|
276 | getRecordWriter</H3> |
---|
277 | <PRE> |
---|
278 | public <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A><<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>> <B>getRecordWriter</B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A> fs, |
---|
279 | <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> 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> name, |
---|
281 | <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A> 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><<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>></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><<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>></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> |
---|
300 | generateLeafFileName</H3> |
---|
301 | <PRE> |
---|
302 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>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> 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> |
---|
315 | generateFileNameForKeyValue</H3> |
---|
316 | <PRE> |
---|
317 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>generateFileNameForKeyValue</B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">K</A> key, |
---|
318 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> 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> 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> |
---|
333 | generateActualKey</H3> |
---|
334 | <PRE> |
---|
335 | protected <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> key, |
---|
336 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> 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> |
---|
349 | generateActualValue</H3> |
---|
350 | <PRE> |
---|
351 | protected <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> key, |
---|
352 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleOutputFormat.html" title="type parameter in MultipleOutputFormat">V</A> 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> |
---|
365 | getInputFileBasedOutputFileName</H3> |
---|
366 | <PRE> |
---|
367 | protected <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getInputFileBasedOutputFileName</B>(<A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> 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> 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> |
---|
386 | getBaseRecordWriter</H3> |
---|
387 | <PRE> |
---|
388 | protected abstract <A HREF="../../../../../org/apache/hadoop/mapred/RecordWriter.html" title="interface in org.apache.hadoop.mapred">RecordWriter</A><<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>> <B>getBaseRecordWriter</B>(<A HREF="../../../../../org/apache/hadoop/fs/FileSystem.html" title="class in org.apache.hadoop.fs">FileSystem</A> fs, |
---|
389 | <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> 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> name, |
---|
391 | <A HREF="../../../../../org/apache/hadoop/util/Progressable.html" title="interface in org.apache.hadoop.util">Progressable</A> 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> </TD> |
---|
416 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
417 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
418 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MultipleOutputFormat.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
419 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
420 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
421 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
422 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/MultipleInputs.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A> |
---|
434 | <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> |
---|
437 | <A HREF="MultipleOutputFormat.html" target="_top"><B>NO FRAMES</B></A> |
---|
438 | <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
455 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
456 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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> |
---|
463 | Copyright © 2009 The Apache Software Foundation |
---|
464 | </BODY> |
---|
465 | </HTML> |
---|