hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yi Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-9302) WebHDFS throws NullPointerException if newLength is not provided
Date Sun, 25 Oct 2015 04:15:27 GMT

    [ https://issues.apache.org/jira/browse/HDFS-9302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14973001#comment-14973001
] 

Yi Liu commented on HDFS-9302:
------------------------------

[~Karthik Palaniappan],  thanks for reporting this, it's better to return a better exception
and error msg to user if there is no {{newLength}}.
This can be done by checking whether newLength is null string (NewLengthParam#DEFAULT) in
{{NamenodeWebHdfsMethods}}, feel free to upload a patch to fix it.

In the document, the newLength is already a required parameter, for any optional parameter,
there is []

> WebHDFS throws NullPointerException if newLength is not provided
> ----------------------------------------------------------------
>
>                 Key: HDFS-9302
>                 URL: https://issues.apache.org/jira/browse/HDFS-9302
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: HDFS
>    Affects Versions: 2.7.1
>         Environment: Centos6
>            Reporter: Karthik Palaniappan
>            Priority: Minor
>
> $ 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message