[
https://issues.apache.org/jira/browse/HDFS-8717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14631696#comment-14631696
]
Anu Engineer commented on HDFS-8717:
------------------------------------
This is a very good question, the reason why we have these 2 functions has
nothing to do with Json serialization at all. All classes inside the response
directory are classes that are part of the REST protocol. That is , it is part
of our contract for this version of the Ozone protocol. However the server
would find it very easy to maintain some extra fields in these response classes
so that it can maintain some meta-data about these classes. So all Response
classes have these 2 functions. toJSonString -- that returns the REST interface
as we will document and toDBString , which contains all the REST fields +
private fields that are specific to the server.
I have added a comment to reflect this in BucketInfo.
> OzoneHandler : Add common bucket objects
> ----------------------------------------
>
> Key: HDFS-8717
> URL: https://issues.apache.org/jira/browse/HDFS-8717
> Project: Hadoop HDFS
> Issue Type: Sub-task
> Components: ozone
> Affects Versions: HDFS-7240
> Reporter: Anu Engineer
> Assignee: Anu Engineer
> Fix For: HDFS-7240
>
> Attachments: hdfs-8717-HDFS-7240.001.patch,
> hdfs-8717-HDFS-7240.002.patch
>
>
> Add common bucket classes that are needed by the bucket REST interface.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)