API Docs

XRootD file storage interface.

class invenio_xrootd.storage.EOSFileStorage(*args, **kwargs)[source]

File storage for CERN EOS via XRootD.

EOS needs to know the file size upfront in order to allocate your file to disk servers with enough available space. This is done by providing eos.bookingsize=xyz in the root URL.

This file storage module takes care of setting the booking size for initialize and save operations.

If you use this file storage class, it also means that your REST API clients must provide the file size upfront.

Initialize storage.

initialize(*args, **kwargs)[source]

Initialize file of given size.

Set the eos.bookingsize variable in the root URL, to ensure EOS allocates the file to a disk server with enough space.

save(*args, **kwargs)[source]

Initialize file of given size.

Set the eos.bookingsize variable in the root URL, to ensure EOS allocates the file to a disk server with enough space.

set_bookingsize(size)[source]

Set EOS booking size.

Ensures that EOS will allocate the file to disk server with enough available space.

class invenio_xrootd.storage.XRootDFileStorage(*args, **kwargs)[source]

File system storage using XRootD for accessing files.

XRootD v3.x are only capable of reporting adler32 checksums, even though that the storage system will report e.g. a MD5 checksums. If this is the case, set the configuration variable XROOTD_CHECKSUM_ALOG to overwrite the alogrithm name reported by the XRootD server.

Initialize file storage object.

checksum(chunk_size=None, progress_callback=None)[source]

Compute checksum of file.

Queries the XRootD server to get checksum if possible, otherwise falls back to default Python implementation. The checksum algorithm used will be the one configured on the XRootD server.

invenio_xrootd.storage.ensure_bookingsize(with_arg=False)[source]

Decorator to set eos.bookingsize.

invenio_xrootd.storage.eos_storage_factory(**kwargs)[source]

File storage factory for EOS.

invenio_xrootd.storage.xrootd_storage_factory(**kwargs)[source]

File storage factory for XRootD.