[ 
https://issues.apache.org/jira/browse/HDFS-8448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593793#comment-14593793
 ] 

Anu Engineer commented on HDFS-8448:
------------------------------------

Thanks [~cnauroth] for the review.

bq.Can we remove the default constructor in OzoneException? In general, it's 
better practice to build an exception with a descriptive message and optionally 
a root cause exception. If a default constructor is available, then it might 
encourage writing code that doesn't provide a descriptive message

We serialize and deserialize this using jackson, hence the default constructor. 
I will check if it works correctly if we remove this.

bq. Do you think it makes sense for the *Args classes to be made immutable by 
moving all member initialization into the constructors and removing the setter 
methods?

The way we use *Args make it slightly hard to make it immutable. I can do it 
for a large number of fields, but one field - the userName in the UserArgs is 
an exception. The reason is that we create userArgs with requestID and hostname 
and then pass that to userAuth Interface and ask the Auth interface to return a 
user name. it is possible that call will fail at that location, then end user 
will get a request ID for the call that was made with appropriate error code - 
in this case for missing user name. if we get a valid user name we set that to 
userArgs and then call the underlying file system.

However I can make a large number of those fields immutable and I will do so.

bq. In general, there are inaccuracies in JavaDoc. I saw missing parameters or 
incorrect parameters in several of the classes. test-patch will catch these 
during the JavaDoc check, or you could review manually now.

Thanks for the catch, I will clean up the javadoc in the next patch.



> Create REST Interface for Volumes
> ---------------------------------
>
>                 Key: HDFS-8448
>                 URL: https://issues.apache.org/jira/browse/HDFS-8448
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Anu Engineer
>            Assignee: Anu Engineer
>         Attachments: hdfs-8448-HDFS-7240.003.patch, 
> hdfs-8448-hdfs-7240.001.patch, hdfs-8448-hdfs-7240.002.patch
>
>
> Create REST interfaces as specified in the architecture document.
> This Jira is for creating the Volume Interface



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to