You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2016/02/18 18:43:21 UTC

[1/2] ambari git commit: AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.2 ad5ecf826 -> 494d9d78b
  refs/heads/trunk fab9fa5d8 -> 1d7af0ebd


AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)


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

Branch: refs/heads/trunk
Commit: 1d7af0ebd37e2e0d01d6e03380cd52750754fea3
Parents: fab9fa5
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Feb 18 19:43:10 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Feb 18 19:43:10 2016 +0200

----------------------------------------------------------------------
 ambari-server/src/main/resources/scripts/Ambaripreupload.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1d7af0eb/ambari-server/src/main/resources/scripts/Ambaripreupload.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index a803de4..cc6213e 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -43,6 +43,8 @@ from resource_management.libraries.functions.format import format
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop
 from resource_management import Script
+
+SQL_DRIVER_PATH = "/var/lib/ambari-server/resources/sqljdbc41.jar"
  
 """
 This file provides helper methods needed for the versioning of RPMs. Specifically, it does dynamic variable
@@ -266,6 +268,10 @@ with Environment() as env:
     with open("/var/lib/ambari-agent/data/.hdfs_resource_ignore", "a+") as fp:
       fp.write(file_content)
       
+  def putSQLDriverToOozieShared():
+    params.HdfsResource('/user/oozie/share/lib/sqoop/{0}'.format(os.path.basename(SQL_DRIVER_PATH)),
+                        owner='hdfs', type='file', action=['create_on_execute'], mode=0644, source=SQL_DRIVER_PATH)
+      
   env.set_params(params)
   hadoop_conf_dir = params.hadoop_conf_dir
    
@@ -374,6 +380,7 @@ with Environment() as env:
   copy_tarballs_to_hdfs(format("/usr/hdp/{hdp_version}/sqoop/sqoop.tar.gz"), hdfs_path_prefix+"/hdp/apps/{{ hdp_stack_version }}/sqoop/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group)
   print "Creating hdfs directories..."
   createHdfsResources()
+  putSQLDriverToOozieShared()
   putCreatedHdfsResourcesToIgnore(env)
   
   # jar shouldn't be used before (read comment below)


[2/2] ambari git commit: AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)

Posted by ao...@apache.org.
AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk)


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

Branch: refs/heads/branch-2.2
Commit: 494d9d78bcc2078f517953d066c5ef926fdcb106
Parents: ad5ecf8
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Feb 18 19:43:16 2016 +0200
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Feb 18 19:43:16 2016 +0200

----------------------------------------------------------------------
 ambari-server/src/main/resources/scripts/Ambaripreupload.py | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/494d9d78/ambari-server/src/main/resources/scripts/Ambaripreupload.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index a803de4..cc6213e 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -43,6 +43,8 @@ from resource_management.libraries.functions.format import format
 from resource_management.libraries.resources.hdfs_resource import HdfsResource
 from resource_management.libraries.resources.execute_hadoop import ExecuteHadoop
 from resource_management import Script
+
+SQL_DRIVER_PATH = "/var/lib/ambari-server/resources/sqljdbc41.jar"
  
 """
 This file provides helper methods needed for the versioning of RPMs. Specifically, it does dynamic variable
@@ -266,6 +268,10 @@ with Environment() as env:
     with open("/var/lib/ambari-agent/data/.hdfs_resource_ignore", "a+") as fp:
       fp.write(file_content)
       
+  def putSQLDriverToOozieShared():
+    params.HdfsResource('/user/oozie/share/lib/sqoop/{0}'.format(os.path.basename(SQL_DRIVER_PATH)),
+                        owner='hdfs', type='file', action=['create_on_execute'], mode=0644, source=SQL_DRIVER_PATH)
+      
   env.set_params(params)
   hadoop_conf_dir = params.hadoop_conf_dir
    
@@ -374,6 +380,7 @@ with Environment() as env:
   copy_tarballs_to_hdfs(format("/usr/hdp/{hdp_version}/sqoop/sqoop.tar.gz"), hdfs_path_prefix+"/hdp/apps/{{ hdp_stack_version }}/sqoop/", 'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, params.user_group)
   print "Creating hdfs directories..."
   createHdfsResources()
+  putSQLDriverToOozieShared()
   putCreatedHdfsResourcesToIgnore(env)
   
   # jar shouldn't be used before (read comment below)