source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.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.7 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>
7InputSampler.SplitSampler (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="InputSampler.SplitSampler (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/InputSampler.SplitSampler.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/InputSampler.Sampler.html" title="interface in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InverseMapper.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/InputSampler.SplitSampler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="InputSampler.SplitSampler.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 InputSampler.SplitSampler&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 "><B>org.apache.hadoop.mapred.lib.InputSampler.SplitSampler&lt;K,V&gt;</B>
97</PRE>
98<DL>
99<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.Sampler.html" title="interface in org.apache.hadoop.mapred.lib">InputSampler.Sampler</A>&lt;K,V&gt;</DD>
100</DL>
101<DL>
102<DT><B>Enclosing class:</B><DD><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.html" title="class in org.apache.hadoop.mapred.lib">InputSampler</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.html" title="type parameter in InputSampler">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.html" title="type parameter in InputSampler">V</A>&gt;</DD>
103</DL>
104<HR>
105<DL>
106<DT><PRE>public static class <B>InputSampler.SplitSampler&lt;K,V&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/lib/InputSampler.Sampler.html" title="interface in org.apache.hadoop.mapred.lib">InputSampler.Sampler</A>&lt;K,V&gt;</DL>
107</PRE>
108
109<P>
110Samples the first n records from s splits.
111 Inexpensive way to sample random data.
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/InputSampler.SplitSampler.html#InputSampler.SplitSampler(int)">InputSampler.SplitSampler</A></B>(int&nbsp;numSamples)</CODE>
129
130<BR>
131&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a SplitSampler sampling <em>all</em> splits.</TD>
132</TR>
133<TR BGCOLOR="white" CLASS="TableRowColor">
134<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html#InputSampler.SplitSampler(int, int)">InputSampler.SplitSampler</A></B>(int&nbsp;numSamples,
135                          int&nbsp;maxSplitsSampled)</CODE>
136
137<BR>
138&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new SplitSampler.</TD>
139</TR>
140</TABLE>
141&nbsp;
142<!-- ========== METHOD SUMMARY =========== -->
143
144<A NAME="method_summary"><!-- --></A>
145<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
146<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
147<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
148<B>Method Summary</B></FONT></TH>
149</TR>
150<TR BGCOLOR="white" CLASS="TableRowColor">
151<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
152<CODE>&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">K</A>[]</CODE></FONT></TD>
153<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html#getSample(org.apache.hadoop.mapred.InputFormat, org.apache.hadoop.mapred.JobConf)">getSample</A></B>(<A HREF="../../../../../org/apache/hadoop/mapred/InputFormat.html" title="interface in org.apache.hadoop.mapred">InputFormat</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">V</A>&gt;&nbsp;inf,
154          <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job)</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;From each split sampled, take the first numSamples / numSplits records.</TD>
158</TR>
159</TABLE>
160&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
161<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
162<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
163<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>
164</TR>
165<TR BGCOLOR="white" CLASS="TableRowColor">
166<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>
167</TR>
168</TABLE>
169&nbsp;
170<P>
171
172<!-- ========= CONSTRUCTOR DETAIL ======== -->
173
174<A NAME="constructor_detail"><!-- --></A>
175<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
176<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
177<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
178<B>Constructor Detail</B></FONT></TH>
179</TR>
180</TABLE>
181
182<A NAME="InputSampler.SplitSampler(int)"><!-- --></A><H3>
183InputSampler.SplitSampler</H3>
184<PRE>
185public <B>InputSampler.SplitSampler</B>(int&nbsp;numSamples)</PRE>
186<DL>
187<DD>Create a SplitSampler sampling <em>all</em> splits.
188 Takes the first numSamples / numSplits records from each split.
189<P>
190<DL>
191<DT><B>Parameters:</B><DD><CODE>numSamples</CODE> - Total number of samples to obtain from all selected
192                   splits.</DL>
193</DL>
194<HR>
195
196<A NAME="InputSampler.SplitSampler(int, int)"><!-- --></A><H3>
197InputSampler.SplitSampler</H3>
198<PRE>
199public <B>InputSampler.SplitSampler</B>(int&nbsp;numSamples,
200                                 int&nbsp;maxSplitsSampled)</PRE>
201<DL>
202<DD>Create a new SplitSampler.
203<P>
204<DL>
205<DT><B>Parameters:</B><DD><CODE>numSamples</CODE> - Total number of samples to obtain from all selected
206                   splits.<DD><CODE>maxSplitsSampled</CODE> - The maximum number of splits to examine.</DL>
207</DL>
208
209<!-- ============ METHOD DETAIL ========== -->
210
211<A NAME="method_detail"><!-- --></A>
212<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
213<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
214<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
215<B>Method Detail</B></FONT></TH>
216</TR>
217</TABLE>
218
219<A NAME="getSample(org.apache.hadoop.mapred.InputFormat, org.apache.hadoop.mapred.JobConf)"><!-- --></A><H3>
220getSample</H3>
221<PRE>
222public <A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">K</A>[] <B>getSample</B>(<A HREF="../../../../../org/apache/hadoop/mapred/InputFormat.html" title="interface in org.apache.hadoop.mapred">InputFormat</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">V</A>&gt;&nbsp;inf,
223                     <A HREF="../../../../../org/apache/hadoop/mapred/JobConf.html" title="class in org.apache.hadoop.mapred">JobConf</A>&nbsp;job)
224              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>
225<DL>
226<DD>From each split sampled, take the first numSamples / numSplits records.
227<P>
228<DD><DL>
229<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.Sampler.html#getSample(org.apache.hadoop.mapred.InputFormat, org.apache.hadoop.mapred.JobConf)">getSample</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.Sampler.html" title="interface in org.apache.hadoop.mapred.lib">InputSampler.Sampler</A>&lt;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">K</A>,<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" title="type parameter in InputSampler.SplitSampler">V</A>&gt;</CODE></DL>
230</DD>
231<DD><DL>
232
233<DT><B>Throws:</B>
234<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>
235</DD>
236</DL>
237<!-- ========= END OF CLASS DATA ========= -->
238<HR>
239
240
241<!-- ======= START OF BOTTOM NAVBAR ====== -->
242<A NAME="navbar_bottom"><!-- --></A>
243<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
244<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
245<TR>
246<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
247<A NAME="navbar_bottom_firstrow"><!-- --></A>
248<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
249  <TR ALIGN="center" VALIGN="top">
250  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
251  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
252  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
253  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/InputSampler.SplitSampler.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
254  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
255  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
256  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
257  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
258  </TR>
259</TABLE>
260</TD>
261<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
262</EM>
263</TD>
264</TR>
265
266<TR>
267<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
268&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InputSampler.Sampler.html" title="interface in org.apache.hadoop.mapred.lib"><B>PREV CLASS</B></A>&nbsp;
269&nbsp;<A HREF="../../../../../org/apache/hadoop/mapred/lib/InverseMapper.html" title="class in org.apache.hadoop.mapred.lib"><B>NEXT CLASS</B></A></FONT></TD>
270<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
271  <A HREF="../../../../../index.html?org/apache/hadoop/mapred/lib/InputSampler.SplitSampler.html" target="_top"><B>FRAMES</B></A>  &nbsp;
272&nbsp;<A HREF="InputSampler.SplitSampler.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
273&nbsp;<SCRIPT type="text/javascript">
274  <!--
275  if(window==top) {
276    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
277  }
278  //-->
279</SCRIPT>
280<NOSCRIPT>
281  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
282</NOSCRIPT>
283
284
285</FONT></TD>
286</TR>
287<TR>
288<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
289  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
290<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
291DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
292</TR>
293</TABLE>
294<A NAME="skip-navbar_bottom"></A>
295<!-- ======== END OF BOTTOM NAVBAR ======= -->
296
297<HR>
298Copyright &copy; 2009 The Apache Software Foundation
299</BODY>
300</HTML>
Note: See TracBrowser for help on using the repository browser.