Issue Details (XML | Word | Printable)

Key: HADOOP-2192
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mahadev konar
Reporter: Mukund Madhugiri
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

dfs mv command differs from POSIX standards

Created: 12/Nov/07 07:05 PM   Updated: 08/Jul/09 04:42 PM
Component/s: None
Affects Version/s: 0.15.1, 0.16.0
Fix Version/s: 0.17.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works Hadoop-2192_1.patch 2008-02-15 12:34 AM Mahadev konar 2 kB
Text File Licensed for inclusion in ASF works Hadoop-2192_2.patch 2008-02-16 01:00 AM Mahadev konar 3 kB
Text File Licensed for inclusion in ASF works Hadoop-2192_3.patch 2008-02-16 01:09 AM Mahadev konar 3 kB
Issue Links:
Dependants
 

Hadoop Flags: Reviewed, Incompatible change
Release Note: this patch makes dfs -mv more like linux mv command getting rid of unnecessary output in dfs -mv and returns an error message when moving non existent files/directories --- mv: cannot stat "filename": No such file or directory.
Resolution Date: 20/Feb/08 06:10 PM


 Description  « Hide
Assuming the dfs commands follow POSIX standards, there are some problems with the DFS mv command. I compared the DFS output with that of RHEL 4u5

1. mv a file:
Linux: No output
DFS: Renamed /testarea/hadoop-site.xml to test

2. mv a file/directory that does not exist. The DFS file does not exist, but the output says it renamed the file:
Linux: mv: cannot stat `testarea/one': No such file or directory
DFS: mv: Rename failed /testarea/one

3. mv a directory to another directory:
Linux: No output
DFS: Renamed /testarea to testarea2



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mahadev konar added a comment - 15/Feb/08 12:34 AM
this patch fixes the issues stated in the bug.

Lohit Vijayarenu added a comment - 15/Feb/08 06:48 PM
Looks good. Could we also get this fixed

Here build is dir and build.xml is file
DFS Output
[lohit@ hadoop-core-trunk]$ hadoop dfs -mv build build.xml
mv: Rename failed /user/lohit/build

LINUX output
[lohit@ hadoop-core-trunk]$ mv build build.xml
mv: cannot overwrite non-directory `build.xml' with directory `build'


Mahadev konar added a comment - 16/Feb/08 01:00 AM
this patch addresses the issue pointed out by lohit...

Mahadev konar added a comment - 16/Feb/08 01:09 AM
changed catchign IOException to FileNotfoundexception in call to getfilestatus. thanks lohit.

Lohit Vijayarenu added a comment - 16/Feb/08 01:17 AM
+1 looks good

Hadoop QA added a comment - 16/Feb/08 03:59 AM
+1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12375737/Hadoop-2192_3.patch
against trunk revision 619744.

@author +1. The patch does not contain any @author tags.

tests included +1. The patch appears to include 7 new or modified tests.

javadoc +1. The javadoc tool did not generate any warning messages.

javac +1. The applied patch does not generate any new javac compiler warnings.

release audit +1. The applied patch does not generate any new release audit warnings.

findbugs +1. The patch does not introduce any new Findbugs warnings.

core tests +1. The patch passed core unit tests.

contrib tests +1. The patch passed contrib unit tests.

Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/testReport/
Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/artifact/trunk/build/test/checkstyle-errors.html
Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch/1811/console

This message is automatically generated.


dhruba borthakur added a comment - 20/Feb/08 06:10 PM
I just committed this. Thanks Mahadev!

Hudson added a comment - 21/Feb/08 12:06 PM

Robert Chansler added a comment - 14/Apr/08 04:30 PM
Noted as incompatible in changes.txt