ITeye博客

HDFS使用

cakin24 · 2017-10-18 21:32 · Hadoop · 开源软件 · Markdown

一 HDFS命令行操作演示

[root@localhost ~]# hadoop fs -ls /

Warning: $HADOOP_HOME is deprecated.

 

Found 1 items

drwxr-xr-x - root supergroup 0 2017-08-20 11:23 /hadoop

 

[root@localhost ~]# hadoop fs -ls /hadoop

Warning: $HADOOP_HOME is deprecated.

 

Found 1 items

drwxr-xr-x - root supergroup 0 2017-08-20 11:40 /hadoop/mapred

[root@localhost ~]# hadoop fs -mkdir input

Warning: $HADOOP_HOME is deprecated.

 

[root@localhost ~]# hadoop fs -ls

Warning: $HADOOP_HOME is deprecated.

 

Found 1 items

drwxr-xr-x - root supergroup 0 2017-08-20 12:40 /user/root/input

 

[root@localhost ~]# hadoop fs -ls /

Warning: $HADOOP_HOME is deprecated.

 

Found 2 items

drwxr-xr-x - root supergroup 0 2017-08-20 11:23 /hadoop

drwxr-xr-x - root supergroup 0 2017-08-20 12:40 /user

[root@localhost ~]# hadoop fs -put a.av input/

[root@localhost ~]# hadoop fs -ls /user/root/input

Warning: $HADOOP_HOME is deprecated.

 

Found 1 items

-rw-r--r-- 3 root supergroup 0 2017-08-20 12:44 /user/root/input/a.av

[root@localhost ~]# hadoop fs -cat input/a.av

Warning: $HADOOP_HOME is deprecated.

 

[root@localhost ~]# hadoop fs -get input/a.av aa.av

Warning: $HADOOP_HOME is deprecated.

 

[root@localhost ~]# ls

123 cangls fping-4.0 monitor_man shell16.sh system_man.sh

aa.av canyls fping-4.0.tar.gz monitor_man.sh shell5.sh Templates

a.av ChangeLog-2.6.0 hping-master Music student.txt test

 

[root@localhost ~]# hadoop dfsadmin -report

Warning: $HADOOP_HOME is deprecated.

 

Configured Capacity: 21464350720 (19.99 GB)

Present Capacity: 21046108160 (19.6 GB)

DFS Remaining: 21046083584 (19.6 GB)

DFS Used: 24576 (24 KB)

DFS Used%: 0%

Under replicated blocks: 1

Blocks with corrupt replicas: 0

Missing blocks: 0

 

-------------------------------------------------

Datanodes available: 1 (1 total, 0 dead)

 

Name: 127.0.0.1:50010

Decommission Status : Normal

Configured Capacity: 21464350720 (19.99 GB)

DFS Used: 24576 (24 KB)

Non DFS Used: 418242560 (398.87 MB)

DFS Remaining: 21046083584(19.6 GB)

DFS Used%: 0%

DFS Remaining%: 98.05%

Last contact: Sun Aug 20 12:56:33 CST 2017

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。