5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-02 15:12:33 +08:00

SQOOP-438. allow sourcing of sqoop-env.sh to set various environment variables

(Arpit Gupta via Jarek Jarcec Cecho)


git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1292917 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jarek Jarcec Cecho 2012-02-23 19:37:54 +00:00
parent c3d0e4b61e
commit 6710cbc3d8
2 changed files with 38 additions and 1 deletions

View File

@ -32,6 +32,12 @@ if [ -z "$SQOOP_HOME" ]; then
export SQOOP_HOME=${bin}/.. export SQOOP_HOME=${bin}/..
fi 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. # Find paths to our dependency systems. If they are unset, use CDH defaults.
if [ -z "${HADOOP_HOME}" ]; then if [ -z "${HADOOP_HOME}" ]; then
@ -89,7 +95,6 @@ if [ -d "${ZOOCFGDIR}" ]; then
SQOOP_CLASSPATH=$ZOOCFGDIR:$SQOOP_CLASSPATH SQOOP_CLASSPATH=$ZOOCFGDIR:$SQOOP_CLASSPATH
fi fi
SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-${SQOOP_HOME}/conf}
SQOOP_CLASSPATH=${SQOOP_CONF_DIR}:${SQOOP_CLASSPATH} SQOOP_CLASSPATH=${SQOOP_CONF_DIR}:${SQOOP_CLASSPATH}
# If there's a build subdir, use Ivy-retrieved dependencies too. # If there's a build subdir, use Ivy-retrieved dependencies too.

View File

@ -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=