ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject [2/2] ambari git commit: AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA (dlysnichenko)
Date Wed, 27 May 2015 17:23:05 GMT
AMBARI-11435. Tell Ambari the value of topology.max.replication.wait.time.sec for Storm HA
(dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/90bd51a8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/90bd51a8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/90bd51a8

Branch: refs/heads/trunk
Commit: 90bd51a81b7b93de3ed73d6f674fbc6c035786e8
Parents: 1a6dd84
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Wed May 27 20:22:12 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Wed May 27 20:22:12 2015 +0300

----------------------------------------------------------------------
 .../0.9.1.2.1/package/scripts/params_linux.py   | 13 ++++++++++++
 .../services/STORM/configuration/storm-site.xml | 22 ++++++++++++++------
 .../services/STORM/configuration/storm-site.xml | 22 ++++++++++++++------
 ambari-web/app/controllers/main/host/details.js | 11 ----------
 4 files changed, 45 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/90bd51a8/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 41ea1ac..5ae7170 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
@@ -89,6 +89,19 @@ storm_zookeeper_servers = default('/configurations/storm-site/storm.zookeeper.se
 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)
+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)
+
+#Calculate topology.max.replication.wait.time.sec and topology.min.replication.count
+if len(nimbus_hosts) > 1:
+  actual_topology_max_replication_wait_time_sec = -1
+  actual_topology_min_replication_count = 2
+else:
+  actual_topology_max_replication_wait_time_sec = default_topology_max_replication_wait_time_sec
+  actual_topology_min_replication_count = default_topology_min_replication_count  
 
 rest_api_port = "8745"
 rest_api_admin_port = "8746"

http://git-wip-us.apache.org/repos/asf/ambari/blob/90bd51a8/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 373f408..c7309e5 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
@@ -25,15 +25,25 @@
     <description>Comma-delimited list of the hosts running nimbus server.</description>
   </property>
   <property>
-    <name>topology.min.replication.count</name>
+    <name>topology.min.replication.count.default</name>
     <value>1</value>
-    <description> 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>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>
   </property>
-   <property>
-      <name>topology.max.replication.wait.time.sec</name>
+  <property>
+    <name>topology.min.replication.count</name>
+    <value>{{actual_topology_min_replication_count}}</value>
+    <description>Calculated 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.max.replication.wait.time.sec.default</name>
       <value>60</value>
-      <description>Maximum wait time for the nimbus host replication to achieve the
nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and perform topology
activation tasks even if required nimbus.min.replication.count is not achieved</description>
-   </property>
+      <description>Default maximum wait time for the nimbus host replication to achieve
the nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and perform
topology activation tasks even if required nimbus.min.replication.count is not achieved</description>
+  </property>
+  <property>
+      <name>topology.max.replication.wait.time.sec</name>
+      <value>{{actual_topology_max_replication_wait_time_sec}}</value>
+      <description>Calculated maximum wait time for the nimbus host replication to
achieve the nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and
perform topology activation tasks even if required nimbus.min.replication.count is not achieved</description>
+  </property>  
    <property>
     <name>nimbus.host</name>
     <value>localhost</value>

http://git-wip-us.apache.org/repos/asf/ambari/blob/90bd51a8/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 373f408..4656a45 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
@@ -25,15 +25,25 @@
     <description>Comma-delimited list of the hosts running nimbus server.</description>
   </property>
   <property>
-    <name>topology.min.replication.count</name>
+    <name>topology.min.replication.count.default</name>
     <value>1</value>
-    <description> 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>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>
   </property>
-   <property>
-      <name>topology.max.replication.wait.time.sec</name>
+  <property>
+    <name>topology.min.replication.count</name>
+    <value>{{actual_topology_min_replication_count}}</value>
+    <description>Calculated 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.max.replication.wait.time.sec.default</name>
       <value>60</value>
-      <description>Maximum wait time for the nimbus host replication to achieve the
nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and perform topology
activation tasks even if required nimbus.min.replication.count is not achieved</description>
-   </property>
+      <description>Default maximum wait time for the nimbus host replication to achieve
the nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and perform
topology activation tasks even if required nimbus.min.replication.count is not achieved</description>
+  </property>
+  <property>
+      <name>topology.max.replication.wait.time.sec</name>
+      <value>{{actual_topology_max_replication_wait_time_sec}}</value>
+      <description>Calculated maximum wait time for the nimbus host replication to
achieve the nimbus.min.replication.count. Once this time is elapsed nimbus will go ahead and
perform topology activation tasks even if required nimbus.min.replication.count is not achieved</description>
+  </property> 
    <property>
     <name>nimbus.host</name>
     <value>localhost</value>

http://git-wip-us.apache.org/repos/asf/ambari/blob/90bd51a8/ambari-web/app/controllers/main/host/details.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js
index 034ceae..8ebb6d6 100644
--- a/ambari-web/app/controllers/main/host/details.js
+++ b/ambari-web/app/controllers/main/host/details.js
@@ -703,17 +703,6 @@ App.MainHostDetailsController = Em.Controller.extend({
     }, this);
 
     configs['storm-site']['nimbus.seeds'] = JSON.stringify(stormNimbusHosts).replace(/"/g,
"'");
-
-    if (stormNimbusHosts.length > 1) {
-      // for HA Nimbus
-      configs['storm-site']['topology.max.replication.wait.time.sec'] = '-1';
-      configs['storm-site']['topology.min.replication.count'] = '2';
-    } else {
-      // for non-HA Nimbus
-      configs['storm-site']['topology.max.replication.wait.time.sec'] = App.StackConfigProperty.find().findProperty('name',
'topology.max.replication.wait.time.sec').get('value');
-      configs['storm-site']['topology.min.replication.count'] = App.StackConfigProperty.find().findProperty('name',
'topology.min.replication.count').get('value');
-    }
-
     var groups = [
       {
         properties: {


Mime
View raw message