Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
HDFS-7240
-
Reviewed
Description
At present the outputs of listVolume, listBucket and listKey are hard to parse, for example following call
./bin/hdfs oz -listVolume http://localhost:9864 -user wwei
lists all volumes in my cluster and it returns
{ "version" : 0, "md5hash" : null, "createdOn" : "Mon, 04 Sep 2017 03:25:22 GMT", "modifiedOn" : "Mon, 04 Sep 2017 03:25:22 GMT", "size" : 10240, "keyName" : "key-0-22381", "dataFileName" : null } { "version" : 0, "md5hash" : null, "createdOn" : "Mon, 04 Sep 2017 03:25:22 GMT", "modifiedOn" : "Mon, 04 Sep 2017 03:25:22 GMT", "size" : 10240, "keyName" : "key-0-22381", "dataFileName" : null } ...
this is not a valid JSON format output hence it is hard to parse in clients' script for further interactions. Propose to reformat them to valid JSON data.