You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2014/10/23 19:59:44 UTC

[1/2] git commit: fix webhcat templeton on sqoop

Repository: ambari
Updated Branches:
  refs/heads/trunk b7902decc -> 896d0a2e3


fix webhcat templeton on sqoop


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

Branch: refs/heads/trunk
Commit: de1dae5315cc612620554a4357a7de48130f48e3
Parents: b7902de
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Wed Oct 22 19:58:42 2014 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Thu Oct 23 10:57:34 2014 -0700

----------------------------------------------------------------------
 .../HDP/2.0.6/services/HIVE/package/scripts/webhcat.py | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/de1dae53/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
index 4eeff8b..c1b3b4c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
@@ -21,6 +21,7 @@ Ambari Agent
 import sys
 import os.path
 import glob
+import re
 
 from resource_management import *
 from resource_management.libraries.functions.version import compare_versions
@@ -47,6 +48,18 @@ def __inject_config_variables(mutable_configs):
         found_at_least_one_replacement, new_value = interpret_dynamic_version_property(prop_value, prefix, ",")
         if found_at_least_one_replacement:
           webhcat_config[prop_name] = new_value
+
+          # Sqoop has a dependency on another property that needs to inject the tarball name
+          if prop_name == "templeton.sqoop.archive":
+            templeton_sqoop_path = mutable_configs["templeton.sqoop.path"]
+            if templeton_sqoop_path and templeton_sqoop_path.strip() != "":
+              # Need to replace "sqoop.tar.gz" with the actual file name found above.
+              p = re.compile(".*(hdfs([^,])*sqoop.*\\.tar\\.gz).*")
+              m = p.match(new_value)
+              if m and len(m.groups()) >= 1:
+                templeton_sqoop_path = templeton_sqoop_path.replace("sqoop.tar.gz", m.group(1))
+                webhcat_config["templeton.sqoop.path"] = templeton_sqoop_path
+  
   return mutable_configs
 
 


[2/2] git commit: Reverting unintended commit, fix webhcat templeton on sqoop (alejandro)

Posted by al...@apache.org.
Reverting unintended commit, fix webhcat templeton on sqoop (alejandro)


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

Branch: refs/heads/trunk
Commit: 896d0a2e3ae336f433de1466077c8f8dbeeea1eb
Parents: de1dae5
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Thu Oct 23 10:59:37 2014 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Thu Oct 23 10:59:37 2014 -0700

----------------------------------------------------------------------
 .../HDP/2.0.6/services/HIVE/package/scripts/webhcat.py | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/896d0a2e/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
index c1b3b4c..4eeff8b 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/webhcat.py
@@ -21,7 +21,6 @@ Ambari Agent
 import sys
 import os.path
 import glob
-import re
 
 from resource_management import *
 from resource_management.libraries.functions.version import compare_versions
@@ -48,18 +47,6 @@ def __inject_config_variables(mutable_configs):
         found_at_least_one_replacement, new_value = interpret_dynamic_version_property(prop_value, prefix, ",")
         if found_at_least_one_replacement:
           webhcat_config[prop_name] = new_value
-
-          # Sqoop has a dependency on another property that needs to inject the tarball name
-          if prop_name == "templeton.sqoop.archive":
-            templeton_sqoop_path = mutable_configs["templeton.sqoop.path"]
-            if templeton_sqoop_path and templeton_sqoop_path.strip() != "":
-              # Need to replace "sqoop.tar.gz" with the actual file name found above.
-              p = re.compile(".*(hdfs([^,])*sqoop.*\\.tar\\.gz).*")
-              m = p.match(new_value)
-              if m and len(m.groups()) >= 1:
-                templeton_sqoop_path = templeton_sqoop_path.replace("sqoop.tar.gz", m.group(1))
-                webhcat_config["templeton.sqoop.path"] = templeton_sqoop_path
-  
   return mutable_configs