MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
2015-07-16 19:58:11 -04:00
|
|
|
MYNAME="${BASH_SOURCE-$0}"
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
function hadoop_usage
|
|
|
|
{
|
2015-07-31 17:32:21 -04:00
|
|
|
hadoop_add_option "--buildpaths" "attempt to add class files from build tree"
|
|
|
|
hadoop_add_option "--daemon (start|status|stop)" "operate on a daemon"
|
|
|
|
hadoop_add_option "--hostnames list[,of,host,names]" "hosts to use in slave mode"
|
|
|
|
hadoop_add_option "--loglevel level" "set the log4j level for this command"
|
|
|
|
hadoop_add_option "--hosts filename" "list of hosts to use in slave mode"
|
|
|
|
hadoop_add_option "--slaves" "turn on slave mode"
|
|
|
|
|
2015-07-16 19:58:11 -04:00
|
|
|
hadoop_add_subcommand "application" "prints application(s) report/kill application"
|
|
|
|
hadoop_add_subcommand "applicationattempt" "prints applicationattempt(s) report"
|
|
|
|
hadoop_add_subcommand "classpath" "prints the class path needed to get the hadoop jar and the required libraries"
|
|
|
|
hadoop_add_subcommand "cluster" "prints cluster information"
|
|
|
|
hadoop_add_subcommand "container" "prints container(s) report"
|
|
|
|
hadoop_add_subcommand "daemonlog" "get/set the log level for each daemon"
|
2015-11-07 11:32:56 -05:00
|
|
|
hadoop_add_subcommand "envvars" "display computed Hadoop environment variables"
|
2015-07-16 19:58:11 -04:00
|
|
|
hadoop_add_subcommand "jar <jar>" "run a jar file"
|
|
|
|
hadoop_add_subcommand "logs" "dump container logs"
|
|
|
|
hadoop_add_subcommand "node" "prints node report(s)"
|
|
|
|
hadoop_add_subcommand "nodemanager" "run a nodemanager on each slave"
|
|
|
|
hadoop_add_subcommand "proxyserver" "run the web app proxy server"
|
|
|
|
hadoop_add_subcommand "queue" "prints queue information"
|
|
|
|
hadoop_add_subcommand "resourcemanager" "run the ResourceManager"
|
|
|
|
hadoop_add_subcommand "rmadmin" "admin tools"
|
|
|
|
hadoop_add_subcommand "scmadmin" "SharedCacheManager admin tools"
|
|
|
|
hadoop_add_subcommand "sharedcachemanager" "run the SharedCacheManager daemon"
|
|
|
|
hadoop_add_subcommand "timelineserver" "run the timeline server"
|
|
|
|
hadoop_add_subcommand "top" "view cluster information"
|
|
|
|
hadoop_add_subcommand "version" "print the version"
|
|
|
|
hadoop_generate_usage "${MYNAME}" true
|
2013-02-22 13:36:24 -05:00
|
|
|
}
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
|
|
|
|
# let's locate libexec...
|
|
|
|
if [[ -n "${HADOOP_PREFIX}" ]]; then
|
2015-11-04 05:26:17 -05:00
|
|
|
HADOOP_DEFAULT_LIBEXEC_DIR="${HADOOP_PREFIX}/libexec"
|
2014-08-19 08:11:17 -04:00
|
|
|
else
|
2015-07-16 19:58:11 -04:00
|
|
|
bin=$(cd -P -- "$(dirname -- "${MYNAME}")" >/dev/null && pwd -P)
|
2015-11-04 05:26:17 -05:00
|
|
|
HADOOP_DEFAULT_LIBEXEC_DIR="${bin}/../libexec"
|
2014-08-19 08:11:17 -04:00
|
|
|
fi
|
|
|
|
|
2015-11-04 05:26:17 -05:00
|
|
|
HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$HADOOP_DEFAULT_LIBEXEC_DIR}"
|
2014-08-19 08:11:17 -04:00
|
|
|
# shellcheck disable=SC2034
|
|
|
|
HADOOP_NEW_CONFIG=true
|
|
|
|
if [[ -f "${HADOOP_LIBEXEC_DIR}/yarn-config.sh" ]]; then
|
|
|
|
. "${HADOOP_LIBEXEC_DIR}/yarn-config.sh"
|
|
|
|
else
|
|
|
|
echo "ERROR: Cannot execute ${HADOOP_LIBEXEC_DIR}/yarn-config.sh." 2>&1
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
# if no args specified, show usage
|
|
|
|
if [[ $# = 0 ]]; then
|
|
|
|
hadoop_exit_with_usage 1
|
|
|
|
fi
|
|
|
|
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
# get arguments
|
|
|
|
COMMAND=$1
|
|
|
|
shift
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
case "${COMMAND}" in
|
|
|
|
application|applicationattempt|container)
|
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.ApplicationCLI
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-21 17:33:35 -04:00
|
|
|
set -- "${COMMAND}" "$@"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
|
|
|
classpath)
|
2015-03-26 01:36:09 -04:00
|
|
|
hadoop_do_classpath_subcommand CLASS "$@"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
2015-03-05 13:54:34 -05:00
|
|
|
cluster)
|
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.ClusterCLI
|
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto YARN_OPTS"
|
|
|
|
YARN_OPTS="${YARN_OPTS} ${YARN_CLIENT_OPTS}"
|
|
|
|
;;
|
2014-08-19 08:11:17 -04:00
|
|
|
daemonlog)
|
|
|
|
CLASS=org.apache.hadoop.log.LogLevel
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
2015-11-07 11:32:56 -05:00
|
|
|
envvars)
|
|
|
|
echo "JAVA_HOME='${JAVA_HOME}'"
|
|
|
|
echo "HADOOP_YARN_HOME='${HADOOP_YARN_HOME}'"
|
|
|
|
echo "YARN_DIR='${YARN_DIR}'"
|
|
|
|
echo "YARN_LIB_JARS_DIR='${YARN_LIB_JARS_DIR}'"
|
|
|
|
echo "HADOOP_CONF_DIR='${HADOOP_CONF_DIR}'"
|
2016-03-02 16:13:36 -05:00
|
|
|
echo "HADOOP_TOOLS_HOME='${HADOOP_TOOLS_HOME}'"
|
|
|
|
echo "HADOOP_TOOLS_DIR='${HADOOP_TOOLS_DIR}'"
|
|
|
|
echo "HADOOP_TOOLS_LIB_JARS_DIR='${HADOOP_TOOLS_LIB_JARS_DIR}'"
|
2015-11-07 11:32:56 -05:00
|
|
|
exit 0
|
|
|
|
;;
|
2014-08-19 08:11:17 -04:00
|
|
|
jar)
|
|
|
|
CLASS=org.apache.hadoop.util.RunJar
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
|
|
|
historyserver)
|
2014-11-19 17:49:16 -05:00
|
|
|
supportdaemonization="true"
|
2014-08-19 08:11:17 -04:00
|
|
|
echo "DEPRECATED: Use of this command to start the timeline server is deprecated." 1>&2
|
|
|
|
echo "Instead use the timelineserver command for it." 1>&2
|
|
|
|
echo "Starting the History Server anyway..." 1>&2
|
|
|
|
CLASS='org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer'
|
|
|
|
;;
|
|
|
|
logs)
|
2014-09-12 13:35:41 -04:00
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.LogsCLI
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
|
|
|
node)
|
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.NodeCLI
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
|
|
|
nodemanager)
|
2014-11-19 17:49:16 -05:00
|
|
|
supportdaemonization="true"
|
2014-08-19 08:11:17 -04:00
|
|
|
CLASS='org.apache.hadoop.yarn.server.nodemanager.NodeManager'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_NODEMANAGER_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_NODEMANAGER_OPTS}"
|
2014-12-10 16:37:32 -05:00
|
|
|
# Backwards compatibility
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ -n "${YARN_NODEMANAGER_HEAPSIZE}" ]]; then
|
2014-12-10 16:37:32 -05:00
|
|
|
HADOOP_HEAPSIZE_MAX="${YARN_NODEMANAGER_HEAPSIZE}"
|
2014-08-19 08:11:17 -04:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
proxyserver)
|
2014-11-19 17:49:16 -05:00
|
|
|
supportdaemonization="true"
|
2014-08-19 08:11:17 -04:00
|
|
|
CLASS='org.apache.hadoop.yarn.server.webproxy.WebAppProxyServer'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_PROXYSERVER_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_PROXYSERVER_OPTS}"
|
2014-12-10 16:37:32 -05:00
|
|
|
# Backwards compatibility
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ -n "${YARN_PROXYSERVER_HEAPSIZE}" ]]; then
|
2014-12-10 16:37:32 -05:00
|
|
|
HADOOP_HEAPSIZE_MAX="${YARN_PROXYSERVER_HEAPSIZE}"
|
2014-08-19 08:11:17 -04:00
|
|
|
fi
|
|
|
|
;;
|
2014-11-06 23:48:31 -05:00
|
|
|
queue)
|
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.QueueCLI
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-11-06 23:48:31 -05:00
|
|
|
;;
|
2014-08-19 08:11:17 -04:00
|
|
|
resourcemanager)
|
2014-11-19 17:49:16 -05:00
|
|
|
supportdaemonization="true"
|
2014-08-19 08:11:17 -04:00
|
|
|
CLASS='org.apache.hadoop.yarn.server.resourcemanager.ResourceManager'
|
2015-02-04 19:35:50 -05:00
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_RESOURCEMANAGER_OPTS}"
|
|
|
|
hadoop_debug "Append YARN_RESOURCEMANAGER_OPTS onto HADOOP_OPTS"
|
2014-12-10 16:37:32 -05:00
|
|
|
# Backwards compatibility
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ -n "${YARN_RESOURCEMANAGER_HEAPSIZE}" ]]; then
|
2014-12-10 16:37:32 -05:00
|
|
|
HADOOP_HEAPSIZE_MAX="${YARN_RESOURCEMANAGER_HEAPSIZE}"
|
2014-08-19 08:11:17 -04:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
rmadmin)
|
|
|
|
CLASS='org.apache.hadoop.yarn.client.cli.RMAdminCLI'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
2014-12-17 14:18:23 -05:00
|
|
|
scmadmin)
|
|
|
|
CLASS='org.apache.hadoop.yarn.client.SCMAdmin'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-12-17 14:18:23 -05:00
|
|
|
;;
|
|
|
|
sharedcachemanager)
|
|
|
|
supportdaemonization="true"
|
|
|
|
CLASS='org.apache.hadoop.yarn.server.sharedcachemanager.SharedCacheManager'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_SHAREDCACHEMANAGER_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_SHAREDCACHEMANAGER_OPTS}"
|
2014-12-17 14:18:23 -05:00
|
|
|
;;
|
2014-08-19 08:11:17 -04:00
|
|
|
timelineserver)
|
2014-11-19 17:49:16 -05:00
|
|
|
supportdaemonization="true"
|
2014-08-19 08:11:17 -04:00
|
|
|
CLASS='org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer'
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_TIMELINESERVER_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_TIMELINESERVER_OPTS}"
|
2014-12-10 16:37:32 -05:00
|
|
|
# Backwards compatibility
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ -n "${YARN_TIMELINESERVER_HEAPSIZE}" ]]; then
|
2014-12-10 16:37:32 -05:00
|
|
|
HADOOP_HEAPSIZE_MAX="${YARN_TIMELINESERVER_HEAPSIZE}"
|
2014-08-19 08:11:17 -04:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
version)
|
|
|
|
CLASS=org.apache.hadoop.util.VersionInfo
|
2015-02-04 19:35:50 -05:00
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
2015-04-09 23:24:32 -04:00
|
|
|
top)
|
|
|
|
doNotSetCols=0
|
|
|
|
doNotSetRows=0
|
|
|
|
for i in "$@"; do
|
|
|
|
if [[ $i == "-cols" ]]; then
|
|
|
|
doNotSetCols=1
|
|
|
|
fi
|
|
|
|
if [[ $i == "-rows" ]]; then
|
|
|
|
doNotSetRows=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ $doNotSetCols == 0 ] && [ -n "${TERM}" ]; then
|
|
|
|
cols=$(tput cols)
|
|
|
|
if [ -n "$cols" ]; then
|
|
|
|
args=( $@ )
|
|
|
|
args=("${args[@]}" "-cols" "$cols")
|
|
|
|
set -- "${args[@]}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if [ $doNotSetRows == 0 ] && [ -n "${TERM}" ]; then
|
|
|
|
rows=$(tput lines)
|
|
|
|
if [ -n "$rows" ]; then
|
|
|
|
args=( $@ )
|
|
|
|
args=("${args[@]}" "-rows" "$rows")
|
|
|
|
set -- "${args[@]}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
CLASS=org.apache.hadoop.yarn.client.cli.TopCLI
|
|
|
|
hadoop_debug "Append YARN_CLIENT_OPTS onto HADOOP_OPTS"
|
|
|
|
HADOOP_OPTS="${HADOOP_OPTS} ${YARN_CLIENT_OPTS}"
|
|
|
|
;;
|
2014-08-19 08:11:17 -04:00
|
|
|
*)
|
|
|
|
CLASS="${COMMAND}"
|
2014-09-23 15:24:23 -04:00
|
|
|
if ! hadoop_validate_classname "${CLASS}"; then
|
|
|
|
hadoop_exit_with_usage 1
|
|
|
|
fi
|
2014-08-19 08:11:17 -04:00
|
|
|
;;
|
2013-02-22 13:36:24 -05:00
|
|
|
esac
|
|
|
|
|
2014-12-10 16:41:28 -05:00
|
|
|
hadoop_verify_user "${COMMAND}"
|
|
|
|
|
2015-02-12 21:01:28 -05:00
|
|
|
if [[ ${HADOOP_SLAVE_MODE} = true ]]; then
|
|
|
|
hadoop_common_slave_mode_execute "${HADOOP_YARN_HOME}/bin/yarn" "${HADOOP_USER_PARAMS[@]}"
|
|
|
|
exit $?
|
|
|
|
fi
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
daemon_outfile="${HADOOP_LOG_DIR}/hadoop-${HADOOP_IDENT_STRING}-${COMMAND}-${HOSTNAME}.out"
|
|
|
|
daemon_pidfile="${HADOOP_PID_DIR}/hadoop-${HADOOP_IDENT_STRING}-${COMMAND}.pid"
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ "${HADOOP_DAEMON_MODE}" != "default" ]]; then
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
HADOOP_ROOT_LOGGER="${HADOOP_DAEMON_ROOT_LOGGER}"
|
|
|
|
HADOOP_LOGFILE="hadoop-${HADOOP_IDENT_STRING}-${COMMAND}-${HOSTNAME}.log"
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
fi
|
|
|
|
|
2014-08-19 08:11:17 -04:00
|
|
|
hadoop_finalize
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
|
2014-11-19 17:49:16 -05:00
|
|
|
if [[ -n "${supportdaemonization}" ]]; then
|
2014-08-19 08:11:17 -04:00
|
|
|
if [[ -n "${secure_service}" ]]; then
|
|
|
|
hadoop_secure_daemon_handler "${HADOOP_DAEMON_MODE}" "${COMMAND}" \
|
|
|
|
"${CLASS}" "${daemon_pidfile}" "${daemon_outfile}" \
|
|
|
|
"${priv_pidfile}" "${priv_outfile}" "${priv_errfile}" "$@"
|
2014-02-26 21:18:34 -05:00
|
|
|
else
|
2014-08-19 08:11:17 -04:00
|
|
|
hadoop_daemon_handler "${HADOOP_DAEMON_MODE}" "${COMMAND}" "${CLASS}" \
|
|
|
|
"${daemon_pidfile}" "${daemon_outfile}" "$@"
|
2014-02-26 21:18:34 -05:00
|
|
|
fi
|
2014-08-19 08:11:17 -04:00
|
|
|
exit $?
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
else
|
2014-08-19 08:11:17 -04:00
|
|
|
hadoop_java_exec "${COMMAND}" "${CLASS}" "$@"
|
MAPREDUCE-279. MapReduce 2.0. Merging MR-279 branch into trunk. Contributed by Arun C Murthy, Christopher Douglas, Devaraj Das, Greg Roelofs, Jeffrey Naisbitt, Josh Wills, Jonathan Eagles, Krishna Ramachandran, Luke Lu, Mahadev Konar, Robert Evans, Sharad Agarwal, Siddharth Seth, Thomas Graves, and Vinod Kumar Vavilapalli.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1159166 13f79535-47bb-0310-9956-ffa450edef68
2011-08-18 07:07:10 -04:00
|
|
|
fi
|