xiaoyuyao opened a new pull request #272: HDDS-2629. Ozone CLI: 
CreationTime/modifyTime of volume/bucket/key in…
URL: https://github.com/apache/hadoop-ozone/pull/272
 
 
   …fo are not formatted.
   
   ## What changes were proposed in this pull request?
   Format JSON output of volume/bucket/key info properly in a readable format. 
   
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-2629
   
   ## How was this patch tested?
   unit test and run ozone CLI in docker-compose and validate the output like 
below
   
   `bash-4.2$ ozone sh vol info /vol1
   {
     "metadata" : { },
     "name" : "vol1",
     "admin" : "hadoop",
     "owner" : "hadoop",
     "creationTime" : "2019-11-27T06:08:15.546Z",
     "acls" : [ {
       "type" : "USER",
       "name" : "hadoop",
       "aclScope" : "ACCESS",
       "aclList" : [ "ALL" ]
     }, {
       "type" : "GROUP",
       "name" : "users",
       "aclScope" : "ACCESS",
       "aclList" : [ "ALL" ]
     } ],
     "quota" : 1152921504606846976
   }
   
   bash-4.2$ ozone sh bucket info /vol1/bucket1
   {
     "metadata" : { },
     "volumeName" : "vol1",
     "name" : "bucket1",
     "storageType" : "DISK",
     "versioning" : false,
     "creationTime" : "2019-11-27T06:08:21.148Z",
     "encryptionKeyName" : null
   }
   
   
   bash-4.2$ ozone sh key info /vol1/bucket1/key1
   {
     "volumeName" : "vol1",
     "bucketName" : "bucket1",
     "name" : "key1",
     "dataSize" : 3813,
     "creationTime" : "2019-11-27T06:08:33.206Z",
     "modificationTime" : "2019-11-27T06:08:35.558Z",
     "replicationType" : "RATIS",
     "replicationFactor" : 3,
     "ozoneKeyLocations" : [ {
       "containerID" : 1,
       "localID" : 103208380870754304,
       "length" : 3813,
       "offset" : 0
     } ],
     "metadata" : { },
     "fileEncryptionInfo" : null
   }
   `
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to