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) -
tellMasterflag
BlockInfo is created when:
BlockManageris requested to doPut
Block Size¶
BlockInfo knows the size of the block (in bytes).
The size is 0 by default and changes when:
BlockStoreUpdateris requested to saveBlockManageris 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:
BlockInfoManageris requested to remove a block and clear
readerCount is incremented when a read lock is acquired and decreases when the following happens:
BlockInfoManageris 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:
-
-1for no writers and hence no write lock in use -
-1024for non-task threads (by a driver thread or by unit test code)
writerTask is assigned a task ID when:
BlockInfoManageris requested to lockForWriting, unlock, releaseAllLocksForTask, removeBlock, clear