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