HIVE-15407 : add distcp to classpath by default, because hive depends on it. (Fei Hui, reviewed by Sergey Shelukhin)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/8dda898b Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/8dda898b Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/8dda898b Branch: refs/heads/hive-14535 Commit: 8dda898ba0104015ad31264c83b8c7248b3fbcd2 Parents: f6d1ac2 Author: Sergey Shelukhin <[email protected]> Authored: Fri Mar 10 16:11:29 2017 -0800 Committer: Sergey Shelukhin <[email protected]> Committed: Fri Mar 10 16:11:29 2017 -0800 ---------------------------------------------------------------------- bin/hive | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/8dda898b/bin/hive ---------------------------------------------------------------------- diff --git a/bin/hive b/bin/hive index d908dca..a7671c3 100755 --- a/bin/hive +++ b/bin/hive @@ -216,6 +216,11 @@ if [ "$HADOOP_HOME" == "" ]; then exit 4; fi +# add distcp to classpath, hive depends on it +for f in ${HADOOP_HOME}/share/hadoop/tools/lib/hadoop-distcp-*.jar; do + export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}:$f; +done + HADOOP=$HADOOP_HOME/bin/hadoop if [ ! -f ${HADOOP} ]; then echo "Cannot find hadoop installation: \$HADOOP_HOME or \$HADOOP_PREFIX must be set or hadoop must be in the path";
