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

Rushabh S Shah commented on HDFS-11754:
---------------------------------------

Hi [~erofeev],
Thanks for the latest patch.
The patch looks almost close.
Some minor comments on the last patch.
1. From the patch:
bq. +      spyNamesystem.getServerDefaults().getKeyProviderUri();
I don't see any relevance to this line in the patch.

2. From the patch,
{code:title=TestFileCreation.java|borderStyle=solid}
public String testServerDefaultsWithCaching()
{
    FsServerDefaults newFsServerDefaults = 
spy(spyNamesystem.getServerDefaults());     
    doReturn(updatedDefaultBlockSize).when(newFsServerDefaults).getBlockSize();
    doReturn(newFsServerDefaults).when(spyNamesystem).getServerDefaults();
}
{code}
Spying on object which is already a spy.
The logic seems little bit twisted and took me some time to understand.
Do you mind creating a new FsServerDefaults object instead of spying ?

3. There are some checkstyle issues. Please fix them.

4. I copied the patch to eclipse IDE. In test case, eclipse is warning about 
DFSClient not being close.
Please close all the opened clients.


> Make FsServerDefaults cache configurable.
> -----------------------------------------
>
>                 Key: HDFS-11754
>                 URL: https://issues.apache.org/jira/browse/HDFS-11754
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 2.6.0
>            Reporter: Rushabh S Shah
>            Assignee: Mikhail Erofeev
>            Priority: Minor
>              Labels: newbie
>             Fix For: 2.9.0
>
>         Attachments: HDFS-11754.001.patch, HDFS-11754.002.patch, 
> HDFS-11754.003.patch, HDFS-11754.004.patch, HDFS-11754.005.patch
>
>
> DFSClient caches the result of FsServerDefaults for 60 minutes.
> But the 60 minutes time is not configurable.
> Continuing the discussion from HDFS-11702, it would be nice if we can make 
> this configurable and make the default as 60 minutes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to