ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject git commit: AMBARI-7240. Change the way oozie uploads sharelib into hdfs (aonishuk)
Date Wed, 10 Sep 2014 14:51:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 2b78d36ea -> 1ef2af3f7


AMBARI-7240. Change the way oozie uploads sharelib into hdfs  (aonishuk)


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

Branch: refs/heads/trunk
Commit: 1ef2af3f704bddc02c6b5532fecd438f13cab02c
Parents: 2b78d36
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Sep 10 17:51:33 2014 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Sep 10 17:51:33 2014 +0300

----------------------------------------------------------------------
 .../HDP/2.0.6/services/HIVE/package/scripts/params.py     |  6 +++---
 .../HDP/2.0.6/services/OOZIE/package/scripts/oozie.py     |  2 +-
 .../2.0.6/services/OOZIE/package/scripts/oozie_service.py |  2 +-
 .../HDP/2.0.6/services/OOZIE/package/scripts/params.py    | 10 ++++++++++
 ambari-web/app/data/HDP2/config_mapping.js                |  4 ++--
 ambari-web/app/data/config_mapping.js                     |  4 ++--
 6 files changed, 19 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
index 6f05b6b..b1a4a49 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
@@ -126,10 +126,10 @@ mysql_host = config['clusterHostInfo']['hive_mysql_host']
 mysql_adduser_path = format("{tmp_dir}/addMysqlUser.sh")
 
 ######## Metastore Schema
-if str(hdp_stack_version).startswith('2.1'):
-  init_metastore_schema = True
-else:
+if str(hdp_stack_version).startswith('2.0'):
   init_metastore_schema = False
+else:
+  init_metastore_schema = True
 
 ########## HCAT
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
index f5d4142..d390c69 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie.py
@@ -139,7 +139,7 @@ def oozie_server_specific(
   if params.has_falcon_host:
     cmd3 += format(' && cp {falcon_home}/oozie/ext/falcon-oozie-el-extension-*.jar
{oozie_libext_dir}')
   # this is different for HDP1
-  cmd4 = format("cd {oozie_tmp_dir} && /usr/lib/oozie/bin/oozie-setup.sh prepare-war")
+  cmd4 = format("cd {oozie_tmp_dir} && {oozie_setup_sh} prepare-war")
 
   no_op_test = format("ls {pid_file} >/dev/null 2>&1 && ps `cat {pid_file}`
>/dev/null 2>&1")
   Execute( [cmd1, cmd2, cmd3],

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py
index aa2b7e2..78661b0 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/oozie_service.py
@@ -37,7 +37,7 @@ def oozie_service(action = 'start'): # 'start' or 'stop'
       db_connection_check_command = None
       
     cmd1 =  format("cd {oozie_tmp_dir} && /usr/lib/oozie/bin/ooziedb.sh create -sqlfile
oozie.sql -run")
-    cmd2 =  format("{kinit_if_needed} hadoop dfs -put /usr/lib/oozie/share {oozie_hdfs_user_dir}
; hadoop dfs -chmod -R 755 {oozie_hdfs_user_dir}/share")
+    cmd2 =  format("{kinit_if_needed} {put_shared_lib_to_hdfs_cmd} ; hadoop dfs -chmod -R
755 {oozie_hdfs_user_dir}/share")
 
     if not os.path.isfile(params.jdbc_driver_jar) and params.jdbc_driver_name == "org.postgresql.Driver":
       print "ERROR: jdbc file " + params.jdbc_driver_jar + " is unavailable. Please, follow
next steps:\n" \

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
index 260063f..a484c0e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/scripts/params.py
@@ -39,6 +39,7 @@ oozie_hdfs_user_dir = format("/user/{oozie_user}")
 oozie_pid_dir = status_params.oozie_pid_dir
 pid_file = status_params.pid_file
 hadoop_jar_location = "/usr/lib/hadoop/"
+hdp_stack_version = config['hostLevelParams']['stack_version']
 # for HDP1 it's "/usr/share/HDP-oozie/ext.zip"
 ext_js_path = "/usr/share/HDP-oozie/ext-2.2.zip"
 oozie_libext_dir = "/usr/lib/oozie/libext"
@@ -65,7 +66,16 @@ oozie_server_admin_port = config['configurations']['oozie-env']['oozie_admin_por
 oozie_env_sh_template = config['configurations']['oozie-env']['content']
 oozie_lib_dir = "/var/lib/oozie/"
 oozie_webapps_dir = "/var/lib/oozie/oozie-server/webapps/"
+oozie_setup_sh = "/usr/lib/oozie/bin/oozie-setup.sh"
+oozie_shared_lib = "/usr/lib/oozie/share"
+fs_root = config['configurations']['core-site']['fs.defaultFS']
 
+if str(hdp_stack_version).startswith('2.0') or str(hdp_stack_version).startswith('2.1'):
+  put_shared_lib_to_hdfs_cmd = format("hadoop dfs -put {oozie_shared_lib} {oozie_hdfs_user_dir}")
+# for newer
+else:
+  put_shared_lib_to_hdfs_cmd = format("{oozie_setup_sh} sharelib create -fs {fs_root} -locallib
{oozie_shared_lib}")
+  
 jdbc_driver_name = default("/configurations/oozie-site/oozie.service.JPAService.jdbc.driver",
"")
 
 if jdbc_driver_name == "com.mysql.jdbc.Driver":

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-web/app/data/HDP2/config_mapping.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/config_mapping.js b/ambari-web/app/data/HDP2/config_mapping.js
index f405b94..2e6b4e3 100644
--- a/ambari-web/app/data/HDP2/config_mapping.js
+++ b/ambari-web/app/data/HDP2/config_mapping.js
@@ -37,9 +37,9 @@ var configs = [
   },
   {
     "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
-    "templateName": ["proxyuser_group"],
+    "templateName": [],
     "foreignKey": ["oozie_user"],
-    "value": "<templateName[0]>",
+    "value": "*",
     "filename": "core-site.xml",
     "isOverridable": true
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/1ef2af3f/ambari-web/app/data/config_mapping.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/config_mapping.js b/ambari-web/app/data/config_mapping.js
index 6b7bdbc..7fcde38 100644
--- a/ambari-web/app/data/config_mapping.js
+++ b/ambari-web/app/data/config_mapping.js
@@ -36,9 +36,9 @@ var configs = [
   },
   {
     "name": "hadoop.proxyuser.<foreignKey[0]>.groups",
-    "templateName": ["proxyuser_group"],
+    "templateName": [],
     "foreignKey": ["oozie_user"],
-    "value": "<templateName[0]>",
+    "value": "*",
     "filename": "core-site.xml",
     "isOverridable" : true
   },


Mime
View raw message