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

Erik Krogen commented on HDFS-13767:
------------------------------------

Cool, thanks for incorporating the feedback Chen! I agree with Konstantin's 
comments and have a few more to add:

* The comment at the top of {{GlobalStateIdContext#receiveRequestState()}} is a 
little confusing. I agree that we don't need to care about the client state in 
this case, but shouldn't we still return {{header.getStateId()}} to meet the 
interface contract? Is there any disadvantage to doing so?
* I'm not a fan of the changes within {{Server#run()}}; they are extremely 
HDFS-specific in a Hadoop-general class. It seems it would be better if there 
was a way for the {{AlignmentContext}}, a generic/pluggable component, to make 
the decision about how to handle the call. Something like a new method 
{{boolean shouldDeferProcessing(Server.Call call)}}
* GlobalStateIdContext L81/82, you shouldn't use a string comparison to compare 
an enum, you can use {{FSNamesystem#getState()}} to retrieve the enum directly.
* In {{TestObserverNode}}, you shouldn't use a star-import for {{Assert}}. 
Also, this is nitpicky, but the {{AtomicBoolean}} import should probably be 
grouped with the other {{java.}} imports.
* Why did you move {{setUpCluster()}} out of {{TestObserverNode#setUp()}} and 
into the individual test methods? It seems like code duplication without any 
advantage. Let me know if I'm missing something.
* You can make the tests much faster by enabling in-progress edit log tailing 
which will use the new fast-path from HDFS-13150 :) Just use configs like:
{code}
    conf.setBoolean(DFSConfigKeys.DFS_HA_TAILEDITS_INPROGRESS_KEY, true);
    conf.setTimeDuration(DFS_HA_TAILEDITS_PERIOD_KEY, 100, 
TimeUnit.MILLISECONDS);
{code}
Note that you should use the {{setTimeDuration}} for time-related configs these 
days; else you get messages like:
{code}INFO  Configuration.deprecation (Configuration.java:logDeprecation(1395)) 
- No unit for dfs.ha.log-roll.period(60) assuming SECONDS{code}

> Add msync server implementation.
> --------------------------------
>
>                 Key: HDFS-13767
>                 URL: https://issues.apache.org/jira/browse/HDFS-13767
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Chen Liang
>            Assignee: Chen Liang
>            Priority: Major
>         Attachments: HDFS-13767-HDFS-12943.001.patch, 
> HDFS-13767.WIP.001.patch, HDFS-13767.WIP.002.patch, HDFS-13767.WIP.003.patch, 
> HDFS-13767.WIP.004.patch
>
>
> This is a followup on HDFS-13688, where msync API is introduced to 
> {{ClientProtocol}} but the server side implementation is missing. This is 
> Jira is to implement the server side logic.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to