source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/util/bloom/CountingBloomFilter.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: 32.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:55 UTC 2009 -->
6<TITLE>
7CountingBloomFilter (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="CountingBloomFilter (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/CountingBloomFilter.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/util/bloom/BloomFilter.html" title="class in org.apache.hadoop.util.bloom"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/DynamicBloomFilter.html" title="class in org.apache.hadoop.util.bloom"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/util/bloom/CountingBloomFilter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="CountingBloomFilter.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;<A HREF="#fields_inherited_from_class_org.apache.hadoop.util.bloom.Filter">FIELD</A>&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.util.bloom</FONT>
92<BR>
93Class CountingBloomFilter</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/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">org.apache.hadoop.util.bloom.Filter</A>
97      <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.util.bloom.CountingBloomFilter</B>
98</PRE>
99<DL>
100<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A></DD>
101</DL>
102<HR>
103<DL>
104<DT><PRE>public final class <B>CountingBloomFilter</B><DT>extends <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></DL>
105</PRE>
106
107<P>
108Implements a <i>counting Bloom filter</i>, as defined by Fan et al. in a ToN
109 2000 paper.
110 <p>
111 A counting Bloom filter is an improvement to standard a Bloom filter as it
112 allows dynamic additions and deletions of set membership information.  This
113 is achieved through the use of a counting vector instead of a bit vector.
114 <p>
115 Originally created by
116 <a href="http://www.one-lab.org">European Commission One-Lab Project 034819</a>.
117<P>
118
119<P>
120<DL>
121<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom"><CODE>The general behavior of a filter</CODE></A>,
122<a href="http://portal.acm.org/citation.cfm?id=343571.343572">Summary cache: a scalable wide-area web cache sharing protocol</a></DL>
123<HR>
124
125<P>
126<!-- =========== FIELD SUMMARY =========== -->
127
128<A NAME="field_summary"><!-- --></A>
129<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
130<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
131<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
132<B>Field Summary</B></FONT></TH>
133</TR>
134</TABLE>
135&nbsp;<A NAME="fields_inherited_from_class_org.apache.hadoop.util.bloom.Filter"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
138<TH ALIGN="left"><B>Fields inherited from class org.apache.hadoop.util.bloom.<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></B></TH>
139</TR>
140<TR BGCOLOR="white" CLASS="TableRowColor">
141<TD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#hash">hash</A>, <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#hashType">hashType</A>, <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#nbHash">nbHash</A>, <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#vectorSize">vectorSize</A></CODE></TD>
142</TR>
143</TABLE>
144&nbsp;
145<!-- ======== CONSTRUCTOR SUMMARY ======== -->
146
147<A NAME="constructor_summary"><!-- --></A>
148<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
149<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
150<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
151<B>Constructor Summary</B></FONT></TH>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#CountingBloomFilter()">CountingBloomFilter</A></B>()</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default constructor - use with readFields</TD>
158</TR>
159<TR BGCOLOR="white" CLASS="TableRowColor">
160<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#CountingBloomFilter(int, int, int)">CountingBloomFilter</A></B>(int&nbsp;vectorSize,
161                    int&nbsp;nbHash,
162                    int&nbsp;hashType)</CODE>
163
164<BR>
165&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor</TD>
166</TR>
167</TABLE>
168&nbsp;
169<!-- ========== METHOD SUMMARY =========== -->
170
171<A NAME="method_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>Method Summary</B></FONT></TH>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179<CODE>&nbsp;void</CODE></FONT></TD>
180<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#add(org.apache.hadoop.util.bloom.Key)">add</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a key to <i>this</i> filter.</TD>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>&nbsp;void</CODE></FONT></TD>
188<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#and(org.apache.hadoop.util.bloom.Filter)">and</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peforms a logical AND between <i>this</i> filter and a specified filter.</TD>
192</TR>
193<TR BGCOLOR="white" CLASS="TableRowColor">
194<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195<CODE>&nbsp;int</CODE></FONT></TD>
196<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#approximateCount(org.apache.hadoop.util.bloom.Key)">approximateCount</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</CODE>
197
198<BR>
199&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This method calculates an approximate count of the key, i.e.</TD>
200</TR>
201<TR BGCOLOR="white" CLASS="TableRowColor">
202<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203<CODE>&nbsp;void</CODE></FONT></TD>
204<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#delete(org.apache.hadoop.util.bloom.Key)">delete</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</CODE>
205
206<BR>
207&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes a specified key from <i>this</i> counting Bloom filter.</TD>
208</TR>
209<TR BGCOLOR="white" CLASS="TableRowColor">
210<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211<CODE>&nbsp;boolean</CODE></FONT></TD>
212<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#membershipTest(org.apache.hadoop.util.bloom.Key)">membershipTest</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</CODE>
213
214<BR>
215&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines wether a specified key belongs to <i>this</i> filter.</TD>
216</TR>
217<TR BGCOLOR="white" CLASS="TableRowColor">
218<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219<CODE>&nbsp;void</CODE></FONT></TD>
220<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#not()">not</A></B>()</CODE>
221
222<BR>
223&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Performs a logical NOT on <i>this</i> filter.</TD>
224</TR>
225<TR BGCOLOR="white" CLASS="TableRowColor">
226<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
227<CODE>&nbsp;void</CODE></FONT></TD>
228<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#or(org.apache.hadoop.util.bloom.Filter)">or</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</CODE>
229
230<BR>
231&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peforms a logical OR between <i>this</i> filter and a specified filter.</TD>
232</TR>
233<TR BGCOLOR="white" CLASS="TableRowColor">
234<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
235<CODE>&nbsp;void</CODE></FONT></TD>
236<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#readFields(java.io.DataInput)">readFields</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A>&nbsp;in)</CODE>
237
238<BR>
239&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Deserialize the fields of this object from <code>in</code>.</TD>
240</TR>
241<TR BGCOLOR="white" CLASS="TableRowColor">
242<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
243<CODE>&nbsp;<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></CODE></FONT></TD>
244<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#toString()">toString</A></B>()</CODE>
245
246<BR>
247&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
248</TR>
249<TR BGCOLOR="white" CLASS="TableRowColor">
250<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
251<CODE>&nbsp;void</CODE></FONT></TD>
252<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#write(java.io.DataOutput)">write</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A>&nbsp;out)</CODE>
253
254<BR>
255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Serialize the fields of this object to <code>out</code>.</TD>
256</TR>
257<TR BGCOLOR="white" CLASS="TableRowColor">
258<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
259<CODE>&nbsp;void</CODE></FONT></TD>
260<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#xor(org.apache.hadoop.util.bloom.Filter)">xor</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</CODE>
261
262<BR>
263&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Peforms a logical XOR between <i>this</i> filter and a specified filter.</TD>
264</TR>
265</TABLE>
266&nbsp;<A NAME="methods_inherited_from_class_org.apache.hadoop.util.bloom.Filter"><!-- --></A>
267<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
268<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
269<TH ALIGN="left"><B>Methods inherited from class org.apache.hadoop.util.bloom.<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></B></TH>
270</TR>
271<TR BGCOLOR="white" CLASS="TableRowColor">
272<TD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#add(java.util.Collection)">add</A>, <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#add(org.apache.hadoop.util.bloom.Key[])">add</A>, <A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#add(java.util.List)">add</A></CODE></TD>
273</TR>
274</TABLE>
275&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
276<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
277<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
278<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>
279</TR>
280<TR BGCOLOR="white" CLASS="TableRowColor">
281<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#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>
282</TR>
283</TABLE>
284&nbsp;
285<P>
286
287<!-- ========= CONSTRUCTOR DETAIL ======== -->
288
289<A NAME="constructor_detail"><!-- --></A>
290<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
291<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
292<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
293<B>Constructor Detail</B></FONT></TH>
294</TR>
295</TABLE>
296
297<A NAME="CountingBloomFilter()"><!-- --></A><H3>
298CountingBloomFilter</H3>
299<PRE>
300public <B>CountingBloomFilter</B>()</PRE>
301<DL>
302<DD>Default constructor - use with readFields
303<P>
304</DL>
305<HR>
306
307<A NAME="CountingBloomFilter(int, int, int)"><!-- --></A><H3>
308CountingBloomFilter</H3>
309<PRE>
310public <B>CountingBloomFilter</B>(int&nbsp;vectorSize,
311                           int&nbsp;nbHash,
312                           int&nbsp;hashType)</PRE>
313<DL>
314<DD>Constructor
315<P>
316<DL>
317<DT><B>Parameters:</B><DD><CODE>vectorSize</CODE> - The vector size of <i>this</i> filter.<DD><CODE>nbHash</CODE> - The number of hash function to consider.<DD><CODE>hashType</CODE> - type of the hashing function (see
318 <A HREF="../../../../../org/apache/hadoop/util/hash/Hash.html" title="class in org.apache.hadoop.util.hash"><CODE>Hash</CODE></A>).</DL>
319</DL>
320
321<!-- ============ METHOD DETAIL ========== -->
322
323<A NAME="method_detail"><!-- --></A>
324<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
325<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
326<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
327<B>Method Detail</B></FONT></TH>
328</TR>
329</TABLE>
330
331<A NAME="add(org.apache.hadoop.util.bloom.Key)"><!-- --></A><H3>
332add</H3>
333<PRE>
334public void <B>add</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</PRE>
335<DL>
336<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#add(org.apache.hadoop.util.bloom.Key)">Filter</A></CODE></B></DD>
337<DD>Adds a key to <i>this</i> filter.
338<P>
339<DD><DL>
340<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#add(org.apache.hadoop.util.bloom.Key)">add</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
341</DD>
342<DD><DL>
343<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to add.</DL>
344</DD>
345</DL>
346<HR>
347
348<A NAME="delete(org.apache.hadoop.util.bloom.Key)"><!-- --></A><H3>
349delete</H3>
350<PRE>
351public void <B>delete</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</PRE>
352<DL>
353<DD>Removes a specified key from <i>this</i> counting Bloom filter.
354 <p>
355 <b>Invariant</b>: nothing happens if the specified key does not belong to <i>this</i> counter Bloom filter.
356<P>
357<DD><DL>
358<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to remove.</DL>
359</DD>
360</DL>
361<HR>
362
363<A NAME="and(org.apache.hadoop.util.bloom.Filter)"><!-- --></A><H3>
364and</H3>
365<PRE>
366public void <B>and</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</PRE>
367<DL>
368<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#and(org.apache.hadoop.util.bloom.Filter)">Filter</A></CODE></B></DD>
369<DD>Peforms a logical AND between <i>this</i> filter and a specified filter.
370 <p>
371 <b>Invariant</b>: The result is assigned to <i>this</i> filter.
372<P>
373<DD><DL>
374<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#and(org.apache.hadoop.util.bloom.Filter)">and</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
375</DD>
376<DD><DL>
377<DT><B>Parameters:</B><DD><CODE>filter</CODE> - The filter to AND with.</DL>
378</DD>
379</DL>
380<HR>
381
382<A NAME="membershipTest(org.apache.hadoop.util.bloom.Key)"><!-- --></A><H3>
383membershipTest</H3>
384<PRE>
385public boolean <B>membershipTest</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</PRE>
386<DL>
387<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#membershipTest(org.apache.hadoop.util.bloom.Key)">Filter</A></CODE></B></DD>
388<DD>Determines wether a specified key belongs to <i>this</i> filter.
389<P>
390<DD><DL>
391<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#membershipTest(org.apache.hadoop.util.bloom.Key)">membershipTest</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
392</DD>
393<DD><DL>
394<DT><B>Parameters:</B><DD><CODE>key</CODE> - The key to test.
395<DT><B>Returns:</B><DD>boolean True if the specified key belongs to <i>this</i> filter.
396                     False otherwise.</DL>
397</DD>
398</DL>
399<HR>
400
401<A NAME="approximateCount(org.apache.hadoop.util.bloom.Key)"><!-- --></A><H3>
402approximateCount</H3>
403<PRE>
404public int <B>approximateCount</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;key)</PRE>
405<DL>
406<DD>This method calculates an approximate count of the key, i.e. how many
407 times the key was added to the filter. This allows the filter to be
408 used as an approximate <code>key -&gt; count</code> map.
409 <p>NOTE: due to the bucket size of this filter, inserting the same
410 key more than 15 times will cause an overflow at all filter positions
411 associated with this key, and it will significantly increase the error
412 rate for this and other keys. For this reason the filter can only be
413 used to store small count values <code>0 &lt;= N &lt;&lt; 15</code>.
414<P>
415<DD><DL>
416<DT><B>Parameters:</B><DD><CODE>key</CODE> - key to be tested
417<DT><B>Returns:</B><DD>0 if the key is not present. Otherwise, a positive value v will
418 be returned such that <code>v == count</code> with probability equal to the
419 error rate of this filter, and <code>v &gt; count</code> otherwise.
420 Additionally, if the filter experienced an underflow as a result of
421 <A HREF="../../../../../org/apache/hadoop/util/bloom/CountingBloomFilter.html#delete(org.apache.hadoop.util.bloom.Key)"><CODE>delete(Key)</CODE></A> operation, the return value may be lower than the
422 <code>count</code> with the probability of the false negative rate of such
423 filter.</DL>
424</DD>
425</DL>
426<HR>
427
428<A NAME="not()"><!-- --></A><H3>
429not</H3>
430<PRE>
431public void <B>not</B>()</PRE>
432<DL>
433<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#not()">Filter</A></CODE></B></DD>
434<DD>Performs a logical NOT on <i>this</i> filter.
435 <p>
436 The result is assigned to <i>this</i> filter.
437<P>
438<DD><DL>
439<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#not()">not</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
440</DD>
441<DD><DL>
442</DL>
443</DD>
444</DL>
445<HR>
446
447<A NAME="or(org.apache.hadoop.util.bloom.Filter)"><!-- --></A><H3>
448or</H3>
449<PRE>
450public void <B>or</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</PRE>
451<DL>
452<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#or(org.apache.hadoop.util.bloom.Filter)">Filter</A></CODE></B></DD>
453<DD>Peforms a logical OR between <i>this</i> filter and a specified filter.
454 <p>
455 <b>Invariant</b>: The result is assigned to <i>this</i> filter.
456<P>
457<DD><DL>
458<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#or(org.apache.hadoop.util.bloom.Filter)">or</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
459</DD>
460<DD><DL>
461<DT><B>Parameters:</B><DD><CODE>filter</CODE> - The filter to OR with.</DL>
462</DD>
463</DL>
464<HR>
465
466<A NAME="xor(org.apache.hadoop.util.bloom.Filter)"><!-- --></A><H3>
467xor</H3>
468<PRE>
469public void <B>xor</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A>&nbsp;filter)</PRE>
470<DL>
471<DD><B>Description copied from class: <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#xor(org.apache.hadoop.util.bloom.Filter)">Filter</A></CODE></B></DD>
472<DD>Peforms a logical XOR between <i>this</i> filter and a specified filter.
473 <p>
474 <b>Invariant</b>: The result is assigned to <i>this</i> filter.
475<P>
476<DD><DL>
477<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#xor(org.apache.hadoop.util.bloom.Filter)">xor</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
478</DD>
479<DD><DL>
480<DT><B>Parameters:</B><DD><CODE>filter</CODE> - The filter to XOR with.</DL>
481</DD>
482</DL>
483<HR>
484
485<A NAME="toString()"><!-- --></A><H3>
486toString</H3>
487<PRE>
488public <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> <B>toString</B>()</PRE>
489<DL>
490<DD><DL>
491<DT><B>Overrides:</B><DD><CODE><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></CODE> in class <CODE><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></CODE></DL>
492</DD>
493<DD><DL>
494</DL>
495</DD>
496</DL>
497<HR>
498
499<A NAME="write(java.io.DataOutput)"><!-- --></A><H3>
500write</H3>
501<PRE>
502public void <B>write</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataOutput.html?is-external=true" title="class or interface in java.io">DataOutput</A>&nbsp;out)
503           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>
504<DL>
505<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html#write(java.io.DataOutput)">Writable</A></CODE></B></DD>
506<DD>Serialize the fields of this object to <code>out</code>.
507<P>
508<DD><DL>
509<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html#write(java.io.DataOutput)">write</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#write(java.io.DataOutput)">write</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
510</DD>
511<DD><DL>
512<DT><B>Parameters:</B><DD><CODE>out</CODE> - <code>DataOuput</code> to serialize this object into.
513<DT><B>Throws:</B>
514<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>
515</DD>
516</DL>
517<HR>
518
519<A NAME="readFields(java.io.DataInput)"><!-- --></A><H3>
520readFields</H3>
521<PRE>
522public void <B>readFields</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/io/DataInput.html?is-external=true" title="class or interface in java.io">DataInput</A>&nbsp;in)
523                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>
524<DL>
525<DD><B>Description copied from interface: <CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html#readFields(java.io.DataInput)">Writable</A></CODE></B></DD>
526<DD>Deserialize the fields of this object from <code>in</code>
527 
528 <p>For efficiency, implementations should attempt to re-use storage in the
529 existing object where possible.</p>
530<P>
531<DD><DL>
532<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html#readFields(java.io.DataInput)">readFields</A></CODE> in interface <CODE><A HREF="../../../../../org/apache/hadoop/io/Writable.html" title="interface in org.apache.hadoop.io">Writable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html#readFields(java.io.DataInput)">readFields</A></CODE> in class <CODE><A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom">Filter</A></CODE></DL>
533</DD>
534<DD><DL>
535<DT><B>Parameters:</B><DD><CODE>in</CODE> - <code>DataInput</code> to deseriablize this object from.
536<DT><B>Throws:</B>
537<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>
538</DD>
539</DL>
540<!-- ========= END OF CLASS DATA ========= -->
541<HR>
542
543
544<!-- ======= START OF BOTTOM NAVBAR ====== -->
545<A NAME="navbar_bottom"><!-- --></A>
546<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
547<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
548<TR>
549<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
550<A NAME="navbar_bottom_firstrow"><!-- --></A>
551<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
552  <TR ALIGN="center" VALIGN="top">
553  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
554  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
555  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
556  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/CountingBloomFilter.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
557  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
558  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
559  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
560  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
561  </TR>
562</TABLE>
563</TD>
564<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
565</EM>
566</TD>
567</TR>
568
569<TR>
570<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
571&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/BloomFilter.html" title="class in org.apache.hadoop.util.bloom"><B>PREV CLASS</B></A>&nbsp;
572&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/DynamicBloomFilter.html" title="class in org.apache.hadoop.util.bloom"><B>NEXT CLASS</B></A></FONT></TD>
573<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
574  <A HREF="../../../../../index.html?org/apache/hadoop/util/bloom/CountingBloomFilter.html" target="_top"><B>FRAMES</B></A>  &nbsp;
575&nbsp;<A HREF="CountingBloomFilter.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
576&nbsp;<SCRIPT type="text/javascript">
577  <!--
578  if(window==top) {
579    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
580  }
581  //-->
582</SCRIPT>
583<NOSCRIPT>
584  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
585</NOSCRIPT>
586
587
588</FONT></TD>
589</TR>
590<TR>
591<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
592  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.hadoop.util.bloom.Filter">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
593<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
594DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
595</TR>
596</TABLE>
597<A NAME="skip-navbar_bottom"></A>
598<!-- ======== END OF BOTTOM NAVBAR ======= -->
599
600<HR>
601Copyright &copy; 2009 The Apache Software Foundation
602</BODY>
603</HTML>
Note: See TracBrowser for help on using the repository browser.