From 72c141ba969aa9090528e4b79beb891fbfb03c1b Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Wed, 19 Nov 2014 14:49:16 -0800 Subject: [PATCH] HADOOP-11208. Replace "daemon" with better name in script subcommands (aw) --- .../hadoop-common/CHANGES.txt | 2 ++ .../hadoop-hdfs/src/main/bin/hdfs | 20 +++++++++---------- hadoop-mapreduce-project/bin/mapred | 4 ++-- hadoop-yarn-project/hadoop-yarn/bin/yarn | 14 ++++++------- 4 files changed, 21 insertions(+), 19 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index a15a8c1525..becae367d1 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -141,6 +141,8 @@ Trunk (Unreleased) HADOOP-11150. hadoop command should show the reason on failure by invalid COMMAND or CLASSNAME (Masatake Iwasaki via aw) + HADOOP-11208. Replace "daemon" with better name in script subcommands (aw) + BUG FIXES HADOOP-9451. Fault single-layer config if node group topology is enabled. diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs index f29a5c6753..8ff0ee61f6 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs @@ -85,7 +85,7 @@ shift case ${COMMAND} in balancer) - daemon="true" + supportdaemonization="true" CLASS=org.apache.hadoop.hdfs.server.balancer.Balancer hadoop_debug "Appending HADOOP_BALANCER_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_BALANCER_OPTS}" @@ -102,7 +102,7 @@ case ${COMMAND} in CLASS=org.apache.hadoop.hdfs.tools.CryptoAdmin ;; datanode) - daemon="true" + supportdaemonization="true" # Determine if we're starting a secure datanode, and # if so, redefine appropriate variables if [[ -n "${HADOOP_SECURE_DN_USER}" ]]; then @@ -158,7 +158,7 @@ case ${COMMAND} in HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}" ;; journalnode) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.hdfs.qjournal.server.JournalNode' hadoop_debug "Appending HADOOP_JOURNALNODE_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_JOURNALNODE_OPTS}" @@ -170,19 +170,19 @@ case ${COMMAND} in CLASS=org.apache.hadoop.hdfs.tools.snapshot.LsSnapshottableDir ;; mover) - daemon="true" + supportdaemonization="true" CLASS=org.apache.hadoop.hdfs.server.mover.Mover hadoop_debug "Appending HADOOP_MOVER_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_MOVER_OPTS}" ;; namenode) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.hdfs.server.namenode.NameNode' hadoop_debug "Appending HADOOP_NAMENODE_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_NAMENODE_OPTS}" ;; nfs3) - daemon="true" + supportdaemonization="true" if [[ -n "${HADOOP_PRIVILEGED_NFS_USER}" ]]; then secure_service="true" secure_user="${HADOOP_PRIVILEGED_NFS_USER}" @@ -211,13 +211,13 @@ case ${COMMAND} in CLASS=org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer ;; portmap) - daemon="true" + supportdaemonization="true" CLASS=org.apache.hadoop.portmap.Portmap hadoop_debug "Appending HADOOP_PORTMAP_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_PORTMAP_OPTS}" ;; secondarynamenode) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode' hadoop_debug "Appending HADOOP_SECONDARYNAMENODE_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_SECONDARYNAMENODE_OPTS}" @@ -232,7 +232,7 @@ case ${COMMAND} in CLASS=org.apache.hadoop.util.VersionInfo ;; zkfc) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.hdfs.tools.DFSZKFailoverController' hadoop_debug "Appending HADOOP_ZKFC_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_ZKFC_OPTS}" @@ -274,7 +274,7 @@ fi hadoop_add_param HADOOP_OPTS Xmx "${JAVA_HEAP_MAX}" hadoop_finalize -if [[ -n "${daemon}" ]]; then +if [[ -n "${supportdaemonization}" ]]; then if [[ -n "${secure_service}" ]]; then hadoop_secure_daemon_handler \ "${HADOOP_DAEMON_MODE}" "${COMMAND}" "${CLASS}"\ diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred index 9131ba7916..667777a4c8 100755 --- a/hadoop-mapreduce-project/bin/mapred +++ b/hadoop-mapreduce-project/bin/mapred @@ -90,7 +90,7 @@ case ${COMMAND} in HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}" ;; historyserver) - daemon="true" + supportdaemonization="true" CLASS=org.apache.hadoop.mapreduce.v2.hs.JobHistoryServer hadoop_debug "Appending HADOOP_JOB_HISTORYSERVER_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_JOB_HISTORYSERVER_OPTS}" @@ -150,7 +150,7 @@ fi hadoop_add_param HADOOP_OPTS Xmx "${JAVA_HEAP_MAX}" hadoop_finalize -if [[ -n "${daemon}" ]]; then +if [[ -n "${supportdaemonization}" ]]; then if [[ -n "${secure_service}" ]]; then hadoop_secure_daemon_handler "${HADOOP_DAEMON_MODE}" "${COMMAND}"\ "${CLASS}" "${daemon_pidfile}" "${daemon_outfile}" \ diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn index 90e5527a3a..b98f344c85 100644 --- a/hadoop-yarn-project/hadoop-yarn/bin/yarn +++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn @@ -95,7 +95,7 @@ case "${COMMAND}" in YARN_OPTS="${YARN_OPTS} ${YARN_CLIENT_OPTS}" ;; historyserver) - daemon="true" + supportdaemonization="true" 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 @@ -112,7 +112,7 @@ case "${COMMAND}" in YARN_OPTS="${YARN_OPTS} ${YARN_CLIENT_OPTS}" ;; nodemanager) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.yarn.server.nodemanager.NodeManager' hadoop_debug "Append YARN_NODEMANAGER_OPTS onto YARN_OPTS" YARN_OPTS="${YARN_OPTS} ${YARN_NODEMANAGER_OPTS}" @@ -121,7 +121,7 @@ case "${COMMAND}" in fi ;; proxyserver) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.yarn.server.webproxy.WebAppProxyServer' hadoop_debug "Append YARN_PROXYSERVER_OPTS onto YARN_OPTS" YARN_OPTS="${YARN_OPTS} ${YARN_PROXYSERVER_OPTS}" @@ -135,7 +135,7 @@ case "${COMMAND}" in YARN_OPTS="${YARN_OPTS} ${YARN_CLIENT_OPTS}" ;; resourcemanager) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.yarn.server.resourcemanager.ResourceManager' YARN_OPTS="${YARN_OPTS} ${YARN_RESOURCEMANAGER_OPTS}" hadoop_debug "Append YARN_RESOURCEMANAGER_OPTS onto YARN_OPTS" @@ -149,7 +149,7 @@ case "${COMMAND}" in YARN_OPTS="${YARN_OPTS} ${YARN_CLIENT_OPTS}" ;; timelineserver) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.yarn.server.applicationhistoryservice.ApplicationHistoryServer' hadoop_debug "Append YARN_TIMELINESERVER_OPTS onto YARN_OPTS" YARN_OPTS="${YARN_OPTS} ${YARN_TIMELINESERVER_OPTS}" @@ -158,7 +158,7 @@ case "${COMMAND}" in fi ;; sharedcachemanager) - daemon="true" + supportdaemonization="true" CLASS='org.apache.hadoop.yarn.server.sharedcachemanager.SharedCacheManager' YARN_OPTS="$YARN_OPTS $YARN_SHAREDCACHEMANAGER_OPTS" ;; @@ -206,7 +206,7 @@ hadoop_add_param HADOOP_OPTS yarn.root.logger "-Dyarn.root.logger=${YARN_ROOT_LO hadoop_finalize -if [[ -n "${daemon}" ]]; then +if [[ -n "${supportdaemonization}" ]]; then if [[ -n "${secure_service}" ]]; then hadoop_secure_daemon_handler "${HADOOP_DAEMON_MODE}" "${COMMAND}" \ "${CLASS}" "${daemon_pidfile}" "${daemon_outfile}" \