Alluxio CLI code for distributed load and copy always return zero.
See original GitHub issueIs your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I’m always frustrated when […]
I am interacting with the Alluxio form python code by creating the python sub process and executing commands like distributed load and copy. Alluxio code for distributed load and copy always return the zero value even though it couldn’t succeed in loading or copying all the files.
For example, Completed count is 203,Failed count is 617.
Code reference: https://github.com/Alluxio/alluxio/blob/2df1da2d4f6caa47574640bf54c52447e8c0f3ea/shell/src/main/java/alluxio/cli/fs/command/DistributedLoadCommand.java#L314
https://github.com/Alluxio/alluxio/blob/2df1da2d4f6caa47574640bf54c52447e8c0f3ea/shell/src/main/java/alluxio/cli/fs/command/DistributedCpCommand.java#L150
Describe the solution you’d like
A clear and concise description of what you want to happen.
If Alluxio code returns the appropriate integer value like -1 (Exception), 0(Successful) or 1(Error) , it would help parent process to take the decision and control the code flow accordingly. For example, in case of distributed load cli command, if Alluxio loads all the files it should return 0 to indicate successful copy; if it loads partial files and failed for other files, it should return 1 to indicate error in copying all the files; if it faces any exception while doing distributed load, it should return -1 to indicate its process abruption.
Describe alternatives you’ve considered
A clear and concise description of any alternative solutions or features you’ve considered.
As of now, Alluxio returns the zero value for any situation and prints the line Completed count is %d,Failed count is %d.
on console. I need to take the python sub process output, parse it, find the Failed count and make the decision like whether distributed load succeeded or not.
Urgency
Explain why the feature is important
It makes more sense to return appropriate value of the process rather than zero for all the situations. That’s how CLI works.
Additional context
Add any other context or screenshots about the feature request here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top GitHub Comments
@jja725 that’s cool ! agree, it would be duplicate effort. I am ready to help (design review, development, testing etc…) in case if you need. thank you.
Thanks for raising this issue! This is on our radar and would be addressed in the 2.8 release @vimalKeshu