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> |
---|
7 | Mapper (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="Mapper (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/Mapper.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/mapreduce/MapContext.html" title="class in org.apache.hadoop.mapreduce"><B>PREV CLASS</B></A> |
---|
59 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce"><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/Mapper.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="Mapper.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: <A HREF="#nested_class_summary">NESTED</A> | 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.mapreduce</FONT> |
---|
92 | <BR> |
---|
93 | Class Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT></H2> |
---|
94 | <PRE> |
---|
95 | <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> |
---|
96 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.mapreduce.Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT></B> |
---|
97 | </PRE> |
---|
98 | <DL> |
---|
99 | <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../org/apache/hadoop/mapreduce/lib/map/InverseMapper.html" title="class in org.apache.hadoop.mapreduce.lib.map">InverseMapper</A>, <A HREF="../../../../org/apache/hadoop/mapreduce/lib/map/MultithreadedMapper.html" title="class in org.apache.hadoop.mapreduce.lib.map">MultithreadedMapper</A>, <A HREF="../../../../org/apache/hadoop/examples/SecondarySort.MapClass.html" title="class in org.apache.hadoop.examples">SecondarySort.MapClass</A>, <A HREF="../../../../org/apache/hadoop/mapreduce/lib/map/TokenCounterMapper.html" title="class in org.apache.hadoop.mapreduce.lib.map">TokenCounterMapper</A>, <A HREF="../../../../org/apache/hadoop/examples/WordCount.TokenizerMapper.html" title="class in org.apache.hadoop.examples">WordCount.TokenizerMapper</A></DD> |
---|
100 | </DL> |
---|
101 | <HR> |
---|
102 | <DL> |
---|
103 | <DT><PRE>public class <B>Mapper<KEYIN,VALUEIN,KEYOUT,VALUEOUT></B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL> |
---|
104 | </PRE> |
---|
105 | |
---|
106 | <P> |
---|
107 | Maps input key/value pairs to a set of intermediate key/value pairs. |
---|
108 | |
---|
109 | <p>Maps are the individual tasks which transform input records into a |
---|
110 | intermediate records. The transformed intermediate records need not be of |
---|
111 | the same type as the input records. A given input pair may map to zero or |
---|
112 | many output pairs.</p> |
---|
113 | |
---|
114 | <p>The Hadoop Map-Reduce framework spawns one map task for each |
---|
115 | <A HREF="../../../../org/apache/hadoop/mapreduce/InputSplit.html" title="class in org.apache.hadoop.mapreduce"><CODE>InputSplit</CODE></A> generated by the <A HREF="../../../../org/apache/hadoop/mapreduce/InputFormat.html" title="class in org.apache.hadoop.mapreduce"><CODE>InputFormat</CODE></A> for the job. |
---|
116 | <code>Mapper</code> implementations can access the <A HREF="../../../../org/apache/hadoop/conf/Configuration.html" title="class in org.apache.hadoop.conf"><CODE>Configuration</CODE></A> for |
---|
117 | the job via the <A HREF="../../../../org/apache/hadoop/mapreduce/JobContext.html#getConfiguration()"><CODE>JobContext.getConfiguration()</CODE></A>. |
---|
118 | |
---|
119 | <p>The framework first calls |
---|
120 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#setup(org.apache.hadoop.mapreduce.Mapper.Context)"><CODE>setup(org.apache.hadoop.mapreduce.Mapper.Context)</CODE></A>, followed by |
---|
121 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#map(KEYIN, VALUEIN, org.apache.hadoop.mapreduce.Mapper.Context)"><CODE>map(Object, Object, Context)</CODE></A> |
---|
122 | for each key/value pair in the <code>InputSplit</code>. Finally |
---|
123 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#cleanup(org.apache.hadoop.mapreduce.Mapper.Context)"><CODE>cleanup(Context)</CODE></A> is called.</p> |
---|
124 | |
---|
125 | <p>All intermediate values associated with a given output key are |
---|
126 | subsequently grouped by the framework, and passed to a <A HREF="../../../../org/apache/hadoop/mapreduce/Reducer.html" title="class in org.apache.hadoop.mapreduce"><CODE>Reducer</CODE></A> to |
---|
127 | determine the final output. Users can control the sorting and grouping by |
---|
128 | specifying two key <A HREF="../../../../org/apache/hadoop/io/RawComparator.html" title="interface in org.apache.hadoop.io"><CODE>RawComparator</CODE></A> classes.</p> |
---|
129 | |
---|
130 | <p>The <code>Mapper</code> outputs are partitioned per |
---|
131 | <code>Reducer</code>. Users can control which keys (and hence records) go to |
---|
132 | which <code>Reducer</code> by implementing a custom <A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html" title="class in org.apache.hadoop.mapreduce"><CODE>Partitioner</CODE></A>. |
---|
133 | |
---|
134 | <p>Users can optionally specify a <code>combiner</code>, via |
---|
135 | <A HREF="../../../../org/apache/hadoop/mapreduce/Job.html#setCombinerClass(java.lang.Class)"><CODE>Job.setCombinerClass(Class)</CODE></A>, to perform local aggregation of the |
---|
136 | intermediate outputs, which helps to cut down the amount of data transferred |
---|
137 | from the <code>Mapper</code> to the <code>Reducer</code>. |
---|
138 | |
---|
139 | <p>Applications can specify if and how the intermediate |
---|
140 | outputs are to be compressed and which <A HREF="../../../../org/apache/hadoop/io/compress/CompressionCodec.html" title="interface in org.apache.hadoop.io.compress"><CODE>CompressionCodec</CODE></A>s are to be |
---|
141 | used via the <code>Configuration</code>.</p> |
---|
142 | |
---|
143 | <p>If the job has zero |
---|
144 | reduces then the output of the <code>Mapper</code> is directly written |
---|
145 | to the <A HREF="../../../../org/apache/hadoop/mapreduce/OutputFormat.html" title="class in org.apache.hadoop.mapreduce"><CODE>OutputFormat</CODE></A> without sorting by keys.</p> |
---|
146 | |
---|
147 | <p>Example:</p> |
---|
148 | <p><blockquote><pre> |
---|
149 | public class TokenCounterMapper |
---|
150 | extends Mapper<Object, Text, Text, IntWritable>{ |
---|
151 | |
---|
152 | private final static IntWritable one = new IntWritable(1); |
---|
153 | private Text word = new Text(); |
---|
154 | |
---|
155 | public void map(Object key, Text value, Context context) throws IOException { |
---|
156 | StringTokenizer itr = new StringTokenizer(value.toString()); |
---|
157 | while (itr.hasMoreTokens()) { |
---|
158 | word.set(itr.nextToken()); |
---|
159 | context.collect(word, one); |
---|
160 | } |
---|
161 | } |
---|
162 | } |
---|
163 | </pre></blockquote></p> |
---|
164 | |
---|
165 | <p>Applications may override the <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#run(org.apache.hadoop.mapreduce.Mapper.Context)"><CODE>run(Context)</CODE></A> method to exert |
---|
166 | greater control on map processing e.g. multi-threaded <code>Mapper</code>s |
---|
167 | etc.</p> |
---|
168 | <P> |
---|
169 | |
---|
170 | <P> |
---|
171 | <DL> |
---|
172 | <DT><B>See Also:</B><DD><A HREF="../../../../org/apache/hadoop/mapreduce/InputFormat.html" title="class in org.apache.hadoop.mapreduce"><CODE>InputFormat</CODE></A>, |
---|
173 | <A HREF="../../../../org/apache/hadoop/mapreduce/JobContext.html" title="class in org.apache.hadoop.mapreduce"><CODE>JobContext</CODE></A>, |
---|
174 | <A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html" title="class in org.apache.hadoop.mapreduce"><CODE>Partitioner</CODE></A>, |
---|
175 | <A HREF="../../../../org/apache/hadoop/mapreduce/Reducer.html" title="class in org.apache.hadoop.mapreduce"><CODE>Reducer</CODE></A></DL> |
---|
176 | <HR> |
---|
177 | |
---|
178 | <P> |
---|
179 | <!-- ======== NESTED CLASS SUMMARY ======== --> |
---|
180 | |
---|
181 | <A NAME="nested_class_summary"><!-- --></A> |
---|
182 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
183 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
184 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
185 | <B>Nested Class Summary</B></FONT></TH> |
---|
186 | </TR> |
---|
187 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
188 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
189 | <CODE> class</CODE></FONT></TD> |
---|
190 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A></B></CODE> |
---|
191 | |
---|
192 | <BR> |
---|
193 | </TD> |
---|
194 | </TR> |
---|
195 | </TABLE> |
---|
196 | |
---|
197 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
198 | |
---|
199 | <A NAME="constructor_summary"><!-- --></A> |
---|
200 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
201 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
202 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
203 | <B>Constructor Summary</B></FONT></TH> |
---|
204 | </TR> |
---|
205 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
206 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#Mapper()">Mapper</A></B>()</CODE> |
---|
207 | |
---|
208 | <BR> |
---|
209 | </TD> |
---|
210 | </TR> |
---|
211 | </TABLE> |
---|
212 | |
---|
213 | <!-- ========== METHOD SUMMARY =========== --> |
---|
214 | |
---|
215 | <A NAME="method_summary"><!-- --></A> |
---|
216 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
217 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
218 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
219 | <B>Method Summary</B></FONT></TH> |
---|
220 | </TR> |
---|
221 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
222 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
223 | <CODE>protected void</CODE></FONT></TD> |
---|
224 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#cleanup(org.apache.hadoop.mapreduce.Mapper.Context)">cleanup</A></B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context)</CODE> |
---|
225 | |
---|
226 | <BR> |
---|
227 | Called once at the end of the task.</TD> |
---|
228 | </TR> |
---|
229 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
230 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
231 | <CODE>protected void</CODE></FONT></TD> |
---|
232 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#map(KEYIN, VALUEIN, org.apache.hadoop.mapreduce.Mapper.Context)">map</A></B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html" title="type parameter in Mapper">KEYIN</A> key, |
---|
233 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html" title="type parameter in Mapper">VALUEIN</A> value, |
---|
234 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context)</CODE> |
---|
235 | |
---|
236 | <BR> |
---|
237 | Called once for each key/value pair in the input split.</TD> |
---|
238 | </TR> |
---|
239 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
240 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
241 | <CODE> void</CODE></FONT></TD> |
---|
242 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#run(org.apache.hadoop.mapreduce.Mapper.Context)">run</A></B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context)</CODE> |
---|
243 | |
---|
244 | <BR> |
---|
245 | Expert users can override this method for more complete control over the |
---|
246 | execution of the Mapper.</TD> |
---|
247 | </TR> |
---|
248 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
249 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
250 | <CODE>protected void</CODE></FONT></TD> |
---|
251 | <TD><CODE><B><A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html#setup(org.apache.hadoop.mapreduce.Mapper.Context)">setup</A></B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context)</CODE> |
---|
252 | |
---|
253 | <BR> |
---|
254 | Called once at the beginning of the task.</TD> |
---|
255 | </TR> |
---|
256 | </TABLE> |
---|
257 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
258 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
259 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
260 | <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> |
---|
261 | </TR> |
---|
262 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
263 | <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> |
---|
264 | </TR> |
---|
265 | </TABLE> |
---|
266 | |
---|
267 | <P> |
---|
268 | |
---|
269 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
270 | |
---|
271 | <A NAME="constructor_detail"><!-- --></A> |
---|
272 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
273 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
274 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
275 | <B>Constructor Detail</B></FONT></TH> |
---|
276 | </TR> |
---|
277 | </TABLE> |
---|
278 | |
---|
279 | <A NAME="Mapper()"><!-- --></A><H3> |
---|
280 | Mapper</H3> |
---|
281 | <PRE> |
---|
282 | public <B>Mapper</B>()</PRE> |
---|
283 | <DL> |
---|
284 | </DL> |
---|
285 | |
---|
286 | <!-- ============ METHOD DETAIL ========== --> |
---|
287 | |
---|
288 | <A NAME="method_detail"><!-- --></A> |
---|
289 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
290 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
291 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
292 | <B>Method Detail</B></FONT></TH> |
---|
293 | </TR> |
---|
294 | </TABLE> |
---|
295 | |
---|
296 | <A NAME="setup(org.apache.hadoop.mapreduce.Mapper.Context)"><!-- --></A><H3> |
---|
297 | setup</H3> |
---|
298 | <PRE> |
---|
299 | protected void <B>setup</B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context) |
---|
300 | 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>, |
---|
301 | <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> |
---|
302 | <DL> |
---|
303 | <DD>Called once at the beginning of the task. |
---|
304 | <P> |
---|
305 | <DD><DL> |
---|
306 | |
---|
307 | <DT><B>Throws:</B> |
---|
308 | <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> |
---|
309 | <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> |
---|
310 | </DD> |
---|
311 | </DL> |
---|
312 | <HR> |
---|
313 | |
---|
314 | <A NAME="map(java.lang.Object,java.lang.Object,org.apache.hadoop.mapreduce.Mapper.Context)"><!-- --></A><A NAME="map(KEYIN, VALUEIN, org.apache.hadoop.mapreduce.Mapper.Context)"><!-- --></A><H3> |
---|
315 | map</H3> |
---|
316 | <PRE> |
---|
317 | protected void <B>map</B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html" title="type parameter in Mapper">KEYIN</A> key, |
---|
318 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.html" title="type parameter in Mapper">VALUEIN</A> value, |
---|
319 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context) |
---|
320 | 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>, |
---|
321 | <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> |
---|
322 | <DL> |
---|
323 | <DD>Called once for each key/value pair in the input split. Most applications |
---|
324 | should override this, but the default is the identity function. |
---|
325 | <P> |
---|
326 | <DD><DL> |
---|
327 | |
---|
328 | <DT><B>Throws:</B> |
---|
329 | <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> |
---|
330 | <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> |
---|
331 | </DD> |
---|
332 | </DL> |
---|
333 | <HR> |
---|
334 | |
---|
335 | <A NAME="cleanup(org.apache.hadoop.mapreduce.Mapper.Context)"><!-- --></A><H3> |
---|
336 | cleanup</H3> |
---|
337 | <PRE> |
---|
338 | protected void <B>cleanup</B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context) |
---|
339 | 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>, |
---|
340 | <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> |
---|
341 | <DL> |
---|
342 | <DD>Called once at the end of the task. |
---|
343 | <P> |
---|
344 | <DD><DL> |
---|
345 | |
---|
346 | <DT><B>Throws:</B> |
---|
347 | <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> |
---|
348 | <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> |
---|
349 | </DD> |
---|
350 | </DL> |
---|
351 | <HR> |
---|
352 | |
---|
353 | <A NAME="run(org.apache.hadoop.mapreduce.Mapper.Context)"><!-- --></A><H3> |
---|
354 | run</H3> |
---|
355 | <PRE> |
---|
356 | public void <B>run</B>(<A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce">Mapper.Context</A> context) |
---|
357 | 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>, |
---|
358 | <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> |
---|
359 | <DL> |
---|
360 | <DD>Expert users can override this method for more complete control over the |
---|
361 | execution of the Mapper. |
---|
362 | <P> |
---|
363 | <DD><DL> |
---|
364 | <DT><B>Parameters:</B><DD><CODE>context</CODE> - |
---|
365 | <DT><B>Throws:</B> |
---|
366 | <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> |
---|
367 | <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> |
---|
368 | </DD> |
---|
369 | </DL> |
---|
370 | <!-- ========= END OF CLASS DATA ========= --> |
---|
371 | <HR> |
---|
372 | |
---|
373 | |
---|
374 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
375 | <A NAME="navbar_bottom"><!-- --></A> |
---|
376 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
377 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
378 | <TR> |
---|
379 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
380 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
381 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
382 | <TR ALIGN="center" VALIGN="top"> |
---|
383 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
384 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
385 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
386 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Mapper.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
387 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
388 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
389 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
390 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
391 | </TR> |
---|
392 | </TABLE> |
---|
393 | </TD> |
---|
394 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
395 | </EM> |
---|
396 | </TD> |
---|
397 | </TR> |
---|
398 | |
---|
399 | <TR> |
---|
400 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
401 | <A HREF="../../../../org/apache/hadoop/mapreduce/MapContext.html" title="class in org.apache.hadoop.mapreduce"><B>PREV CLASS</B></A> |
---|
402 | <A HREF="../../../../org/apache/hadoop/mapreduce/Mapper.Context.html" title="class in org.apache.hadoop.mapreduce"><B>NEXT CLASS</B></A></FONT></TD> |
---|
403 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
404 | <A HREF="../../../../index.html?org/apache/hadoop/mapreduce/Mapper.html" target="_top"><B>FRAMES</B></A> |
---|
405 | <A HREF="Mapper.html" target="_top"><B>NO FRAMES</B></A> |
---|
406 | <SCRIPT type="text/javascript"> |
---|
407 | <!-- |
---|
408 | if(window==top) { |
---|
409 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
410 | } |
---|
411 | //--> |
---|
412 | </SCRIPT> |
---|
413 | <NOSCRIPT> |
---|
414 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
415 | </NOSCRIPT> |
---|
416 | |
---|
417 | |
---|
418 | </FONT></TD> |
---|
419 | </TR> |
---|
420 | <TR> |
---|
421 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
422 | SUMMARY: <A HREF="#nested_class_summary">NESTED</A> | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
423 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
424 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
425 | </TR> |
---|
426 | </TABLE> |
---|
427 | <A NAME="skip-navbar_bottom"></A> |
---|
428 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
429 | |
---|
430 | <HR> |
---|
431 | Copyright © 2009 The Apache Software Foundation |
---|
432 | </BODY> |
---|
433 | </HTML> |
---|