Siyao Meng created HDFS-13868:
---------------------------------
Summary: WebHDFS: GETSNAPSHOTDIFF API NPE when param
"snapshotname" is given but "oldsnapshotname" is not.
Key: HDFS-13868
URL: https://issues.apache.org/jira/browse/HDFS-13868
Project: Hadoop HDFS
Issue Type: Bug
Components: webhdfs
Reporter: Siyao Meng
Proof:
{code:java}
# Bash
$ curl
"http://<SERVER>:<PORT>/webhdfs/v1/snaptest/?op=GETSNAPSHOTDIFF&user.name=hdfs&oldsnapshotnameZZZ=snap2&snapshotname=snap3"
# Note that I intentionally typed the wrong parameter name for
"oldsnapshotname" above to cause NPE.
{"RemoteException":{"exception":"NullPointerException","javaClassName":"java.lang.NullPointerException","message":null}}
# OR
$ curl
"http://<SERVER>:<PORT>/webhdfs/v1/snaptest/?op=GETSNAPSHOTDIFF&user.name=hdfs&oldsnapshotname=&snapshotname=snap3"
{"RemoteException":{"exception":"NullPointerException","javaClassName":"java.lang.NullPointerException","message":null}}
# OR
$ curl
"http://<SERVER>:<PORT>/webhdfs/v1/snaptest/?op=GETSNAPSHOTDIFF&user.name=hdfs&snapshotname=snap3"
{"RemoteException":{"exception":"NullPointerException","javaClassName":"java.lang.NullPointerException","message":null}{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]