How to check if Hadoop daemons are running?

后端 未结 9 1000
醉梦人生
醉梦人生 2021-02-02 10:33

What are simple commands to check if Hadoop daemons are running?

For example if I\'m trying to figure out why HDFS is not setup correctly I\'ll want to know a way to ch

相关标签:
9条回答
  • 2021-02-02 11:19

    If you see hadoop process is not running on ps -ef|grep hadoop, run sbin/start-dfs.sh. Monitor with hdfs dfsadmin -report:

    [mapr@node1 bin]$ hadoop dfsadmin -report
    Configured Capacity: 105689374720 (98.43 GB)
    Present Capacity: 96537456640 (89.91 GB)
    DFS Remaining: 96448180224 (89.82 GB)
    DFS Used: 89276416 (85.14 MB)
    DFS Used%: 0.09%
    Under replicated blocks: 0
    Blocks with corrupt replicas: 0
    Missing blocks: 0
    
    -------------------------------------------------
    Datanodes available: 2 (2 total, 0 dead)
    
    Name: 192.168.1.16:50010
    Decommission Status : Normal
    Configured Capacity: 52844687360 (49.22 GB)
    DFS Used: 44638208 (42.57 MB)
    Non DFS Used: 4986138624 (4.64 GB)
    DFS Remaining: 47813910528(44.53 GB)
    DFS Used%: 0.08%
    DFS Remaining%: 90.48%
    Last contact: Tue Aug 20 13:23:32 EDT 2013
    
    
    Name: 192.168.1.17:50010
    Decommission Status : Normal
    Configured Capacity: 52844687360 (49.22 GB)
    DFS Used: 44638208 (42.57 MB)
    Non DFS Used: 4165779456 (3.88 GB)
    DFS Remaining: 48634269696(45.29 GB)
    DFS Used%: 0.08%
    DFS Remaining%: 92.03%
    Last contact: Tue Aug 20 13:23:34 EDT 2013
    
    0 讨论(0)
  • 2021-02-02 11:27

    I did not find great solution to it, so I used

    ps -ef | grep hadoop | grep -P  'namenode|datanode|tasktracker|jobtracker'
    

    just to see if stuff is running

    and

    ./hadoop dfsadmin -report
    

    but last was not helpful until server was running.

    0 讨论(0)
  • 2021-02-02 11:29

    In the shell type 'jps' (you might need a jdk to run jps). It lists all the running java processes and will list out the hadoop daemons that are running.

    0 讨论(0)
提交回复
热议问题