Class BlockSources

java.lang.Object
org.aksw.commons.io.hadoop.binseach.bz2.BlockSources

public class BlockSources extends Object
  • 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:
      Exception
      IOException
    • closeWithRethrowAsIOException

      public static void closeWithRethrowAsIOException(AutoCloseable obj) throws IOException
      Throws:
      IOException