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 Block>binarySearch(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 BinarySearchercreateBinarySearcherBz2(FileChannel fileChannel, int pageSize, boolean closeChannel) static BinarySearchercreateBinarySearcherBz2(Path path) static BinarySearchercreateBinarySearcherBz2(Path path, int pageSize) static BinarySearchercreateBinarySearcherBz2(SeekableSource seekableSource) static BinarySearchercreateBinarySearcherText(FileChannel fileChannel, int pageSize, boolean closeChannel) static BinarySearchercreateBinarySearcherText(Path path) static BinarySearchercreateBinarySearcherText(Path path, int pageSize)
-
Constructor Details
-
BlockSources
public BlockSources()
-
-
Method Details
-
createBinarySearcherBz2
- Throws:
IOException
-
createBinarySearcherBz2
- Throws:
IOException
-
createBinarySearcherBz2
public static BinarySearcher createBinarySearcherBz2(FileChannel fileChannel, int pageSize, boolean closeChannel) throws IOException - Throws:
IOException
-
createBinarySearcherBz2
public static BinarySearcher createBinarySearcherBz2(SeekableSource seekableSource) throws IOException - Throws:
IOException
-
createBinarySearcherText
- Throws:
IOException
-
createBinarySearcherText
- Throws:
IOException
-
createBinarySearcherText
public static BinarySearcher createBinarySearcherText(FileChannel fileChannel, int pageSize, boolean closeChannel) throws IOException - Throws:
IOException
-
binarySearch
public static org.aksw.commons.util.ref.Ref<? extends Block> binarySearch(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
-