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

Xiaoyu Yao commented on HDFS-10207:
-----------------------------------

[~xiaobingo], thanks for updating the patch. Here are my new comments on patch 
v004

1. Remove unused imports in Namenode.java
+import java.util.Set;

import java.util.Collections; 
since the RECONFIGURABLE_PROPERTIES is changed from 
Collections.unmodifiableList to Sets.newTreeSet(Lists.newArrayList(...)

2. Do we want to keep the unmodifieableList to avoid creating new list upon 
each NamenodeRpcServer#listReconfigurableProperties() call? 

3. NIT: NameNode#initBackoffEnableKeys can be changed to 
NameNode#initReconfigurableBackoffKey to avoid confusion. 

4. NIT: An extra space TestNameNodeReconfigure (line 109 )
* Test to reconfigure enable/disable IPC backoff
 */

5. Test code below can be simplified:
{code}
     String IPC_CLIENT_RPC_BACKOFF_ENABLE;
116     
117         /**
118          * Test IPC_CLIENT_RPC_BACKOFF_ENABLE
119          */
120         IPC_CLIENT_RPC_BACKOFF_ENABLE = NameNode.buildBackoffEnableKey(nnrs
121             .getClientRpcServer().getPort());
{code}

into 
{code}
String IPC_CLIENT_RPC_BACKOFF_ENABLE = NameNode.buildBackoffEnableKey(nnrs
121             .getClientRpcServer().getPort());
{code}

6. This test verification logic can be wrapped into helper functions with a 
single boolean parameter for better reuse and clarity. 

{code}
125         assertEquals(IPC_CLIENT_RPC_BACKOFF_ENABLE + " has wrong value", 
false,
126             nnrs.getClientRpcServer().isClientBackoffEnabled());
127         assertEquals(
128             IPC_CLIENT_RPC_BACKOFF_ENABLE + " has wrong value",
129             false,
130             nameNode.getConf().getBoolean(IPC_CLIENT_RPC_BACKOFF_ENABLE,
131                 IPC_BACKOFF_ENABLE_DEFAULT));
{code}



> Support enable Hadoop IPC backoff without namenode restart
> ----------------------------------------------------------
>
>                 Key: HDFS-10207
>                 URL: https://issues.apache.org/jira/browse/HDFS-10207
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Xiaoyu Yao
>            Assignee: Xiaobing Zhou
>         Attachments: HDFS-10207-HDFS-9000.000.patch, 
> HDFS-10207-HDFS-9000.001.patch, HDFS-10207-HDFS-9000.002.patch, 
> HDFS-10207-HDFS-9000.003.patch, HDFS-10207-HDFS-9000.004.patch
>
>
> It will be useful to allow changing {{ipc.#port#.backoff.enable}} without a 
> namenode restart to protect namenode from being overloaded.



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

Reply via email to