![]() |
XRootD
|
#include <XrdEcRedundancyProvider.hh>
Public Member Functions | |
RedundancyProvider (const ObjCfg &objcfg) | |
void | compute (stripes_t &stripes) |
The redundancy provider class offers automatic parity computing and data recovery. Depending on configuration it will use erasure coding or replication.
Definition at line 41 of file XrdEcRedundancyProvider.hh.
XrdEc::RedundancyProvider::RedundancyProvider | ( | const ObjCfg & | objcfg | ) |
Constructor. Stripe parameters (number of data and parity blocks) are constant per ErasureEncoding object.
Definition at line 151 of file XrdEcRedundancyProvider.cc.
References XrdEc::ObjCfg::nbchunks, and XrdEc::ObjCfg::nbdata.
void XrdEc::RedundancyProvider::compute | ( | stripes_t & | stripes | ) |
Compute all missing data and parity blocks in the the stripe. Stripe size has to equal nData+nParity. Blocks can be arbitrary size, but size has to be equal within a stripe. Function will throw on incorrect input.
stripes | nData+nParity blocks, missing (empty) blocks will be computed if possible. |
Definition at line 231 of file XrdEcRedundancyProvider.cc.
References XrdEc::ObjCfg::chunksize, XrdEc::ObjCfg::nbchunks, XrdEc::ObjCfg::nbdata, and XrdEc::ObjCfg::nbparity.
Referenced by XrdEc::WrtBuff::Encode().