Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-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 8BAA21737C for ; Fri, 6 Mar 2015 13:26:25 +0000 (UTC) Received: (qmail 29175 invoked by uid 500); 6 Mar 2015 13:26:03 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 29135 invoked by uid 500); 6 Mar 2015 13:26:03 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 29124 invoked by uid 99); 6 Mar 2015 13:26:03 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Mar 2015 13:26:03 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 4A710AC006E for ; Fri, 6 Mar 2015 13:26:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1664615 - /hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java Date: Fri, 06 Mar 2015 13:26:03 -0000 To: commits@hive.apache.org From: gopalv@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150306132603.4A710AC006E@hades.apache.org> Author: gopalv Date: Fri Mar 6 13:26:02 2015 New Revision: 1664615 URL: http://svn.apache.org/r1664615 Log: HIVE-9884: LLAP : Add llap-daemon jars to the Tez session if the execution mode is LLAP Modified: hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java Modified: hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java URL: http://svn.apache.org/viewvc/hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java?rev=1664615&r1=1664614&r2=1664615&view=diff ============================================================================== --- hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java (original) +++ hive/branches/llap/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java Fri Mar 6 13:26:02 2015 @@ -18,6 +18,7 @@ package org.apache.hadoop.hive.ql.exec.tez; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; @@ -44,6 +45,9 @@ import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.conf.HiveConf.ConfVars; +import org.apache.hadoop.hive.ql.exec.Utilities; +import org.apache.hadoop.hive.ql.metadata.HiveException; +import org.apache.hadoop.hive.ql.optimizer.physical.LlapDecider.LlapMode; import org.apache.hadoop.hive.ql.session.SessionState; import org.apache.hadoop.hive.shims.ShimLoader; import org.apache.hadoop.hive.shims.Utils; @@ -173,6 +177,22 @@ public class TezSessionState { commonLocalResources.put(utils.getBaseName(lr), lr); } + if("llap".equals(HiveConf.getVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_MODE))) { + // add configs for llap-daemon-site.xml + localize llap jars + // they cannot be referred to directly as it would be a circular depedency + conf.addResource("llap-daemon-site.xml"); + try { + final File daemonJar = + new File(Utilities.jarFinderGetJar(Class + .forName("org.apache.hadoop.hive.llap.io.api.impl.LlapInputFormat"))); + final LocalResource daemonLr = + createJarLocalResource(daemonJar.toURI().toURL().toExternalForm()); + commonLocalResources.put(utils.getBaseName(daemonLr), daemonLr); + } catch (ClassNotFoundException ce) { + throw new IOException("Cannot find LlapInputFormat in the classpath", ce); + } + } + // Create environment for AM. Map amEnv = new HashMap(); MRHelpers.updateEnvBasedOnMRAMEnv(conf, amEnv);