public interface CacheBlock
extends org.apache.hadoop.io.Writable
Modifier and Type | Method and Description |
---|---|
void |
compactEmptyBlock()
Free unnecessarily allocated empty block.
|
long |
getExactSerializedSize()
Get the exact serialized size in bytes of the cache block.
|
long |
getInMemorySize()
Get the in-memory size in bytes of the cache block.
|
int |
getNumColumns() |
int |
getNumRows() |
boolean |
isShallowSerialize()
Indicates if the cache block is subject to shallow serialized,
which is generally true if in-memory size and serialized size
are almost identical allowing to avoid unnecessary deep serialize.
|
boolean |
isShallowSerialize(boolean inclConvert)
Indicates if the cache block is subject to shallow serialized,
which is generally true if in-memory size and serialized size
are almost identical allowing to avoid unnecessary deep serialize.
|
void |
merge(CacheBlock that,
boolean appendOnly)
Merge the given block into the current block.
|
CacheBlock |
slice(int rl,
int ru,
int cl,
int cu,
CacheBlock block)
Slice a sub block out of the current block and write into the given output block.
|
void |
toShallowSerializeBlock()
Converts a cache block that is not shallow serializable into
a form that is shallow serializable.
|
int getNumRows()
int getNumColumns()
long getInMemorySize()
long getExactSerializedSize()
boolean isShallowSerialize()
boolean isShallowSerialize(boolean inclConvert)
inclConvert
- if true report blocks as shallow serialize that are
currently not amenable but can be brought into an amenable form
via toShallowSerializeBlock
.void toShallowSerializeBlock()
void compactEmptyBlock()
CacheBlock slice(int rl, int ru, int cl, int cu, CacheBlock block)
rl
- row lowerru
- row uppercl
- column lowercu
- column upperblock
- cache blockvoid merge(CacheBlock that, boolean appendOnly)
that
- cache blockappendOnly
- ?Copyright © 2020 The Apache Software Foundation. All rights reserved.