hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Ahrens (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-6345) Refactor Trash::moveToTrash() and its accompanying poor tests
Date Thu, 12 Nov 2009 17:20:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12777069#action_12777069
] 

Matt Ahrens commented on HADOOP-6345:
-------------------------------------

Path #3 needs clarification.  Code currently returns false when client tries to remove a file
in the trash.   However, the FsShell class handles the false return value by proceeding to
calling delete on the src (line 1152 in FsShell.java).  So we need to decide what behavior
should be when client tries to remove a file in the trash (path inputted is file in trash).

Options:
1) Keep current behavior and let a client remove a path that is in the trash. (Keep path #3
as is to return false.)
2) Modify to throw an exception when client tries to remove a path that is in the trash.

Any thoughts?

> Refactor Trash::moveToTrash() and its accompanying poor tests
> -------------------------------------------------------------
>
>                 Key: HADOOP-6345
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6345
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: fs
>            Reporter: Jakob Homan
>
> We've had several issues relating to the Trash and its access via the shell, none of
which were picked up by the unit tests.  The current moveToTrash method has 8 different ways
it can terminate and sometimes uses a false value and sometimes uses an exception to indicate
failure.  This method should be refactored to improve readability and testability, and new
tests written to exercise all possible code paths.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message