| 80 | } |
| 81 | |
| 82 | Status CopyHdfsFile(const hdfsFS& src_conn, const string& src_path, |
| 83 | const hdfsFS& dst_conn, const string& dst_path) { |
| 84 | int error = hdfsCopy(src_conn, src_path.c_str(), dst_conn, dst_path.c_str()); |
| 85 | if (error != 0) { |
| 86 | string error_msg = GetHdfsErrorMsg(""); |
| 87 | stringstream ss; |
| 88 | ss << "Failed to copy " << src_path << " to " << dst_path << ": " << error_msg; |
| 89 | return Status(ss.str()); |
| 90 | } |
| 91 | return Status::OK(); |
| 92 | } |
| 93 | |
| 94 | static bool IsSpecificPath( |
| 95 | const char* path, const char* specific_prefix, bool check_default_fs) { |
no test coverage detected