Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-1902

du command throws an exception when the directory is not specified

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.13.1
    • 0.17.0
    • None
    • None

    Description

      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

      Attachments

        1. Hadoop-1902_1.patch
          2 kB
          Mahadev Konar

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mahadev Mahadev Konar
            mukundm Mukund Madhugiri
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment