| 430 | {} |
| 431 | |
| 432 | void CreateRequestGenerator::getFromConfigImpl(const std::string & key, const Poco::Util::AbstractConfiguration & config) |
| 433 | { |
| 434 | if (config.has(key + ".watch_probability")) |
| 435 | throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "watch_probability is not supported for create requests (key '{}')", key); |
| 436 | |
| 437 | parent_path = PathGetter::fromConfig(key, config); |
| 438 | |
| 439 | name = StringGetter(NumberGetter::fromConfig(key + ".name_length", config, 10)); |
| 440 | |
| 441 | if (config.has(key + ".data")) |
| 442 | data = StringGetter::fromConfig(key + ".data", config); |
| 443 | |
| 444 | if (config.has(key + ".remove_factor")) |
| 445 | { |
| 446 | remove_factor = config.getDouble(key + ".remove_factor"); |
| 447 | if (*remove_factor < 0.0 || *remove_factor > 1.0) |
| 448 | throw DB::Exception(DB::ErrorCodes::BAD_ARGUMENTS, "remove_factor must be in [0.0, 1.0], got {}", *remove_factor); |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | std::string CreateRequestGenerator::descriptionImpl() |
| 453 | { |
nothing calls this directly
no test coverage detected