[ https://issues.apache.org/jira/browse/HDFS-16188?focusedWorklogId=644080&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-644080 ]
ASF GitHub Bot logged work on HDFS-16188: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/Aug/21 14:45 Start Date: 31/Aug/21 14:45 Worklog Time Spent: 10m Work Description: LeonGao91 commented on a change in pull request #3346: URL: https://github.com/apache/hadoop/pull/3346#discussion_r698897540 ########## File path: hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/router/NamenodeHeartbeatService.java ########## @@ -113,47 +116,91 @@ public NamenodeHeartbeatService( } + /** + * Create a new Namenode status updater. + * + * @param resolver Namenode resolver service to handle NN registration. + * @param nsId Identifier of the nameservice. + * @param nnId Identifier of the namenode in HA. + * @param resolvedHost resolvedHostname for this specific namenode. + */ + public NamenodeHeartbeatService( + ActiveNamenodeResolver resolver, String nsId, String nnId, String resolvedHost) { + super(NamenodeHeartbeatService.class.getSimpleName() + Review comment: sure, will make a static method for this as it is calling super() ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/NNHAServiceTarget.java ########## @@ -56,9 +56,25 @@ private final String nnId; private final String nsId; private final boolean autoFailoverEnabled; - + public NNHAServiceTarget(Configuration conf, String nsId, String nnId) { + this(conf, nsId, nnId, null, null, null); + } + + /** + * Create a NNHAServiceTarget for a namenode. + * + * @param conf HDFS configuration. + * @param nsId nsId of this nn. + * @param nnId nnId of this nn. + * @param serviceAddr Provided service address. + * @param addr Provided service address. + * @param lifelineAddr Provided service address. + */ + public NNHAServiceTarget(Configuration conf, Review comment: Yeah this will look cleaner. I will need to remove the final key word from some vars as the assignment is out of the constructor. ########## File path: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/NNHAServiceTarget.java ########## @@ -56,9 +56,25 @@ private final String nnId; private final String nsId; private final boolean autoFailoverEnabled; - + public NNHAServiceTarget(Configuration conf, String nsId, String nnId) { + this(conf, nsId, nnId, null, null, null); + } + + /** + * Create a NNHAServiceTarget for a namenode. + * + * @param conf HDFS configuration. + * @param nsId nsId of this nn. + * @param nnId nnId of this nn. + * @param serviceAddr Provided service address. + * @param addr Provided service address. + * @param lifelineAddr Provided service address. + */ + public NNHAServiceTarget(Configuration conf, Review comment: Added a simple test per comment. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 644080) Time Spent: 1h 50m (was: 1h 40m) > RBF: Router to support resolving monitored namenodes with DNS > ------------------------------------------------------------- > > Key: HDFS-16188 > URL: https://issues.apache.org/jira/browse/HDFS-16188 > Project: Hadoop HDFS > Issue Type: Improvement > Components: rbf > Reporter: Leon Gao > Assignee: Leon Gao > Priority: Minor > Labels: pull-request-available > Time Spent: 1h 50m > Remaining Estimate: 0h > > We can use a DNS round-robin record to configure list of monitored namenodes, > so we don't have to reconfigure everything namenode hostname is changed. For > example, in containerized environment the hostname of namenode/observers can > change pretty often. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org