Slides modified from presentation by B. Ramamurthy

Slides:



Advertisements
Similar presentations
Introduction to cloud computing Jiaheng Lu Department of Computer Science Renmin University of China
Advertisements

Sanjay Ghemawat, Howard Gobioff and Shun-Tak Leung
G O O G L E F I L E S Y S T E M 陳 仕融 黃 振凱 林 佑恩 Z 1.
The Google File System Authors : Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung Presentation by: Vijay Kumar Chalasani 1CS5204 – Operating Systems.
 Need for a new processing platform (BigData)  Origin of Hadoop  What is Hadoop & what it is not ?  Hadoop architecture  Hadoop components (Common/HDFS/MapReduce)
Lecture 6 – Google File System (GFS) CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of this presentation.
The Google File System. Why? Google has lots of data –Cannot fit in traditional file system –Spans hundreds (thousands) of servers connected to (tens.
The Google File System.
Hadoop File System B. Ramamurthy 4/19/2017.
Case Study - GFS.
Google Distributed System and Hadoop Lakshmi Thyagarajan.
The Hadoop Distributed File System, by Dhyuba Borthakur and Related Work Presented by Mohit Goenka.
Take An Internal Look at Hadoop Hairong Kuang Grid Team, Yahoo! Inc
Hadoop Distributed File System by Swathi Vangala.
The Hadoop Distributed File System: Architecture and Design by Dhruba Borthakur Presented by Bryant Yao.
1 The Google File System Reporter: You-Wei Zhang.
CSC 456 Operating Systems Seminar Presentation (11/13/2012) Leon Weingard, Liang Xin The Google File System.
The Hadoop Distributed File System
Introduction to Hadoop 趨勢科技研發實驗室. Copyright Trend Micro Inc. Outline Introduction to Hadoop project HDFS (Hadoop Distributed File System) overview.
Cloud Distributed Computing Environment Content of this lecture is primarily from the book “Hadoop, The Definite Guide 2/e)
CS525: Special Topics in DBs Large-Scale Data Management Hadoop/MapReduce Computing Paradigm Spring 2013 WPI, Mohamed Eltabakh 1.
Presented by CH.Anusha.  Apache Hadoop framework  HDFS and MapReduce  Hadoop distributed file system  JobTracker and TaskTracker  Apache Hadoop NextGen.
Hadoop/MapReduce Computing Paradigm 1 Shirish Agale.
f ACT s  Data intensive applications with Petabytes of data  Web pages billion web pages x 20KB = 400+ terabytes  One computer can read
Hadoop & Condor Dhruba Borthakur Project Lead, Hadoop Distributed File System Presented at the The Israeli Association of Grid Technologies.
The exponential growth of data –Challenges for Google,Yahoo,Amazon & Microsoft in web search and indexing The volume of data being made publicly available.
The Hadoop Distributed File System (HDFS) is a distributed file system designed to run on commodity hardware. It has many similarities with existing distributed.
Introduction to HDFS Prasanth Kothuri, CERN 2 What’s HDFS HDFS is a distributed file system that is fault tolerant, scalable and extremely easy to expand.
Grid Computing at Yahoo! Sameer Paranjpye Mahadev Konar Yahoo!
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
Presenters: Rezan Amiri Sahar Delroshan
Eduardo Gutarra Velez. Outline Distributed Filesystems Motivation Google Filesystem Architecture The Metadata Consistency Model File Mutation.
GFS. Google r Servers are a mix of commodity machines and machines specifically designed for Google m Not necessarily the fastest m Purchases are based.
HDFS (Hadoop Distributed File System) Taejoong Chung, MMLAB.
Introduction to HDFS Prasanth Kothuri, CERN 2 What’s HDFS HDFS is a distributed file system that is fault tolerant, scalable and extremely easy to expand.
Presented by: Katie Woods and Jordan Howell. * Hadoop is a distributed computing platform written in Java. It incorporates features similar to those of.
HADOOP DISTRIBUTED FILE SYSTEM HDFS Reliability Based on “The Hadoop Distributed File System” K. Shvachko et al., MSST 2010 Michael Tsitrin 26/05/13.
CS525: Big Data Analytics MapReduce Computing Paradigm & Apache Hadoop Open Source Fall 2013 Elke A. Rundensteiner 1.
 Introduction  Architecture NameNode, DataNodes, HDFS Client, CheckpointNode, BackupNode, Snapshots  File I/O Operations and Replica Management File.
