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");
73 std::string compression_algorithm_str;
74 if (!parser.
GetValue(
"CVMFS_COMPRESSION_ALGORITHM",
75 &compression_algorithm_str)) {
77 "Missing parameter %s in repository configuration file.",
78 "CVMFS_COMPRESSION_ALGORITHM");
90 std::string use_chunking_str;
91 if (!parser.
GetValue(
"CVMFS_USE_FILE_CHUNKING", &use_chunking_str)) {
93 "Missing parameter %s in repository configuration file.",
94 "CVMFS_USE_FILE_CHUNKING");
99 std::string min_chunk_size_str;
100 if (!parser.
GetValue(
"CVMFS_MIN_CHUNK_SIZE", &min_chunk_size_str)) {
102 "Missing parameter %s in repository configuration file.",
103 "CVMFS_MIN_CHUNK_SIZE");
108 std::string avg_chunk_size_str;
109 if (!parser.
GetValue(
"CVMFS_AVG_CHUNK_SIZE", &avg_chunk_size_str)) {
111 "Missing parameter %s in repository configuration file.",
112 "CVMFS_AVG_CHUNK_SIZE");
117 std::string max_chunk_size_str;
118 if (!parser.
GetValue(
"CVMFS_MAX_CHUNK_SIZE", &max_chunk_size_str)) {
120 "Missing parameter %s in repository configuration file.",
121 "CVMFS_MAX_CHUNK_SIZE");
126 std::string garbage_collection_str;
127 if (!parser.
GetValue(
"CVMFS_GARBAGE_COLLECTION", &garbage_collection_str)) {
129 "Missing parameter %s in repository configuration file.",
130 "CVMFS_GARBAGE_COLLECTION");
135 std::string use_autocatalogs_str;
136 if (!parser.
GetValue(
"CVMFS_AUTOCATALOGS", &use_autocatalogs_str)) {
138 "Missing parameter %s in repository configuration file.",
139 "CVMFS_AUTOCATALOGS");
144 std::string max_weight_str;
145 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MAX_WEIGHT", &max_weight_str)) {
149 std::string min_weight_str;
150 if (parser.
GetValue(
"CVMFS_AUTOCATALOGS_MIN_WEIGHT", &min_weight_str)) {
154 std::string enforce_limits_str;
155 if (parser.
GetValue(
"CVMFS_ENFORCE_LIMITS", &enforce_limits_str)) {
162 std::string nested_kcatalog_limit_str;
163 if (parser.
GetValue(
"CVMFS_NESTED_KCATALOG_LIMIT",
164 &nested_kcatalog_limit_str)) {
169 std::string root_kcatalog_limit_str;
170 if (parser.
GetValue(
"CVMFS_ROOT_KCATALOG_LIMIT", &root_kcatalog_limit_str)) {
175 std::string file_mbyte_limit_str;
176 if (parser.
GetValue(
"CVMFS_FILE_MBYTE_LIMIT", &file_mbyte_limit_str)) {
180 std::string upload_stats_db_str;
181 if (parser.
GetValue(
"CVMFS_UPLOAD_STATS_DB", &upload_stats_db_str)) {
#define LogCvmfs(source, mask,...)
Algorithms ParseCompressionAlgorithm(const std::string &algorithm_option)
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