Class BlockSources
- java.lang.Object
-
- org.aksw.commons.io.hadoop.binseach.bz2.BlockSources
-
public class BlockSources extends Object
-
-
Constructor Summary
Constructors Constructor Description BlockSources()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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)Binary search over blocks Only examines the first record in the block to decide whether to look into the next or the previous onestatic voidcloseWithRethrowAsIOException(AutoCloseable obj)static 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)
-
-
-
Method Detail
-
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 IOExceptionBinary 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
public static void closeWithRethrowAsIOException(AutoCloseable obj) throws IOException
- Throws:
IOException
-
-