Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E543E18B6C for ; Fri, 19 Feb 2016 13:26:18 +0000 (UTC) Received: (qmail 70319 invoked by uid 500); 19 Feb 2016 13:26:18 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 70243 invoked by uid 500); 19 Feb 2016 13:26:18 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 69908 invoked by uid 99); 19 Feb 2016 13:26:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2016 13:26:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4E868E0B14; Fri, 19 Feb 2016 13:26:18 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dmitriusan@apache.org To: commits@ambari.apache.org Date: Fri, 19 Feb 2016 13:26:25 -0000 Message-Id: <55beced99bcc4b7aa0542f1c4154cb78@git.apache.org> In-Reply-To: <65cd973a00eb487d97a65ed3eac88f18@git.apache.org> References: <65cd973a00eb487d97a65ed3eac88f18@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [08/21] ambari git commit: AMBARI-15092. Oozie sharelib missing SQL JDBC driver (aonishuk) 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/branch-dev-patch-upgrade Commit: 1d7af0ebd37e2e0d01d6e03380cd52750754fea3 Parents: fab9fa5 Author: Andrew Onishuk Authored: Thu Feb 18 19:43:10 2016 +0200 Committer: Andrew Onishuk 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)