wiki:waue/2009/0401

Version 5 (modified by waue, 16 years ago) (diff)

--

DFSAdmin 命令

-report

報告HDFS的基本統計信息。有些信息也可以在NameNode Web服務首頁看到

$ bin/hadoop dfsadmin -report
  • 執行畫面
    Total raw bytes: 59529687040 (55.44 GB)
    Remaining raw bytes: 46887116647 (43.67 GB)
    Used raw bytes: 24576 (24 KB)
    % used: 0%
    Total effective bytes: 0 (0 KB)
    Effective replication multiplier: Infinity
    -------------------------------------------------
    Datanodes available: 1
    Name: 140.110.141.129:50010
    State          : In Service
    Total raw bytes: 59529687040 (55.44 GB)
    Remaining raw bytes: 46887116647(43.67 GB)
    Used raw bytes: 24576 (24 KB)
    % used: 0%
    Last contact: Wed Apr 01 14:49:39 CST 2009
    

-safemode

雖然通常並不需要,但是管理員的確可以手動讓NameNode進入或離開安全模式。

$ bin/hadoop dfsadmin -safemode

Usage: java DFSAdmin [-safemode enter | leave | get | wait]

$ bin/hadoop dfsadmin -safemode enter
Safe mode is ON
$ bin/hadoop dfsadmin -safemode leave
Safe mode is OFF

不知道安全模式有何作用??