source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/examples/SecondarySort.FirstPartitioner.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.0 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.FirstPartitioner (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.FirstPartitioner (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.FirstPartitioner.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/SecondarySort.FirstGroupingComparator.html" title="class in org.apache.hadoop.examples"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.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.FirstPartitioner.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="SecondarySort.FirstPartitioner.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.examples</FONT>
92<BR>
93Class SecondarySort.FirstPartitioner</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/mapreduce/Partitioner.html" title="class in org.apache.hadoop.mapreduce">org.apache.hadoop.mapreduce.Partitioner</A>&lt;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A>,<A HREF="../../../../org/apache/hadoop/io/IntWritable.html" title="class in org.apache.hadoop.io">IntWritable</A>&gt;
97      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.examples.SecondarySort.FirstPartitioner</B>
98</PRE>
99<DL>
100<DT><B>Enclosing class:</B><DD><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.html" title="class in org.apache.hadoop.examples">SecondarySort</A></DD>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public static class <B>SecondarySort.FirstPartitioner</B><DT>extends <A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html" title="class in org.apache.hadoop.mapreduce">Partitioner</A>&lt;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A>,<A HREF="../../../../org/apache/hadoop/io/IntWritable.html" title="class in org.apache.hadoop.io">IntWritable</A>&gt;</DL>
105</PRE>
106
107<P>
108Partition based on the first part of the pair.
109<P>
110
111<P>
112<HR>
113
114<P>
115
116<!-- ======== CONSTRUCTOR SUMMARY ======== -->
117
118<A NAME="constructor_summary"><!-- --></A>
119<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
120<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
121<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
122<B>Constructor Summary</B></FONT></TH>
123</TR>
124<TR BGCOLOR="white" CLASS="TableRowColor">
125<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstPartitioner.html#SecondarySort.FirstPartitioner()">SecondarySort.FirstPartitioner</A></B>()</CODE>
126
127<BR>
128&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
129</TR>
130</TABLE>
131&nbsp;
132<!-- ========== METHOD SUMMARY =========== -->
133
134<A NAME="method_summary"><!-- --></A>
135<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
136<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
137<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
138<B>Method Summary</B></FONT></TH>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
142<CODE>&nbsp;int</CODE></FONT></TD>
143<TD><CODE><B><A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstPartitioner.html#getPartition(org.apache.hadoop.examples.SecondarySort.IntPair, org.apache.hadoop.io.IntWritable, int)">getPartition</A></B>(<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A>&nbsp;key,
144             <A HREF="../../../../org/apache/hadoop/io/IntWritable.html" title="class in org.apache.hadoop.io">IntWritable</A>&nbsp;value,
145             int&nbsp;numPartitions)</CODE>
146
147<BR>
148&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the partition number for a given key (hence record) given the total
149 number of partitions i.e.</TD>
150</TR>
151</TABLE>
152&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
153<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
154<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
155<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>
156</TR>
157<TR BGCOLOR="white" CLASS="TableRowColor">
158<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>
159</TR>
160</TABLE>
161&nbsp;
162<P>
163
164<!-- ========= CONSTRUCTOR DETAIL ======== -->
165
166<A NAME="constructor_detail"><!-- --></A>
167<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
168<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
169<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
170<B>Constructor Detail</B></FONT></TH>
171</TR>
172</TABLE>
173
174<A NAME="SecondarySort.FirstPartitioner()"><!-- --></A><H3>
175SecondarySort.FirstPartitioner</H3>
176<PRE>
177public <B>SecondarySort.FirstPartitioner</B>()</PRE>
178<DL>
179</DL>
180
181<!-- ============ METHOD DETAIL ========== -->
182
183<A NAME="method_detail"><!-- --></A>
184<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
185<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
186<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
187<B>Method Detail</B></FONT></TH>
188</TR>
189</TABLE>
190
191<A NAME="getPartition(org.apache.hadoop.examples.SecondarySort.IntPair, org.apache.hadoop.io.IntWritable, int)"><!-- --></A><H3>
192getPartition</H3>
193<PRE>
194public int <B>getPartition</B>(<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A>&nbsp;key,
195                        <A HREF="../../../../org/apache/hadoop/io/IntWritable.html" title="class in org.apache.hadoop.io">IntWritable</A>&nbsp;value,
196                        int&nbsp;numPartitions)</PRE>
197<DL>
198<DD><B>Description copied from class: <CODE><A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html#getPartition(KEY, VALUE, int)">Partitioner</A></CODE></B></DD>
199<DD>Get the partition number for a given key (hence record) given the total
200 number of partitions i.e. number of reduce-tasks for the job.
201   
202 <p>Typically a hash function on a all or a subset of the key.</p>
203<P>
204<DD><DL>
205<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html#getPartition(KEY, VALUE, int)">getPartition</A></CODE> in class <CODE><A HREF="../../../../org/apache/hadoop/mapreduce/Partitioner.html" title="class in org.apache.hadoop.mapreduce">Partitioner</A>&lt;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples">SecondarySort.IntPair</A>,<A HREF="../../../../org/apache/hadoop/io/IntWritable.html" title="class in org.apache.hadoop.io">IntWritable</A>&gt;</CODE></DL>
206</DD>
207<DD><DL>
208<DT><B>Parameters:</B><DD><CODE>key</CODE> - the key to be partioned.<DD><CODE>value</CODE> - the entry value.<DD><CODE>numPartitions</CODE> - the total number of partitions.
209<DT><B>Returns:</B><DD>the partition number for the <code>key</code>.</DL>
210</DD>
211</DL>
212<!-- ========= END OF CLASS DATA ========= -->
213<HR>
214
215
216<!-- ======= START OF BOTTOM NAVBAR ====== -->
217<A NAME="navbar_bottom"><!-- --></A>
218<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
219<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
220<TR>
221<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
222<A NAME="navbar_bottom_firstrow"><!-- --></A>
223<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
224  <TR ALIGN="center" VALIGN="top">
225  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
226  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
227  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
228  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/SecondarySort.FirstPartitioner.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
229  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
230  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
231  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
232  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
233  </TR>
234</TABLE>
235</TD>
236<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
237</EM>
238</TD>
239</TR>
240
241<TR>
242<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
243&nbsp;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.FirstGroupingComparator.html" title="class in org.apache.hadoop.examples"><B>PREV CLASS</B></A>&nbsp;
244&nbsp;<A HREF="../../../../org/apache/hadoop/examples/SecondarySort.IntPair.html" title="class in org.apache.hadoop.examples"><B>NEXT CLASS</B></A></FONT></TD>
245<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
246  <A HREF="../../../../index.html?org/apache/hadoop/examples/SecondarySort.FirstPartitioner.html" target="_top"><B>FRAMES</B></A>  &nbsp;
247&nbsp;<A HREF="SecondarySort.FirstPartitioner.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
248&nbsp;<SCRIPT type="text/javascript">
249  <!--
250  if(window==top) {
251    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
252  }
253  //-->
254</SCRIPT>
255<NOSCRIPT>
256  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
257</NOSCRIPT>
258
259
260</FONT></TD>
261</TR>
262<TR>
263<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
264  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
265<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
266DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
267</TR>
268</TABLE>
269<A NAME="skip-navbar_bottom"></A>
270<!-- ======== END OF BOTTOM NAVBAR ======= -->
271
272<HR>
273Copyright &copy; 2009 The Apache Software Foundation
274</BODY>
275</HTML>
Note: See TracBrowser for help on using the repository browser.