Skip to content

BlockInfo

BlockInfo is a metadata of data blocks (stored in MemoryStore or DiskStore).

Creating Instance

BlockInfo takes the following to be created:

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:

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:

readerCount is incremented when a read lock is acquired and decreases when the following happens:

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: