ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-13265: [PluggableStackDefinition] Update templates and shell scripts (jluniya)
Date Tue, 29 Sep 2015 05:31:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1.2 fe6f603ca -> 226dfd1c6


AMBARI-13265: [PluggableStackDefinition] Update templates and shell scripts (jluniya)


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

Branch: refs/heads/branch-2.1.2
Commit: 226dfd1c6136f859fc42dd18e7090a9346f0f745
Parents: fe6f603
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Mon Sep 28 22:29:31 2015 -0700
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Mon Sep 28 22:31:16 2015 -0700

----------------------------------------------------------------------
 .../GenerateStackDefinition.py                     | 17 +++++++++++++++--
 .../pluggable_stack_definition/configs/PHD.json    |  2 +-
 .../pluggable_stack_definition/configs/SAPHD.json  |  2 +-
 3 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/226dfd1c/ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py
b/ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py
index f1f9381..3038f90 100644
--- a/ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py
+++ b/ambari-common/src/main/python/pluggable_stack_definition/GenerateStackDefinition.py
@@ -369,6 +369,9 @@ def process_py_files(file_path, config_data, stack_version_changes):
 def process_xml_files(file_path, config_data, stack_version_changes):
   return process_replacements(file_path, config_data, stack_version_changes)
 
+def process_other_files(file_path, config_data, stack_version_changes):
+  return process_replacements(file_path, config_data, stack_version_changes)
+
 def process_config_xml(file_path, config_data):
   tree = ET.parse(file_path)
   root = tree.getroot()
@@ -520,6 +523,11 @@ class GeneratorHelper(object):
           ###################################################################
           target = process_py_files(target, self.config_data, self.stack_version_changes)
           return
+        ####################################################################
+        # Generic processing for all other types of files.
+        ####################################################################
+        if target.endswith(".j2") or target.endswith(".sh"):
+          process_other_files(target, self.config_data, self.stack_version_changes)
 
       copy_tree(original_stack, target_stack, ignored_files, post_copy=post_copy)
       # copy default stack advisor
@@ -542,12 +550,17 @@ class GeneratorHelper(object):
             # process configuration xml
             target = process_config_xml(target, self.config_data)
           # process generic xml
-          if target.endswith('.xml'):
-            process_xml_files(target, self.config_data, self.stack_version_changes)
+          process_xml_files(target, self.config_data, self.stack_version_changes)
+          return
         # process python files
         if target.endswith('.py'):
           process_py_files(target, self.config_data, self.stack_version_changes)
           return
+        ####################################################################
+        # Generic processing for all other types of files.
+        ####################################################################
+        if target.endswith(".j2") or target.endswith(".sh"):
+          process_other_files(target, self.config_data, self.stack_version_changes)
 
       copy_tree(source_folder, target_folder, ignored_files, post_copy=post_copy)
       if parent_services:

http://git-wip-us.apache.org/repos/asf/ambari/blob/226dfd1c/ambari-common/src/main/python/pluggable_stack_definition/configs/PHD.json
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/pluggable_stack_definition/configs/PHD.json b/ambari-common/src/main/python/pluggable_stack_definition/configs/PHD.json
index 45e45be..431a26c 100644
--- a/ambari-common/src/main/python/pluggable_stack_definition/configs/PHD.json
+++ b/ambari-common/src/main/python/pluggable_stack_definition/configs/PHD.json
@@ -5,7 +5,7 @@
   "textReplacements": [
     ["hdp-select", "distro-select"]
    ],
-  "preservedText": ["ext-2.2", "HDP-oozie", "hdp.version", "HDP_VERSION"],
+  "preservedText": ["ext-2.2", "HDP-oozie", "hdp.version", "HDP_VERSION", "192.168."],
   "uiMapping": [
     {
       "stackVersionNumber": "3.0",

http://git-wip-us.apache.org/repos/asf/ambari/blob/226dfd1c/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json b/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
index 27c6995..de85ade 100644
--- a/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
+++ b/ambari-common/src/main/python/pluggable_stack_definition/configs/SAPHD.json
@@ -5,7 +5,7 @@
   "textReplacements": [
     ["hdp-select", "distro-select"]
    ],
-  "preservedText": ["ext-2.2", "HDP-oozie", "hdp.version", "HDP_VERSION"],
+  "preservedText": ["ext-2.2", "HDP-oozie", "hdp.version", "HDP_VERSION", "192.168."],
   "uiMapping": [
     {
       "stackVersionNumber": "1.0",


Mime
View raw message