source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/examples/SecondarySort.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 15.3 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:58 UTC 2009 -->
6<TITLE>
7SecondarySort (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="SecondarySort (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SecondarySort.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../org/apache/hadoop/examples/RandomWriter.html" title="class in org.apache.hadoop.examples"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstGroupingComparator.html" title="class in org.apache.hadoop.examples"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../index.html?org/apache/hadoop/examples/SecondarySort.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="SecondarySort.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.examples</FONT>
92<BR>
93Class SecondarySort</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.examples.SecondarySort</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public class <B>SecondarySort</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>
101</PRE>
102
103<P>
104This is an example Hadoop Map/Reduce application.
105 It reads the text input files that must contain two integers per a line.
106 The output is sorted by the first and second number and grouped on the
107 first number.
108
109 To run: bin/hadoop jar build/hadoop-examples.jar secondarysort
110            <i>in-dir</i> <i>out-dir</i>
111<P>
112
113<P>
114<HR>
115
116<P>
117<!-- ======== NESTED CLASS SUMMARY ======== -->
118
119<A NAME="nested_class_summary"><!-- --></A>
120<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
121<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
122<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
123<B>Nested Class Summary</B></FONT></TH>
124</TR>
125<TR BGCOLOR="white" CLASS="TableRowColor">
126<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
127<CODE>static&nbsp;class</CODE></FONT></TD>
128<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstGroupingComparator.html" title="class in org.apache.hadoop.examples">SecondarySort.FirstGroupingComparator</A></B></CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compare only the first part of the pair, so that reduce is called once
132 for each value of the first part.</TD>
133</TR>
134<TR BGCOLOR="white" CLASS="TableRowColor">
135<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
136<CODE>static&nbsp;class</CODE></FONT></TD>
137<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstPartitioner.html" title="class in org.apache.hadoop.examples">SecondarySort.FirstPartitioner</A></B></CODE>
138
139<BR>
140&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Partition based on the first part of the pair.</TD>
141</TR>
142<TR BGCOLOR="white" CLASS="TableRowColor">
143<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
144<CODE>static&nbsp;class</CODE></FONT></TD>
145<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A></B></CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Define a pair of integers that are writable.</TD>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>static&nbsp;class</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.MapClass.html" title="class in org.apache.hadoop.examples">SecondarySort.MapClass</A></B></CODE>
154
155<BR>
156&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read two integers from each line and generate a key, value pair
157 as ((left, right), right).</TD>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
161<CODE>static&nbsp;class</CODE></FONT></TD>
162<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.Reduce.html" title="class in org.apache.hadoop.examples">SecondarySort.Reduce</A></B></CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;A reducer class that just emits the sum of the input values.</TD>
166</TR>
167</TABLE>
168&nbsp;
169<!-- ======== CONSTRUCTOR SUMMARY ======== -->
170
171<A NAME="constructor_summary"><!-- --></A>
172<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
173<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
174<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
175<B>Constructor Summary</B></FONT></TH>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.html#SecondarySort()">SecondarySort</A></B>()</CODE>
179
180<BR>
181&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
182</TR>
183</TABLE>
184&nbsp;
185<!-- ========== METHOD SUMMARY =========== -->
186
187<A NAME="method_summary"><!-- --></A>
188<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
189<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
190<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
191<B>Method Summary</B></FONT></TH>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>static&nbsp;void</CODE></FONT></TD>
196<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.html#main(java.lang.String[])">main</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;args)</CODE>
197
198<BR>
199&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
200</TR>
201</TABLE>
202&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
203<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
204<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
205<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>
206</TR>
207<TR BGCOLOR="white" CLASS="TableRowColor">
208<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>
209</TR>
210</TABLE>
211&nbsp;
212<P>
213
214<!-- ========= CONSTRUCTOR DETAIL ======== -->
215
216<A NAME="constructor_detail"><!-- --></A>
217<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
218<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
219<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
220<B>Constructor Detail</B></FONT></TH>
221</TR>
222</TABLE>
223
224<A NAME="SecondarySort()"><!-- --></A><H3>
225SecondarySort</H3>
226<PRE>
227public <B>SecondarySort</B>()</PRE>
228<DL>
229</DL>
230
231<!-- ============ METHOD DETAIL ========== -->
232
233<A NAME="method_detail"><!-- --></A>
234<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
235<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
236<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
237<B>Method Detail</B></FONT></TH>
238</TR>
239</TABLE>
240
241<A NAME="main(java.lang.String[])"><!-- --></A><H3>
242main</H3>
243<PRE>
244public static void <B>main</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[]&nbsp;args)
245                 throws <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></PRE>
246<DL>
247<DD><DL>
248
249<DT><B>Throws:</B>
250<DD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</A></CODE></DL>
251</DD>
252</DL>
253<!-- ========= END OF CLASS DATA ========= -->
254<HR>
255
256
257<!-- ======= START OF BOTTOM NAVBAR ====== -->
258<A NAME="navbar_bottom"><!-- --></A>
259<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
260<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
261<TR>
262<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
263<A NAME="navbar_bottom_firstrow"><!-- --></A>
264<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
265  <TR ALIGN="center" VALIGN="top">
266  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
267  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
268  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
269  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SecondarySort.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
270  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
271  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
272  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
273  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
274  </TR>
275</TABLE>
276</TD>
277<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
278</EM>
279</TD>
280</TR>
281
282<TR>
283<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
284&nbsp;<A HREF="../../../../org/apache/hadoop/examples/RandomWriter.html" title="class in org.apache.hadoop.examples"><B>PREV CLASS</B></A>&nbsp;
285&nbsp;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstGroupingComparator.html" title="class in org.apache.hadoop.examples"><B>NEXT CLASS</B></A></FONT></TD>
286<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
287  <A HREF="../../../../index.html?org/apache/hadoop/examples/SecondarySort.html" target="_top"><B>FRAMES</B></A>  &nbsp;
288&nbsp;<A HREF="SecondarySort.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
289&nbsp;<SCRIPT type="text/javascript">
290  <!--
291  if(window==top) {
292    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
293  }
294  //-->
295</SCRIPT>
296<NOSCRIPT>
297  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
298</NOSCRIPT>
299
300
301</FONT></TD>
302</TR>
303<TR>
304<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
305  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
306<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
307DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
308</TR>
309</TABLE>
310<A NAME="skip-navbar_bottom"></A>
311<!-- ======== END OF BOTTOM NAVBAR ======= -->
312
313<HR>
314Copyright &copy; 2009 The Apache Software Foundation
315</BODY>
316</HTML>
Note: See TracBrowser for help on using the repository browser.