HDFS-2544. Hadoop scripts unconditionally source "$bin"/../libexec/hadoop-config.sh. Contributed by Bruno Mahé
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1203452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
41cfb68419
commit
dc5a0ab245
@ -109,6 +109,9 @@ Release 0.23.1 - UNRELEASED
|
||||
IMPROVEMENTS
|
||||
HDFS-2560. Refactor BPOfferService to be a static inner class (todd)
|
||||
|
||||
HDFS-2544. Hadoop scripts unconditionally source
|
||||
"$bin"/../libexec/hadoop-config.sh. (Bruno Mahé via tomwhite)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
HDFS-2130. Switch default checksum to CRC32C. (todd)
|
||||
|
@ -36,7 +36,9 @@
|
||||
bin=`dirname "$0"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin/../libexec/hdfs-config.sh"
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
if [ "$1" = '' ] ; then
|
||||
"Error: please specify local exclude file as a first argument"
|
||||
|
@ -19,7 +19,9 @@ bin=`which $0`
|
||||
bin=`dirname ${bin}`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
function print_usage(){
|
||||
echo "Usage: hdfs [--config confdir] COMMAND"
|
||||
|
@ -24,8 +24,10 @@ bin=`cd "$bin"; pwd`
|
||||
|
||||
export HADOOP_PREFIX="${HADOOP_PREFIX:-$bin/..}"
|
||||
|
||||
if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
|
||||
. $bin/../libexec/hadoop-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
if [ -e "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]; then
|
||||
. ${HADOOP_LIBEXEC_DIR}/hadoop-config.sh
|
||||
elif [ -e "${HADOOP_COMMON_HOME}/libexec/hadoop-config.sh" ]; then
|
||||
. "$HADOOP_COMMON_HOME"/libexec/hadoop-config.sh
|
||||
elif [ -e "${HADOOP_HOME}/libexec/hadoop-config.sh" ]; then
|
||||
|
@ -23,7 +23,9 @@
|
||||
bin=`dirname "$0"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin/../libexec/hdfs-config.sh"
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
namenodes=$("$HADOOP_PREFIX/bin/hdfs" getconf -nnRpcAddresses)
|
||||
if [ "$?" != '0' ] ; then errorFlag='1' ;
|
||||
|
@ -18,7 +18,9 @@
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
# Start balancer daemon.
|
||||
|
||||
|
@ -25,7 +25,9 @@ usage="Usage: start-dfs.sh [-upgrade|-rollback]"
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
# get arguments
|
||||
if [ $# -ge 1 ]; then
|
||||
|
@ -22,7 +22,9 @@ usage="Usage (run as root in order to start secure datanodes): start-secure-dns.
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
if [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
|
||||
"$HADOOP_PREFIX"/sbin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs start datanode $dataStartOpt
|
||||
|
@ -18,7 +18,9 @@
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
# Stop balancer daemon.
|
||||
# Run this on the machine where the balancer is running
|
||||
|
@ -18,7 +18,9 @@
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
#---------------------------------------------------------
|
||||
# namenodes
|
||||
|
@ -22,7 +22,9 @@ usage="Usage (run as root in order to stop secure datanodes): stop-secure-dns.sh
|
||||
bin=`dirname "${BASH_SOURCE-$0}"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
. "$bin"/../libexec/hdfs-config.sh
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
if [ "$EUID" -eq 0 ] && [ -n "$HADOOP_SECURE_DN_USER" ]; then
|
||||
"$HADOOP_PREFIX"/sbin/hadoop-daemons.sh --config $HADOOP_CONF_DIR --script "$bin"/hdfs stop datanode
|
||||
|
Loading…
Reference in New Issue
Block a user