You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2015/12/21 01:18:11 UTC
incubator-zeppelin git commit: [ZEPPELIN-515] Hadoop libraries in
${HADOOP_HOME}/share folder not included in CLASSPATH
Repository: incubator-zeppelin
Updated Branches:
refs/heads/master 81b1e2271 -> f54b49b40
[ZEPPELIN-515] Hadoop libraries in ${HADOOP_HOME}/share folder not included in CLASSPATH
### What is this PR for?
Find and add jar under ${HADOOP_HOME}/share, recursively.
### What type of PR is it?
Bug Fix
### Is there a relevant Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-515
### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no
Author: Lee moon soo <mo...@apache.org>
Closes #551 from Leemoonsoo/ZEPPELIN-515 and squashes the following commits:
350aaa0 [Lee moon soo] find jar under share in recursive way
Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/f54b49b4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/f54b49b4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/f54b49b4
Branch: refs/heads/master
Commit: f54b49b40a3c00f926df8896724edec20de4a5a8
Parents: 81b1e22
Author: Lee moon soo <mo...@apache.org>
Authored: Fri Dec 18 14:09:14 2015 +0900
Committer: Lee moon soo <mo...@apache.org>
Committed: Mon Dec 21 09:19:34 2015 +0900
----------------------------------------------------------------------
bin/common.sh | 9 +++++++++
bin/interpreter.sh | 2 +-
2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f54b49b4/bin/common.sh
----------------------------------------------------------------------
diff --git a/bin/common.sh b/bin/common.sh
index 5f20436..1a8e2d7 100644
--- a/bin/common.sh
+++ b/bin/common.sh
@@ -70,6 +70,15 @@ function addEachJarInDir(){
fi
}
+function addEachJarInDirRecursive(){
+ if [[ -d "${1}" ]]; then
+ for jar in $(find -L "${1}" -type f -name '*jar'); do
+ ZEPPELIN_CLASSPATH="$jar:$ZEPPELIN_CLASSPATH"
+ done
+ fi
+}
+
+
function addJarInDir(){
if [[ -d "${1}" ]]; then
ZEPPELIN_CLASSPATH="${1}/*:${ZEPPELIN_CLASSPATH}"
http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/f54b49b4/bin/interpreter.sh
----------------------------------------------------------------------
diff --git a/bin/interpreter.sh b/bin/interpreter.sh
index 464cd9c..ba7f017 100755
--- a/bin/interpreter.sh
+++ b/bin/interpreter.sh
@@ -87,7 +87,7 @@ if [[ "${INTERPRETER_ID}" == "spark" ]]; then
# add Hadoop jars into classpath
if [[ -n "${HADOOP_HOME}" ]]; then
# Apache
- addEachJarInDir "${HADOOP_HOME}/share"
+ addEachJarInDirRecursive "${HADOOP_HOME}/share"
# CDH
addJarInDir "${HADOOP_HOME}"