摘要
伴随着各种电子产品和网络的蓬勃发展,互联网上的数据正在以爆炸般的模式增长着,信息量逐渐从最小的字节增长成为TB乃至PB级的大数据。越来越多的信息量成为了一个难题,对于摒弃它们还是从中获取价值的这个选择题也逐渐有了显而易见的答案。但是面对如此严峻的形势,我们该如何从大量的数据中获取有价值的信息,并且对这些数据进行高效、精准的处理呢。就在此时,人们将目光移向了Hadoop,一个开源的能够对大量数据进行分布式处理的文件系统和并行计算编程模型。
本文将要介绍Hadoop的伪分布式集群具体的搭建过程和以HDFS为代表的分布式文件存储系统的数据存储平台的设计与实现。并且对于HDFS本身仍面临的一些问题进行性能优化和解决。
首先Hadoop适宜在Linux系统上进行,所以先介绍centos系统的安装和配置过程;然后在centos系统下进行Hadoop伪分布式集群的搭建和基本配置;之后进行一系列的文件、数据的存储和读取应用;最后对于HDFS目前仍具有的一些问题进行分析和假定并对其进行性能优化。
关键字:大数据;Hadoop;Access;centos;HDFS
ABSTRACT
With the rapid development of various electronic products and networks, the data on the Internet is increasing in an exploding mode, and the amount of information is gradually increasing from the smallest bytes to the TB and even the PB big data.More and more information is becoming a puzzle, and the answer to the multiple choice question of abandoning them and gaining value from them is becoming apparent.But in the face of such a severe situation, how can we obtain valuable information from a large number of data and process these data efficiently and accurately?At this point, people turned their eyes to Hadoop, an open source that could do a lot of data. Distributed file system and parallel computing programming model.
This paper will introduce the construction process of Hadoop pseudo-distributed cluster and the design and implementation of data storage platform of distributed file storage system represented by HDFS.And the HDFS itself is still faced with some problems for performance optimization and solution.
First, Hadoop is suitable for Linux system, so the installation and configuration process of centos system is introduced first, then the construction and basic configuration of Hadoop pseudo-distributed cluster under centos system, a series of files, data storage and reading applications are carried out.Finally, some problems still existing in HDFS are analyzed and hypothesized and its performance is optimized.
Keywords: big data / Hadoop access centosine HDFS
目录
目录 I
摘要 I
ABSTRACT II
引言 1
1 绪论 2
1.1 大数据简介 2
1.2 Hadoop简介 3
1.2.1 Hadoop的优点 3
1.2.2 Hadoop的架构 4
1.2.3 Hadoop的组成 5
2 ARM开发板下centOS7.0的装载和配置 7
3 Hadoop平台的搭建和基本配置 11
3.1 安装JDK 11
3.2 SSH免密码登陆 12
3.2 安装配置Hadoop 13
4 Hadoop平台下数据存储的分析和研究 16
4.1 用命令进行文件存储和读取 16
4.1.1 创建目录 16
4.1.2 显示目录以及网页图形化界面 16
4.1.3 本地文件存入目录以及网页图形化界面 17
4.1.4 显示HDFS下文件内容以及网页图形化界面 18
4.1.5 显示HDFS下文件大小 19
4.1.6 显示HDFS下文件的信息 19
4.1.7 在HDFS下复制文件 19
4.1.8 保存至本地文件 20
4.1.9 从本地移动文件 20
4.2 用API进行文件存储和读取 21
5 HDFS中的大量小文件存储问题 22
5.1 小文件存储问题简介 22
5.2 小文件存储问题的解决方法 22
5.2.1 Archive工具 22
5.2.2 CombineFileInputFormat类 23
5.2.3 SequenceFile格式 23
5.2.4 其他方法 23
结论 24
致谢 25
参考文献 26