HADOOP-10787. Rename/remove non-HADOOP_*, etc from the shell scripts. Contributed by Allen Wittenauer.
This commit is contained in:
parent
3e1745d8e8
commit
73b9c7b82b
|
@ -32,6 +32,9 @@ Trunk (Unreleased)
|
|||
HADOOP-11356. Removed deprecated o.a.h.fs.permission.AccessControlException.
|
||||
(Li Lu via wheat9)
|
||||
|
||||
HADOOP-10787 Rename/remove non-HADOOP_*, etc from the shell scripts.
|
||||
(aw via vvasudev)
|
||||
|
||||
NEW FEATURES
|
||||
|
||||
HADOOP-6590. Add a username check for hadoop sub-commands (John Smith via
|
||||
|
|
|
@ -47,13 +47,13 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
@ -113,8 +113,7 @@ case ${COMMAND} in
|
|||
;;
|
||||
archive)
|
||||
CLASS=org.apache.hadoop.tools.HadoopArchives
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
;;
|
||||
checknative)
|
||||
CLASS=org.apache.hadoop.util.NativeLibraryChecker
|
||||
|
@ -133,13 +132,11 @@ case ${COMMAND} in
|
|||
;;
|
||||
distch)
|
||||
CLASS=org.apache.hadoop.tools.DistCh
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
;;
|
||||
distcp)
|
||||
CLASS=org.apache.hadoop.tools.DistCp
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
;;
|
||||
fs)
|
||||
CLASS=org.apache.hadoop.fs.FsShell
|
||||
|
|
|
@ -22,14 +22,14 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -28,12 +28,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -233,6 +233,10 @@ function hadoop_bootstrap
|
|||
# the root of the Hadoop installation
|
||||
# See HADOOP-6255 for the expected directory structure layout
|
||||
|
||||
if [[ -n "${DEFAULT_LIBEXEC_DIR}" ]]; then
|
||||
hadoop_error "WARNING: DEFAULT_LIBEXEC_DIR ignored. It has been replaced by HADOOP_DEFAULT_LIBEXEC_DIR."
|
||||
fi
|
||||
|
||||
# By now, HADOOP_LIBEXEC_DIR should have been defined upstream
|
||||
# We can piggyback off of that to figure out where the default
|
||||
# HADOOP_FREFIX should be. This allows us to run without
|
||||
|
@ -260,8 +264,10 @@ function hadoop_bootstrap
|
|||
YARN_LIB_JARS_DIR=${YARN_LIB_JARS_DIR:-"share/hadoop/yarn/lib"}
|
||||
MAPRED_DIR=${MAPRED_DIR:-"share/hadoop/mapreduce"}
|
||||
MAPRED_LIB_JARS_DIR=${MAPRED_LIB_JARS_DIR:-"share/hadoop/mapreduce/lib"}
|
||||
# setup a default TOOL_PATH
|
||||
TOOL_PATH=${TOOL_PATH:-${HADOOP_PREFIX}/share/hadoop/tools/lib/*}
|
||||
|
||||
# setup a default HADOOP_TOOLS_PATH
|
||||
hadoop_deprecate_envvar TOOL_PATH HADOOP_TOOLS_PATH
|
||||
HADOOP_TOOLS_PATH=${HADOOP_TOOLS_PATH:-${HADOOP_PREFIX}/share/hadoop/tools/lib/*}
|
||||
|
||||
# usage output set to zero
|
||||
hadoop_reset_usage
|
||||
|
@ -616,6 +622,8 @@ function hadoop_connect_to_hosts
|
|||
{
|
||||
# shellcheck disable=SC2124
|
||||
local params="$@"
|
||||
local slave_file
|
||||
local tmpslvnames
|
||||
|
||||
#
|
||||
# ssh (or whatever) to a host
|
||||
|
@ -624,12 +632,8 @@ function hadoop_connect_to_hosts
|
|||
if [[ -n "${HADOOP_SLAVES}" && -n "${HADOOP_SLAVE_NAMES}" ]] ; then
|
||||
hadoop_error "ERROR: Both HADOOP_SLAVES and HADOOP_SLAVE_NAME were defined. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "${HADOOP_SLAVE_NAMES}" ]] ; then
|
||||
SLAVE_NAMES=${HADOOP_SLAVE_NAMES}
|
||||
else
|
||||
SLAVE_FILE=${HADOOP_SLAVES:-${HADOOP_CONF_DIR}/slaves}
|
||||
elif [[ -z "${HADOOP_SLAVE_NAMES}" ]]; then
|
||||
slave_file=${HADOOP_SLAVES:-${HADOOP_CONF_DIR}/slaves}
|
||||
fi
|
||||
|
||||
# if pdsh is available, let's use it. otherwise default
|
||||
|
@ -639,17 +643,18 @@ function hadoop_connect_to_hosts
|
|||
# if we were given a file, just let pdsh deal with it.
|
||||
# shellcheck disable=SC2086
|
||||
PDSH_SSH_ARGS_APPEND="${HADOOP_SSH_OPTS}" pdsh \
|
||||
-f "${HADOOP_SSH_PARALLEL}" -w ^"${SLAVE_FILE}" $"${@// /\\ }" 2>&1
|
||||
-f "${HADOOP_SSH_PARALLEL}" -w ^"${slave_file}" $"${@// /\\ }" 2>&1
|
||||
else
|
||||
# no spaces allowed in the pdsh arg host list
|
||||
# shellcheck disable=SC2086
|
||||
SLAVE_NAMES=$(echo ${SLAVE_NAMES} | tr -s ' ' ,)
|
||||
tmpslvnames=$(echo ${SLAVE_NAMES} | tr -s ' ' ,)
|
||||
PDSH_SSH_ARGS_APPEND="${HADOOP_SSH_OPTS}" pdsh \
|
||||
-f "${HADOOP_SSH_PARALLEL}" -w "${SLAVE_NAMES}" $"${@// /\\ }" 2>&1
|
||||
-f "${HADOOP_SSH_PARALLEL}" \
|
||||
-w "${tmpslvnames}" $"${@// /\\ }" 2>&1
|
||||
fi
|
||||
else
|
||||
if [[ -z "${SLAVE_NAMES}" ]]; then
|
||||
SLAVE_NAMES=$(sed 's/#.*$//;/^$/d' "${SLAVE_FILE}")
|
||||
if [[ -z "${HADOOP_SLAVE_NAMES}" ]]; then
|
||||
HADOOP_SLAVE_NAMES=$(sed 's/#.*$//;/^$/d' "${slave_file}")
|
||||
fi
|
||||
hadoop_connect_to_hosts_without_pdsh "${params}"
|
||||
fi
|
||||
|
@ -666,7 +671,7 @@ function hadoop_connect_to_hosts_without_pdsh
|
|||
{
|
||||
# shellcheck disable=SC2124
|
||||
local params="$@"
|
||||
local slaves=(${SLAVE_NAMES})
|
||||
local slaves=(${HADOOP_SLAVE_NAMES})
|
||||
for (( i = 0; i < ${#slaves[@]}; i++ ))
|
||||
do
|
||||
if (( i != 0 && i % HADOOP_SSH_PARALLEL == 0 )); then
|
||||
|
@ -940,6 +945,37 @@ function hadoop_add_common_to_classpath
|
|||
hadoop_add_classpath "${HADOOP_COMMON_HOME}/${HADOOP_COMMON_DIR}"'/*'
|
||||
}
|
||||
|
||||
## @description Add the HADOOP_TOOLS_PATH to the classpath
|
||||
## @description environment
|
||||
## @audience private
|
||||
## @stability evolving
|
||||
## @replaceable yes
|
||||
function hadoop_add_to_classpath_toolspath
|
||||
{
|
||||
declare -a array
|
||||
declare -i c=0
|
||||
declare -i j
|
||||
declare -i i
|
||||
declare idx
|
||||
|
||||
if [[ -n "${HADOOP_TOOLS_PATH}" ]]; then
|
||||
hadoop_debug "Adding HADOOP_TOOLS_PATH to CLASSPATH"
|
||||
oldifs=${IFS}
|
||||
IFS=:
|
||||
for idx in ${HADOOP_TOOLS_PATH}; do
|
||||
array[${c}]=${idx}
|
||||
((c=c+1))
|
||||
done
|
||||
IFS=${oldifs}
|
||||
((j=c-1)) || ${QATESTMODE}
|
||||
|
||||
for ((i=0; i<=j; i++)); do
|
||||
hadoop_add_classpath "${array[$i]}" after
|
||||
done
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
## @description Add the user's custom classpath settings to the
|
||||
## @description environment
|
||||
## @audience private
|
||||
|
@ -1868,7 +1904,7 @@ function hadoop_verify_user
|
|||
local uservar="HADOOP_${command}_USER"
|
||||
|
||||
if [[ -n ${!uservar} ]]; then
|
||||
if [[ ${!uservar} != ${USER} ]]; then
|
||||
if [[ ${!uservar} != "${USER}" ]]; then
|
||||
hadoop_error "ERROR: ${command} can only be executed by ${!uservar}."
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
####
|
||||
|
||||
# Default location for the common/core Hadoop project
|
||||
# export HADOOP_COMMON_HOME=$HADOOP_PREFIX
|
||||
# export HADOOP_COMMON_HOME=${HADOOP_PREFIX}
|
||||
|
||||
# Relative locations where components under HADOOP_COMMON_HOME are located
|
||||
# export HADOOP_COMMON_DIR="share/hadoop/common"
|
||||
|
@ -55,7 +55,7 @@
|
|||
####
|
||||
|
||||
# Default location for the HDFS subproject
|
||||
# export HADOOP_HDFS_HOME=$HADOOP_PREFIX
|
||||
# export HADOOP_HDFS_HOME=${HADOOP_PREFIX}
|
||||
|
||||
# Relative locations where components under HADOOP_HDFS_HOME are located
|
||||
# export HDFS_DIR="share/hadoop/hdfs"
|
||||
|
@ -66,19 +66,19 @@
|
|||
####
|
||||
|
||||
# Default location for the YARN subproject
|
||||
# export HADOOP_YARN_HOME=$HADOOP_PREFIX
|
||||
# export HADOOP_YARN_HOME=${HADOOP_PREFIX}
|
||||
|
||||
# Relative locations where components under HADOOP_YARN_HOME are located
|
||||
# export YARN_DIR="share/hadoop/yarn"
|
||||
# export YARN_LIB_JARS_DIR="share/hadoop/yarn/lib"
|
||||
|
||||
# Default location for the MapReduce subproject
|
||||
# export HADOOP_MAPRED_HOME=$HADOOP_PREFIX
|
||||
|
||||
####
|
||||
# MapReduce disk layout
|
||||
####
|
||||
|
||||
# Default location for the MapReduce subproject
|
||||
# export HADOOP_MAPRED_HOME=${HADOOP_PREFIX}
|
||||
|
||||
# Relative locations where components under HADOOP_MAPRED_HOME are located
|
||||
# export MAPRED_DIR="share/hadoop/mapreduce"
|
||||
# export MAPRED_LIB_JARS_DIR="share/hadoop/mapreduce/lib"
|
||||
|
@ -87,7 +87,7 @@
|
|||
# Misc paths
|
||||
####
|
||||
|
||||
# setup a default TOOL_PATH, where things like distcp lives
|
||||
# setup a default HADOOP_TOOLS_PATH, where things like distcp lives
|
||||
# note that this path only gets added for certain commands and not
|
||||
# part of the general classpath
|
||||
# export TOOL_PATH="$HADOOP_PREFIX/share/hadoop/tools/lib/*"
|
||||
# export HADOOP_TOOLS_PATH="${HADOOP_PREFIX}/share/hadoop/tools/lib/*"
|
||||
|
|
|
@ -21,8 +21,8 @@ bin=$(cd -P -- "$(dirname -- "$this")" >/dev/null && pwd -P)
|
|||
script="$(basename -- "$this")"
|
||||
this="$bin/$script"
|
||||
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
. "$HADOOP_LIBEXEC_DIR/hadoop-config.sh"
|
||||
|
|
|
@ -34,14 +34,14 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
|
|
@ -22,14 +22,14 @@ exit 1
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
|
|
@ -23,14 +23,14 @@ exit 1
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
|
|
@ -94,6 +94,8 @@
|
|||
#
|
||||
#function hadoop_connect_to_hosts_without_pdsh
|
||||
#{
|
||||
# local tmpslvnames
|
||||
#
|
||||
# # quoting here gets tricky. it's easier to push it into a function
|
||||
# # so that we don't have to deal with it. However...
|
||||
# # xargs can't use a function so instead we'll export it out
|
||||
|
@ -106,9 +108,9 @@
|
|||
# # list with each hostname read from stdin/pipe. But it consider one
|
||||
# # line as one argument while reading from stdin/pipe. So place each
|
||||
# # hostname in different lines while passing via pipe.
|
||||
# SLAVE_NAMES=$(echo "$SLAVE_NAMES" | tr ' ' '\n' )
|
||||
# echo "${SLAVE_NAMES}" | \
|
||||
# xargs -n 1 -P"${HADOOP_SSH_PARALLEL}" \
|
||||
# -I {} bash -c -- "hadoop_actual_ssh {} ${params}"
|
||||
# tmpslvnames=$(echo "${HADOOP_SLAVE_NAMES}" | tr ' ' '\n' )
|
||||
# echo "${tmpslvnames}" | \
|
||||
# xargs -n 1 -P"${HADOOP_SSH_PARALLEL}" \
|
||||
# -I {} bash -c -- "hadoop_actual_ssh {} ${params}"
|
||||
# wait
|
||||
#}
|
||||
|
|
|
@ -24,7 +24,7 @@ freetheclasses () {
|
|||
HADOOP_COMMON_HOME \
|
||||
HADOOP_COMMON_LIB_JARS_DIR \
|
||||
HADOOP_ENABLE_BUILD_PATHS ; do
|
||||
unset ${!j}
|
||||
unset ${j}
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -68,4 +68,4 @@ createdirs () {
|
|||
set -e
|
||||
echo ">${CLASSPATH}<"
|
||||
[ "${CLASSPATH}" = "${TMP}/hadoop-common/target/classes:${TMP}/commonlibjars/*:${TMP}/commondir/*" ]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
# 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.
|
||||
|
||||
load hadoop-functions_test_helper
|
||||
|
||||
freetheclasses () {
|
||||
local j
|
||||
|
||||
for j in HADOOP_TOOLS_PATH \
|
||||
CLASSPATH; do
|
||||
unset ${j}
|
||||
done
|
||||
}
|
||||
|
||||
createdirs () {
|
||||
local j
|
||||
|
||||
for j in new old foo bar baz; do
|
||||
mkdir -p "${TMP}/${j}"
|
||||
done
|
||||
}
|
||||
|
||||
@test "hadoop_add_to_classpath_toolspath (nothing)" {
|
||||
freetheclasses
|
||||
hadoop_add_to_classpath_toolspath
|
||||
[ -z "${CLASSPATH}" ]
|
||||
}
|
||||
|
||||
@test "hadoop_add_to_classpath_toolspath (none)" {
|
||||
freetheclasses
|
||||
CLASSPATH=test
|
||||
hadoop_add_to_classpath_toolspath
|
||||
[ "${CLASSPATH}" = "test" ]
|
||||
}
|
||||
|
||||
@test "hadoop_add_to_classpath_toolspath (only)" {
|
||||
freetheclasses
|
||||
createdirs
|
||||
HADOOP_TOOLS_PATH="${TMP}/new"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
[ "${CLASSPATH}" = "${TMP}/new" ]
|
||||
}
|
||||
|
||||
@test "hadoop_add_to_classpath_toolspath (1+1)" {
|
||||
freetheclasses
|
||||
createdirs
|
||||
CLASSPATH=${TMP}/foo
|
||||
HADOOP_TOOLS_PATH=${TMP}/foo
|
||||
hadoop_add_to_classpath_toolspath
|
||||
echo ">${CLASSPATH}<"
|
||||
[ ${CLASSPATH} = "${TMP}/foo" ]
|
||||
}
|
||||
|
||||
@test "hadoop_add_to_classpath_toolspath (3+2)" {
|
||||
freetheclasses
|
||||
createdirs
|
||||
CLASSPATH=${TMP}/foo:${TMP}/bar:${TMP}/baz
|
||||
HADOOP_TOOLS_PATH=${TMP}/new:${TMP}/old
|
||||
hadoop_add_to_classpath_toolspath
|
||||
echo ">${CLASSPATH}<"
|
||||
[ ${CLASSPATH} = "${TMP}/foo:${TMP}/bar:${TMP}/baz:${TMP}/new:${TMP}/old" ]
|
||||
}
|
|
@ -41,7 +41,7 @@ basicinitsetup () {
|
|||
HADOOP_YARN_HOME"
|
||||
|
||||
for j in ${testvars}; do
|
||||
unset ${!j}
|
||||
unset ${j}
|
||||
done
|
||||
|
||||
HADOOP_PREFIX=${TMP}
|
||||
|
|
|
@ -31,13 +31,13 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/kms-config.sh" ]]; then
|
||||
|
|
|
@ -31,13 +31,13 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/httpfs-config.sh" ]]; then
|
||||
|
|
|
@ -36,8 +36,8 @@
|
|||
bin=`dirname "$0"`
|
||||
bin=`cd "$bin"; pwd`
|
||||
|
||||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="$bin"/../libexec
|
||||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}
|
||||
. $HADOOP_LIBEXEC_DIR/hdfs-config.sh
|
||||
|
||||
if [ "$1" = '' ] ; then
|
||||
|
|
|
@ -60,13 +60,13 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
@ -155,8 +155,7 @@ case ${COMMAND} in
|
|||
;;
|
||||
haadmin)
|
||||
CLASS=org.apache.hadoop.hdfs.tools.DFSHAAdmin
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
|
||||
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
|
||||
;;
|
||||
|
|
|
@ -22,14 +22,14 @@
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -31,12 +31,12 @@ bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -30,12 +30,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -27,12 +27,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -29,12 +29,12 @@ bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -29,12 +29,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -27,12 +27,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
|
||||
|
|
|
@ -37,12 +37,12 @@ bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/mapred-config.sh" ]]; then
|
||||
|
@ -68,15 +68,13 @@ case ${COMMAND} in
|
|||
;;
|
||||
archive)
|
||||
CLASS=org.apache.hadoop.tools.HadoopArchives
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
|
||||
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
|
||||
;;
|
||||
archive-logs)
|
||||
CLASS=org.apache.hadoop.tools.HadoopArchiveLogs
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
|
||||
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
|
||||
;;
|
||||
|
@ -85,8 +83,7 @@ case ${COMMAND} in
|
|||
;;
|
||||
distcp)
|
||||
CLASS=org.apache.hadoop.tools.DistCp
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
|
||||
HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
|
||||
;;
|
||||
|
|
|
@ -22,14 +22,14 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
|
@ -55,8 +55,7 @@ function parse_args()
|
|||
|
||||
function calculate_classpath()
|
||||
{
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
hadoop_add_to_classpath_toolspath
|
||||
}
|
||||
|
||||
function run_sls_generator()
|
||||
|
@ -79,14 +78,14 @@ function run_sls_generator()
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
|
|
@ -68,9 +68,9 @@ function parse_args()
|
|||
fi
|
||||
}
|
||||
|
||||
function calculate_classpath() {
|
||||
hadoop_debug "Injecting TOOL_PATH into CLASSPATH"
|
||||
hadoop_add_classpath "${TOOL_PATH}"
|
||||
function calculate_classpath
|
||||
{
|
||||
hadoop_add_to_classpath_toolspath
|
||||
hadoop_debug "Injecting ${HADOOP_PREFIX}/share/hadoop/tools/sls/html into CLASSPATH"
|
||||
hadoop_add_classpath "${HADOOP_PREFIX}/share/hadoop/tools/sls/html"
|
||||
}
|
||||
|
@ -106,14 +106,14 @@ function run_simulation() {
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../../../../../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
|
||||
|
|
|
@ -27,12 +27,12 @@ bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
|
@ -27,12 +27,12 @@ bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
|
@ -51,13 +51,13 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
|
@ -22,14 +22,14 @@ function hadoop_usage
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
this="${BASH_SOURCE-$0}"
|
||||
bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
|
@ -26,12 +26,12 @@ bin=$(cd -P -- "$(dirname -- "${this}")" >/dev/null && pwd -P)
|
|||
|
||||
# let's locate libexec...
|
||||
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
||||
DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
||||
else
|
||||
DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
||||
fi
|
||||
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
|
||||
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
||||
# shellcheck disable=SC2034
|
||||
HADOOP_NEW_CONFIG=true
|
||||
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
||||
|
|
Loading…
Reference in New Issue