Service and Cloud Computing Lecture 10: DFS2 Prof. George Baciu PQ838

Similar documents
Cloud Computing CS

UNIT-IV HDFS. Ms. Selva Mary. G

Distributed File Systems II

HDFS Architecture Guide

HDFS Architecture. Gregory Kesden, CSE-291 (Storage Systems) Fall 2017

Cloud Computing CS

Distributed Systems 16. Distributed File Systems II

CPSC 426/526. Cloud Computing. Ennan Zhai. Computer Science Department Yale University

Introduction to Cloud Computing

Advanced Operating Systems

CS60021: Scalable Data Mining. Sourangshu Bhattacharya

Cloud Computing and Hadoop Distributed File System. UCSB CS170, Spring 2018

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

HDFS What is New and Futures

Hadoop File System S L I D E S M O D I F I E D F R O M P R E S E N T A T I O N B Y B. R A M A M U R T H Y 11/15/2017

Distributed File Systems. Distributed Systems IT332

Chapter 11 DISTRIBUTED FILE SYSTEMS

What is a file system

COSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Spring HDFS Basics

The Google File System. Alexandru Costan

Distributed Filesystem

Distributed File Systems. CS 537 Lecture 15. Distributed File Systems. Transfer Model. Naming transparency 3/27/09

COSC 6397 Big Data Analytics. Distributed File Systems (II) Edgar Gabriel Fall HDFS Basics

Distributed File Systems

Lecture 7: Distributed File Systems

AN OVERVIEW OF DISTRIBUTED FILE SYSTEM Aditi Khazanchi, Akshay Kanwar, Lovenish Saluja

Today: Coda, xfs. Case Study: Coda File System. Brief overview of other file systems. xfs Log structured file systems HDFS Object Storage Systems

GFS: The Google File System

CLOUD-SCALE FILE SYSTEMS

Hadoop and HDFS Overview. Madhu Ankam

Today: Distributed File Systems

7680: Distributed Systems

Today: Distributed File Systems!

NFSv4 as the Building Block for Fault Tolerant Applications

Introduction to MapReduce

Introduction to Hadoop and MapReduce

Today: Distributed File Systems

Choosing an Interface

CS370 Operating Systems

Distributed File Systems. Directory Hierarchy. Transfer Model

Operating Systems. Week 13 Recitation: Exam 3 Preview Review of Exam 3, Spring Paul Krzyzanowski. Rutgers University.

CS 416: Operating Systems Design April 22, 2015

