public static class BloomMapFile.Reader extends MapFile.Reader
Constructor and Description |
---|
Reader(FileSystem fs,
String dirName,
Configuration conf) |
Reader(FileSystem fs,
String dirName,
WritableComparator comparator,
Configuration conf) |
Reader(FileSystem fs,
String dirName,
WritableComparator comparator,
Configuration conf,
boolean open) |
Modifier and Type | Method and Description |
---|---|
Writable |
get(WritableComparable key,
Writable val)
Fast version of the
MapFile.Reader.get(WritableComparable, Writable) method. |
Filter |
getBloomFilter()
Retrieve the Bloom filter used by this instance of the Reader.
|
boolean |
probablyHasKey(WritableComparable key)
Checks if this MapFile has the indicated key.
|
close, createDataFileReader, finalKey, getClosest, getClosest, getKeyClass, getValueClass, midKey, next, open, reset, seek
public Reader(FileSystem fs, String dirName, Configuration conf) throws IOException
IOException
public Reader(FileSystem fs, String dirName, WritableComparator comparator, Configuration conf, boolean open) throws IOException
IOException
public Reader(FileSystem fs, String dirName, WritableComparator comparator, Configuration conf) throws IOException
IOException
public boolean probablyHasKey(WritableComparable key) throws IOException
key
- key to checkIOException
public Writable get(WritableComparable key, Writable val) throws IOException
MapFile.Reader.get(WritableComparable, Writable)
method. First
it checks the Bloom filter for the existence of the key, and only if
present it performs the real get operation. This yields significant
performance improvements for get operations on sparsely populated files.get
in class MapFile.Reader
IOException
Copyright © 2010 The Apache Software Foundation