Repository: ambari Updated Branches: refs/heads/branch-2.1 20a899d91 -> 466a421da refs/heads/trunk 6779e0c95 -> e05ee943e
AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA. Additional fix (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/466a421d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/466a421d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/466a421d Branch: refs/heads/branch-2.1 Commit: 466a421da267b29b2f22b45e7af9ca4b2a0ca1d0 Parents: 20a899d Author: Lisnichenko Dmitro <[email protected]> Authored: Wed Jun 10 20:45:37 2015 +0300 Committer: Lisnichenko Dmitro <[email protected]> Committed: Wed Jun 10 20:45:37 2015 +0300 ---------------------------------------------------------------------- .../STORM/0.9.1.2.1/package/scripts/params_linux.py | 8 ++++---- .../STORM/0.9.1.2.1/package/scripts/params_windows.py | 9 +++++---- .../HDP/2.3/services/STORM/configuration/storm-site.xml | 2 +- .../HDPWIN/2.3/services/STORM/configuration/storm-site.xml | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py index d0ed8f0..68f2d0e 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_linux.py @@ -90,17 +90,17 @@ storm_zookeeper_port = config['configurations']['storm-site']['storm.zookeeper.p nimbus_seeds_supported = default('/configurations/storm-env/nimbus_seeds_supported', False) nimbus_host = default('/configurations/storm-site/nimbus.host', None) nimbus_seeds = default('/configurations/storm-site/nimbus.seeds', None) -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) -actual_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count', None) -default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', None) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) #Calculate topology.max.replication.wait.time.sec and topology.min.replication.count if len(nimbus_hosts) > 1: + # for HA Nimbus actual_topology_max_replication_wait_time_sec = -1 actual_topology_min_replication_count = 2 else: + # for non-HA Nimbus actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec actual_topology_min_replication_count = default_topology_min_replication_count http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py index 688b1d9..4853762 100644 --- a/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py +++ b/ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py @@ -20,6 +20,7 @@ limitations under the License. from resource_management import * from status_params import * +from resource_management.libraries.functions.default import default # server configurations config = Script.get_config() @@ -32,17 +33,17 @@ hadoop_user = config["configurations"]["cluster-env"]["hadoop.user.name"] storm_user = hadoop_user security_enabled = config['configurations']['cluster-env']['security_enabled'] -default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', None) -actual_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec', None) +default_topology_max_replication_wait_time_sec = default('/configurations/storm-site/topology.max.replication.wait.time.sec.default', -1) nimbus_hosts = default("/clusterHostInfo/nimbus_hosts", []) -actual_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count', None) -default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', None) +default_topology_min_replication_count = default('/configurations/storm-site/topology.min.replication.count.default', 1) #Calculate topology.max.replication.wait.time.sec and topology.min.replication.count if len(nimbus_hosts) > 1: + # for HA Nimbus actual_topology_max_replication_wait_time_sec = -1 actual_topology_min_replication_count = 2 else: + # for non-HA Nimbus actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec actual_topology_min_replication_count = default_topology_min_replication_count http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/configuration/storm-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/configuration/storm-site.xml index c7309e5..bbe0a3d 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/configuration/storm-site.xml +++ b/ambari-server/src/main/resources/stacks/HDP/2.3/services/STORM/configuration/storm-site.xml @@ -27,7 +27,7 @@ <property> <name>topology.min.replication.count.default</name> <value>1</value> - <description>Dafault minimum number of nimbus hosts where the code must be replicated before leader nimbus can mark the topology as active and create assignments. </description> + <description>Default minimum number of nimbus hosts where the code must be replicated before leader nimbus can mark the topology as active and create assignments. </description> </property> <property> <name>topology.min.replication.count</name> http://git-wip-us.apache.org/repos/asf/ambari/blob/466a421d/ambari-server/src/main/resources/stacks/HDPWIN/2.3/services/STORM/configuration/storm-site.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.3/services/STORM/configuration/storm-site.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.3/services/STORM/configuration/storm-site.xml index 4656a45..67cc62d 100644 --- a/ambari-server/src/main/resources/stacks/HDPWIN/2.3/services/STORM/configuration/storm-site.xml +++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.3/services/STORM/configuration/storm-site.xml @@ -27,7 +27,7 @@ <property> <name>topology.min.replication.count.default</name> <value>1</value> - <description>Dafault minimum number of nimbus hosts where the code must be replicated before leader nimbus can mark the topology as active and create assignments. </description> + <description>Default minimum number of nimbus hosts where the code must be replicated before leader nimbus can mark the topology as active and create assignments. </description> </property> <property> <name>topology.min.replication.count</name>
