[ 
https://issues.apache.org/jira/browse/HDFS-16411?focusedWorklogId=710679&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-710679
 ]

ASF GitHub Bot logged work on HDFS-16411:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Jan/22 17:36
            Start Date: 18/Jan/22 17:36
    Worklog Time Spent: 10m 
      Work Description: goiri commented on a change in pull request #3878:
URL: https://github.com/apache/hadoop/pull/3878#discussion_r786999615



##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Router.java
##########
@@ -308,6 +308,22 @@ protected void serviceInit(Configuration configuration) 
throws Exception {
     }
   }
 
+  private void checkRouterId() {

Review comment:
       Add a javadoc saying that we set the router if not set to prevent XYZ.

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Router.java
##########
@@ -308,6 +308,22 @@ protected void serviceInit(Configuration configuration) 
throws Exception {
     }
   }
 
+  private void checkRouterId() {
+    if (this.routerId == null) {
+      try {
+        String hostname = InetAddress.getLocalHost().getHostName();

Review comment:
       You could do:
   ```
   setRpcServerAddress(confRpcAddress);
   ```

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/Router.java
##########
@@ -195,7 +195,7 @@ protected void serviceInit(Configuration configuration) 
throws Exception {
       addService(this.rpcServer);
       this.setRpcServerAddress(rpcServer.getRpcAddress());
     }
-
+    checkRouterId();

Review comment:
       Add breaklines before and after.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 710679)
    Time Spent: 2h 40m  (was: 2.5h)

> RBF: RouterId is NULL when set dfs.federation.router.rpc.enable=false
> ---------------------------------------------------------------------
>
>                 Key: HDFS-16411
>                 URL: https://issues.apache.org/jira/browse/HDFS-16411
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: rbf
>            Reporter: YulongZ
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HDFS-16411.000.patch, HDFS-16411.001.patch, 
> HDFS-16411.002.patch, HDFS-16411.003.patch, HDFS-16411.004.patch
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> When dfs.federation.router.rpc.enable=false, routerid is null, but 
> RouterHeartbeatService need updateStateStore() with routerId.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to