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