Class BlockSources
java.lang.Object
org.aksw.commons.io.hadoop.binseach.bz2.BlockSources
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.aksw.commons.util.ref.Ref<? extends org.aksw.commons.io.block.api.Block>binarySearch(org.aksw.commons.io.block.api.BlockSource blockSource, long min, long max, byte delimiter, byte[] prefix) Binary search over blocks Only examines the first record in the block to decide whether to look into the next or the previous onestatic voidstatic org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherBz2(FileChannel fileChannel, int pageSize, boolean closeChannel) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherBz2(Path path) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherBz2(Path path, int pageSize) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherBz2(org.aksw.commons.io.seekable.api.SeekableSource seekableSource) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherText(FileChannel fileChannel, int pageSize, boolean closeChannel) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherText(Path path) static org.aksw.commons.io.binseach.BinarySearchercreateBinarySearcherText(Path path, int pageSize)
-
Constructor Details
-
BlockSources
public BlockSources()
-
-
Method Details
-
createBinarySearcherBz2
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherBz2(Path path) throws IOException - Throws:
IOException
-
createBinarySearcherBz2
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherBz2(Path path, int pageSize) throws IOException - Throws:
IOException
-
createBinarySearcherBz2
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherBz2(FileChannel fileChannel, int pageSize, boolean closeChannel) throws IOException - Throws:
IOException
-
createBinarySearcherBz2
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherBz2(org.aksw.commons.io.seekable.api.SeekableSource seekableSource) throws IOException - Throws:
IOException
-
createBinarySearcherText
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherText(Path path) throws IOException - Throws:
IOException
-
createBinarySearcherText
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherText(Path path, int pageSize) throws IOException - Throws:
IOException
-
createBinarySearcherText
public static org.aksw.commons.io.binseach.BinarySearcher createBinarySearcherText(FileChannel fileChannel, int pageSize, boolean closeChannel) throws IOException - Throws:
IOException
-
binarySearch
public static org.aksw.commons.util.ref.Ref<? extends org.aksw.commons.io.block.api.Block> binarySearch(org.aksw.commons.io.block.api.BlockSource blockSource, long min, long max, byte delimiter, byte[] prefix) throws IOException Binary search over blocks Only examines the first record in the block to decide whether to look into the next or the previous one- Parameters:
blockSource-min-max- (exclusive)delimiter-prefix-- Returns:
- A reference to a block that may contain the key or null if no candidate block was found
- Throws:
ExceptionIOException
-
closeWithRethrowAsIOException
- Throws:
IOException
-