-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix download always return succeeded #4442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
} else { | ||
return Status::Error(folly::stringPrintf("Failed to run %s", command.c_str())); | ||
try { | ||
folly::Subprocess proc(std::vector<std::string>({command})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
} else { | ||
return Status::Error(folly::stringPrintf("Failed to run %s", command.c_str())); | ||
try { | ||
folly::Subprocess proc(std::vector<std::string>({command})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here actually may have some trouble with system environment variable. May use /bin/bash/ -c
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Close #4321, #4382
Description:
ProcessUtils::runCommand
will always return ok. So we can't tell whether hdfs command succeeded or not.How do you solve it?
Use SubProcess to execute shell command.
Special notes for your reviewer, ex. impact of this fix, design document, etc:
After this PR, if the hdfs address is illegal, the
show job
is weird (job failed but task succeed), probably same as #4263, will try to fix it later.Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: