| 78 | } |
| 79 | |
| 80 | std::string DatabaseHDFS::getTablePath(const std::string & table_name) const |
| 81 | { |
| 82 | if (table_name.starts_with("hdfs://")) |
| 83 | return table_name; |
| 84 | |
| 85 | if (source.empty()) |
| 86 | throw Exception(ErrorCodes::BAD_ARGUMENTS, "Bad HDFS URL: {}. " |
| 87 | "It should have the following structure 'hdfs://<host_name>:<port>/path'", table_name); |
| 88 | |
| 89 | return fs::path(source) / table_name; |
| 90 | } |
| 91 | |
| 92 | bool DatabaseHDFS::checkUrl(const std::string & url, ContextPtr context_, bool throw_on_error) const |
| 93 | { |