XRootD
Loading...
Searching...
No Matches
XrdOssArcConfig.hh
Go to the documentation of this file.
1
#ifndef __XRDOSSARCCONFIG_HH__
2
#define __XRDOSSARCCONFIG_HH__
3
/******************************************************************************/
4
/* */
5
/* X r d O s s A r c C o n f i g . h h */
6
/* */
7
/* (c) 2023 by the Board of Trustees of the Leland Stanford, Jr., University */
8
/* Produced by Andrew Hanushevsky for Stanford University under contract */
9
/* DE-AC02-76-SFO0515 with the Deprtment of Energy */
10
/* */
11
/* This file is part of the XRootD software suite. */
12
/* */
13
/* XRootD is free software: you can redistribute it and/or modify it under */
14
/* the terms of the GNU Lesser General Public License as published by the */
15
/* Free Software Foundation, either version 3 of the License, or (at your */
16
/* option) any later version. */
17
/* */
18
/* XRootD is distributed in the hope that it will be useful, but WITHOUT */
19
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
20
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
21
/* License for more details. */
22
/* */
23
/* You should have received a copy of the GNU Lesser General Public License */
24
/* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
25
/* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
26
/* */
27
/* The copyright holder's institutional names and contributor's names may not */
28
/* be used to endorse or promote products derived from this software without */
29
/* specific prior written permission of the institution or contributor. */
30
/******************************************************************************/
31
32
class
XrdOucEnv
;
33
class
XrdOucProg
;
34
class
XrdOucGatherConf
;
35
class
XrdOssArcStopMon
;
36
37
class
XrdOssArcConfig
38
{
39
public
:
40
41
bool
BuildPath
(
const
char
* what,
const
char
* baseP,
42
const
char
* addP,
char
*& destP,
int
mode=0);
43
44
bool
Configure
(
const
char
* cfn,
const
char
* parms,
XrdOucEnv
* envP);
45
46
int
GenTapePath
(
const
char
* dsn,
char
* buff,
int
bSZ,
bool
addafn=
false
);
47
48
XrdOssArcConfig
();
49
~XrdOssArcConfig
() {}
// Never gets deleted
50
51
// Program section (i.e. the various scripts to launch
52
//
53
XrdOucProg
*
BkpUtilProg
;
// Various Rucio involved functions
54
char
*
BkpUtilPath
;
// The actual path to the program
55
const
char
*
BkpUtilName
;
// Last component for debugging
56
const
char
*
BkpUtilEOL
;
// Character sequence to indicate EOL
57
58
XrdOucProg
*
PrepArcProg
;
// Create an archive
59
char
*
PrepArcPath
;
// The actual path to the executable
60
const
char
*
PrepArcName
;
// Last component for debugging
61
62
XrdOucProg
*
PostArcProg
;
// Create an archive
63
char
*
PostArcPath
;
// The actual path to the executable
64
const
char
*
PostArcName
;
// Last component for debugging
65
66
XrdOucProg
*
ArchiverProg
;
// Create an archive
67
char
*
ArchiverPath
;
// The actual path to the executable
68
const
char
*
ArchiverName
;
// Last component for debugging
69
char
*
ArchiverSave
;
// The command to use to save archives for backup
70
71
XrdOucProg
*
MssComProg
;
// Communicate with the MSS
72
char
*
MssComPath
;
// Path to prog script
73
const
char
*
MssComName
;
// Last component for debugging
74
char
*
MssComCmd
;
// Actual command to be invoked
75
char
*
MssComRoot
;
// Root of the MSS Tape File System
76
77
// Path section
78
//
79
char
*
arcvPathLFN
;
// LFN of archive path, default "/archive/"
80
int
arcvPathLEN
;
// Length of the above
81
int
bkupPathLEN
;
// Length of the below
82
char
*
bkupPathLFN
;
// LFN of backup path, default "/backup/"
83
char
*
dsetPathLFN
;
// LFN of dataset path, default "/dataset/"
84
char
*
dsetRepoPFN
;
// Path to directory where dataset backups are staged
85
char
*
admnPath
;
// The admin path
86
char
*
srcData
;
// Root path to where srcrse data is mounted
87
char
*
stagePath
;
// Path to directory where zip members are extracted
88
char
*
stopPath
;
// Path where the stop file should be written
89
char
*
tapePath
;
// The full path of the tape disk buffer
90
int
tapePathLEN
;
// Length of the above
91
char
*
utilsPath
;
// Default path to utils
92
93
// Miscellaneous
94
//
95
XrdOssArcStopMon
*
stopMon
;
// Pointer to the parent stop monitor
96
97
const
char
*
metaBKP
;
// Metadata variable name of backup status
98
const
char
*
metaIDX
;
// Metadata variable name of ordinal index
99
char
*
doneBKP
;
// Metadata value indicating a backup completed
100
char
*
needBKP
;
// Metadata value indicating a backup is needed
101
char
*
dstRSE
;
// The name of the dest rse (our name)
102
char
*
srcRSE
;
// The name of the source rse
103
char
*
manCKS
;
// Checksum algorithm to add to manifest
104
long
long
bkpMinF
;
// Percentage or bytes that must be always available
105
int
bkpMax
;
// Maximum number of parallel backups
106
int
bkpPoll
;
// Polling interval to find new items to backup
107
int
bkpFSt
;
// Backup fs scan interval in seconds
108
int
maxStage
;
// Maximum number of parallel stages
109
int
wtpStage
;
// Staging Wait/Poll interval
110
int
r_maxItems
;
// rucio maximum response lines (query limit)
111
char
*
arFName
;
// Full archive filename (e.g. archive.zip)
112
char
*
arfSfx
;
// Archive file suffix
113
int
arfSfxLen
;
// Length of the above
114
int
stopChk
;
// Stat interval for STOP file
115
long
long
arcSZ_Want
;
// Preferred size of archive
116
long
long
arcSZ_MinV
;
// Minimum size archive can have
117
long
long
arcSZ_MaxV
;
// Maximum size archive can have
118
bool
arcSZ_Skip
;
// When true skip archiving if size can't be met
119
bool
bkpLocal
;
// T->Use fuse mount for backup, else do remote copy.
120
121
private
:
122
void
ConfigPath(
char
** pDest,
const
char
* pRoot);
123
bool
ConfigProc(
const
char
* drctv);
124
bool
ConfigXeq(
const
char
* cfName,
const
char
* parms,
XrdOucEnv
* envP);
125
int
GenLocalPath(
const
char
* dsn,
char
* buff,
int
bSZ);
126
bool
MissArg(
const
char
* what);
127
bool
Usable(
const
char
* path,
const
char
* what,
bool
useOss=
true
);
128
bool
xqGrab(
const
char
* what,
char
*& theDest,
const
char
* theLine);
129
bool
xqArcsz();
130
bool
xqBkup();
131
bool
xqBkupPS(
char
* tval);
132
bool
xqBkupScope();
133
bool
xqManf();
134
bool
xqPaths();
135
bool
xqRse();
136
bool
xqRucio();
137
bool
xqStage();
138
bool
xqTrace();
139
bool
xqUtils();
140
141
XrdOucGatherConf
* Conf;
142
};
143
#endif
XrdOssArcConfig::MssComCmd
char * MssComCmd
Definition
XrdOssArcConfig.hh:74
XrdOssArcConfig::arFName
char * arFName
Definition
XrdOssArcConfig.hh:111
XrdOssArcConfig::bkpPoll
int bkpPoll
Definition
XrdOssArcConfig.hh:106
XrdOssArcConfig::admnPath
char * admnPath
Definition
XrdOssArcConfig.hh:85
XrdOssArcConfig::PostArcName
const char * PostArcName
Definition
XrdOssArcConfig.hh:64
XrdOssArcConfig::bkupPathLEN
int bkupPathLEN
Definition
XrdOssArcConfig.hh:81
XrdOssArcConfig::MssComProg
XrdOucProg * MssComProg
Definition
XrdOssArcConfig.hh:71
XrdOssArcConfig::metaBKP
const char * metaBKP
Definition
XrdOssArcConfig.hh:97
XrdOssArcConfig::tapePath
char * tapePath
Definition
XrdOssArcConfig.hh:89
XrdOssArcConfig::metaIDX
const char * metaIDX
Definition
XrdOssArcConfig.hh:98
XrdOssArcConfig::XrdOssArcConfig
XrdOssArcConfig()
Definition
XrdOssArcConfig.cc:99
XrdOssArcConfig::tapePathLEN
int tapePathLEN
Definition
XrdOssArcConfig.hh:90
XrdOssArcConfig::BkpUtilEOL
const char * BkpUtilEOL
Definition
XrdOssArcConfig.hh:56
XrdOssArcConfig::BuildPath
bool BuildPath(const char *what, const char *baseP, const char *addP, char *&destP, int mode=0)
Definition
XrdOssArcConfig.cc:179
XrdOssArcConfig::MssComRoot
char * MssComRoot
Definition
XrdOssArcConfig.hh:75
XrdOssArcConfig::bkpMax
int bkpMax
Definition
XrdOssArcConfig.hh:105
XrdOssArcConfig::utilsPath
char * utilsPath
Definition
XrdOssArcConfig.hh:91
XrdOssArcConfig::r_maxItems
int r_maxItems
Definition
XrdOssArcConfig.hh:110
XrdOssArcConfig::dstRSE
char * dstRSE
Definition
XrdOssArcConfig.hh:101
XrdOssArcConfig::PostArcPath
char * PostArcPath
Definition
XrdOssArcConfig.hh:63
XrdOssArcConfig::bkpFSt
int bkpFSt
Definition
XrdOssArcConfig.hh:107
XrdOssArcConfig::stopMon
XrdOssArcStopMon * stopMon
Definition
XrdOssArcConfig.hh:95
XrdOssArcConfig::ArchiverProg
XrdOucProg * ArchiverProg
Definition
XrdOssArcConfig.hh:66
XrdOssArcConfig::arcvPathLFN
char * arcvPathLFN
Definition
XrdOssArcConfig.hh:79
XrdOssArcConfig::stopChk
int stopChk
Definition
XrdOssArcConfig.hh:114
XrdOssArcConfig::GenTapePath
int GenTapePath(const char *dsn, char *buff, int bSZ, bool addafn=false)
XrdOssArcConfig::bkpLocal
bool bkpLocal
Definition
XrdOssArcConfig.hh:119
XrdOssArcConfig::arcvPathLEN
int arcvPathLEN
Definition
XrdOssArcConfig.hh:80
XrdOssArcConfig::ArchiverName
const char * ArchiverName
Definition
XrdOssArcConfig.hh:68
XrdOssArcConfig::MssComName
const char * MssComName
Definition
XrdOssArcConfig.hh:73
XrdOssArcConfig::PrepArcName
const char * PrepArcName
Definition
XrdOssArcConfig.hh:60
XrdOssArcConfig::Configure
bool Configure(const char *cfn, const char *parms, XrdOucEnv *envP)
Definition
XrdOssArcConfig.cc:231
XrdOssArcConfig::ArchiverSave
char * ArchiverSave
Definition
XrdOssArcConfig.hh:69
XrdOssArcConfig::arfSfx
char * arfSfx
Definition
XrdOssArcConfig.hh:112
XrdOssArcConfig::doneBKP
char * doneBKP
Definition
XrdOssArcConfig.hh:99
XrdOssArcConfig::MssComPath
char * MssComPath
Definition
XrdOssArcConfig.hh:72
XrdOssArcConfig::srcData
char * srcData
Definition
XrdOssArcConfig.hh:86
XrdOssArcConfig::BkpUtilName
const char * BkpUtilName
Definition
XrdOssArcConfig.hh:55
XrdOssArcConfig::PrepArcPath
char * PrepArcPath
Definition
XrdOssArcConfig.hh:59
XrdOssArcConfig::arfSfxLen
int arfSfxLen
Definition
XrdOssArcConfig.hh:113
XrdOssArcConfig::ArchiverPath
char * ArchiverPath
Definition
XrdOssArcConfig.hh:67
XrdOssArcConfig::PrepArcProg
XrdOucProg * PrepArcProg
Definition
XrdOssArcConfig.hh:58
XrdOssArcConfig::~XrdOssArcConfig
~XrdOssArcConfig()
Definition
XrdOssArcConfig.hh:49
XrdOssArcConfig::maxStage
int maxStage
Definition
XrdOssArcConfig.hh:108
XrdOssArcConfig::bkupPathLFN
char * bkupPathLFN
Definition
XrdOssArcConfig.hh:82
XrdOssArcConfig::stopPath
char * stopPath
Definition
XrdOssArcConfig.hh:88
XrdOssArcConfig::dsetRepoPFN
char * dsetRepoPFN
Definition
XrdOssArcConfig.hh:84
XrdOssArcConfig::arcSZ_Skip
bool arcSZ_Skip
Definition
XrdOssArcConfig.hh:118
XrdOssArcConfig::BkpUtilPath
char * BkpUtilPath
Definition
XrdOssArcConfig.hh:54
XrdOssArcConfig::srcRSE
char * srcRSE
Definition
XrdOssArcConfig.hh:102
XrdOssArcConfig::bkpMinF
long long bkpMinF
Definition
XrdOssArcConfig.hh:104
XrdOssArcConfig::wtpStage
int wtpStage
Definition
XrdOssArcConfig.hh:109
XrdOssArcConfig::arcSZ_MaxV
long long arcSZ_MaxV
Definition
XrdOssArcConfig.hh:117
XrdOssArcConfig::PostArcProg
XrdOucProg * PostArcProg
Definition
XrdOssArcConfig.hh:62
XrdOssArcConfig::BkpUtilProg
XrdOucProg * BkpUtilProg
Definition
XrdOssArcConfig.hh:53
XrdOssArcConfig::needBKP
char * needBKP
Definition
XrdOssArcConfig.hh:100
XrdOssArcConfig::arcSZ_Want
long long arcSZ_Want
Definition
XrdOssArcConfig.hh:115
XrdOssArcConfig::dsetPathLFN
char * dsetPathLFN
Definition
XrdOssArcConfig.hh:83
XrdOssArcConfig::arcSZ_MinV
long long arcSZ_MinV
Definition
XrdOssArcConfig.hh:116
XrdOssArcConfig::stagePath
char * stagePath
Definition
XrdOssArcConfig.hh:87
XrdOssArcConfig::manCKS
char * manCKS
Definition
XrdOssArcConfig.hh:103
XrdOssArcStopMon
Definition
XrdOssArcStopMon.hh:43
XrdOucEnv
Definition
XrdOucEnv.hh:42
XrdOucGatherConf
Definition
XrdOucGatherConf.hh:36
XrdOucProg
Definition
XrdOucProg.hh:38
XrdOssArc
XrdOssArcConfig.hh
Generated by
1.16.1