Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamlined error handling in TFsShell
All the TFsShell methods were supposed to return 0 on success and -1 on failure, but they could also throw IOExceptions in certain cases. Furthermore, the command runner would catch any IOExceptions and return -1 anyways, so there was no clear distinction between returning -1 and throwing an IOException. Now all the TFsShell methods only throw IOExceptions in case of error, and the runner will catch any exception, print it, and return -1. Made copyFromLocal, copyToLocal, and touch shell operations more atomic These two shell operations create files in Tachyon, then do more TachyonFS operations on the created files. If the subsequent TachyonFS operations fail, we could throw an exception, but the file we created would still be lying around. This adds some clean up code to those functions which tries to delete the created file if subsequent operations failed. Note that other methods didn't need to be modified because they either don't create files in Tachyon, or they accomplish everything with a single TachyonFS call.
- Loading branch information
Showing
7 changed files
with
423 additions
and
453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.