Repository: ambari Updated Branches: refs/heads/branch-alerts-dev 3e54f9568 -> 445a53cf5
AMBARI-7588. Slider View: Properties required by Slider View when RM HA is enabled - view params fix (srimanth) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5e549b9e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5e549b9e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5e549b9e Branch: refs/heads/branch-alerts-dev Commit: 5e549b9e6133ea359b247c27a9065e9fec83ad51 Parents: 2430e39 Author: Srimanth Gunturi <[email protected]> Authored: Wed Oct 1 13:33:15 2014 -0700 Committer: Srimanth Gunturi <[email protected]> Committed: Wed Oct 1 13:33:15 2014 -0700 ---------------------------------------------------------------------- .../view/slider/SliderAppsViewControllerImpl.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/5e549b9e/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java ---------------------------------------------------------------------- diff --git a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java index a2ce65f..0bf8b9b 100644 --- a/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java +++ b/contrib/views/slider/src/main/java/org/apache/ambari/view/slider/SliderAppsViewControllerImpl.java @@ -468,6 +468,8 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { String zkQuorum = viewContext.getProperties().get(PROPERTY_ZK_QUOROM); boolean securedCluster = Boolean.valueOf(viewContext.getProperties().get(PROPERTY_SLIDER_SECURITY_ENABLED)); String rmHAHosts = viewContext.getProperties().get(PROPERTY_YARN_RM_HA_HOSTS); + String rmStoreClass = viewContext.getProperties().get(PROPERTY_YARN_RM_STORE_CLASS); + String rmHAAutoFailoverPath = viewContext.getProperties().get(PROPERTY_YARN_RM_HA_AUTO_FAILOVER_ZKPATH); HdfsConfiguration hdfsConfig = new HdfsConfiguration(); YarnConfiguration yarnConfig = new YarnConfiguration(hdfsConfig); @@ -491,18 +493,13 @@ public class SliderAppsViewControllerImpl implements SliderAppsViewController { yarnConfig.set("slider.security.enabled", "true"); } - if (rmHAHosts != null && rmHAHosts.trim().length() > 0) { + if (rmHAHosts != null && rmHAHosts.trim().length() > 0 && rmStoreClass!=null && rmHAAutoFailoverPath!=null) { yarnConfig.set("yarn.resourcemanager.ha.enabled", "true"); yarnConfig.set("yarn.resourcemanager.cluster-id", "yarn-cluster"); yarnConfig.set("yarn.resourcemanager.recovery.enabled", "true"); - if (viewContext.getProperties().containsKey(PROPERTY_YARN_RM_STORE_CLASS)) { - yarnConfig.set("yarn.resourcemanager.store.class", viewContext - .getProperties().get(PROPERTY_YARN_RM_STORE_CLASS)); - } - if (viewContext.getProperties().containsKey(PROPERTY_YARN_RM_HA_AUTO_FAILOVER_ZKPATH)) { - yarnConfig.set("yarn.resourcemanager.ha.automatic-failover.zk-base-path", viewContext - .getProperties().get(PROPERTY_YARN_RM_HA_AUTO_FAILOVER_ZKPATH)); - } + yarnConfig.set("yarn.resourcemanager.store.class", rmStoreClass); + yarnConfig.set("yarn.resourcemanager.ha.automatic-failover.zk-base-path", + rmHAAutoFailoverPath); // ZK int count = 1; String[] zkHostPorts = zkQuorum.split(",");
