MapReduce, Hadoop And Amazon AWS - University Of California, Irvine

1y ago
11 Views
2 Downloads
704.26 KB
33 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Nora Drum
Transcription

MapReduce, Hadoop andAmazon AWSYasser Ganjisaffarhttp://www.ics.uci.edu/ yganjisaFebruary 2011

What is Hadoop? A software framework that supports data-intensive distributedapplications. It enables applications to work with thousands of nodes and petabytes ofdata. Hadoop was inspired by Google's MapReduce and Google File System(GFS). Hadoop is a top-level Apache project being built and used by a globalcommunity of contributors, using the Java programming language. Yahoo! has been the largest contributor to the project, and uses Hadoopextensively across its businesses.

Who uses Hadoop?http://wiki.apache.org/hadoop/PoweredBy

Who uses Hadoop? Yahoo!– More than 100,000 CPUs in 36,000 computers. Facebook– Used in reporting/analytics and machine learning and alsoas storage engine for logs.– A 1100-machine cluster with 8800 cores and about 12 PBraw storage.– A 300-machine cluster with 2400 cores and about 3 PB rawstorage.– Each (commodity) node has 8 cores and 12 TB of storage.

Very Large Storage Requirements Facebook has Hadoop clusters with 15 PB ofraw storage (15,000,000 GB). No single storage can handle this amount ofdata. We need a large set of nodes each storing partof the data.

HDFS: Hadoop Distributed File System1. filename, indexClientNamenode2. Datanodes, Blockid3. Read data132123132Data Nodes

Terabyte Sort Benchmark http://sortbenchmark.org/ Task: Sorting 100TB of data and writing resultson disk (10 12 records each 100 bytes). Yahoo’s Hadoop Cluster is the current winner:– 173 minutes– 3452 nodes x (2 Quadcore Xeons, 8 GB RAM)This is the first time that a Java program has won this competition.

Counting Words by MapReduceHello WorldBye WorldHello HadoopGoodbye HadoopHello WorldBye WorldSplitHello HadoopGoodbye Hadoop

Counting Words by MapReduceHello WorldBye WorldHello, 1 World, 1 Bye, 1 World, 1 MapperSort & MergeCombinerNode 1Bye, 1 Hello, 1 World, 1, 1 Bye, 1 Hello, 1 World, 2

Counting Words by MapReduceBye, 1 Hello, 1 World, 2 Sort & MergeGoodbye, 1 Hadoop, 2 Hello, 1 Bye, 1 Goodbye, 1 Hadoop, 2 Hello, 1, 1 World, 2 Bye, 1 Goodbye, 1 Hadoop, 2 SplitHello, 1, 1 World, 2

Counting Words by MapReduceNode 1Bye, 1 Goodbye, 1 Hadoop, 2 ReducerBye, 1 Goodbye, 1 Hadoop, 2 part‐00000Bye1Goodbye 1Hadoop 2Write on DiskNode 2Hello, 1, 1 World, 2 Reducerpart‐00001Hello, 2 World, 2 HelloWorld22

