瀏覽代碼

AMBARI-11607: STORM service does not start (jluniya)

Jayush Luniya 10 年之前
父節點
當前提交
82e2ac39e5

+ 2 - 1
ambari-server/src/main/resources/common-services/FALCON/0.5.0.2.1/package/scripts/params_windows.py

@@ -34,7 +34,8 @@ falcon_data_dir = "."
 falcon_home = None
 falcon_log_dir = "."
 
-hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"], ".."))
+if os.environ.has_key("HADOOP_HOME"):
+  hdp_root = os.path.abspath(os.path.join(os.environ["HADOOP_HOME"], ".."))
 
 if os.environ.has_key("FALCON_CONF_DIR"):
   falcon_conf_dir = os.environ["FALCON_CONF_DIR"]

+ 1 - 1
ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py

@@ -18,7 +18,7 @@ limitations under the License.
 """
 
 import os
-
+from resource_management.libraries.script.script import Script
 from resource_management.libraries.resources.xml_config import XmlConfig
 from resource_management.core.resources.service import ServiceConfig
 from resource_management.libraries.functions.format import format

+ 13 - 0
ambari-server/src/main/resources/common-services/STORM/0.9.1.2.1/package/scripts/params_windows.py

@@ -32,6 +32,19 @@ 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)
+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
 
 if stack_is_hdp23_or_further:
   if security_enabled: