Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if hdfs is running?

Tags:

hadoop

I would like to see if the hdfs file system for Hadoop is working properly. I know that jps lists the daemons that are running, but I don't actually know which daemons to look for.

I ran the following commands: $HADOOP_PREFIX/sbin/hadoop-daemon.sh start namenode

$HADOOP_PREFIX/sbin/hadoop-daemon.sh start datanode

$HADOOP_PREFIX/sbin/yarn-daemon.sh start resourcemanager

$HADOOP_PREFIX/sbin/yarn-daemon.sh start nodemanager

Only namenode, resourcemanager, and nodemanager appeared when I entered jps.

Which daemons are supposed to be running in order for hdfs/Hadoop to function? Also, what could you do to fix hdfs if it is not running?

like image 243
user2590144 Avatar asked Dec 08 '22 07:12

user2590144


1 Answers

Use any of the following approaches for to check your deamons status

  1. JPS command would list all active deamons

  2. the below is the most appropriate

       hadoop dfsadmin -report
    

    This would list down details of datanodes which is basically in a sense your HDFS

  3. cat any file available in hdfs path.

like image 94
K S Nidhin Avatar answered Feb 23 '23 22:02

K S Nidhin