java20130726
HDFS 简介 
  HDFS 是 hadoop Distributed  file system 的缩写,意为hadoop 分布式文件系统。是基于流数据模式访问和处理超大文件的需求而开发的,运行在廉价的商用服务器上。
  有以下特点:
     处理超大文件,可以处理和存储PB级的数据,在yahoo 已经运行了4096个节点的集群了。
  在hadoop file system 创建文件夹
  ./bin/hadoop fs -mkdir input
  把一个本地file文件夹下的文件上传到 新建的input文件夹下 hfs1.jpg
  ./bin/hadoop fs -put ~/file/student.txt input

  ./bin/hadoop fs -copyFromLocal /home/liucheng/file/student.copy.txt   input/student.copy.txt


  查看一下上传到input文件夹下的文件
  ./bin/hadoop fs -ls input
  查看一下上传后的文件内容
  ./bin/hadoop fs -cat input/student.txt
  把HDFS文件下载到本地 见图 hfd.jpg

  ./bin/hadoop fs -copyToLocal /user/liucheng/input/student.txt /home/liucheng/file/student.copy.txt


  删除hdfs上的文件夹或是内容
  ./bin/hadoop fs -rmr ouput

分类:

技术点:

相关文章:

  • 2021-10-28
  • 2021-11-07
  • 2021-12-15
  • 2021-11-03
  • 2021-09-27
  • 2021-09-27
猜你喜欢
  • 2021-12-03
  • 2021-10-26
  • 2021-11-30
  • 2021-09-27
  • 2021-09-27
  • 2021-11-23
  • 2021-09-27
相关资源
相似解决方案