Hadoop Reading Notes 1-Meet Hadoop & Hadoop Filesystem

Source: Internet
Author: User

Chapter 1 Meet Hadoop
Data is large, the transfer speed is not improved much. it's a long time to read all data from one single disk-writing is even more slow. the obvious way to reduce the time is read from multiple disk once.
The first problem to solve is hardware failure. The second problem is that most analysis task need to be able to combine the data in different hardware.

Chapter 3 The Hadoop Distributed Filesystem
Filesystem that manage storage has ss a network of machines are called distributed filesystem. HDFS is a filesystem designed for storing very large files with streaming data access patterns, running on clusters of commodity hardware.
HDFS is built around und the idea that the most efficient data processing pattern is a write-once, read-since-times pattern.
HDFS is not a good fit today: low-latency data access, lots of small files, Multiple writers, arbitrary file modifications.

HDFS concepts
1) Blocks:
HDFS has the concept of a block, but it is a much larger unit-64 MB by default. HDFS blocks are large compared to disk blocks, and the reason is to minimize the cost of seeks.
Having a block cipher action for a distributed filesystem brings several benefits. the first benefit is the most obvious: a file can be larger than any single disk in the network. second, making the unit of your action a block rather than a file simplifies the storage subsystem. furthermore, blocks fit well with replication for providing fault tolerance and availability.

2) Namenodes and Datanodes
The namenode manages the filesystem namespace. It maintains the filesystem tree and the metadata for all the files and directories in the tree.
It is important to make the namenode resilient to failure, and Hadoop provides two mechanisms for this. the first way is to back up the files that make up the persistent state of the filesystem metadata. the second way is to run a secondary namenode, which despite its name does not act as a namenode.
Datanodes are the workhorses of the filesystem. they store and retrieve blocks when they are told to (by clients or the namenode), and they report back to the namenode periodically with lists of blocks that they are storing.

3) HDFS Federation
The namenode keeps a reference to every file and block in the filesystem in memory, which means that on very large clusters with program files, memory becomes the limiting factor for scaling. HDFS Federation, introduced in the 2.x release series, allows a cluster to scale by adding namenodes, each of which manages a portion of the filesystem namespace. for example, one namenode might manage all the files rooted under/user, say, and a second namenode might handle files under/share.

Hadoop has an abstract notion of filesystem, of which HDFS is just one implementation.

Data Folw
1) Anatomy of a File Read

650) this. width = 650; "src =" https://app.yinxiang.com/shard/s5/res/0e9dfed3-e777-4a34-960b-af4185371231/read%20data.jpg? ResizeSmall & width = 700 "name =" regular "style =" border: 0px; max-width: 100%; margin: 0px; padding: 0px; line-height: 1.428571em; "/>

2) Anatomy of a File Write650) this. width = 650; "src =" https://app.yinxiang.com/shard/s5/res/9c5a158a-9c94-474a-aec1-b9827bfa3dac/write%20data.jpg? ResizeSmall & width = 700 "name =" regular "style =" border: 0px; max-width: 100%; margin: 0.857412em 0px 0px; padding: 0px; "/>


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.