FAQ
du command throws an exception when the directory is not specified
------------------------------------------------------------------

Key: HADOOP-1902
URL: https://issues.apache.org/jira/browse/HADOOP-1902
Project: Hadoop
Issue Type: Bug
Components: dfs
Affects Versions: 0.13.1
Reporter: Mukund Madhugiri


Running the du command without specifying a directory throws an exception. It runs fine if a directory is specified. Here is the output

mukundm@ucdev28 hadoop]$ bin/hadoop dfs -du
Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from an empty string
at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
at org.apache.hadoop.fs.Path.(FsShell.java:351)
at org.apache.hadoop.fs.FsShell.run(FsShell.java:1040)
at org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:189)
at org.apache.hadoop.fs.FsShell.main(FsShell.java:1092)

[mukundm@ucdev28 hadoop]$ bin/hadoop dfs -du .
Found 2 items
/user/mukundm/input 28578
/user/mukundm/output 747

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

Search Discussions

  • Enis Soztutar (JIRA) at Sep 17, 2007 at 7:47 am
    [ https://issues.apache.org/jira/browse/HADOOP-1902?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527974 ]

    Enis Soztutar commented on HADOOP-1902:
    ---------------------------------------

    This is indeed the desired behavior. Because we do not want to invoke the Path constructor with empty string. see HADOOP-1386. If you do not have any specific reasons to use du command w/o path argument, then we can close this issue as invalid.
    du command throws an exception when the directory is not specified
    ------------------------------------------------------------------

    Key: HADOOP-1902
    URL: https://issues.apache.org/jira/browse/HADOOP-1902
    Project: Hadoop
    Issue Type: Bug
    Components: dfs
    Affects Versions: 0.13.1
    Reporter: Mukund Madhugiri

    Running the du command without specifying a directory throws an exception. It runs fine if a directory is specified. Here is the output
    mukundm@ucdev28 hadoop]$ bin/hadoop dfs -du
    Exception in thread "main" java.lang.IllegalArgumentException: Can not create a Path from an empty string
    at org.apache.hadoop.fs.Path.checkPathArg(Path.java:82)
    at org.apache.hadoop.fs.Path.<init>(Path.java:90)
    at org.apache.hadoop.fs.FsShell.du(FsShell.java:351)
    at org.apache.hadoop.fs.FsShell.run(FsShell.java:1040)
    at org.apache.hadoop.util.ToolBase.doMain(ToolBase.java:189)
    at org.apache.hadoop.fs.FsShell.main(FsShell.java:1092)
    [mukundm@ucdev28 hadoop]$ bin/hadoop dfs -du .
    Found 2 items
    /user/mukundm/input 28578
    /user/mukundm/output 747
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedSep 15, '07 at 1:08a
activeSep 17, '07 at 7:47a
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Enis Soztutar (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase