Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
Expand Up@@ -91,13 +91,6 @@ public static String getRMWebAddress(Configuration config, String Rmid){
public static String getActiveResourceManagerAddress(Configuration config, String zkQuorum)
throws IOException, InterruptedException, KeeperException,
InvalidProtocolBufferException, ZooKeeperConnectionException {
// In case of yarn HA is NOT enabled
String resourceManager = PhoenixMRJobUtil.getRMWebAddress(config);

LOGGER.info("ResourceManagerAddress from config = " + resourceManager);
if(!resourceManager.equals(YarnConfiguration.DEFAULT_RM_WEBAPP_ADDRESS)){
return resourceManager;
}
// In case of yarn HA is enabled
ZKWatcher zkw = null;
ZooKeeper zk = null;
Expand DownExpand Up@@ -130,6 +123,11 @@ public static String getActiveResourceManagerAddress(Configuration config, Strin
if (zkw != null) zkw.close();
if (zk != null) zk.close();
}
// In case of yarn HA is NOT enabled
if (activeRMHost == null) {
activeRMHost = PhoenixMRJobUtil.getRMWebAddress(config);
LOGGER.info("ResourceManagerAddress from config = " + activeRMHost);
}

return activeRMHost;
}
Expand Down