hadoop2.7.6 hdfs 命令测试

hadoop环境搭建
列出所有目录
hdfs dfs -ls /

创建目录
hadoop fs -mkdir hdfs://localhost:9000/chy-data/

创建目录
hadoop fs -mkdir hdfs://localhost:9000/chy-data/data0

 
文件操作
e盘有2个文件server.xml和 settings_copy.xml

写入数据
hadoop fs -put e:\server.xml hdfs://localhost:9000/chy-data/data0

写入数据
hadoop fs -put e:\settings_copy.xml hdfs://localhost:9000/chy-data/data0

 
列出数据
hadoop fs -ls hdfs://localhost:9000/chy-data/data0

 


猜你喜欢

转载自blog.csdn.net/chy2z/article/details/80484972