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

Íñigo Goiri commented on HDFS-14560:
------------------------------------

Thanks [~sodonnell] for tackling the comments.
{quote}
OK, I had never seen that before. TBH, I am not sure it improves the 
readability of the code, but it may be just because I am new to it. I have 
changed the tests to use intercept, so please check I am using it correctly, 
especially as we need to extract the 'cause' exception from the 
ReconfigurationException to validate the reason for the failure.
{quote}
This is usually useful but it is true that as you need to check getCause() it 
loses part of the magic here...
For checking the message of the exception is pretty useful.
To make it shorter we can do the lambda in a single statement:
{code}
ReconfigurationException re = LambdaTestUtils.intercept(
    ReconfigurationException.class,
    () -> cluster.getNameNode().reconfigurePropertyImpl(key, "0"));
{code}

There is still {{import org.apache.hadoop.hdfs.*;}} in 
TestRefreshNamenodeReplicationConfig.
We should also expand it.

Then for the new public methods, if we want to keep them, I would go for a full 
javadoc there.

Other than that I think this is good.

Regarding the point from [~hexiaoqiao], I think the infrastructure is there.
However, as [~sodonnell] mentioned, you have to go case by case which is a 
little painful and overkilled.
I'm not sure if the framework can be made more general.

> Allow block replication parameters to be refreshable
> ----------------------------------------------------
>
>                 Key: HDFS-14560
>                 URL: https://issues.apache.org/jira/browse/HDFS-14560
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: namenode
>    Affects Versions: 3.3.0
>            Reporter: Stephen O'Donnell
>            Assignee: Stephen O'Donnell
>            Priority: Major
>         Attachments: HDFS-14560.001.patch, HDFS-14560.002.patch, 
> HDFS-14560.003.patch
>
>
> There are 3 key parameters that control the speed of block replication across 
> the cluster:
> {code}
> dfs.namenode.replication.max-streams
> dfs.namenode.replication.max-streams-hard-limit
> dfs.namenode.replication.work.multiplier.per.iteration
> {code}
> These are used when decomissioning nodes and when under replicated blocks are 
> being recovered across the cluster. There are times when it may be desirable 
> to increase the speed of replication and then reduce it again (eg during off 
> peak hours) without restarting the namenode.
> Therefore it would be good to be able to reconfigure / refresh these 
> parameters dynamically without a namenode restart.
> This Jira is to allow these parameters to be refreshed at runtime without a 
> restart.



--
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