Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SMALLFIX] Updates for copyFromLocal (#8309)
* Update tests because copyFromLocal fails fast now. * Always shutdown threadpool. * Update description of cp -t. * Make sure threads are stopped under interruption. * Fix checkstyle. * Fix parsing of options in copyFromLocal. * Update description of copyFromLocal. * Log interrupted exceptions. * Revert "Update tests because copyFromLocal fails fast now." This reverts commit 7c82ec4. * Improve exception handling and error messages. When exceptions are thrown during copying a file or traversing directory, copyFromLocal will print an error message to stderr, but will continue copying other files in the best effort. After all copy tasks succeed or fail, a summary of all errors including stacktraces will be printed out at the bottom of the command's output. Example output: Failed to create directory /test/d Copied file:///tmp/test/f2 to /test/f2. Copied file:///tmp/test/d2/d/f to /test/d2/d/f. Copied file:///tmp/test/f1 to /test/f1. ERRORS: [java.io.IOException: Failed to create directory /test/d at alluxio.cli.fs.command.CpCommand.asyncCopyLocalPath(CpCommand.java:556) at alluxio.cli.fs.command.CpCommand.run(CpCommand.java:306) at alluxio.cli.fs.command.CopyFromLocalCommand.run(CopyFromLocalCommand.java:63) at alluxio.cli.AbstractShell.run(AbstractShell.java:105) at alluxio.cli.fs.FileSystemShell.main(FileSystemShell.java:66) Caused by: alluxio.exception.FileAlreadyExistsException: /test/d already exists at alluxio.client.file.BaseFileSystem.createDirectory(BaseFileSystem.java:107) at alluxio.client.file.BaseFileSystem.createDirectory(BaseFileSystem.java:95) at alluxio.cli.fs.command.CpCommand.asyncCopyLocalPath(CpCommand.java:554) ... 4 more ] * Fix checkstyle. * Refactor sendMessage into succeed and fail. * Fix checkstyle. * Log full stacktrace but just print short description of errors. * Do not show Exception class name in command line output. * Test parsing -t in copyFromLocal.
- Loading branch information
Showing
3 changed files
with
161 additions
and
59 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