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");
63 std::string hash_algorithm_str;
64 if (!parser.
GetValue(
"CVMFS_HASH_ALGORITHM", &hash_algorithm_str)) {
66 "Missing parameter %s in repository configuration file.",
67 "CVMFS_HASH_ALGORITHM");
78 std::string use_chunking_str;
79 if (!parser.
GetValue(
"CVMFS_USE_FILE_CHUNKING", &use_chunking_str)) {
81 "Missing parameter %s in repository configuration file.",
82 "CVMFS_USE_FILE_CHUNKING");
87 std::string min_chunk_size_str;
88 if (!parser.
GetValue(
"CVMFS_MIN_CHUNK_SIZE", &min_chunk_size_str)) {
90 "Missing parameter %s in repository configuration file.",
91 "CVMFS_MIN_CHUNK_SIZE");
96 std::string avg_chunk_size_str;
97 if (!parser.
GetValue(
"CVMFS_AVG_CHUNK_SIZE", &avg_chunk_size_str)) {
99 "Missing parameter %s in repository configuration file.",
100 "CVMFS_AVG_CHUNK_SIZE");
105 std::string max_chunk_size_str;
106 if (!parser.
GetValue(
"CVMFS_MAX_CHUNK_SIZE", &max_chunk_size_str)) {
108 "Missing parameter %s in repository configuration file.",
109 "CVMFS_MAX_CHUNK_SIZE");
114 std::string garbage_collection_str;
115 if (!parser.
GetValue(
"CVMFS_GARBAGE_COLLECTION", &garbage_collection_str)) {
117 "Missing parameter %s in repository configuration file.",
118 "CVMFS_GARBAGE_COLLECTION");
123 std::string use_autocatalogs_str;
124 if (!parser.
GetValue(
"CVMFS_AUTOCATALOGS", &use_autocatalogs_str)) {
126 "Missing parameter %s in repository configuration file.",
127 "CVMFS_AUTOCATALOGS");
132 std::string max_weight_str;
133 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MAX_WEIGHT", &max_weight_str)) {
137 std::string min_weight_str;
138 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MIN_WEIGHT", &min_weight_str)) {
142 std::string enforce_limits_str;
143 if (parser.
GetValue(
"CVMFS_ENFORCE_LIMITS", &enforce_limits_str)) {
150 std::string nested_kcatalog_limit_str;
151 if (parser.
GetValue(
"CVMFS_NESTED_KCATALOG_LIMIT",
152 &nested_kcatalog_limit_str)) {
157 std::string root_kcatalog_limit_str;
158 if (parser.
GetValue(
"CVMFS_ROOT_KCATALOG_LIMIT", &root_kcatalog_limit_str)) {
163 std::string file_mbyte_limit_str;
164 if (parser.
GetValue(
"CVMFS_FILE_MBYTE_LIMIT", &file_mbyte_limit_str)) {
168 std::string upload_stats_db_str;
169 if (parser.
GetValue(
"CVMFS_UPLOAD_STATS_DB", &upload_stats_db_str)) {
#define LogCvmfs(source, mask,...)
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