title: Name node never leaves safe mode eventhough none of the files are corrupted and jps shows name node twice
body: <p>I installed hadoop using (brew install hadoop). For 4 months it was running correctly. i realised that mapred-site.xml was configured to jobtracker So. i changed to yarn and restarted then i found data node is missing . i reinstalled hadoop and found some corrupted files. i deleted that files using fsck. but still the name node will stay in the safe mode. I tried re-installing hadoop 5 times and also i uninstalled brew and installed all fresh again . I am still not able to figure it out.Any help will be appreciated. I have assignments to be completed this week.</p>
  
  <p>jps </p>
  
  <pre><code>28723 SecondaryNameNode
  33876 Jps
  16309 NameNode
  28504 NameNode
  28856 ResourceManager
  61292 JoveScala
  32701 DataNode
  28958 NodeManager
  </code></pre>
  
  <p>core-site.xml </p>
  
  <pre><code> &lt;property&gt;
    &lt;name&gt;hadoop.tmp.dir&lt;/name&gt;
    &lt;value&gt;/usr/local/Cellar/hadoop/hdfs/tmp&lt;/value&gt;
  &lt;/property&gt;
  &lt;property&gt;
      &lt;name&gt;fs.defaultFS&lt;/name&gt;
      &lt;value&gt;hdfs://localhost:9000&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>hdfs-site.xml </p>
  
  <pre><code>&lt;property&gt;
      &lt;name&gt;dfs.replication&lt;/name&gt;
      &lt;value&gt;1&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>mapred-site.xml</p>
  
  <pre><code>   &lt;property&gt;
      &lt;name&gt;mapreduce.framework.name&lt;/name&gt;
      &lt;value&gt;yarn&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>yarn-site.xml </p>
  
  <pre><code>   &lt;property&gt;
      &lt;name&gt;yarn.nodemanager.aux-services&lt;/name&gt;
      &lt;value&gt;mapreduce_shuffle&lt;/value&gt;
  &lt;/property&gt;
  </code></pre>
  
  <p>bin/hdfs dfsadmin -report</p>
  
  <pre><code>    Safe mode is ON
      Configured Capacity: 120124866560 (111.88 GB)
      Present Capacity: 40319258624 (37.55 GB)
      DFS Remaining: 40319250432 (37.55 GB)
      DFS Used: 8192 (8 KB)
      DFS Used%: 0.00%
      Under replicated blocks: 0
      Blocks with corrupt replicas: 0
      Missing blocks: 0
      Missing blocks (with replication factor 1): 26
      -------------------------------------------------
      Live datanodes (1):
  
      Name: 127.0.0.1:50010 (localhost)
      Hostname: 192.168.0.15
      Decommission Status : Normal
      Configured Capacity: 120124866560 (111.88 GB)
      DFS Used: 8192 (8 KB)
      Non DFS Used: 79805607936 (74.32 GB)
      DFS Remaining: 40319250432 (37.55 GB)
      DFS Used%: 0.00%
      DFS Remaining%: 33.56%
      Configured Cache Capacity: 0 (0 B)
      Cache Used: 0 (0 B)
      Cache Remaining: 0 (0 B)
      Cache Used%: 100.00%
      Cache Remaining%: 0.00%
      Xceivers: 1
      Last contact: Fri Jan 13 11:41:49 PST 2017
  </code></pre>
  
  <p>hdfs fsck / | egrep -v '^.+$' | grep -v eplica </p>
  
  <pre><code>    Connecting to namenode via            http://localhost:50070/fsckugi=krishnaprasad&amp;path=%2F
      FSCK started by krishnaprasad (auth:SIMPLE) from /127.0.0.1 for    path / at Fri Jan 13 12:07:11 PST 2017
       Status: HEALTHY
       Total size:    0 B
       Total dirs:    1
       Total files:   0
       Total symlinks:        0
       Total blocks (validated):  0
       Corrupt blocks:        0
       Number of data-nodes:      1
       Number of racks:       1
       FSCK ended at Fri Jan 13 12:07:11 PST 2017 in 3 milliseconds
       The filesystem under path '/' is HEALTHY
  </code></pre>