Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
HDFS-7240
-
Reviewed
Description
Tried listing an empty bucket and it fails with
[root@88970a014980 opt]# hadoop-3.0.0-alpha4-SNAPSHOT/bin/hdfs oz -listKey http://localhost:9864/vol1/bucket1 Command Failed : {"httpCode":400,"shortMessage":"invalidResourceName","resource":"vol1/bucket1","message":"Invalid volume, bucket or key name.","requestID":"a38471bb-3fbf-416f-b89d-758506185244","hostName":"88970a014980"}
However after adding one key the same command works.
[root@88970a014980 opt]# hadoop-3.0.0-alpha4-SNAPSHOT/bin/hdfs oz -listKey http://localhost:9864/vol1/bucket1 { "version" : 0, "md5hash" : "d41d8cd98f00b204e9800998ecf8427e", "createdOn" : "Thu, 27 Jul 2017 11:43:55 +0000", "size" : 0, "keyName" : "key1" }
I feel that for an empty bucket, an empty json should be returned.