Hadoop Architecture and its Usage at Facebook

Similar documents
Hadoop & its Usage at Facebook

Apache Hadoop FileSystem and its Usage in Facebook

Hadoop & its Usage at Facebook

Apache Hadoop FileSystem Internals

Hadoop and its Usage at Facebook. Dhruba Borthakur June 22 rd, 2009

Hadoop Distributed File System. Dhruba Borthakur Apache Hadoop Project Management Committee

Hadoop Distributed File System. Dhruba Borthakur Apache Hadoop Project Management Committee June 3 rd, 2008

Hadoop and Hive Development at Facebook. Dhruba Borthakur Zheng Shao {dhruba, Presented at Hadoop World, New York October 2, 2009

Design and Evolution of the Apache Hadoop File System(HDFS)

Hadoop Distributed File System. Dhruba Borthakur June, 2007

Data Warehousing and Analytics Infrastructure at Facebook. Ashish Thusoo & Dhruba Borthakur athusoo,dhruba@facebook.com

Hadoop at Yahoo! Owen O Malley Yahoo!, Grid Team owen@yahoo-inc.com

Apache Hadoop. Alexandru Costan

Using Hadoop for Webscale Computing. Ajay Anand Yahoo! Usenix 2008

EXPERIMENTATION. HARRISON CARRANZA School of Computer Science and Mathematics

Take An Internal Look at Hadoop. Hairong Kuang Grid Team, Yahoo! Inc

Facebook s Petabyte Scale Data Warehouse using Hive and Hadoop

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, SIGMOD, New York, June 2013

CS54100: Database Systems

Hadoop Distributed File System. T Seminar On Multimedia Eero Kurkela

Big Data With Hadoop

DATA MINING WITH HADOOP AND HIVE Introduction to Architecture

Introduction to Cloud Computing

America s Most Wanted a metric to detect persistently faulty machines in Hadoop

HDFS Under the Hood. Sanjay Radia. Grid Computing, Hadoop Yahoo Inc.

CSE-E5430 Scalable Cloud Computing Lecture 2

Prepared By : Manoj Kumar Joshi & Vikas Sawhney

Large scale processing using Hadoop. Ján Vaňo

Chapter 11 Map-Reduce, Hadoop, HDFS, Hbase, MongoDB, Apache HIVE, and Related

From Wikipedia, the free encyclopedia

Data Warehouse Overview. Namit Jain

Application Development. A Paradigm Shift

THE HADOOP DISTRIBUTED FILE SYSTEM

Hadoop: A Framework for Data- Intensive Distributed Computing. CS561-Spring 2012 WPI, Mohamed Y. Eltabakh

Hadoop Distributed File System. Jordan Prosch, Matt Kipps

Distributed File System. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

An Industrial Perspective on the Hadoop Ecosystem. Eldar Khalilov Pavel Valov

Big Data Technology Core Hadoop: HDFS-YARN Internals

Welcome to the unit of Hadoop Fundamentals on Hadoop architecture. I will begin with a terminology review and then cover the major components

Journal of science STUDY ON REPLICA MANAGEMENT AND HIGH AVAILABILITY IN HADOOP DISTRIBUTED FILE SYSTEM (HDFS)

Hadoop IST 734 SS CHUNG

Lecture 5: GFS & HDFS! Claudia Hauff (Web Information Systems)! ti2736b-ewi@tudelft.nl

Hadoop implementation of MapReduce computational model. Ján Vaňo

BBM467 Data Intensive ApplicaAons

<Insert Picture Here> Big Data

Overview. Big Data in Apache Hadoop. - HDFS - MapReduce in Hadoop - YARN. Big Data Management and Analytics

Hadoop Ecosystem B Y R A H I M A.

MapReduce with Apache Hadoop Analysing Big Data

Distributed File Systems

Hadoop Architecture. Part 1

Introduction to Hadoop HDFS and Ecosystems. Slides credits: Cloudera Academic Partners Program & Prof. De Liu, MSBA 6330 Harvesting Big Data

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, UC Berkeley, Nov 2012

Introduction to cloud computing

Alternatives to HIVE SQL in Hadoop File Structure

Big Data Benchmark. The Cloudy Approach. Dhruba Borthakur Nov 7, 2012 at the SDSC Industry Roundtable on Big Data and Big Value

Data-Intensive Computing with Map-Reduce and Hadoop

Realtime Apache Hadoop at Facebook. Jonathan Gray & Dhruba Borthakur June 14, 2011 at SIGMOD, Athens

CS2510 Computer Operating Systems

CS2510 Computer Operating Systems

How To Scale Out Of A Nosql Database

HDFS Architecture Guide

Open source Google-style large scale data analysis with Hadoop

GraySort and MinuteSort at Yahoo on Hadoop 0.23

Big Data and Apache Hadoop s MapReduce

The Hadoop Distributed File System

Open source software framework designed for storage and processing of large scale data on clusters of commodity hardware

Distributed File Systems

HADOOP MOCK TEST HADOOP MOCK TEST I

GeoGrid Project and Experiences with Hadoop

Processing of massive data: MapReduce. 2. Hadoop. New Trends In Distributed Systems MSc Software and Systems

Hadoop: Distributed Data Processing. Amr Awadallah Founder/CTO, Cloudera, Inc. ACM Data Mining SIG Thursday, January 25 th, 2010

Distributed Filesystems

A very short Intro to Hadoop

Chapter 7. Using Hadoop Cluster and MapReduce

Hadoop: Embracing future hardware

Storage Architectures for Big Data in the Cloud

Hadoop. Apache Hadoop is an open-source software framework for storage and large scale processing of data-sets on clusters of commodity hardware.

Hadoop Distributed Filesystem. Spring 2015, X. Zhang Fordham Univ.

COURSE CONTENT Big Data and Hadoop Training

Hadoop Distributed File System (HDFS) Overview

NoSQL and Hadoop Technologies On Oracle Cloud

Data-Intensive Programming. Timo Aaltonen Department of Pervasive Computing

CSE 590: Special Topics Course ( Supercomputing ) Lecture 10 ( MapReduce& Hadoop)

Session: Big Data get familiar with Hadoop to use your unstructured data Udo Brede Dell Software. 22 nd October :00 Sesión B - DB2 LUW

Intro to Map/Reduce a.k.a. Hadoop

APACHE HADOOP JERRIN JOSEPH CSU ID#

Petabyte Scale Data at Facebook. Dhruba Borthakur, Engineer at Facebook, XLDB Conference at Stanford University, Sept 2012

ATLAS Tier 3

INTRODUCTION TO APACHE HADOOP MATTHIAS BRÄGER CERN GS-ASE

Hadoop. Sunday, November 25, 12

MySQL and Hadoop: Big Data Integration. Shubhangi Garg & Neha Kumari MySQL Engineering

Big Data and Hadoop. Sreedhar C, Dr. D. Kavitha, K. Asha Rani

Introduction to HDFS. Prasanth Kothuri, CERN

Open source large scale distributed data management with Google s MapReduce and Bigtable

CitusDB Architecture for Real-Time Big Data

Hadoop Big Data for Processing Data and Performing Workload

Parallel Processing of cluster by Map Reduce

Weekly Report. Hadoop Introduction. submitted By Anurag Sharma. Department of Computer Science and Engineering. Indian Institute of Technology Bombay

Certified Big Data and Apache Hadoop Developer VS-1221

Transcription:

Hadoop Architecture and its Usage at Facebook Dhruba Borthakur Project Lead, Apache Hadoop Distributed File System dhruba@apache.org Presented at Microsoft Research, Seattle October 16, 2009

Outline Introduction Architecture of Hadoop Distributed File System Hadoop Usage at Facebook

Who Am I? Hadoop FileSystem (HDFS) Project Lead Core contributor since Hadoop s infancy Facebook (Hadoop, Hive, Scribe) Yahoo! (Hadoop in Yahoo Search) Veritas (San Point Direct, Veritas File System) IBM Transarc (Andrew File System) UW Computer Science Alumni (Condor Project)

A Confluence of Trends Fault Tolerance File System Open Data format Queryable Database Flexible Schema Archival Store Never Delete Data HADOOP: A Massively Scalable Queryable Store and Archive

Hadoop, Why? Need to process Multi Petabyte Datasets Data may not have strict schema Expensive to build reliability in each application. Nodes fail every day Failure is expected, rather than exceptional. The number of nodes in a cluster is not constant. Need common infrastructure Efficient, reliable, Open Source Apache License

Is Hadoop a Database? Hadoop triggered upheaval in Database Research A giant step backward in the programming paradigm, Dewitt et el DBMS performance outshines Hadoop Stonebraker, Dewitt, SIGMOD 2009 Parallel Databases A few scales to low hundreds of nodes and about 5 PB Primary design goal is performance Requires homogeneous hardware Anomalous behavior is not well tolerated: A slow network can cause serious performance degradation Most queries fail when one node fails Scalability and Fault Tolerance: Hadoop to the rescue!

Hadoop History Dec 2004 Google GFS paper published July 2005 Nutch uses MapReduce Feb 2006 Starts as a Lucene subproject Apr 2007 Yahoo! on 1000-node cluster Jan 2008 An Apache Top Level Project Jul 2008 A 4000 node test cluster May 2009 Hadoop sorts Petabyte in 17 hours

Who uses Hadoop? Amazon/A9 Facebook Google IBM Joost Last.fm New York Times PowerSet Veoh Yahoo!

What is Hadoop used for? Search Yahoo, Amazon, Zvents Log processing Facebook, Yahoo, ContextWeb. Joost, Last.fm Recommendation Systems Facebook Data Warehouse Facebook, AOL Video and Image Analysis New York Times, Eyealike

Public Hadoop Clouds Hadoop Map-reduce on Amazon EC2 http://wiki.apache.org/hadoop/amazonec2 IBM Blue Cloud Partnering with Google to offer web-scale infrastructure Global Cloud Computing Testbed Joint effort by Yahoo, HP and Intel http://www.opencloudconsortium.org/testbed.html

Commodity Hardware Typically in 2 level architecture Nodes are commodity PCs 30-40 nodes/rack Uplink from rack is 3-4 gigabit Rack-internal is 1 gigabit

Goals of HDFS Very Large Distributed File System 10K nodes, 100 million files, 10-100 PB Assumes Commodity Hardware Files are replicated to handle hardware failure Detect failures and recovers from them Optimized for Batch Processing Data locations exposed so that computations can move to where data resides Provides very high aggregate bandwidth User Space, runs on heterogeneous OS

HDFS Architecture Cluster Membership NameNode Secondary NameNode Client 3. Read/write data DataNodes NameNode : Maps a file to a file-id and list of DataNodes DataNode : Maps a block-id to a physical location on disk SecondaryNameNode: Periodic merge of Transaction log

Distributed File System Single Namespace for entire cluster Data Coherency Write-once-read-many access model Client can only append to existing files Files are broken up into blocks Typically 128 MB block size Each block replicated on multiple DataNodes Intelligent Client Client can find location of blocks Client accesses data directly from DataNode

NameNode Metadata Meta-data in Memory The entire metadata is in main memory No demand paging of meta-data Types of Metadata List of files List of Blocks for each file List of DataNodes for each block File attributes, e.g creation time, replication factor A Transaction Log Records file creations, file deletions. etc

DataNode A Block Server Stores data in the local file system (e.g. ext3) Stores meta-data of a block (e.g. CRC32) Serves data and meta-data to Clients - Periodic validation of checksums Block Report Periodically sends a report of all existing blocks to the NameNode Facilitates Pipelining of Data Forwards data to other specified DataNodes

Block Placement Current Strategy -- One replica on local node -- Second replica on a remote rack -- Third replica on same remote rack -- Additional replicas are randomly placed Clients read from nearest replica Pluggable policy for placing block replicas Co-locate datasets that are often used together http://hadoopblog.blogspot.com/2009/09/hdfs-block-replica-placement-inyour.html

Data Pipelining Client writes block to the first DataNode The first DataNode forwards the data to the next DataNode in the Pipeline, and so on When all replicas are written, the Client moves on to write the next block in file

NameNode Failure A Single Point of Failure Transaction Log stored in multiple directories A directory on the local file system A directory on a remote file system (NFS/CIFS) Need to develop a real HA solution work in progress: BackupNode

Rebalancer Goal: % disk full on DataNodes should be similar Usually run when new DataNodes are added Cluster is online when Rebalancer is active Rebalancer is throttled to avoid network congestion Command line tool Disadvantages Does not rebalance based on access patterns or load No support for automatic handling of hotspots of data

Hadoop Map/Reduce The Map-Reduce programming model Distributed processing of large data sets Pluggable user code runs in generic framework Common design pattern in data processing cat * grep sort unique -c cat > file input map shuffle reduce output Natural for: Log processing Web search indexing Ad-hoc queries

Map/Reduce and Storage Clean API between Map/Reduce and HDFS Hadoop Map/Reduce and Storage Stacks Typical installations store data in HDFS Hadoop Map/Reduce can run on data in MySQL Demonstrated to run on IBM GPFS External Schedulers and HDFS Storage Condor Job Scheduler on HDFS Dryad-style DAG Scheduler on HDFS

Job Scheduling Current state of affairs with Hadoop Scheduler Places computation close to data FIFO and Fair Share scheduler Work in progress Resource aware (cpu, memory, network) Support for MPI workloads Isolation of one job from another

Hadoop @ Facebook

Who generates this data? Lots of data is generated on Facebook 300+ million active users 30 million users update their statuses at least once each day More than 1 billion photos uploaded each month More than 10 million videos uploaded each month More than 1 billion pieces of content (web links, news stories, blog posts, notes, photos, etc.) shared each week

Data Usage Statistics per day: 4 TB of compressed new data added per day 135TB of compressed data scanned per day 7500+ Hive jobs on production cluster per day 80K compute hours per day Barrier to entry is significantly reduced: New engineers go though a Hive training session ~200 people/month run jobs on Hadoop/Hive Analysts (non-engineers) use Hadoop through Hive

Where is this data stored? Hadoop/Hive Warehouse 4800 cores, 5.5 PetaBytes 12 TB per node Two level network topology 1 Gbit/sec from node to rack switch 4 Gbit/sec to top level rack switch

Data Flow into Hadoop Cloud Web Servers Scribe MidTier Network Storage and Servers Oracle RAC Hadoop Hive Warehouse MySQL

Hadoop Scribe: Avoid Costly Filers Scribe Writers Web Servers Scribe MidTier RealBme Hadoop Cluster Oracle RAC Hadoop Hive Warehouse MySQL http://hadoopblog.blogspot.com/2009/06/hdfs-scribe-integration.html

HDFS Raid Start the same: triplicate every data block Background encoding Combine third replica of blocks from a single file to create parity block Remove third replica Apache Hadoop 0.22 release DiskReduce from CMU Garth Gibson research A A B B C C A B C A+B+C A file with three blocks A, B and C http://hadoopblog.blogspot.com/2009/08/hdfs-and-erasure-codes-hdfs-raid.html

Archival: Move old data to cheap storage Hadoop Warehouse NFS Hadoop Archive Node Cheap NAS Hadoop Archival Cluster Hive Query hep://issues.apache.org/jira/browse/hdfs 220

Dynamic-size MapReduce Clusters Why multiple compute clouds in Facebook? Users unaware of resources needed by job Absence of flexible Job Isolation techniques Provide adequate SLAs for jobs Dynamically move nodes between clusters Based on load and configured policies Apache Jira MAPREDUCE-1044

Resource Aware Scheduling (Fair Share Scheduler) We use the Hadoop Fair Share Scheduler Scheduler unaware of memory needed by job Memory and CPU aware scheduling RealTime gathering of CPU and memory usage Scheduler analyzes memory consumption in realtime Scheduler fair-shares memory usage among jobs Slot-less scheduling of tasks (in future) Apache Jira MAPREDUCE-961

Hive Data Warehouse Efficient SQL to Map-Reduce Compiler Mar 2008: Started at Facebook May 2009: Release 0.3.0 available Now: Preparing for release 0.4.0 Countable for 95%+ of Hadoop jobs @ Facebook Used by ~200 engineers and business analysts at Facebook every month

Hive Architecture Web UI + Hive CLI + JDBC/ ODBC Browse, Query, DDL Map Reduce User-defined Map-reduce Scripts HDFS MetaStore Hive QL UDF/UDAF Thrift API Parser Planner Optimizer Execution substr sum average SerDe CSV Thrift Regex FileFormats TextFile SequenceFile RCFile

File Formats TextFile: Easy for other applications to write/read Gzip text files are not splittable SequenceFile: Only hadoop can read it Support splittable compression RCFile: Block-based columnar storage Use SequenceFile block format Columnar storage inside a block 25% smaller compressed size On-par or better query performance depending on the query

SerDe Serialization/Deserialization Row Format CSV (LazySimpleSerDe) Thrift (ThriftSerDe) Regex (RegexSerDe) Hive Binary Format (LazyBinarySerDe) LazySimpleSerDe and LazyBinarySerDe Deserialize the field when needed Reuse objects across different rows Text and Binary format

Useful Links HDFS Design: http://hadoop.apache.org/core/docs/current/hdfs_design.html Hadoop API: http://hadoop.apache.org/core/docs/current/api/ My Hadoop Blog: http://hadoopblog.blogspot.com/