used Sudo jps
to see the daemons running. and found node manager not running.
So tried, sudo service hadoop master stop
to stop and when I tried to restart it got restarted. However, when I'm giving this command hadoop dfsadmin -safemode leave
its saying its deprecated. I tried this as well hadoop hdfsadmin -safemode leave
But, getting
Error: Could not find or load main class hdfsadmin
hadoop dfsadmin is depricated, however it should work. Correct usage is
hdfs dfsadmin -safemode leave