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 | FieldSelectionMapReduce (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="FieldSelectionMapReduce (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/FieldSelectionMapReduce.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/DelegatingMapper.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A> |
---|
59 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/HashPartitioner.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/FieldSelectionMapReduce.html" target="_top"><B>FRAMES</B></A> |
---|
62 | <A HREF="FieldSelectionMapReduce.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 | <A HREF="#field_summary">FIELD</A> | <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: <A HREF="#field_detail">FIELD</A> | <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 FieldSelectionMapReduce<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 "><B>org.apache.hadoop.mapred.lib.FieldSelectionMapReduce<K,V></B> |
---|
97 | </PRE> |
---|
98 | <DL> |
---|
99 | <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A>, <A HREF="../../../../../org/apache/hadoop/mapred/JobConfigurable.html" title="interface in org.apache.hadoop.mapred">JobConfigurable</A>, <A HREF="../../../../../org/apache/hadoop/mapred/Mapper.html" title="interface in org.apache.hadoop.mapred">Mapper</A><K,V,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>>, <A HREF="../../../../../org/apache/hadoop/mapred/Reducer.html" title="interface in org.apache.hadoop.mapred">Reducer</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>></DD> |
---|
100 | </DL> |
---|
101 | <HR> |
---|
102 | <DL> |
---|
103 | <DT><PRE>public class <B>FieldSelectionMapReduce<K,V></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><DT>implements <A HREF="../../../../../org/apache/hadoop/mapred/Mapper.html" title="interface in org.apache.hadoop.mapred">Mapper</A><K,V,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>>, <A HREF="../../../../../org/apache/hadoop/mapred/Reducer.html" title="interface in org.apache.hadoop.mapred">Reducer</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>></DL> |
---|
104 | </PRE> |
---|
105 | |
---|
106 | <P> |
---|
107 | This class implements a mapper/reducer class that can be used to perform |
---|
108 | field selections in a manner similar to unix cut. The input data is treated |
---|
109 | as fields separated by a user specified separator (the default value is |
---|
110 | "\t"). The user can specify a list of fields that form the map output keys, |
---|
111 | and a list of fields that form the map output values. If the inputformat is |
---|
112 | TextInputFormat, the mapper will ignore the key to the map function. and the |
---|
113 | fields are from the value only. Otherwise, the fields are the union of those |
---|
114 | from the key and those from the value. |
---|
115 | |
---|
116 | The field separator is under attribute "mapred.data.field.separator" |
---|
117 | |
---|
118 | The map output field list spec is under attribute "map.output.key.value.fields.spec". |
---|
119 | The value is expected to be like "keyFieldsSpec:valueFieldsSpec" |
---|
120 | key/valueFieldsSpec are comma (,) separated field spec: fieldSpec,fieldSpec,fieldSpec ... |
---|
121 | Each field spec can be a simple number (e.g. 5) specifying a specific field, or a range |
---|
122 | (like 2-5) to specify a range of fields, or an open range (like 3-) specifying all |
---|
123 | the fields starting from field 3. The open range field spec applies value fields only. |
---|
124 | They have no effect on the key fields. |
---|
125 | |
---|
126 | Here is an example: "4,3,0,1:6,5,1-3,7-". It specifies to use fields 4,3,0 and 1 for keys, |
---|
127 | and use fields 6,5,1,2,3,7 and above for values. |
---|
128 | |
---|
129 | The reduce output field list spec is under attribute "reduce.output.key.value.fields.spec". |
---|
130 | |
---|
131 | The reducer extracts output key/value pairs in a similar manner, except that |
---|
132 | the key is never ignored. |
---|
133 | <P> |
---|
134 | |
---|
135 | <P> |
---|
136 | <HR> |
---|
137 | |
---|
138 | <P> |
---|
139 | <!-- =========== FIELD SUMMARY =========== --> |
---|
140 | |
---|
141 | <A NAME="field_summary"><!-- --></A> |
---|
142 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
143 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
144 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
145 | <B>Field Summary</B></FONT></TH> |
---|
146 | </TR> |
---|
147 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
148 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
149 | <CODE>static org.apache.commons.logging.Log</CODE></FONT></TD> |
---|
150 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#LOG">LOG</A></B></CODE> |
---|
151 | |
---|
152 | <BR> |
---|
153 | </TD> |
---|
154 | </TR> |
---|
155 | </TABLE> |
---|
156 | |
---|
157 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
158 | |
---|
159 | <A NAME="constructor_summary"><!-- --></A> |
---|
160 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
161 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
162 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
163 | <B>Constructor Summary</B></FONT></TH> |
---|
164 | </TR> |
---|
165 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
166 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#FieldSelectionMapReduce()">FieldSelectionMapReduce</A></B>()</CODE> |
---|
167 | |
---|
168 | <BR> |
---|
169 | </TD> |
---|
170 | </TR> |
---|
171 | </TABLE> |
---|
172 | |
---|
173 | <!-- ========== METHOD SUMMARY =========== --> |
---|
174 | |
---|
175 | <A NAME="method_summary"><!-- --></A> |
---|
176 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
177 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
178 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
179 | <B>Method Summary</B></FONT></TH> |
---|
180 | </TR> |
---|
181 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
182 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
183 | <CODE> void</CODE></FONT></TD> |
---|
184 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#close()">close</A></B>()</CODE> |
---|
185 | |
---|
186 | <BR> |
---|
187 | </TD> |
---|
188 | </TR> |
---|
189 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
190 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
191 | <CODE> void</CODE></FONT></TD> |
---|
192 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#configure(org.apache.hadoop.mapred.JobConf)">configure</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> job)</CODE> |
---|
193 | |
---|
194 | <BR> |
---|
195 | Initializes a new instance from a <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred"><CODE>JobConf</CODE></A>.</TD> |
---|
196 | </TR> |
---|
197 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
198 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
199 | <CODE> void</CODE></FONT></TD> |
---|
200 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#map(K, V, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)">map</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">K</A> key, |
---|
201 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">V</A> val, |
---|
202 | <A HREF="../../../../../org/apache/hadoop/mapred/OutputCollector.html" title="interface in org.apache.hadoop.mapred">OutputCollector</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> output, |
---|
203 | <A HREF="../../../../../org/apache/hadoop/mapred/Reporter.html" title="interface in org.apache.hadoop.mapred">Reporter</A> reporter)</CODE> |
---|
204 | |
---|
205 | <BR> |
---|
206 | The identify function.</TD> |
---|
207 | </TR> |
---|
208 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
209 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
210 | <CODE> void</CODE></FONT></TD> |
---|
211 | <TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html#reduce(org.apache.hadoop.io.Text, java.util.Iterator, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)">reduce</A></B>(<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> key, |
---|
212 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> values, |
---|
213 | <A HREF="../../../../../org/apache/hadoop/mapred/OutputCollector.html" title="interface in org.apache.hadoop.mapred">OutputCollector</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> output, |
---|
214 | <A HREF="../../../../../org/apache/hadoop/mapred/Reporter.html" title="interface in org.apache.hadoop.mapred">Reporter</A> reporter)</CODE> |
---|
215 | |
---|
216 | <BR> |
---|
217 | <i>Reduces</i> values for a given key.</TD> |
---|
218 | </TR> |
---|
219 | </TABLE> |
---|
220 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
221 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
222 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
223 | <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> |
---|
224 | </TR> |
---|
225 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
226 | <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> |
---|
227 | </TR> |
---|
228 | </TABLE> |
---|
229 | |
---|
230 | <P> |
---|
231 | |
---|
232 | <!-- ============ FIELD DETAIL =========== --> |
---|
233 | |
---|
234 | <A NAME="field_detail"><!-- --></A> |
---|
235 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
236 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
237 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
238 | <B>Field Detail</B></FONT></TH> |
---|
239 | </TR> |
---|
240 | </TABLE> |
---|
241 | |
---|
242 | <A NAME="LOG"><!-- --></A><H3> |
---|
243 | LOG</H3> |
---|
244 | <PRE> |
---|
245 | public static final org.apache.commons.logging.Log <B>LOG</B></PRE> |
---|
246 | <DL> |
---|
247 | <DL> |
---|
248 | </DL> |
---|
249 | </DL> |
---|
250 | |
---|
251 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
252 | |
---|
253 | <A NAME="constructor_detail"><!-- --></A> |
---|
254 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
255 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
256 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
257 | <B>Constructor Detail</B></FONT></TH> |
---|
258 | </TR> |
---|
259 | </TABLE> |
---|
260 | |
---|
261 | <A NAME="FieldSelectionMapReduce()"><!-- --></A><H3> |
---|
262 | FieldSelectionMapReduce</H3> |
---|
263 | <PRE> |
---|
264 | public <B>FieldSelectionMapReduce</B>()</PRE> |
---|
265 | <DL> |
---|
266 | </DL> |
---|
267 | |
---|
268 | <!-- ============ METHOD DETAIL ========== --> |
---|
269 | |
---|
270 | <A NAME="method_detail"><!-- --></A> |
---|
271 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
272 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
273 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
274 | <B>Method Detail</B></FONT></TH> |
---|
275 | </TR> |
---|
276 | </TABLE> |
---|
277 | |
---|
278 | <A NAME="map(java.lang.Object,java.lang.Object,org.apache.hadoop.mapred.OutputCollector,org.apache.hadoop.mapred.Reporter)"><!-- --></A><A NAME="map(K, V, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)"><!-- --></A><H3> |
---|
279 | map</H3> |
---|
280 | <PRE> |
---|
281 | public void <B>map</B>(<A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">K</A> key, |
---|
282 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">V</A> val, |
---|
283 | <A HREF="../../../../../org/apache/hadoop/mapred/OutputCollector.html" title="interface in org.apache.hadoop.mapred">OutputCollector</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> output, |
---|
284 | <A HREF="../../../../../org/apache/hadoop/mapred/Reporter.html" title="interface in org.apache.hadoop.mapred">Reporter</A> reporter) |
---|
285 | 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> |
---|
286 | <DL> |
---|
287 | <DD>The identify function. Input key/value pair is written directly to output. |
---|
288 | <P> |
---|
289 | <DD><DL> |
---|
290 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/Mapper.html#map(K1, V1, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)">map</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/mapred/Mapper.html" title="interface in org.apache.hadoop.mapred">Mapper</A><<A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" title="type parameter in FieldSelectionMapReduce">V</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>></CODE></DL> |
---|
291 | </DD> |
---|
292 | <DD><DL> |
---|
293 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - the input key.<DD><CODE>val</CODE> - the input value.<DD><CODE>output</CODE> - collects mapped keys and values.<DD><CODE>reporter</CODE> - facility to report progress. |
---|
294 | <DT><B>Throws:</B> |
---|
295 | <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> |
---|
296 | </DD> |
---|
297 | </DL> |
---|
298 | <HR> |
---|
299 | |
---|
300 | <A NAME="configure(org.apache.hadoop.mapred.JobConf)"><!-- --></A><H3> |
---|
301 | configure</H3> |
---|
302 | <PRE> |
---|
303 | public void <B>configure</B>(<A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A> job)</PRE> |
---|
304 | <DL> |
---|
305 | <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/hadoop/mapred/JobConfigurable.html#configure(org.apache.hadoop.mapred.JobConf)">JobConfigurable</A></CODE></B></DD> |
---|
306 | <DD>Initializes a new instance from a <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred"><CODE>JobConf</CODE></A>. |
---|
307 | <P> |
---|
308 | <DD><DL> |
---|
309 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/JobConfigurable.html#configure(org.apache.hadoop.mapred.JobConf)">configure</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/mapred/JobConfigurable.html" title="interface in org.apache.hadoop.mapred">JobConfigurable</A></CODE></DL> |
---|
310 | </DD> |
---|
311 | <DD><DL> |
---|
312 | <DT><B>Parameters:</B><DD><CODE>job</CODE> - the configuration</DL> |
---|
313 | </DD> |
---|
314 | </DL> |
---|
315 | <HR> |
---|
316 | |
---|
317 | <A NAME="close()"><!-- --></A><H3> |
---|
318 | close</H3> |
---|
319 | <PRE> |
---|
320 | public void <B>close</B>() |
---|
321 | 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> |
---|
322 | <DL> |
---|
323 | <DD><DL> |
---|
324 | <DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</A></CODE> in interface <CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</A></CODE></DL> |
---|
325 | </DD> |
---|
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></DL> |
---|
330 | </DD> |
---|
331 | </DL> |
---|
332 | <HR> |
---|
333 | |
---|
334 | <A NAME="reduce(org.apache.hadoop.io.Text, java.util.Iterator, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)"><!-- --></A><H3> |
---|
335 | reduce</H3> |
---|
336 | <PRE> |
---|
337 | public void <B>reduce</B>(<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A> key, |
---|
338 | <A HREF="http://java.sun.com/javase/6/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> values, |
---|
339 | <A HREF="../../../../../org/apache/hadoop/mapred/OutputCollector.html" title="interface in org.apache.hadoop.mapred">OutputCollector</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>> output, |
---|
340 | <A HREF="../../../../../org/apache/hadoop/mapred/Reporter.html" title="interface in org.apache.hadoop.mapred">Reporter</A> reporter) |
---|
341 | 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> |
---|
342 | <DL> |
---|
343 | <DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/hadoop/mapred/Reducer.html#reduce(K2, java.util.Iterator, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)">Reducer</A></CODE></B></DD> |
---|
344 | <DD><i>Reduces</i> values for a given key. |
---|
345 | |
---|
346 | <p>The framework calls this method for each |
---|
347 | <code><key, (list of values)></code> pair in the grouped inputs. |
---|
348 | Output values must be of the same type as input values. Input keys must |
---|
349 | not be altered. The framework will <b>reuse</b> the key and value objects |
---|
350 | that are passed into the reduce, therefore the application should clone |
---|
351 | the objects they want to keep a copy of. In many cases, all values are |
---|
352 | combined into zero or one value. |
---|
353 | </p> |
---|
354 | |
---|
355 | <p>Output pairs are collected with calls to |
---|
356 | <A HREF="../../../../../org/apache/hadoop/mapred/OutputCollector.html#collect(K, V)"><CODE>OutputCollector.collect(Object,Object)</CODE></A>.</p> |
---|
357 | |
---|
358 | <p>Applications can use the <A HREF="../../../../../org/apache/hadoop/mapred/Reporter.html" title="interface in org.apache.hadoop.mapred"><CODE>Reporter</CODE></A> provided to report progress |
---|
359 | or just indicate that they are alive. In scenarios where the application |
---|
360 | takes an insignificant amount of time to process individual key/value |
---|
361 | pairs, this is crucial since the framework might assume that the task has |
---|
362 | timed-out and kill that task. The other way of avoiding this is to set |
---|
363 | <a href="../../../../../../mapred-default.html#mapred.task.timeout"> |
---|
364 | mapred.task.timeout</a> to a high-enough value (or even zero for no |
---|
365 | time-outs).</p> |
---|
366 | <P> |
---|
367 | <DD><DL> |
---|
368 | <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/Reducer.html#reduce(K2, java.util.Iterator, org.apache.hadoop.mapred.OutputCollector, org.apache.hadoop.mapred.Reporter)">reduce</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/mapred/Reducer.html" title="interface in org.apache.hadoop.mapred">Reducer</A><<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>,<A HREF="../../../../../org/apache/hadoop/io/Text.html" title="class in org.apache.hadoop.io">Text</A>></CODE></DL> |
---|
369 | </DD> |
---|
370 | <DD><DL> |
---|
371 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - the key.<DD><CODE>values</CODE> - the list of values to reduce.<DD><CODE>output</CODE> - to collect keys and combined values.<DD><CODE>reporter</CODE> - facility to report progress. |
---|
372 | <DT><B>Throws:</B> |
---|
373 | <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> |
---|
374 | </DD> |
---|
375 | </DL> |
---|
376 | <!-- ========= END OF CLASS DATA ========= --> |
---|
377 | <HR> |
---|
378 | |
---|
379 | |
---|
380 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
381 | <A NAME="navbar_bottom"><!-- --></A> |
---|
382 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
383 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
384 | <TR> |
---|
385 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
386 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
387 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
388 | <TR ALIGN="center" VALIGN="top"> |
---|
389 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
390 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
391 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
392 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FieldSelectionMapReduce.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
---|
393 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
394 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
395 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
396 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
397 | </TR> |
---|
398 | </TABLE> |
---|
399 | </TD> |
---|
400 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
401 | </EM> |
---|
402 | </TD> |
---|
403 | </TR> |
---|
404 | |
---|
405 | <TR> |
---|
406 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
407 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/DelegatingMapper.html" title="class in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A> |
---|
408 | <A HREF="../../../../../org/apache/hadoop/mapred/lib/HashPartitioner.html" title="class in org.apache.hadoop.mapred.lib"><B>NEXT CLASS</B></A></FONT></TD> |
---|
409 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
410 | <A HREF="../../../../../index.html?org/apache/hadoop/mapred/lib/FieldSelectionMapReduce.html" target="_top"><B>FRAMES</B></A> |
---|
411 | <A HREF="FieldSelectionMapReduce.html" target="_top"><B>NO FRAMES</B></A> |
---|
412 | <SCRIPT type="text/javascript"> |
---|
413 | <!-- |
---|
414 | if(window==top) { |
---|
415 | document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
416 | } |
---|
417 | //--> |
---|
418 | </SCRIPT> |
---|
419 | <NOSCRIPT> |
---|
420 | <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
421 | </NOSCRIPT> |
---|
422 | |
---|
423 | |
---|
424 | </FONT></TD> |
---|
425 | </TR> |
---|
426 | <TR> |
---|
427 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
428 | SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
429 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
430 | DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
431 | </TR> |
---|
432 | </TABLE> |
---|
433 | <A NAME="skip-navbar_bottom"></A> |
---|
434 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
435 | |
---|
436 | <HR> |
---|
437 | Copyright © 2009 The Apache Software Foundation |
---|
438 | </BODY> |
---|
439 | </HTML> |
---|