BlockInfo¶
BlockInfo
is a metadata of data blocks (stored in MemoryStore or DiskStore).
Creating Instance¶
BlockInfo
takes the following to be created:
- StorageLevel
-
ClassTag
(Scala) -
tellMaster
flag
BlockInfo
is created when:
BlockManager
is requested to doPut
Block Size¶
BlockInfo
knows the size of the block (in bytes).
The size is 0
by default and changes when:
BlockStoreUpdater
is requested to saveBlockManager
is requested to doPutIterator
Reader Count¶
readerCount
is the number of times that this block has been locked for reading
readerCount
is 0
by default.
readerCount
changes back to 0
when:
BlockInfoManager
is requested to remove a block and clear
readerCount
is incremented when a read lock is acquired and decreases when the following happens:
BlockInfoManager
is requested to release a lock and releaseAllLocksForTask
Writer Task¶
writerTask
attribute is the task ID that owns the write lock for the block or the following:
-
-1
for no writers and hence no write lock in use -
-1024
for non-task threads (by a driver thread or by unit test code)
writerTask
is assigned a task ID when:
BlockInfoManager
is requested to lockForWriting, unlock, releaseAllLocksForTask, removeBlock, clear