Ubuntu에서 Hadoop 2.x 8 HDFS cluster 관리 명령

2784 단어 hadoop
hadoop dfsadmin은 명령줄 관리 도구입니다. 도움말을 보려면 다음 명령을 사용하십시오.
hadoop dfsadmin -help
그래서 dfsadmin은hadoop 프로그램의 매개 변수이지 독립된 도구가 아니다.그러나 현재 버전이 약간 바뀌었습니다.hadoop dfsadmin의 사용법은 폐지되었고hdfs dfsadmin 명령으로 바뀌었습니다.
다음은 간단한 보고서 보기입니다.
hduser@namenode:~$ hdfs dfsadmin -report
Configured Capacity: 295283847168 (275.00 GB)
Present Capacity: 267895083008 (249.50 GB)
DFS Remaining: 267894972416 (249.50 GB)
DFS Used: 110592 (108 KB)
DFS Used%: 0.00%
Under replicated blocks: 0
Blocks with corrupt replicas: 0
Missing blocks: 0

-------------------------------------------------
Datanodes available: 3 (3 total, 0 dead)

Live datanodes:
Name: 192.168.1.73:50010 (datanode1)
Hostname: datanode1
Decommission Status : Normal
Configured Capacity: 98427949056 (91.67 GB)
DFS Used: 36864 (36 KB)
Non DFS Used: 9129578496 (8.50 GB)
DFS Remaining: 89298333696 (83.17 GB)
DFS Used%: 0.00%
DFS Remaining%: 90.72%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Last contact: Mon Mar 10 03:09:14 UTC 2014


Name: 192.168.1.75:50010 (datanode3)
Hostname: datanode3
Decommission Status : Normal
Configured Capacity: 98427949056 (91.67 GB)
DFS Used: 36864 (36 KB)
Non DFS Used: 9129590784 (8.50 GB)
DFS Remaining: 89298321408 (83.17 GB)
DFS Used%: 0.00%
DFS Remaining%: 90.72%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Last contact: Mon Mar 10 03:09:16 UTC 2014


Name: 192.168.1.74:50010 (datanode2)
Hostname: datanode2
Decommission Status : Normal
Configured Capacity: 98427949056 (91.67 GB)
DFS Used: 36864 (36 KB)
Non DFS Used: 9129594880 (8.50 GB)
DFS Remaining: 89298317312 (83.17 GB)
DFS Used%: 0.00%
DFS Remaining%: 90.72%
Configured Cache Capacity: 0 (0 B)
Cache Used: 0 (0 B)
Cache Remaining: 0 (0 B)
Cache Used%: 100.00%
Cache Remaining%: 0.00%
Last contact: Mon Mar 10 03:09:14 UTC 2014

다음 명령은 토폴로지 구조를 인쇄합니다.
hduser@namenode:~$ hdfs dfsadmin -printTopology 
Rack: /default-rack
   192.168.1.73:50010 (datanode1)
   192.168.1.74:50010 (datanode2)
   192.168.1.75:50010 (datanode3)

rack은 선반을 가리키는데 현재 세 대의 데이터 노드 가상 기기가 하나의 물리적 호스트에 위치하고 있기 때문에default-rack이다.앞으로 여러 트랙의 구성으로 진화해야 한다.하나의 물리기로 레이크를 시뮬레이션할 수 있다.자세한 내용은 공식 문서를 참조하십시오.
http://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/CommandsManual.html#dfsadmin
다음 명령 매개 변수는 HDFS 그룹이 실행될 때 새로운 데이터 노드를 추가한 다음namenode가 프로필에 있는hosts 목록을 다시 읽을 수 있도록 유용합니다.
-refreshNodes
Re-read the hosts and exclude files to update the set of Datanodes that are allowed to connect to the Namenode and those that should be decommissioned or recommissioned.

좋은 웹페이지 즐겨찾기