|
xrootd
|
Status of cached file. Can be read from and written into a binary file. More...
#include <XrdPfcInfo.hh>

Classes | |
| struct | AStat |
| Access statistics. More... | |
| struct | Status |
| struct | Store |
Public Member Functions | |
| Info (XrdSysTrace *trace, bool prefetchBuffer=false) | |
| Constructor. More... | |
| ~Info () | |
| Destructor. More... | |
| void | SetBitWritten (int i) |
| Mark block as written to disk. More... | |
| bool | TestBitWritten (int i) const |
| Test if block at the given index is written to disk. More... | |
| bool | TestBitPrefetch (int i) const |
| Test if block at the given index has been prefetched. More... | |
| void | SetBitPrefetch (int i) |
| Mark block as obtained through prefetch. More... | |
| void | SetBitSynced (int i) |
| Mark block as synced to disk. More... | |
| void | SetAllBitsSynced () |
| Mark all blocks as synced to disk. More... | |
| void | SetBufferSizeFileSizeAndCreationTime (long long bs, long long fs) |
| void | ResizeBits () |
| Reserve bit vectors for file_size / buffer_size bytes. More... | |
| bool | Read (XrdOssDF *fp, const char *dname, const char *fname=0) |
| Read content of cinfo file into this object. More... | |
| bool | Write (XrdOssDF *fp, const char *dname, const char *fname=0) |
| void | CompactifyAccessRecords () |
| Compactify access records to the configured maximum. More... | |
| void | ResetAllAccessStats () |
| Reset IO Stats. More... | |
| void | WriteIOStatAttach () |
| Write open time in the last entry of access statistics. More... | |
| void | WriteIOStat (Stats &s) |
| Write bytes missed, hits, and disk. More... | |
| void | WriteIOStatDetach (Stats &s) |
| Write close time together with bytes missed, hits, and disk. More... | |
| void | WriteIOStatSingle (long long bytes_disk) |
| Write single open/close time for given bytes read from disk. More... | |
| void | WriteIOStatSingle (long long bytes_disk, time_t att, time_t dtc) |
| Write open/close with given time and bytes read from disk. More... | |
| int | CountBlocksNotWrittenInRng (int firstIdx, int lastIdx) const |
| Check download status in given block range. More... | |
| int | GetBitvecSizeInBytes () const |
| Get size of download-state bit-vector in bytes. More... | |
| int | GetNBlocks () const |
| Get number of blocks represented in download-state bit-vector. More... | |
| long long | GetFileSize () const |
| Get file size. More... | |
| bool | GetLatestDetachTime (time_t &t) const |
| Get latest detach time. More... | |
| const AStat * | GetLastAccessStats () const |
| Get latest access stats. More... | |
| long long | GetBufferSize () const |
| Get prefetch buffer size. More... | |
| bool | IsComplete () const |
| Get complete status. More... | |
| int | GetNDownloadedBlocks () const |
| Get number of downloaded blocks. More... | |
| long long | GetNDownloadedBytes () const |
| Get number of downloaded bytes. More... | |
| int | GetLastDownloadedBlock () const |
| Get number of the last downloaded block. More... | |
| long long | GetExpectedDataFileSize () const |
| Get expected data file size. More... | |
| void | UpdateDownloadCompleteStatus () |
| Update complete status. More... | |
| size_t | GetAccessCnt () const |
| Get number of accesses. More... | |
| int | GetVersion () |
| Get version. More... | |
| const Store & | RefStoredData () const |
| Get stored data. More... | |
| const std::vector< AStat > & | RefAStats () const |
| time_t | GetCreationTime () const |
| Get file size. More... | |
| uint32_t | CalcCksumStore () |
| Get cksum, MD5 is for backward compatibility with V2 and V3. More... | |
| uint32_t | CalcCksumSyncedAndAStats () |
| void | CalcCksumMd5 (unsigned char *buff, char *digest) |
| CkSumCheck_e | GetCkSumState () const |
| const char * | GetCkSumStateAsText () const |
| bool | IsCkSumCache () const |
| bool | IsCkSumNet () const |
| bool | IsCkSumAny () const |
| bool | IsCkSumBoth () const |
| void | SetCkSumState (CkSumCheck_e css) |
| void | DowngradeCkSumState (CkSumCheck_e css_ref) |
| void | ResetCkSumCache () |
| void | ResetCkSumNet () |
| bool | HasNoCkSumTime () const |
| time_t | GetNoCkSumTime () const |
| time_t | GetNoCkSumTimeForUVKeep () const |
| void | ResetNoCkSumTime () |
| XrdSysTrace * | GetTrace () const |
Static Public Attributes | |
| static const char * | m_traceID |
| static const char * | s_infoExtension |
| static const size_t | s_infoExtensionLen |
| static size_t | s_maxNumAccess |
| static const int | s_defaultVersion |
Protected Attributes | |
| XrdSysTrace * | m_trace |
| Store | m_store |
| unsigned char * | m_buff_synced |
| disk written state vector More... | |
| unsigned char * | m_buff_written |
| download state vector More... | |
| unsigned char * | m_buff_prefetch |
| prefetch statistics More... | |
| std::vector< AStat > | m_astats |
| access records More... | |
| int | m_version |
| int | m_bitvecSizeInBits |
| cached More... | |
| int | m_missingBlocks |
| cached, updated in SetBitWritten() More... | |
| bool | m_complete |
| cached; if false, set to true when missingBlocks hit zero More... | |
| bool | m_hasPrefetchBuffer |
| constains current prefetch score More... | |
Private Member Functions | |
| unsigned char | cfiBIT (int n) const |
| bool | ReadV2 (XrdOssDF *fp, off_t off, const char *dname, const char *fname) |
| bool | ReadV3 (XrdOssDF *fp, off_t off, const char *dname, const char *fname) |
Private Attributes | |
| XrdCksCalc * | m_cksCalcMd5 |
Status of cached file. Can be read from and written into a binary file.
| XrdPfc::Info::Info | ( | XrdSysTrace * | trace, |
| bool | prefetchBuffer = false |
||
| ) |
Constructor.
| XrdPfc::Info::~Info | ( | ) |
Destructor.
| void XrdPfc::Info::CalcCksumMd5 | ( | unsigned char * | buff, |
| char * | digest | ||
| ) |
| uint32_t XrdPfc::Info::CalcCksumStore | ( | ) |
Get cksum, MD5 is for backward compatibility with V2 and V3.
| uint32_t XrdPfc::Info::CalcCksumSyncedAndAStats | ( | ) |
|
inlineprivate |
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
| void XrdPfc::Info::CompactifyAccessRecords | ( | ) |
Compactify access records to the configured maximum.
|
inline |
Check download status in given block range.
References TestBitWritten().
Referenced by UpdateDownloadCompleteStatus().
|
inline |
References XrdPfc::Info::Status::f_cksum_check, XrdPfc::Info::Store::m_status, and m_store.
|
inline |
Get number of accesses.
References XrdPfc::Info::Store::m_accessCnt, and m_store.
Referenced by XrdPfc::File::GetAccessCnt().
|
inline |
Get size of download-state bit-vector in bytes.
References m_bitvecSizeInBits.
Referenced by SetBitPrefetch(), SetBitSynced(), SetBitWritten(), TestBitPrefetch(), and TestBitWritten().
|
inline |
Get prefetch buffer size.
References XrdPfc::Info::Store::m_buffer_size, and m_store.
Referenced by XrdPfc::File::GetBlockSize().
|
inline |
References XrdPfc::Info::Status::f_cksum_check, XrdPfc::Info::Store::m_status, and m_store.
| const char* XrdPfc::Info::GetCkSumStateAsText | ( | ) | const |
|
inline |
Get file size.
References XrdPfc::Info::Store::m_creationTime, and m_store.
|
inline |
Get expected data file size.
References GetLastDownloadedBlock(), m_bitvecSizeInBits, XrdPfc::Info::Store::m_buffer_size, XrdPfc::Info::Store::m_file_size, and m_store.
|
inline |
Get file size.
References XrdPfc::Info::Store::m_file_size, and m_store.
| const AStat* XrdPfc::Info::GetLastAccessStats | ( | ) | const |
Get latest access stats.
Referenced by XrdPfc::File::GetLastAccessStats().
|
inline |
Get number of the last downloaded block.
References m_bitvecSizeInBits, and TestBitWritten().
Referenced by GetExpectedDataFileSize().
| bool XrdPfc::Info::GetLatestDetachTime | ( | time_t & | t | ) | const |
Get latest detach time.
|
inline |
Get number of blocks represented in download-state bit-vector.
References m_bitvecSizeInBits.
Referenced by XrdPfc::File::GetNBlocks().
|
inline |
Get number of downloaded blocks.
References m_bitvecSizeInBits, and TestBitWritten().
Referenced by XrdPfc::File::GetNDownloadedBlocks(), and GetNDownloadedBytes().
|
inline |
Get number of downloaded bytes.
References GetNDownloadedBlocks(), XrdPfc::Info::Store::m_buffer_size, and m_store.
|
inline |
References XrdPfc::Info::Store::m_noCkSumTime, and m_store.
|
inline |
References XrdPfc::Info::Store::m_creationTime, XrdPfc::Info::Store::m_noCkSumTime, and m_store.
|
inline |
References m_trace.
|
inline |
Get version.
References m_version.
|
inline |
References XrdPfc::Info::Store::m_noCkSumTime, and m_store.
|
inline |
|
inline |
|
inline |
|
inline |
References XrdPfc::CSChk_Net, XrdPfc::Info::Status::f_cksum_check, XrdPfc::Info::Store::m_status, and m_store.
|
inline |
Get complete status.
References m_complete.
| bool XrdPfc::Info::Read | ( | XrdOssDF * | fp, |
| const char * | dname, | ||
| const char * | fname = 0 |
||
| ) |
Read content of cinfo file into this object.
| fp | file handle |
| dname | directory name for trace output |
| fname | optional file name for trace output (can be included in dname) |
|
private |
|
private |
| void XrdPfc::Info::ResetCkSumCache | ( | ) |
| void XrdPfc::Info::ResetCkSumNet | ( | ) |
|
inline |
References XrdPfc::Info::Store::m_noCkSumTime, and m_store.
| void XrdPfc::Info::ResizeBits | ( | ) |
Reserve bit vectors for file_size / buffer_size bytes.
| void XrdPfc::Info::SetAllBitsSynced | ( | ) |
Mark all blocks as synced to disk.
|
inline |
Mark block as obtained through prefetch.
References cfiBIT(), GetBitvecSizeInBytes(), and m_buff_prefetch.
|
inline |
Mark block as synced to disk.
References cfiBIT(), GetBitvecSizeInBytes(), and m_buff_synced.
|
inline |
Mark block as written to disk.
References cfiBIT(), GetBitvecSizeInBytes(), m_buff_written, m_complete, and m_missingBlocks.
| void XrdPfc::Info::SetBufferSizeFileSizeAndCreationTime | ( | long long | bs, |
| long long | fs | ||
| ) |
|
inline |
References XrdPfc::Info::Status::f_cksum_check, XrdPfc::Info::Store::m_status, and m_store.
|
inline |
Test if block at the given index has been prefetched.
References cfiBIT(), GetBitvecSizeInBytes(), and m_buff_prefetch.
|
inline |
Test if block at the given index is written to disk.
References cfiBIT(), GetBitvecSizeInBytes(), and m_buff_written.
Referenced by CountBlocksNotWrittenInRng(), GetLastDownloadedBlock(), and GetNDownloadedBlocks().
|
inline |
Update complete status.
References CountBlocksNotWrittenInRng(), m_bitvecSizeInBits, m_complete, and m_missingBlocks.
| bool XrdPfc::Info::Write | ( | XrdOssDF * | fp, |
| const char * | dname, | ||
| const char * | fname = 0 |
||
| ) |
Write number of blocks and read buffer size
| fp | file handle |
| dname | directory name for trace output |
| fname | optional file name for trace output (can be included in dname) |
| void XrdPfc::Info::WriteIOStat | ( | Stats & | s | ) |
Write bytes missed, hits, and disk.
| void XrdPfc::Info::WriteIOStatAttach | ( | ) |
Write open time in the last entry of access statistics.
| void XrdPfc::Info::WriteIOStatDetach | ( | Stats & | s | ) |
Write close time together with bytes missed, hits, and disk.
| void XrdPfc::Info::WriteIOStatSingle | ( | long long | bytes_disk | ) |
Write single open/close time for given bytes read from disk.
| void XrdPfc::Info::WriteIOStatSingle | ( | long long | bytes_disk, |
| time_t | att, | ||
| time_t | dtc | ||
| ) |
Write open/close with given time and bytes read from disk.
|
protected |
access records
Referenced by RefAStats().
|
protected |
cached
Referenced by GetBitvecSizeInBytes(), GetExpectedDataFileSize(), GetLastDownloadedBlock(), GetNBlocks(), GetNDownloadedBlocks(), and UpdateDownloadCompleteStatus().
|
protected |
prefetch statistics
Referenced by SetBitPrefetch(), and TestBitPrefetch().
|
protected |
disk written state vector
Referenced by SetBitSynced().
|
protected |
download state vector
Referenced by SetBitWritten(), and TestBitWritten().
|
private |
|
protected |
cached; if false, set to true when missingBlocks hit zero
Referenced by IsComplete(), SetBitWritten(), and UpdateDownloadCompleteStatus().
|
protected |
constains current prefetch score
|
protected |
cached, updated in SetBitWritten()
Referenced by SetBitWritten(), and UpdateDownloadCompleteStatus().
|
protected |
Referenced by DowngradeCkSumState(), GetAccessCnt(), GetBufferSize(), GetCkSumState(), GetCreationTime(), GetExpectedDataFileSize(), GetFileSize(), GetNDownloadedBytes(), GetNoCkSumTime(), GetNoCkSumTimeForUVKeep(), HasNoCkSumTime(), IsCkSumAny(), IsCkSumBoth(), IsCkSumCache(), IsCkSumNet(), RefStoredData(), ResetNoCkSumTime(), and SetCkSumState().
|
protected |
Referenced by GetTrace().
|
static |
|
protected |
Referenced by GetVersion().
|
static |
|
static |
|
static |
|
static |
1.8.5