Class BlockSourceBzip2
java.lang.Object
org.aksw.commons.io.hadoop.binseach.bz2.BlockSourceBzip2
- All Implemented Interfaces:
org.aksw.commons.io.block.api.BlockSource
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longprotected com.google.common.cache.Cache<Long,org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>> protected com.google.common.cache.LoadingCache<Long,org.aksw.commons.io.hadoop.binseach.bz2.BlockSourceBzip2.Neighbour> static final Patternprotected longprotected longstatic final Stringstatic final Patternstatic final intThe maximum number of bytes that may be scanned in order to find a block start Bzip blocks are typically 900K uncompressed; unfortunately the CBZip2InputStream API does not give access to the actual block size used.protected org.aksw.commons.io.seekable.api.SeekableSourcestatic long -
Constructor Summary
ConstructorsConstructorDescriptionBlockSourceBzip2(org.aksw.commons.io.seekable.api.SeekableSource seekableSource, org.aksw.commons.io.deprecated.MatcherFactory fwdBlockStartMatcherFactory, org.aksw.commons.io.deprecated.MatcherFactory bwdBlockStartMatcherFactory) -
Method Summary
Modifier and TypeMethodDescriptionorg.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>cache(long blockStart, org.aksw.commons.io.seekable.api.Seekable seekable) org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>contentAtOrAfter(long requestPos, boolean inclusive) org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>contentAtOrBefore(long requestPos, boolean inclusive) static org.aksw.commons.io.block.api.BlockSourcecreate(org.aksw.commons.io.seekable.api.SeekableSource seekableSource) longfindBlockAtOrAfter(org.aksw.commons.io.seekable.api.Seekable seekable) longfindBlockAtOrAfterCached(org.aksw.commons.io.seekable.api.Seekable seekable) longfindBlockAtOrBefore(org.aksw.commons.io.seekable.api.Seekable seekable) longfindBlockAtOrBeforeCached(org.aksw.commons.io.seekable.api.Seekable seekable) longgetSizeOfBlock(long pos) longgetSizeOfBlockCached(long pos) booleanhasBlockAfter(long pos) booleanhasBlockBefore(long pos) protected longloadBlock(long pos) protected org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>loadBlock(org.aksw.commons.io.seekable.api.Seekable seekable) longsize()
-
Field Details
-
COMPRESSED_MAGIC_STR
- See Also:
-
fwdMagicPattern
-
bwdMagicPattern
-
MAX_SEARCH_RANGE
public static final int MAX_SEARCH_RANGEThe maximum number of bytes that may be scanned in order to find a block start Bzip blocks are typically 900K uncompressed; unfortunately the CBZip2InputStream API does not give access to the actual block size used.- See Also:
-
seekableSource
protected org.aksw.commons.io.seekable.api.SeekableSource seekableSource -
ABSENT
public static long ABSENT -
UNKNOWN
public static long UNKNOWN -
blockTopologyCache
protected com.google.common.cache.LoadingCache<Long,org.aksw.commons.io.hadoop.binseach.bz2.BlockSourceBzip2.Neighbour> blockTopologyCache -
blockContentCache
protected com.google.common.cache.Cache<Long,org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block>> blockContentCache -
cachedBlockSize
protected long cachedBlockSize -
cachedLastBlockSize
protected long cachedLastBlockSize
-
-
Constructor Details
-
BlockSourceBzip2
public BlockSourceBzip2(org.aksw.commons.io.seekable.api.SeekableSource seekableSource, org.aksw.commons.io.deprecated.MatcherFactory fwdBlockStartMatcherFactory, org.aksw.commons.io.deprecated.MatcherFactory bwdBlockStartMatcherFactory)
-
-
Method Details
-
create
public static org.aksw.commons.io.block.api.BlockSource create(org.aksw.commons.io.seekable.api.SeekableSource seekableSource) -
loadBlock
protected org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block> loadBlock(org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
findBlockAtOrBeforeCached
public long findBlockAtOrBeforeCached(org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
findBlockAtOrBefore
public long findBlockAtOrBefore(org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
contentAtOrBefore
public org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block> contentAtOrBefore(long requestPos, boolean inclusive) throws IOException - Specified by:
contentAtOrBeforein interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
findBlockAtOrAfterCached
public long findBlockAtOrAfterCached(org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
findBlockAtOrAfter
public long findBlockAtOrAfter(org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
contentAtOrAfter
public org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block> contentAtOrAfter(long requestPos, boolean inclusive) throws IOException - Specified by:
contentAtOrAfterin interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
hasBlockAfter
- Specified by:
hasBlockAfterin interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
hasBlockBefore
- Specified by:
hasBlockBeforein interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
size
- Specified by:
sizein interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
cache
public org.aksw.commons.util.ref.Ref<org.aksw.commons.io.block.api.Block> cache(long blockStart, org.aksw.commons.io.seekable.api.Seekable seekable) throws IOException - Throws:
IOException
-
getSizeOfBlock
- Specified by:
getSizeOfBlockin interfaceorg.aksw.commons.io.block.api.BlockSource- Throws:
IOException
-
getSizeOfBlockCached
- Throws:
IOException
-
loadBlock
- Throws:
IOException
-