@InterfaceAudience.Private public class BlockCacheKey extends Object implements HeapSize, Serializable
BlockCache
Constructor and Description |
---|
BlockCacheKey(String file,
long offset)
Construct a new BlockCacheKey
|
BlockCacheKey(String file,
long offset,
DataBlockEncoding encoding,
BlockType blockType) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
DataBlockEncoding |
getDataBlockEncoding() |
String |
getHfileName() |
long |
getOffset() |
int |
hashCode() |
long |
heapSize()
Strings have two bytes per character due to default Java Unicode encoding
(hence length times 2).
|
String |
toString() |
public BlockCacheKey(String file, long offset, DataBlockEncoding encoding, BlockType blockType)
public BlockCacheKey(String file, long offset)
file
- The name of the HFile this block belongs to.offset
- Offset of the block into the filepublic long heapSize()
public String getHfileName()
public DataBlockEncoding getDataBlockEncoding()
public long getOffset()
Copyright © 2014 The Apache Software Foundation. All rights reserved.