MCPcopy Create free account
hub / github.com/apache/impala / GetHdfsErrorMsg

Function GetHdfsErrorMsg

be/src/util/hdfs-util.cc:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44const char* FILESYS_PREFIX_OBS = "obs://";
45
46string 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
61Status GetFileSize(const hdfsFS& connection, const char* filename, int64_t* filesize) {
62 hdfsFileInfo* info = hdfsGetPathInfo(connection, filename);

Callers 15

ClosePartitionFileMethod · 0.85
CreateNewTmpFileMethod · 0.85
WriteMethod · 0.85
GetConnectionMethod · 0.85
VerifyAndCreateMethod · 0.85
DoOpenMethod · 0.85
ReadFromPosInternalMethod · 0.85
DoUploadMethod · 0.85
DoFetchMethod · 0.85
ExecuteMethod · 0.85

Calls 2

GetStrErrMsgFunction · 0.85
strMethod · 0.45

Tested by

no test coverage detected