hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Pfuntner (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-5740) getmerge file system shell command needs error message for user error
Date Wed, 08 Jan 2014 21:04:50 GMT
John Pfuntner created HDFS-5740:
-----------------------------------

             Summary: getmerge file system shell command needs error message for user error
                 Key: HDFS-5740
                 URL: https://issues.apache.org/jira/browse/HDFS-5740
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: hdfs-client
    Affects Versions: 1.1.2
         Environment: {noformat}[jpfuntner@h58 tmp]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Santiago)
[jpfuntner@h58 tmp]$ hadoop version
Hadoop 1.1.2.21
Subversion  -r 
Compiled by jenkins on Thu Jan 10 03:38:39 PST 2013
>From source with checksum ce0aa0de785f572347f1afee69c73861{noformat}
            Reporter: John Pfuntner
            Priority: Minor


I naively tried a {{getmerge}} operation but it didn't seem to do anything and there was no
error message:

{noformat}[jpfuntner@h58 tmp]$ hadoop fs -mkdir /user/jpfuntner/tmp
[jpfuntner@h58 tmp]$ num=0; while [ $num -lt 5 ]; do echo file$num | hadoop fs -put - /user/jpfuntner/tmp/file$num;
let num=num+1; done
[jpfuntner@h58 tmp]$ ls -A
[jpfuntner@h58 tmp]$ hadoop fs -getmerge /user/jpfuntner/tmp/file* files.txt
[jpfuntner@h58 tmp]$ ls -A
[jpfuntner@h58 tmp]$ hadoop fs -ls /user/jpfuntner/tmp
Found 5 items
-rw-------   3 jpfuntner hdfs          6 2014-01-08 17:37 /user/jpfuntner/tmp/file0
-rw-------   3 jpfuntner hdfs          6 2014-01-08 17:37 /user/jpfuntner/tmp/file1
-rw-------   3 jpfuntner hdfs          6 2014-01-08 17:37 /user/jpfuntner/tmp/file2
-rw-------   3 jpfuntner hdfs          6 2014-01-08 17:37 /user/jpfuntner/tmp/file3
-rw-------   3 jpfuntner hdfs          6 2014-01-08 17:37 /user/jpfuntner/tmp/file4
[jpfuntner@h58 tmp]$ {noformat}

It was pointed out to me that I made a mistake and my source should have been a directory
not a set of regular files.  It works if I use the directory:

{noformat}[jpfuntner@h58 tmp]$ hadoop fs -getmerge /user/jpfuntner/tmp/ files.txt
[jpfuntner@h58 tmp]$ ls -A
files.txt  .files.txt.crc
[jpfuntner@h58 tmp]$ cat files.txt
file0
file1
file2
file3
file4
[jpfuntner@h58 tmp]$ {noformat}

I think the {{getmerge}} command should issue an error message to let the user know they made
a mistake.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message