Hadoop/MapReduce Computing Paradigm 1 CS525: Special Topics in DBs Large-Scale Data Management Presented By Kelly Technologies
{ Tanya Chaturvedi MBA(ISM) Hadoop is a software framework for distributed processing of large datasets across large clusters of computers.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 24: GFS.
Cloud Distributed Computing Environment Hadoop. Hadoop is an open-source software system that provides a distributed computing environment on cloud (data.
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Presenter: Chao-Han Tsai (Some slides adapted from the Google’s series lectures)
B. RAMAMURTHY Big-data Computing 6/22/2016 Bina Ramamurthy
Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung
Hadoop Aakash Kag What Why How 1.
Hadoop.
Introduction to Distributed Platforms
Dhruba Borthakur Apache Hadoop Developer Facebook Data Infrastructure
Google File System.
Google Filesystem Some slides taken from Alan Sussman.
Gregory Kesden, CSE-291 (Storage Systems) Fall 2017
Gregory Kesden, CSE-291 (Cloud Computing) Fall 2016
Software Engineering Introduction to Apache Hadoop Map Reduce
Large-scale Processing with MapReduce
Big-data Computing: Hadoop Distributed File System
The Basics of Apache Hadoop
GARRETT SINGLETARY.
Hadoop Distributed Filesystem
Hadoop Basics.
Hadoop Technopoints.
Introduction to Apache
The Memory B. Ramamurthy C B. Ramamurthy.
Big-data Computing: Hadoop Distributed File System
THE GOOGLE FILE SYSTEM.
by Mikael Bjerga & Arne Lange
Apache Hadoop and Spark
Presentation transcript:

Slides modified from presentation by B. Ramamurthy Hadoop File System Slides modified from presentation by B. Ramamurthy 9/12/2018

Moving Computation is Cheaper than Moving Data

Motivation: Big Data! What is BigData ? - Google (over 20~ PB/day) Where does it come from ? Why to take so much of pain ? - Information everywhere, but where is the knowledge? Existing systems (vertical scalibility) Why Hadoop (horizontal scalibility)?

Origin of Hadoop MapReduce paper in OSDI 2014 (Google) new programming paradigm to handle data at internet scale Google developed GFS Hadoop/HDFS open source version of MapReduce Hadoop started as a part of the Nutch project. In Jan 2006 Doug Cutting started working on Hadoop at Yahoo Factored out of Nutch in Feb 2006 Yahoo gave it to Apache First release of Apache Hadoop in September 2007 Jan 2008 - Hadoop became a top level Apache project

What is Hadoop ? Flexible infrastructure for large scale computation & data processing on a network of commodity hardware Completely written in java Open source & distributed under Apache license Hadoop Common, HDFS & MapReduce

Hadoop distributions Amazon Cloudera MapR HortonWorks Microsoft Windows Azure. IBM InfoSphere Biginsights Datameer EMC Greenplum HD Hadoop distribution Hadapt 

Google/GFS Assumptions Based on Google workloads Also the assumptions driving HDFS Hardware failure common Files are large, and numbers are limited (millions not billions) Two main types of reads: large streaming reads and small random reads Sequential writes that append to files Files rarely modified (simplifies coherence) High sustained bandwidth preferred to low latency 9/12/2018

What is Hadoop ? Flexible infrastructure for large scale computation & data processing on a network of commodity hardware Completely written in java Open source & distributed under Apache license Hadoop Common, HDFS & MapReduce

Basic Features: HDFS Highly fault-tolerant High throughput Thousands of server machines Failure norm rather than exception High throughput Internet scale workloads Move compute to data (e.g., MapReduce) Suitable for applications with large data sets Streaming access to file system data Can be built out of commodity hardware Compare to RAID 9/12/2018

Data Characteristics Large data sets and files: gigabytes to terabytes size Tens of millions of files in a single instance Applications need streaming access to data Batch processing rather than interactive user access. Scale to thousands of nodes in a cluster Write-once-read-many: a file once created rarely needs to changed Assumption simplifies coherence Internet workloads (e.g., map-reduce or web-crawler) fits model 9/12/2018

MapReduce Cat combine reduce part0 map split Bat part1 Dog Other Words (size: TByte) map split combine reduce part0 part1 part2 9/12/2018

Architecture 9/12/2018

Whats new for us? Why not just run NFS? Scalability Performance Elasticity Reliability Is it a different form of RAID? 9/12/2018

Namenode and Datanodes HDFS exposes a file system Each file is split into one or more A single Namenode Maintains metadata and name space Regulates access to files by clients Carries out rebalancing and fault recovery Many DataNodes, usually one per node in a cluster DataNodes manage storage attached to the nodes that they run on Serves read, write requests, performs block creation, deletion, and replication upon instruction from Namenode Communicates to Namenode via heartbeats Namenode communicates back through replies; otherwise clients talk directly to datanodes 9/12/2018

HDFS Architecture Namenode Metadata ops Client Block ops Read Metadata(Name, replicas..) (/home/foo/data,6. .. Metadata ops Client Block ops Read Datanodes Datanodes B replication Blocks Rack2 Rack1 Write Client 9/12/2018

File system Namespace Hierarchical file system with directories and files Create, remove, move, rename etc. File system API started as unix compatible “faithfulness to standards was sacrificed in favor of improved performance …” Any meta information changes to the file system recorded by the Namenode. 9/12/2018

Data Replication HDFS is designed to store very large files across machines in a large cluster. Each file is a sequence of blocks. All blocks in the file except the last are of the same size. Blocks are replicated for fault tolerance. Block size and replicas are configurable per file. The Namenode receives a Heartbeat and a BlockReport from each DataNode in the cluster. BlockReport contains all the blocks on a Datanode. 9/12/2018

Replica Placement The placement of the replicas is critical to HDFS reliability and performance. Rack-aware replica placement: Goal: improve reliability, availability and network bandwidth utilization Research topic Many racks, communication between racks are through switches. Replicas are typically placed on unique racks Simple but non-optimal Writes are expensive Replication factor is 3 Replicas are placed: one on a node in a local rack, one on a different node in the local rack and one on a node in a different rack. 9/12/2018

Rack awareness Typically large Hadoop clusters are arranged in racks and network traffic between different nodes with in the same rack is much more desirable than network traffic across the racks. In addition Namenode tries to place replicas of block on multiple racks for improved fault tolerance. A default installation assumes all the nodes belong to the same rack.

Filesystem Metadata The HDFS namespace is stored by Namenode. Namenode uses a transaction log called the EditLog to record every change that occurs to the filesystem meta data. For example, creating a new file. Change replication factor of a file EditLog is stored in the Namenode’s local filesystem Metadata only Entire filesystem namespace including mapping of blocks to files and file system properties is stored in a file FsImage. Stored in Namenode’s local filesystem. 9/12/2018

Namenode Keeps image of entire file system namespace and file Blockmap in memory. 4GB of local RAM is sufficient When Namenode starts up it gets the FsImage and Editlog from its local file system update FsImage with EditLog information and then stores a copy of the FsImage on the filesytstem as a checkpoint. Periodic checkpointing is done. So that the system can recover back to the last checkpointed state in case of a crash. 9/12/2018

Datanode A Datanode stores data in files in its local file system. Datanode has no knowledge about HDFS filesystem It stores each block of HDFS data in a separate file. Datanode does not create all files in the same directory. It uses heuristics to determine optimal number of files per directory and creates directories appropriately: Research issue? When the filesystem starts up it generates a list of all HDFS blocks and send this report to Namenode: Blockreport. 9/12/2018

Protocol 9/12/2018

The Communication Protocol All HDFS communication protocols are layered on top of the TCP/IP protocol A client establishes a connection to a configurable TCP port on the Namenode machine. It talks ClientProtocol with the Namenode. The Datanodes talk to the Namenode using Datanode protocol. RPC abstraction wraps both ClientProtocol and Datanode protocol. Namenode is simply a server and never initiates a request; it only responds to RPC requests issued by DataNodes or clients. 9/12/2018

Robustness 9/12/2018

Objectives Primary objective of HDFS is to store data reliably in the presence of failures. Three common failures are: Namenode failure, Datanode failure and network partition. 9/12/2018

DataNode failure and heartbeat A network partition can cause a subset of Datanodes to lose connectivity with the Namenode. Namenode detects this condition by the absence of a Heartbeat message. Namenode marks Datanodes without Hearbeat and does not send any IO requests to them. Any data registered to the failed Datanode is not available to the HDFS. Also the death of a Datanode may cause replication factor of some of the blocks to fall below their specified value. 9/12/2018

Re-replication Re-replication (creating more replicas) is sometimes needed Re-replication could be invoked due to: A Datanode is unavailable, A replica is corrupted, A hard disk on a Datanode fails, or The replication factor on the block may be increased. 9/12/2018

Metadata Disk Failure FsImage and EditLog are central data structures of HDFS. A corruption of these files can cause a HDFS instance to be non-functional. For this reason, a Namenode can be configured to maintain multiple copies of the FsImage and EditLog. Multiple copies of the FsImage and EditLog files are updated synchronously. Meta-data is not data-intensive. The Namenode could be single point failure: automatic failover originally NOT supported! 9/12/2018

Discussion Single metadata server – why? Can we replicate? Consistency issues! Can we parallelize? Yes, GFS does it, as do several research DFS But by partitioning directory space to different servers – no replication 9/12/2018

Data Organization 9/12/2018

Data Blocks HDFS support write-once-read-many with reads at streaming speeds. A typical block size is 64MB (or even 128 MB). A file is chopped into 64MB chunks and stored. 9/12/2018

Staging A client request to create a file does not reach Namenode immediately. HDFS client caches the data into a temporary file. When the data reached a HDFS block size the client contacts the Namenode. Namenode inserts the filename into its hierarchy and allocates a data block for it. The Namenode responds to the client with the identity of the Datanode and the destination of the replicas (Datanodes) for the block. Then the client flushes it from its local memory. 9/12/2018

Staging (contd.) The client sends a message that the file is closed. Namenode proceeds to commit the file for creation operation into the persistent store. If the Namenode dies before file is closed, the file is lost. This client side caching is required to avoid network congestion; also it has precedence is AFS (Andrew file system). 9/12/2018

Replication Pipelining When the client receives response from Namenode, it flushes its block in small pieces (4K) to the first replica, that in turn copies it to the next replica and so on. Thus data is pipelined from Datanode to the next. 9/12/2018

API (Accessibility) 9/12/2018

Application Programming Interface HDFS provides Java API for application to use. Python access is also used in many applications. A C language wrapper for Java API is also available. A HTTP browser can be used to browse the files of a HDFS instance. 9/12/2018

FS Shell, Admin and Browser Interface HDFS organizes its data in files and directories. It provides a command line interface called the FS shell that lets the user interact with data in the HDFS. The syntax of the commands is similar to bash and csh. Example: to create a directory /foodir /bin/hadoop dfs –mkdir /foodir There is also DFSAdmin interface available Browser interface is also available to view the namespace. 9/12/2018

Space Reclamation When a file is deleted by a client, HDFS renames file to a file in be the /trash directory for a configurable amount of time. A client can request for an undelete in this allowed time. After the specified time the file is deleted and the space is reclaimed. When the replication factor is reduced, the Namenode selects excess replicas that can be deleted. Next heartbeat(?) transfers this information to the Datanode that clears the blocks for use. 9/12/2018

Summary We discussed the features of the Hadoop File System, a peta-scale file system to handle big-data sets. What discussed: Architecture, Protocol, API, etc. Missing element: Implementation The Hadoop file system (internals) An implementation of an instance of the HDFS (for use by applications such as web crawlers). 9/12/2018