Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-9302

WebHDFS truncate throws NullPointerException if newLength is not provided

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7.1
    • Fix Version/s: 2.8.0, 3.0.0-alpha1
    • Component/s: webhdfs
    • Labels:
      None
    • Environment:

      Centos6

    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      $ curl -X POST "http://namenode:50070/webhdfs/v1/foo?op=truncate"
      {"RemoteException":{"exception":"NullPointerException","javaClassName":"java.lang.NullPointerException","message":null}}

      We should change newLength to be a required parameter in the webhdfs documentation (https://hadoop.apache.org/docs/r2.7.1/hadoop-project-dist/hadoop-hdfs/WebHDFS.html#New_Length), and throw an IllegalArgumentException if isn't provided.

        Attachments

        1. HDFS-9302_00.patch
          1 kB
          Jagadesh Kiran N
        2. HDFS-9302_01.patch
          1 kB
          Jagadesh Kiran N

          Issue Links

            Activity

              People

              • Assignee:
                jagadesh.kiran Jagadesh Kiran N
                Reporter:
                Karthik Palaniappan Karthik Palaniappan
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: