Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2802 Support for RW/RO snapshots in HDFS
  3. HDFS-4801

lsSnapshottableDir throws IllegalArgumentException when root is made snapshottable

    Details

    • Type: Sub-task Sub-task
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Snapshot (HDFS-2802)
    • Component/s: namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      $ hadoop dfsadmin -allowSnapshot /
      Allowing snaphot on / succeeded

      $ hadoop lsSnapshottableDir
      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.Path.<init>(Path.java:45)
      at org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus.getFullPath(SnapshottableDirectoryStatus.java:125)
      at org.apache.hadoop.hdfs.protocol.SnapshottableDirectoryStatus.print(SnapshottableDirectoryStatus.java:166)
      at org.apache.hadoop.hdfs.tools.snapshot.LsSnapshottableDir.main(LsSnapshottableDir.java:55)

      Whereas,
      $ hadoop dfsadmin -disallowSnapshot /
      Disallowing snaphot on / succeeded

      $ hadoop lsSnapshottableDir

      $

        Activity

        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-Snapshots-Branch-build #176 (See https://builds.apache.org/job/Hadoop-Hdfs-Snapshots-Branch-build/176/)
        HDFS-4801. lsSnapshottableDir throws IllegalArgumentException when root is snapshottable. Contributed by Jing Zhao (Revision 1479709)

        Result = FAILURE
        szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1479709
        Files :

        • /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt
        • /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshottableDirectoryStatus.java
        • /hadoop/common/branches/HDFS-2802/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshottableDirListing.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-Snapshots-Branch-build #176 (See https://builds.apache.org/job/Hadoop-Hdfs-Snapshots-Branch-build/176/ ) HDFS-4801 . lsSnapshottableDir throws IllegalArgumentException when root is snapshottable. Contributed by Jing Zhao (Revision 1479709) Result = FAILURE szetszwo : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1479709 Files : /hadoop/common/branches/ HDFS-2802 /hadoop-hdfs-project/hadoop-hdfs/CHANGES. HDFS-2802 .txt /hadoop/common/branches/ HDFS-2802 /hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/SnapshottableDirectoryStatus.java /hadoop/common/branches/ HDFS-2802 /hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestSnapshottableDirListing.java
        Tsz Wo Nicholas Sze made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Tsz Wo Nicholas Sze added a comment -

        I have committed this. Thanks Jing!

        Show
        Tsz Wo Nicholas Sze added a comment - I have committed this. Thanks Jing!
        Tsz Wo Nicholas Sze made changes -
        Hadoop Flags Reviewed [ 10343 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Component/s datanode [ 12312927 ]
        Hide
        Tsz Wo Nicholas Sze added a comment -

        +1 patch looks good.

        Show
        Tsz Wo Nicholas Sze added a comment - +1 patch looks good.
        Jing Zhao made changes -
        Attachment HDFS-4801.001.patch [ 12581918 ]
        Hide
        Jing Zhao added a comment -

        Thanks for the report Ramya! Upload the patch to fix. A unit test is also added to regenerate the case.

        Show
        Jing Zhao added a comment - Thanks for the report Ramya! Upload the patch to fix. A unit test is also added to regenerate the case.
        Jing Zhao made changes -
        Assignee Jing Zhao [ jingzhao ]
        Ramya Sunil made changes -
        Field Original Value New Value
        Component/s datanode [ 12312927 ]
        Component/s namenode [ 12312926 ]
        Ramya Sunil created issue -

          People

          • Assignee:
            Jing Zhao
            Reporter:
            Ramya Sunil
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development