dhirajh commented on a change in pull request #1964:
URL: https://github.com/apache/hadoop/pull/1964#discussion_r413393035
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
##########
@@ -111,8 +111,11 @@ protected HAServiceTarget dataToTarget(byte[] data) {
@Override
protected InetSocketAddress getRpcAddressToBindTo() {
int zkfcPort = getZkfcPort(conf);
- return new InetSocketAddress(localTarget.getAddress().getAddress(),
- zkfcPort);
+ String zkfcBindAddr = getZkfcServerBindHost(conf);
+ if (zkfcBindAddr == null || zkfcBindAddr.isEmpty()) {
Review comment:
Fixed, removed the lines.
##########
File path:
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ha/ZKFailoverController.java
##########
@@ -321,6 +321,7 @@ private void initHM() {
protected void initRPC() throws IOException {
InetSocketAddress bindAddr = getRpcAddressToBindTo();
+ LOG.info("ZKFC RpcServer binding to " + bindAddr);
Review comment:
Fixed
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSZKFailoverController.java
##########
@@ -125,7 +128,21 @@ static int getZkfcPort(Configuration conf) {
return conf.getInt(DFSConfigKeys.DFS_HA_ZKFC_PORT_KEY,
DFSConfigKeys.DFS_HA_ZKFC_PORT_DEFAULT);
}
-
+
+ /** Given a configuration get the bind host that could be used by ZKFC.
Review comment:
Fixed. Added javadoc
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]