Package org.apache.hadoop.hbase.io.hfile
Class BlockCacheKey
java.lang.Object
org.apache.hadoop.hbase.io.hfile.BlockCacheKey
- All Implemented Interfaces:
Serializable
,HeapSize
Cache Key for use with implementations of
BlockCache
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBlockCacheKey
(String hfileName, long offset) Construct a new BlockCacheKeyBlockCacheKey
(String hfileName, long offset, boolean isPrimaryReplica, BlockType blockType) BlockCacheKey
(org.apache.hadoop.fs.Path hfilePath, long offset, boolean isPrimaryReplica, BlockType blockType) -
Method Summary
Modifier and TypeMethodDescriptionboolean
org.apache.hadoop.fs.Path
Returns The hfileName portion of this cache keylong
int
hashCode()
long
heapSize()
Strings have two bytes per character due to default Java Unicode encoding (hence length times 2).boolean
void
setBlockType
(BlockType blockType) toString()
-
Field Details
-
serialVersionUID
- See Also:
-
hfileName
-
offset
-
blockType
-
isPrimaryReplicaBlock
-
filePath
-
FIXED_OVERHEAD
-
-
Constructor Details
-
BlockCacheKey
Construct a new BlockCacheKey- Parameters:
hfileName
- The name of the HFile this block belongs to.offset
- Offset of the block into the file
-
BlockCacheKey
-
BlockCacheKey
public BlockCacheKey(org.apache.hadoop.fs.Path hfilePath, long offset, boolean isPrimaryReplica, BlockType blockType)
-
-
Method Details
-
hashCode
-
equals
-
toString
-
heapSize
Strings have two bytes per character due to default Java Unicode encoding (hence length times 2). -
getHfileName
Returns The hfileName portion of this cache key -
isPrimary
-
getOffset
-
getBlockType
-
setBlockType
-
getFilePath
-