瀏覽代碼

HADOOP-2100. Remove faulty check for existence of $HADOOP_PID_DIR and let 'mkdir -p' to check & create it. Contributed by Michael Bieniosek.

git-svn-id: https://svn.apache.org/repos/asf/lucene/hadoop/trunk@588285 13f79535-47bb-0310-9956-ffa450edef68
Arun Murthy 17 年之前
父節點
當前提交
bb3729f2e2
共有 2 個文件被更改,包括 7 次插入3 次删除
  1. 5 0
      CHANGES.txt
  2. 2 3
      bin/hadoop-daemon.sh

+ 5 - 0
CHANGES.txt

@@ -33,6 +33,11 @@ Trunk (unreleased changes)
     HADOOP-1898.  Release the lock protecting the last time of the last stack
     dump while the dump is happening. (Amareshwari Sri Ramadasu via omalley)
 
+  BUG FIXES
+
+    HADOOP-2100.  Remove faulty check for existence of $HADOOP_PID_DIR and let
+    'mkdir -p' check & create it. (Michael Bieniosek via acmurthy)
+
 Branch 0.15 (unreleased changes)
 
   INCOMPATIBLE CHANGES

+ 2 - 3
bin/hadoop-daemon.sh

@@ -81,9 +81,8 @@ case $startStop in
 
   (start)
 
-    if [ ! -d "HADOOP_PID_DIR" ]; then
-      mkdir -p "$HADOOP_PID_DIR"
-    fi
+    mkdir -p "$HADOOP_PID_DIR"
+
     if [ -f $pid ]; then
       if kill -0 `cat $pid` > /dev/null 2>&1; then
         echo $command running as process `cat $pid`.  Stop it first.