Konstantin Shvachko, Hairong Kuang, Sanjay Radia, Robert Chansler Yahoo! Sunnyvale, California USA {Shv, Hairong, SRadia,

18-hdfs-gfs.txt Thu Oct 27 10:05: Notes on Parallel File Systems: HDFS & GFS , Fall 2011 Carnegie Mellon University Randal E.

CS435 Introduction to Big Data FALL 2018 Colorado State University. 11/7/2018 Week 12-B Sangmi Lee Pallickara. FAQs

Google File System (GFS) and Hadoop Distributed File System (HDFS)

Distributed Systems - III

System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called files

DISTRIBUTED SYSTEMS [COMP9243] Lecture 9b: Distributed File Systems INTRODUCTION. Transparency: Flexibility: Slide 1. Slide 3.

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

Chapter 11: File-System Interface

Distributed System. Gang Wu. Spring,2018

CS370 Operating Systems

Map-Reduce. Marco Mura 2010 March, 31th

Today: Distributed File Systems. Naming and Transparency

ECE 7650 Scalable and Secure Internet Services and Architecture ---- A Systems Perspective

Today: Distributed File Systems. File System Basics

OPERATING SYSTEM. Chapter 12: File System Implementation

DFS Case Studies, Part 1

CSE 124: Networked Services Lecture-16

MI-PDB, MIE-PDB: Advanced Database Systems

Lecture 14: Distributed File Systems. Contents. Basic File Service Architecture. CDK: Chapter 8 TVS: Chapter 11

Network File System (NFS)

Network File System (NFS)

Chapter 11: Implementing File Systems

Operating Systems 2010/2011

CS3600 SYSTEMS AND NETWORKS

HDFS: Hadoop Distributed File System. Sector: Distributed Storage System

Chapter 12 Distributed File Systems. Copyright 2015 Prof. Amr El-Kadi

The Google File System (GFS)

CA485 Ray Walshe Google File System

Operating Systems. studykorner.org

CSE 124: Networked Services Fall 2009 Lecture-19

COS 318: Operating Systems. NSF, Snapshot, Dedup and Review

Distributed File Systems I

Windows 7 Overview. Windows 7. Objectives. The History of Windows. CS140M Fall Lake 1

Chapter 11: Implementing File Systems

Overview. Why MapReduce? What is MapReduce? The Hadoop Distributed File System Cloudera, Inc.

DISTRIBUTED FILE SYSTEMS & NFS

Vendor: Cloudera. Exam Code: CCA-505. Exam Name: Cloudera Certified Administrator for Apache Hadoop (CCAH) CDH5 Upgrade Exam.

Federated Namespace BOF: Applications and Protocols

GlusterFS Architecture & Roadmap

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

TITLE: PRE-REQUISITE THEORY. 1. Introduction to Hadoop. 2. Cluster. Implement sort algorithm and run it using HADOOP

Lecture 19. NFS: Big Picture. File Lookup. File Positioning. Stateful Approach. Version 4. NFS March 4, 2005

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/15

Dept. Of Computer Science, Colorado State University

File-System Structure

COS 318: Operating Systems. Journaling, NFS and WAFL

Chapter 12 File-System Implementation

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

Chapter 12: File System Implementation

A brief history on Hadoop

Chapter 11: File-System Interface

Introduction to MapReduce

The Analysis Research of Hierarchical Storage System Based on Hadoop Framework Yan LIU 1, a, Tianjian ZHENG 1, Mingjiang LI 1, Jinpeng YUAN 1

Chapter 10: File System Implementation

Chapter 9: File System Interface

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

18-hdfs-gfs.txt Thu Nov 01 09:53: Notes on Parallel File Systems: HDFS & GFS , Fall 2012 Carnegie Mellon University Randal E.

Transcription:

COMP4442 Service and Cloud Computing Lecture 10: DFS2 www.comp.polyu.edu.hk/~csgeorge/comp4442 Prof. George Baciu PQ838 csgeorge@comp.polyu.edu.hk 1

Preamble 2

Recall the Cloud Stack Model A B Application Data Runtime Middleware OS Virtualization C Servers Storage D Networking Hardware 3

Virtualized Machines VM1 App 1 App 2 App n VMn App 1 App 2 App n Guest Operating System Guest Operating System Drivers Virtual Machine Monitor (VMM) Drivers Hardware 4

Contents DFS Aspects Part 2 Naming Conventions Naming in NFS Mounting in NFS Sharing Files in NFS 5

DFS Aspects Part 2 Aspect Architecture Processes Communication Naming Synchronization Consistency and Replication Fault Tolerance Description How is a DFS generally organized? Who are the cooperating processes? Are processes stateful or stateless? What is the typical communication paradigm followed by a DFS? How do processes in a DFS communicate? How is naming often handled by the DFS? What are the file sharing semantics adopted by DFS? What are the various features of client-side caching as well as server-side replication? How is fault tolerance handled in a DFS? 6

Naming Names are used to uniquely identify entities in distributed systems Entities may be processes, remote objects, newsgroups, etc. Names are mapped onto an entity s location using a name resolution 7

A Naming Resolution Ex. An example of name resolution is to use connection address plus a file name: Name http://www.comp.polyu.edu.hk:3600/files/comp4442.html DNS 158.132.29.226 Port 3600 path files/comp4442.html MAC MAC Address f3:20:4a:01:08:00 Resource ID: (IP Address, Port, File Path) 8

NFS NFS is considered as a classic representative of how naming is handled in most DFS s 9

Naming In NFS The fundamental idea underlying the NFS naming model is to provide clients with complete transparency Transparency in NFS is achieved by allowing a client to mount a remote file system into its own local file system However, instead of mounting an entire file system, NFS allows clients to mount only part of a file system A server is said to export a directory to a client when a client mounts a directory, and its entries, into its own name space 10

Mounting a Server FS bob Client A Server Client B remote usr Mount bob subdirectory remote usr Mount bob subdirectory work usr ada bob alice mbox mbox mbox The file named /remote/ada/mbox In Client A Exported directory mounted by Client A Sharing files becomes harder Exported directory mounted by Client B The file named /work/alice/mbox at Client B 3/21/2019 11

Sharing Files In NFS A common solution for sharing files in NFS is to provide each client with a name space that is partly standardized For example, each client may use the local directory /usr/bin to mount a file system A remote file system can then be mounted in the same manner for each user 12

Standardizing Client Name Space Client A Server Client B remote usr Mount bob subdirectory users usr Mount bob subdirectory remote usr bin bob bin mbox mbox mbox The file named /usr/bin/mbox in Client A Exported directory mounted by Client A Sharing files resolved Exported directory mounted by Client B The file named /usr/bin/mbox in Client B 3/21/2019 13

File Mounting Rules Mounting nested directories in NFSv3 Mounting nested directories in NFSv4 NFS: mounting upon logging in On-demand mounting in NFS Naming in HDFS Client reading data from HDFS 14

Mounting Nested Directories In NFSv3 An NFS server, S, can itself mount directories, D, that are exported by other servers However, in NFSv3, S is not allowed to export D to its own clients Instead, a client of S will have to explicitly mount D If S were allowed to export D, it would have to return to its clients file handles that include identifiers for the exporting servers NFSv4 solves this problem 15

Mounting Nested Directories in NFSv4 Client Server A Server B bin packages draw draw install install install Client imports directory from server A Server A imports directory from server B Client needs to explicitly import subdirectory from server B 3/21/2019 16

NFS: Mounting Upon Logging In (1) Another problem with the NFS naming model has to do with deciding when a remote file system should be mounted Example: Let us assume a large system with 1000s of users and that each user has a local directory /home that is used to mount the home directories of other users Alice s (a user) home directory is made locally available to her as /home/alice This directory can be automatically mounted when Alice logs into her workstation 17

NFS: Mounting Upon Logging In (2) In addition, Alice may have access to Bob s (another user) public files by accessing Bob s directory through /home/bob The question is whether Bob s home directory should also be mounted automatically when Alice logs in If automatic mounting is followed for each user, then: logging in requires communication and administrative overhead all users should be known in advance A better approach is to transparently mount another user s home directory on-demand 18

On-Demand Mounting In NFS On-demand mounting of a remote file system is handled in NFS by an automounter, which runs as a separate process on the client s machine Client Machine 1. Lookup /home/alice NFS Client Automounter 3. Mount request Server Machine 2. Create subdir alice Local File System Interface users alice home alice 19

Hadoop http://www.tutorialspoint.com/hadoop/hadoop_hdfs_overview.htm 20

Hadoop HDFS Goals Fault detection and recovery: expect frequent failure of components. HDFS needs mechanisms for quick and automatic fault detection and recovery. Huge datasets: HDFS should have hundreds of nodes per cluster to manage the applications having huge datasets. Hardware at data: A requested task can be done efficiently, when the computation takes place near the data. Especially, where huge datasets are involved, it reduces the network traffic and increases the throughput. 21

Naming in HDFS A HDFS cluster consists of a single NameNode (the master), and multiple DataNodes (the slaves) The NameNode manages HDFS namespace and regulates accesses to files by clients It executes file system namespace operations (e.g., opening, closing, and renaming files and directories) It is an arbitrator and repository for all HDFS metadata It determines the mapping of blocks to DataNodes 22

DataNodes in HDFS The DataNodes manage storage attached to the nodes that they run on DataNodes are responsible for serving read and write requests from clients DataNodes perform block creation, deletion, and replication upon instructions from the NameNode 23

A Client Reading Data from HDFS Here is the main sequence of events when reading a file in HDFS HDFS Client DFS Manager 2.Get Block Locations NameNode namenode FSDataInputStream 6. Close Client JVM Client Node DataNode namenode DataNode namenode DataNode namenode 24

HDFS Operations Data Reads A Client Writing Data to HDFS Data Pipelining PVFS System View Naming in PVFS Metadata and Data Accesses 25

Data Reads The DFS Manager calls the NameNode using RPC to determine the locations of the blocks for the first few blocks in the file For each block, the NameNode returns the addresses of the DataNodes that have a copy of that block During the read process, DFSInputStream calls the NameNode to retrieve the DataNode locations for the next batch of blocks needed 26

Data Reads The DataNodes are sorted according to their proximity to the client in order to exploit data locality An important aspect of this design is that the client contacts DataNodes directly to retrieve data and is guided by the NameNode to the best DataNode for each block 27

A Client Writing Data to HDFS The main sequence of events when writing a file to HDFS This case assumes creating a new file, writing data to it, then closing the file DFS Manager HDFS Client NameNode FSDataInputStream namenode 6. Close Client JVM Client Node Pipeline of DataNodes DataNode namenode 4 4 5 DataNode namenode 5 DataNode namenode 3/21/2019 28

Data Pipelining When a client is writing data to a HDFS file, its data is first written to a local file When the local file accumulates a full block of user data, the client retrieves a list of DataNodes from the NameNode The client then flushes the block to the first DataNode 29

Data Pipelining The first DataNode: Starts receiving the data in small portions (4KB) Writes each portion to its local repository Transfers that portion to the subsequent DataNode in the list A subsequent DataNode follows the same steps as the previous DataNode Thus, the data is pipelined from one DataNode to the next 30

Compute Nodes I/O Nodes PVFS System View Metadata Manager Network 31

PVFS System View Some major components of the PVFS system: Metadata server (mgr) I/O server (iod) PVFS native API (libpvfs) The manager manages all file metadata for PVFS files 32

PVFS System View The iods handle storing and retrieving file data stored on local disks connected to the node Libpvfs: provides user-space access to the PVFS servers handles the scatter/gather operations necessary to move data between user buffers and PVFS servers 33

Naming in PVFS PVFS file systems may be mounted on all nodes in the same directory simultaneously This allows all nodes to see and access all files on the PVFS file system through the same directory scheme 34

Naming in PVFS Once mounted, PVFS files and directories can be operated on with all the familiar tools, such as ls, cp, and rm With PVFS, clients can avoid making requests to the file system through the kernel by linking to the PVFS native API This library implements a subset of the UNIX operations which directly contact PVFS servers rather than passing through the local kernel 35

Metadata and Data Accesses For metadata operations, applications communicate through the library with the metadata server For data access, the metadata server is eliminated from the access path and instead I/O servers are contacted directly 36

Metadata and Data Accesses libpvfs mgr File request libpvfs mgr libpvfs iod libpvfs iod libpvfs libpvfs iod : : iod : : libpvfs : : libpvfs iod File retrieval through : iods : iod : : Metadata Access Data Access 37

Summary More DFS Aspects Naming Examples: HDFS, PVFS Mounting directories Communications issues 38

39