Commit 72956167 authored by Steven Murray's avatar Steven Murray
Browse files

Simplfied the implementation of TapedConfiguration

parent f91e9850
......@@ -47,67 +47,64 @@ struct TapedConfiguration {
// Basics: tp config
//----------------------------------------------------------------------------
/// The log mask. Logs with a level lower than this value will be masked.
SourcedParameter<std::string> logMask = decltype(logMask)
("taped", "LogMask", "DEBUG", "Compile time default");
SourcedParameter<std::string> logMask{
"taped", "LogMask", "DEBUG", "Compile time default"};
/// Path to the file describing the tape drives (TPCONFIG)
SourcedParameter<std::string> tpConfigPath = decltype(tpConfigPath)
("taped" , "TpConfigPath", "/etc/cta/TPCONFIG", "Compile time default");
SourcedParameter<std::string> tpConfigPath{
"taped" , "TpConfigPath", "/etc/cta/TPCONFIG", "Compile time default"};
/// Extracted drives configuration.
Tpconfig driveConfigs;
//----------------------------------------------------------------------------
// Memory management
//----------------------------------------------------------------------------
/// Memory buffer size (with a default of 5MB). TODO-switch to 32MB once validated in CASTOR.
SourcedParameter<uint64_t> bufferSize = decltype(bufferSize)
("taped", "BufferSize", 5*1025*1024, "Compile time default");
SourcedParameter<uint64_t> bufferSize{
"taped", "BufferSize", 5*1025*1024, "Compile time default"};
/// Memory buffer count per drive. There is no default to this one.
SourcedParameter<uint64_t> bufferCount = decltype(bufferCount)
("taped", "BufferCount");
SourcedParameter<uint64_t> bufferCount{
"taped", "BufferCount"};
//----------------------------------------------------------------------------
// Batched metadata access and tape write flush parameters
//----------------------------------------------------------------------------
/// The fetch size for archive requests
SourcedParameter<FetchReportOrFlushLimits> archiveFetchBytesFiles =
decltype(archiveFetchBytesFiles)
("taped", "ArchiveFetchBytesFiles", {80L*1000*1000*1000, 500}, "Compile time default");
SourcedParameter<FetchReportOrFlushLimits> archiveFetchBytesFiles{
"taped", "ArchiveFetchBytesFiles", {80L*1000*1000*1000, 500}, "Compile time default"};
/// The flush to tape criteria for archiving
SourcedParameter<FetchReportOrFlushLimits> archiveFlushBytesFiles =
decltype(archiveFlushBytesFiles)
("taped", "ArchiveFlushBytesFiles", {32L*1000*1000*1000, 200}, "Compile time default");
SourcedParameter<FetchReportOrFlushLimits> archiveFlushBytesFiles{
"taped", "ArchiveFlushBytesFiles", {32L*1000*1000*1000, 200}, "Compile time default"};
/// The fetch and report size for retrieve requests
SourcedParameter<FetchReportOrFlushLimits> retrieveFetchBytesFiles =
decltype(retrieveFetchBytesFiles)
("taped", "RetrieveFetchBytesFiles", {80L*1000*1000*1000, 500}, "Compile time default");
SourcedParameter<FetchReportOrFlushLimits> retrieveFetchBytesFiles{
"taped", "RetrieveFetchBytesFiles", {80L*1000*1000*1000, 500}, "Compile time default"};
//----------------------------------------------------------------------------
// Disk file access parameters
//----------------------------------------------------------------------------
/// Number of disk threads. This is the number of parallel file transfers.
SourcedParameter<uint64_t> nbDiskThreads = decltype(nbDiskThreads)
("taped", "NbDiskThreads", 10, "Compile time default");
SourcedParameter<uint64_t> nbDiskThreads{
"taped", "NbDiskThreads", 10, "Compile time default"};
//----------------------------------------------------------------------------
// Watchdog: parameters for timeouts in various situations.
//----------------------------------------------------------------------------
/// Maximum time allowed to complete a single mount scheduling.
SourcedParameter<time_t> wdScheduleMaxSecs = decltype(wdScheduleMaxSecs)
("taped", "WatchdogScheduleMaxSecs", 60, "Compile time default");
SourcedParameter<time_t> wdScheduleMaxSecs{
"taped", "WatchdogScheduleMaxSecs", 60, "Compile time default"};
/// Maximum time allowed to complete mount a tape.
SourcedParameter<time_t> wdMountMaxSecs =decltype(wdMountMaxSecs)
("taped", "WatchdogMountMaxSecs", 900, "Compile time default");
SourcedParameter<time_t> wdMountMaxSecs{
"taped", "WatchdogMountMaxSecs", 900, "Compile time default"};
/// Maximum time allowed after mounting without a single tape block move
SourcedParameter<time_t> wdNoBlockMoveMaxSecs = decltype(wdNoBlockMoveMaxSecs)
("taped", "WatchdogNoBlockMoveMaxSecs", 1800, "Compile time default");
SourcedParameter<time_t> wdNoBlockMoveMaxSecs{
"taped", "WatchdogNoBlockMoveMaxSecs", 1800, "Compile time default"};
/// Time to wait after scheduling came up idle
SourcedParameter<time_t> wdIdleSessionTimer = decltype(wdIdleSessionTimer)
("taped", "WatchdogIdleSessionTimer", 10, "Compile time default");
SourcedParameter<time_t> wdIdleSessionTimer{
"taped", "WatchdogIdleSessionTimer", 10, "Compile time default"};
//----------------------------------------------------------------------------
// The central storage access configuration
//----------------------------------------------------------------------------
/// URL of the object store.
SourcedParameter<std::string> objectStoreURL = decltype(objectStoreURL)
("general", "ObjectStoreURL");
SourcedParameter<std::string> objectStoreURL{
"general", "ObjectStoreURL"};
/// Path to the file catalog config file
SourcedParameter<std::string> fileCatalogConfigFile = decltype(fileCatalogConfigFile)
("general", "FileCatalogConfigFile", "/etc/cta/cta_catalogue_db.conf", "Compile time default");
SourcedParameter<std::string> fileCatalogConfigFile{
"general", "FileCatalogConfigFile", "/etc/cta/cta_catalogue_db.conf", "Compile time default"};
private:
/** A private dummy logger which will simplify the implementation of the
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment