Home | Trees | Indices | Help |
---|
|
builtins.object --+ | _BlockManager
BlockManager handles buffer blocks.
Also handles background block uploads, and background block prefetch for a Collection of ArvadosFiles.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
DEFAULT_PUT_THREADS = 2
|
|||
DEFAULT_GET_THREADS = 2
|
|
Allocate a new, empty bufferblock in WRITABLE state and return it. :blockid: optional block identifier, otherwise one will be automatically assigned :starting_capacity: optional capacity, otherwise will use default capacity :owner: ArvadosFile that owns this block
|
Create a new bufferblock initialized with the content of an existing bufferblock. :block: the buffer block to copy. :owner: ArvadosFile that owns the new block
|
|
|
Shut down and wait for background upload and download threads to finish.
|
Packs small blocks together before uploading
|
Initiate a background upload of a bufferblock. :block: The block object to upload :sync: If `sync` is True, upload the block synchronously. If `sync` is False, upload the block asynchronously. This will return immediately unless the upload queue is at capacity, in which case it will wait on an upload queue slot. |
|
Get a bufferblock 64 MB in size consisting of all zeros, used as padding when using truncate() to extend the size of a file. For reference (and possible future optimization), the md5sum of the padding block is: 7f614da9329cd3aebf59b91aadc30bf0+67108864
|
|
Fetch a block. First checks to see if the locator is a BufferBlock and return that, if not, passes the request through to KeepClient.get(). |
Commit all outstanding buffer blocks. This is a synchronous call, and will not return until all buffer blocks are uploaded. Raises KeepWriteError() if any blocks failed to upload. |
Initiate a background download of a block. This assumes that the underlying KeepClient implements a block cache, so repeated requests for the same block will not result in repeated downloads (unless the block is evicted from the cache.) This method does not block. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Thu Dec 21 19:09:45 2023 | http://epydoc.sourceforge.net |