diff --git a/src/common/hdfs/HdfsCommandHelper.cpp b/src/common/hdfs/HdfsCommandHelper.cpp index 14e6b7f98b8..117d3ffb6af 100644 --- a/src/common/hdfs/HdfsCommandHelper.cpp +++ b/src/common/hdfs/HdfsCommandHelper.cpp @@ -24,6 +24,9 @@ Status HdfsCommandHelper::ls(const std::string& hdfsHost, auto result = proc.wait(); if (!result.exited()) { return Status::Error("Failed to ls hdfs"); + } else if (result.exitStatus() != 0) { + LOG(INFO) << "Failed to ls: " << result.str(); + return Status::Error("Failed to ls hdfs, errno: %d", result.exitStatus()); } else { return Status::OK(); } @@ -47,6 +50,9 @@ Status HdfsCommandHelper::copyToLocal(const std::string& hdfsHost, auto result = proc.wait(); if (!result.exited()) { return Status::Error("Failed to download from hdfs"); + } else if (result.exitStatus() != 0) { + LOG(INFO) << "Failed to download: " << result.str(); + return Status::Error("Failed to download from hdfs, errno: %d", result.exitStatus()); } else { return Status::OK(); }