You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by ja...@apache.org on 2013/09/18 13:20:33 UTC
git commit: SQOOP-1203: Add another default case for finding *_HOME
when not explicitly defined
Updated Branches:
refs/heads/trunk f2bf86104 -> e187f454c
SQOOP-1203: Add another default case for finding *_HOME when not explicitly defined
(Mark Grover via Jarek Jarcec Cecho)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/e187f454
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/e187f454
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/e187f454
Branch: refs/heads/trunk
Commit: e187f454c550081687f72bedbd88d0a1d3d92f14
Parents: f2bf861
Author: Jarek Jarcec Cecho <ja...@apache.org>
Authored: Wed Sep 18 04:19:23 2013 -0700
Committer: Jarek Jarcec Cecho <ja...@apache.org>
Committed: Wed Sep 18 04:19:23 2013 -0700
----------------------------------------------------------------------
bin/configure-sqoop | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/e187f454/bin/configure-sqoop
----------------------------------------------------------------------
diff --git a/bin/configure-sqoop b/bin/configure-sqoop
index 178720d..e604197 100755
--- a/bin/configure-sqoop
+++ b/bin/configure-sqoop
@@ -44,14 +44,22 @@ if [ -z "${HADOOP_COMMON_HOME}" ]; then
if [ -n "${HADOOP_HOME}" ]; then
HADOOP_COMMON_HOME=${HADOOP_HOME}
else
- HADOOP_COMMON_HOME=/usr/lib/hadoop
+ if [ -d "/usr/lib/hadoop" ]; then
+ HADOOP_COMMON_HOME=/usr/lib/hadoop
+ else
+ HADOOP_COMMON_HOME=${SQOOP_HOME}/../hadoop
+ fi
fi
fi
if [ -z "${HADOOP_MAPRED_HOME}" ]; then
if [ -n "${HADOOP_HOME}" ]; then
HADOOP_MAPRED_HOME=${HADOOP_HOME}
else
- HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
+ if [ -d "/usr/lib/hadoop-mapreduce" ]; then
+ HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce
+ else
+ HADOOP_MAPRED_HOME=${SQOOP_HOME}/../hadoop-mapreduce
+ fi
fi
fi
@@ -65,10 +73,18 @@ if [ -z "${HADOOP_HOME}" ]; then
fi
if [ -z "${HBASE_HOME}" ]; then
- HBASE_HOME=/usr/lib/hbase
+ if [ -d "/usr/lib/hbase" ]; then
+ HBASE_HOME=/usr/lib/hbase
+ else
+ HBASE_HOME=${SQOOP_HOME}/../hbase
+ fi
fi
if [ -z "${HCAT_HOME}" ]; then
- HCAT_HOME=/usr/lib/hcatalog
+ if [ -d "/usr/lib/hive-hcatalog" ]; then
+ HCAT_HOME=/usr/lib/hive-hcatalog
+ else
+ HCAT_HOME=${SQOOP_HOME}/../hive-hcatalog
+ fi
fi
# Check: If we can't find our dependencies, give up here.