Hi all, also while working on the DataNodeServerCli I noticed that we don’t actually handle how CLIs deal with issues correctly. While in most case in case of a successful operation we return a code of 0, we don’t consequently do this in case of issues. Sometimes we return -1 or other cases, but in most cases we simply fire exceptions that terminate the CLI.
I think we should define a set of globally adopted return codes and consequently catch and handle all exceptions that could occur in CLIs and map these to these standard return codes and log readable messages instead of dumping stack-traces. While for a human running these scripts, the stacktrace usually should provide enough information, they might be overwhelmed by chains of stacktraces … also does a process calling these scripts don’t know how to interpret them. What do you think?
