diff --git llap-server/bin/runLlapDaemon.sh llap-server/bin/runLlapDaemon.sh index f652ada..445a41e 100755 --- llap-server/bin/runLlapDaemon.sh +++ 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} diff --git llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java index 8404974..2ff4952 100644 --- llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java +++ llap-server/src/java/org/apache/hadoop/hive/llap/cli/LlapServiceDriver.java @@ -243,6 +243,7 @@ private void run(String[] args) throws Exception { Path libDir = new Path(tmpDir, "lib"); + Path tezDir = new Path(libDir, "tez"); String tezLibs = conf.get(TezConfiguration.TEZ_LIB_URIS); if (tezLibs == null) { @@ -251,21 +252,32 @@ private void run(String[] args) throws Exception { 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); - // hive-common (https deps) - lfs.copyFromLocalFile(new Path(Utilities.jarFinderGetJar(SslSocketConnector.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)