You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by pr...@apache.org on 2016/04/05 20:32:05 UTC

hive git commit: HIVE-13110: LLAP: Package log4j2 jars into Slider pkg (Gopal V, reviewed by Gunther Hagleitner)

Repository: hive
Updated Branches:
  refs/heads/branch-2.0 9c0549a48 -> c7c0e3cc3


HIVE-13110: LLAP: Package log4j2 jars into Slider pkg (Gopal V, reviewed by Gunther Hagleitner)


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

Branch: refs/heads/branch-2.0
Commit: c7c0e3cc3f946c66338dee1f4ab98b57792b516e
Parents: 9c0549a
Author: Gopal V <go...@apache.org>
Authored: Tue Feb 23 15:39:49 2016 -0800
Committer: Prasanth Jayachandran <pr...@apache.org>
Committed: Tue Apr 5 13:31:50 2016 -0500

----------------------------------------------------------------------
 llap-server/bin/runLlapDaemon.sh                |  2 +-
 .../hadoop/hive/llap/cli/LlapServiceDriver.java | 34 ++++++++++++++------
 2 files changed, 25 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c7c0e3cc/llap-server/bin/runLlapDaemon.sh
----------------------------------------------------------------------
diff --git a/llap-server/bin/runLlapDaemon.sh b/llap-server/bin/runLlapDaemon.sh
index b015ccb..529f899 100755
--- a/llap-server/bin/runLlapDaemon.sh
+++ b/llap-server/bin/runLlapDaemon.sh
@@ -82,7 +82,7 @@ if [ ! -n "${LLAP_DAEMON_LOG_LEVEL}" ]; then
   LLAP_DAEMON_LOG_LEVEL=${LOG_LEVEL_DEFAULT}
 fi
 
-CLASSPATH=${LLAP_DAEMON_CONF_DIR}:${LLAP_DAEMON_HOME}/lib/*:`${HADOOP_PREFIX}/bin/hadoop classpath`:.
+CLASSPATH=${LLAP_DAEMON_CONF_DIR}:${LLAP_DAEMON_HOME}/lib/*:${LLAP_DAEMON_HOME}/lib/tez/*:`${HADOOP_PREFIX}/bin/hadoop classpath`:.
 
 if [ -n "LLAP_DAEMON_USER_CLASSPATH" ]; then
   CLASSPATH=${CLASSPATH}:${LLAP_DAEMON_USER_CLASSPATH}

http://git-wip-us.apache.org/repos/asf/hive/blob/c7c0e3cc/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
----------------------------------------------------------------------
diff --git a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
index ca0f85e..637191b 100644
--- a/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
+++ b/llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java
@@ -211,6 +211,7 @@ public class LlapServiceDriver {
     }
 
     Path libDir = new Path(tmpDir, "lib");
+    Path tezDir = new Path(libDir, "tez");
 
     String tezLibs = conf.get("tez.lib.uris");
     if (tezLibs == null) {
@@ -219,19 +220,32 @@ public class LlapServiceDriver {
     if (LOG.isDebugEnabled()) {
       LOG.debug("Copying tez libs from " + tezLibs);
     }
-    lfs.mkdirs(libDir);
+    lfs.mkdirs(tezDir);
     fs.copyToLocalFile(new Path(tezLibs), new Path(libDir, "tez.tar.gz"));
-    CompressionUtils.unTar(new Path(libDir, "tez.tar.gz").toString(), libDir.toString(), true);
+    CompressionUtils.unTar(new Path(libDir, "tez.tar.gz").toString(), tezDir.toString(), true);
     lfs.delete(new Path(libDir, "tez.tar.gz"), false);
 
-    // llap-common
-    lfs.copyFromLocalFile(new Path(Utilities.jarFinderGetJar(LlapDaemonProtocolProtos.class)), libDir);
-    // llap-tez
-    lfs.copyFromLocalFile(new Path(Utilities.jarFinderGetJar(LlapTezUtils.class)), libDir);
-    // llap-server
-    lfs.copyFromLocalFile(new Path(Utilities.jarFinderGetJar(LlapInputFormat.class)), libDir);
-    // hive-exec
-    lfs.copyFromLocalFile(new Path(Utilities.jarFinderGetJar(HiveInputFormat.class)), libDir);
+    Class<?>[] dependencies = new Class<?>[] {
+        LlapDaemonProtocolProtos.class, // llap-common
+        LlapTezUtils.class, // llap-tez
+        LlapInputFormat.class, // llap-server
+        HiveInputFormat.class, // hive-exec
+        SslSocketConnector.class, // hive-common (https deps)
+        // log4j2
+        com.lmax.disruptor.RingBuffer.class, // disruptor
+        org.apache.logging.log4j.Logger.class, // log4j-api
+        org.apache.logging.log4j.core.Appender.class, // log4j-core
+        org.apache.logging.slf4j.Log4jLogger.class, // log4j-slf4j
+    };
+
+    for (Class<?> c : dependencies) {
+      Path jarPath = new Path(Utilities.jarFinderGetJar(c));
+      lfs.copyFromLocalFile(jarPath, libDir);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Copying " + jarPath + " to " + libDir);
+      }
+    }
+
 
     // copy default aux classes (json/hbase)