| 44 | const char* FILESYS_PREFIX_OBS = "obs://"; |
| 45 | |
| 46 | string GetHdfsErrorMsg(const string& prefix, const string& file) { |
| 47 | string error_msg = GetStrErrMsg(); |
| 48 | stringstream ss; |
| 49 | ss << prefix << file << "\n" << error_msg; |
| 50 | char* root_cause = hdfsGetLastExceptionRootCause(); |
| 51 | if (root_cause != nullptr) { |
| 52 | ss << "\nRoot cause: " << root_cause; |
| 53 | } |
| 54 | char* stack_trace = hdfsGetLastExceptionStackTrace(); |
| 55 | if (stack_trace != nullptr) { |
| 56 | ss << "\nStack trace:\n" << stack_trace; |
| 57 | } |
| 58 | return ss.str(); |
| 59 | } |
| 60 | |
| 61 | Status GetFileSize(const hdfsFS& connection, const char* filename, int64_t* filesize) { |
| 62 | hdfsFileInfo* info = hdfsGetPathInfo(connection, filename); |
no test coverage detected