From c9507fe6c12491f3aef5cd4142b4d466bd6b71c3 Mon Sep 17 00:00:00 2001 From: Allen Wittenauer Date: Tue, 21 Jul 2015 09:41:28 -0700 Subject: [PATCH] HDFS-8800. hdfs --daemon stop namenode corrupts logs (John Smith via aw) --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 6c91c45fa57..223baaf31fb 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -343,6 +343,8 @@ Trunk (Unreleased) HDFS-8657. Update docs for mSNN. (Jesse Yates via atm) + HDFS-8800. hdfs --daemon stop namenode corrupts logs (John Smith via aw) + Release 2.8.0 - UNRELEASED NEW FEATURES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs index a996a80934a..23a08be7936 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs @@ -274,14 +274,6 @@ fi hadoop_finalize if [[ -n "${supportdaemonization}" ]]; then - if [[ "${COMMAND}" == "namenode" ]] && - [[ "${HADOOP_DAEMON_MODE}" == "stop" ]]; then - hadoop_debug "Do checkpoint if necessary before stopping NameNode" - export CLASSPATH - "${JAVA}" "-Dproc_dfsadmin" ${HADOOP_OPTS} "org.apache.hadoop.hdfs.tools.DFSAdmin" "-safemode" "enter" - "${JAVA}" "-Dproc_dfsadmin" ${HADOOP_OPTS} "org.apache.hadoop.hdfs.tools.DFSAdmin" "-saveNamespace" "-beforeShutdown" - "${JAVA}" "-Dproc_dfsadmin" ${HADOOP_OPTS} "org.apache.hadoop.hdfs.tools.DFSAdmin" "-safemode" "leave" - fi if [[ -n "${secure_service}" ]]; then hadoop_secure_daemon_handler \ "${HADOOP_DAEMON_MODE}" "${COMMAND}" "${CLASS}"\