15 const std::vector<std::string> tokens =
SplitString(spooler_config,
',');
16 assert(tokens.size() == 3);
21 const std::string repo_config_file =
22 "/etc/cvmfs/repositories.d/" + repo_name +
"/server.conf";
28 "Could not parse repository configuration: %s.",
29 repo_config_file.c_str());
35 "Missing parameter %s in repository configuration file.",
40 if (parser.
IsDefined(
"CVMFS_SERVER_PROXY")) {
49 if (parser.
IsDefined(
"TEST_CVMFS_RECEIVER_UPSTREAM_STORAGE")) {
50 parser.
GetValue(
"TEST_CVMFS_RECEIVER_UPSTREAM_STORAGE",
53 if (!parser.
GetValue(
"CVMFS_UPSTREAM_STORAGE",
56 "Missing parameter %s in repository configuration file.",
57 "CVMFS_UPSTREAM_STORAGE");
62 std::string use_local_cache_str;
63 if (parser.
GetValue(
"CVMFS_SERVER_USE_CATALOG_CACHE", &use_local_cache_str)) {
70 std::string hash_algorithm_str;
71 if (!parser.
GetValue(
"CVMFS_HASH_ALGORITHM", &hash_algorithm_str)) {
73 "Missing parameter %s in repository configuration file.",
74 "CVMFS_HASH_ALGORITHM");
85 std::string use_chunking_str;
86 if (!parser.
GetValue(
"CVMFS_USE_FILE_CHUNKING", &use_chunking_str)) {
88 "Missing parameter %s in repository configuration file.",
89 "CVMFS_USE_FILE_CHUNKING");
94 std::string min_chunk_size_str;
95 if (!parser.
GetValue(
"CVMFS_MIN_CHUNK_SIZE", &min_chunk_size_str)) {
97 "Missing parameter %s in repository configuration file.",
98 "CVMFS_MIN_CHUNK_SIZE");
103 std::string avg_chunk_size_str;
104 if (!parser.
GetValue(
"CVMFS_AVG_CHUNK_SIZE", &avg_chunk_size_str)) {
106 "Missing parameter %s in repository configuration file.",
107 "CVMFS_AVG_CHUNK_SIZE");
112 std::string max_chunk_size_str;
113 if (!parser.
GetValue(
"CVMFS_MAX_CHUNK_SIZE", &max_chunk_size_str)) {
115 "Missing parameter %s in repository configuration file.",
116 "CVMFS_MAX_CHUNK_SIZE");
121 std::string garbage_collection_str;
122 if (!parser.
GetValue(
"CVMFS_GARBAGE_COLLECTION", &garbage_collection_str)) {
124 "Missing parameter %s in repository configuration file.",
125 "CVMFS_GARBAGE_COLLECTION");
130 std::string use_autocatalogs_str;
131 if (!parser.
GetValue(
"CVMFS_AUTOCATALOGS", &use_autocatalogs_str)) {
133 "Missing parameter %s in repository configuration file.",
134 "CVMFS_AUTOCATALOGS");
139 std::string max_weight_str;
140 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MAX_WEIGHT", &max_weight_str)) {
144 std::string min_weight_str;
145 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MIN_WEIGHT", &min_weight_str)) {
149 std::string enforce_limits_str;
150 if (parser.
GetValue(
"CVMFS_ENFORCE_LIMITS", &enforce_limits_str)) {
157 std::string nested_kcatalog_limit_str;
158 if (parser.
GetValue(
"CVMFS_NESTED_KCATALOG_LIMIT",
159 &nested_kcatalog_limit_str)) {
164 std::string root_kcatalog_limit_str;
165 if (parser.
GetValue(
"CVMFS_ROOT_KCATALOG_LIMIT", &root_kcatalog_limit_str)) {
170 std::string file_mbyte_limit_str;
171 if (parser.
GetValue(
"CVMFS_FILE_MBYTE_LIMIT", &file_mbyte_limit_str)) {
175 std::string upload_stats_db_str;
176 if (parser.
GetValue(
"CVMFS_UPLOAD_STATS_DB", &upload_stats_db_str)) {
std::string spooler_configuration
zlib::Algorithms compression_alg
size_t nested_kcatalog_limit
bool GetParamsFromFile(const std::string &repo_name, Params *params)
bool IsOn(const std::string ¶m_value) const
assert((mem||(size==0))&&"Out Of Memory")
std::string GetSpoolerTempDir(const std::string &spooler_config)
bool TryParsePath(const std::string &config_file)
vector< string > SplitString(const string &str, char delim)
bool GetValue(const std::string &key, std::string *value) const
uint64_t String2Uint64(const string &value)
Algorithms ParseHashAlgorithm(const string &algorithm_option)
size_t root_kcatalog_limit
bool generate_legacy_bulk_chunks
bool IsDefined(const std::string &key)
shash::Algorithms hash_alg
CVMFS_EXPORT void LogCvmfs(const LogSource source, const int mask, const char *format,...)