Writing Word Count in Java Download hadoop core (version doop/core/ It would be something like:– hadoop-0.20.2.tar.gz Unzip the package and extract:– hadoop-0.20.2-core.jar Add this jar file to your project class pathWarning! Most of the sample codes on web are for older versions of Hadoop.

Word Count: MapperSource files are available at: http://www.ics.uci.edu/ v1-src.zip

Word Count: Reducer

Word Count: Main Class

My Small Test Cluster 3 nodes– 1 master (ip address: 50.17.65.29)– 2 slaves Copy your jar file to master node:– Linux:– scp WordCount.jar john@50.17.65.29:WordCount.jarWindows (you need to download pscp.exe): pscp.exe WordCount.jar john@50.17.65.29:WordCount.jar Login to master node:– ssh john@50.17.65.29

Counting words in U.S. Constitution! Download text version:wget http://www.usconstitution.net/const.txt Put input text file on HDFS:hadoop dfs -put const.txt const.txt Run the job:hadoop jar WordCount.jar edu.uci.hadoop.WordCount const.txt word-count-result

Counting words in U.S. Constitution! List my files on HDFS:– Hadoop dfs -ls List files in word-count-result folder:– Hadoop dfs -ls word-count-result/

Counting words in U.S. Constitution! Downloading results from HDFS:hadoop dfs -cat word-count-result/part-r-00000 word-count.txt Sort and view results:sort -k2 -n -r word-count.txt more

Hadoop Map/Reduce - Terminology Running “Word Count” across 20 files is onejob Job Tracker initiates some number of maptasks and some number of reduce tasks. For each map task at least one task attemptwill be performed more if a task fails (e.g.,machine crashes).

High Level Architecture of MapReduceMaster ve NodeTaskTrackerTaskSlave NodeTaskTrackerTaskTaskSlave Node

High Level Architecture of HadoopMapReduce layerHDFS layerMaster NodeSlave NodeSlave odeJobTrackerNameNodeDataNode

Web based User interfaces JobTracker: http://50.17.65.29:9100/ NameNode: http://50.17.65.29:9101/

Hadoop Job Scheduling FIFO queue matches incoming jobs toavailable nodes– No notion of fairness– Never switches out running job Warning! Start your job as soon as possible.

Reporting ProgressIf your tasks don’t report anything in 10 minutes they would be killed by Hadoop!Source files are available at: http://www.ics.uci.edu/ v2-src.zip

Distributed File Cache The Distributed Cache facility allows you totransfer files from the distributed file systemto the local file system (for reading only) of allparticipating nodes before the beginning of ajob.

TextInputFormat offset1, line1 LineRecordReader offset2, line2 offset3, line3 SplitFor more complex inputs,You should extend: InputSplit RecordReader InputFormat

Part 2: Amazon Web Services(AWS)

What is AWS? A collection of services that together make upa cloud computing platform:– S3 (Simple Storage Service)– EC2 (Elastic Compute Cloud)– Elastic MapReduce– Email Service– SimpleDB– Flexibile Payments Service–

Case Study: yelp Yelp uses Amazon S3 to store daily logs and photos,generating around 100GB of logs per day. Features powered by Amazon Elastic MapReduceinclude:––––––People Who Viewed this Also ViewedReview highlightsAuto complete as you type on searchSearch spelling suggestionsTop searchesAds Yelp runs approximately 200 Elastic MapReduce jobsper day, processing 3TB of data.

Amazon S3 Data Storage in Amazon Data CenterWeb Service interface99.99% monthly uptime guaranteeStorage cost: 0.15 per GB/Month S3 is reported to store more than 102 billionobjects as of March 2010.

Amazon S3 You can think of S3 as a big HashMap whereyou store your files with a unique key:– HashMap: key - File

References Hadoop Project Page:http://hadoop.apache.org/ Amazon Web Services:http://aws.amazon.com/

Part 2: Amazon Web Services (AWS) What is AWS? A collection of services that together make up a cloud computing platform: . Amazon S3 Data Storage in Amazon Data Center Web Service interface 99.99% monthly uptime guarantee Storage cost: 0.15 per GB/Month

Related Documents:

1: hadoop 2 2 Apache Hadoop? 2 Apache Hadoop : 2: 2 2 Examples 3 Linux 3 Hadoop ubuntu 5 Hadoop: 5: 6 SSH: 6 hadoop sudoer: 8 IPv6: 8 Hadoop: 8 Hadoop HDFS 9 2: MapReduce 13 13 13 Examples 13 ( Java Python) 13 3: Hadoop 17 Examples 17 hoods hadoop 17 hadoop fs -mkdir: 17: 17: 17 hadoop fs -put: 17: 17

Hadoop and Pig Overview Lavanya Ramakrishnan Shane Canon . Source: Hadoop: The Definitive Guide Zoo Keeper 13 Constantly evolving! Google Vs Hadoop Google Hadoop MapReduce Hadoop MapReduce GFS HDFS Sawzall Pig, Hive . Hadoop on Amazon – Elastic MapReduce 19 .

As Hadoop MapReduce became popular, the number and scale of MapReduce programs became increasingly large. To utilize Hadoop MapReduce, users need a Hadoop plat-form which runs on a dedicated environment like a cluster or cloud. In this paper, we construct a novel Hadoop platform, Hadoop on the Grid (HOG), based on the OSG [6] which

Introduction Apache Hadoop . What is Apache Hadoop? MapReduce is the processing part of Hadoop HDFS is the data part of Hadoop Dept. of Computer Science, Georgia State University 05/03/2013 5 Introduction Apache Hadoop HDFS MapReduce Machine . What is Apache Hadoop? The MapReduce server on a typical machine is called a .

4 AWS Training & Services AWS Essentials Training AWS Cloud Practitioner Essentials (CP-ESS) AWS Technical Essentials (AWSE) AWS Business Essentials (AWSBE) AWS Security Essentials (SEC-ESS) AWS System Architecture Training Architecting on AWS (AWSA) Advanced Architecting on AWS (AWSAA) Architecting on AWS - Accelerator (ARCH-AX) AWS Development Training

Source: Hadoop: The Definitive Guide Zoo Keeper 12 Constantly evolving! Google Vs Hadoop Google Hadoop MapReduce Hadoop MapReduce GFS HDFS Sawzall Pig, Hive BigTable Hbase Chubby Zookeeper Pregel Hama, Giraph . Hadoop on Amazon – Elastic MapReduce 18 . Other Related Projects [2/2]

Splunk App for AWS Comprehensive AWS Visibility AWS Data Sources AWS EC2 Amazon EMR Amazon Kinesis Amazon R53 Amazon VPC Amazon ELB Amazon S3 CloudFront AWS CloudTrail Amazon . Planning the Largest AWS Splunk Migration Do we age out? -Support dying infrastructure that is almost out of support for an additional 18 months?

2.2 Hadoop Architecture Hadoop is composed of Hadoop MapReduce, an im-plementation of MapReduce designed for large clusters, and the Hadoop Distributed File System (HDFS), a file system optimized for batch-oriented workloads such as MapReduce. In most Hadoop jobs, HDFS is used to store both the input to the map step and the output of the .