You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by fb...@apache.org on 2015/01/08 09:06:23 UTC

ambari git commit: AMBARI-9032 [WinGA] Zookeeper on Windows fails to start after cluster setup

Repository: ambari
Updated Branches:
  refs/heads/trunk 61f3c0227 -> 4bc86e37e


AMBARI-9032 [WinGA] Zookeeper on Windows fails to start after cluster setup

Adjusted the default ZK dataDir, to account for the internal character escaping.


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

Branch: refs/heads/trunk
Commit: 4bc86e37e33d072c289d3bd36d9860464f5a33ed
Parents: 61f3c02
Author: Florian Barca <fb...@hortonworks.com>
Authored: Thu Jan 8 00:06:08 2015 -0800
Committer: Florian Barca <fb...@hortonworks.com>
Committed: Thu Jan 8 00:06:08 2015 -0800

----------------------------------------------------------------------
 .../libraries/functions/install_hdp_msi.py                    | 2 +-
 .../HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml   | 2 +-
 .../HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py   | 7 +++++--
 3 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4bc86e37/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py
index c016fbc..bbedd2c 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/install_hdp_msi.py
@@ -169,7 +169,7 @@ def install_windows_msi(msi_url, save_dir, save_file, hadoop_password, stack_ver
     hdp_stack_version = format_hdp_stack_version(stack_version)
     hdp_22_specific_props = ''
     if hdp_stack_version != "" and compare_versions(hdp_stack_version, '2.2') >= 0:
-      hdp_22_specific_props = hdp_22
+      hdp_22_specific_props = hdp_22.format(hdp_data_dir=hdp_data_dir)
 
     # install msi
     download_file(msi_url, os.path.join(msi_save_dir, save_file))

http://git-wip-us.apache.org/repos/asf/ambari/blob/4bc86e37/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml
index 244f75e..6505500 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/configuration/zoo.cfg.xml
@@ -23,7 +23,7 @@
 <configuration>
   <property>
     <name>dataDir</name>
-    <value>c:\hadoop\zookeeper</value>
+    <value>c:\\\\hadoop\\\\zookeeper</value>
     <description>Data directory for ZooKeeper.</description>
   </property>
 </configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/4bc86e37/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py
index 930b6f0..de5b9bb 100644
--- a/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/ZOOKEEPER/package/scripts/params.py
@@ -18,6 +18,7 @@ limitations under the License.
 Ambari Agent
 
 """
+from ambari_commons.str_utils import ensure_double_backslashes
 
 from resource_management import *
 
@@ -30,14 +31,16 @@ hdp_root = os.environ["HADOOP_NODE_INSTALL_ROOT"]
 zk_user = "hadoop"
 
 # notused zk_log_dir = config['configurations']['zookeeper-env']['zk_log_dir']
-zk_data_dir = config['configurations']['zoo.cfg']['dataDir']
+zk_data_dir = ensure_double_backslashes(config['configurations']['zoo.cfg']['dataDir'])
 tickTime = config['configurations']['zoo.cfg']['tickTime']
 initLimit = config['configurations']['zoo.cfg']['initLimit']
 syncLimit = config['configurations']['zoo.cfg']['syncLimit']
 clientPort = config['configurations']['zoo.cfg']['clientPort']
 
 if 'zoo.cfg' in config['configurations']:
-  zoo_cfg_properties_map = config['configurations']['zoo.cfg']
+  zoo_cfg_properties_map = config['configurations']['zoo.cfg'].copy()
+  # Fix the data dir - ZK won't start unless the backslashes are doubled
+  zoo_cfg_properties_map['dataDir'] = zk_data_dir
 else:
   zoo_cfg_properties_map = {}
 zoo_cfg_properties_map_length = len(zoo_cfg_properties_map)