diff --git a/bin/configure-sqoop b/bin/configure-sqoop index 9101d531..ee1dd7bd 100755 --- a/bin/configure-sqoop +++ b/bin/configure-sqoop @@ -32,6 +32,12 @@ if [ -z "$SQOOP_HOME" ]; then export SQOOP_HOME=${bin}/.. fi +SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-${SQOOP_HOME}/conf} + +if [ -f "${SQOOP_CONF_DIR}/sqoop-env.sh" ]; then + . "${SQOOP_CONF_DIR}/sqoop-env.sh" +fi + # Find paths to our dependency systems. If they are unset, use CDH defaults. if [ -z "${HADOOP_HOME}" ]; then @@ -89,7 +95,6 @@ if [ -d "${ZOOCFGDIR}" ]; then SQOOP_CLASSPATH=$ZOOCFGDIR:$SQOOP_CLASSPATH fi -SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-${SQOOP_HOME}/conf} SQOOP_CLASSPATH=${SQOOP_CONF_DIR}:${SQOOP_CLASSPATH} # If there's a build subdir, use Ivy-retrieved dependencies too. diff --git a/conf/sqoop-env-template.sh b/conf/sqoop-env-template.sh new file mode 100644 index 00000000..0294f17f --- /dev/null +++ b/conf/sqoop-env-template.sh @@ -0,0 +1,32 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# included in all the hadoop scripts with source command +# should not be executable directly +# also should not be passed any arguments, since we need original $* + +# Set Hadoop-specific environment variables here. + +#Set path to where bin/hadoop is available +#export HADOOP_HOME= + +#set the path to where bin/hbase is available +#export HBASE_HOME= + +#Set the path to where bin/hive is available +#export HIVE_HOME= + +#Set the path for where zookeper config dir is +#export ZOOCFGDIR=