4. Cont...
● Large and growing data files
● Commonly measured in terabytes or
petabytes
● Unstructured data
● May not fit in a “relational database model”
● Derived from Users, Applications, Systems,
and Sensors
5. Problem: Data Throughput Mis-match
● Standard spinning hard drive 60-120 MB/sec
● Standard solid state hard drive 250-500
MB/sec
● Hard drive capacity growing
● Online data growth
Moving data on and off of disk is the bottleneck.
6. Cont...
● One Terabyte (TB) of data will take 10,000
seconds (approximately 167 minutes)
● One TB of data will take 2000 seconds
(approximately 33 minutes) to read data at
500 MB/sec (solid state)
One TB is a “small” file size
The need for parallel data access is essential
for Big data.
9. Definition
● A framework of open-source tools,
libraries, and methodologies for the
distributed processing of large data sets
● Scale up from single servers to thousands of
machines, each offering local computation
and storage
13. Hadoop Usage Modes
● Administrators
❏ Installation
❏ Monitor/Manage System
❏ Tune System
● End Users
❏ Design MapReduce Applications
❏ Import/Export Data
❏ Work with various Hadoop Tools
14. Hadoop History
● Developed by Doug Cutting and Michael J.
Cafarella
● Based On Google MapReduce technology
● Designed to handle large amounts of data
and be robust
● Donated to Apache Software Foundation in
2006 by Yahoo
15. Cont...
Application areas:
❏ Social media
❏ Retail
❏ Financial services
❏ Web Search
❏ Everywhere there is large amounts of
unstructured data
17. Design Principles
● Moving computation is cheaper than moving
data
● Hardware will fail, manage it
● Hide execution details from the user
● Use streaming data access
● Use a simple file system coherency model
18. Cont...
What Hadoop is not: A replacement for SQL,
always fast and efficient, good for quick ad-hoc
querying
21. NameNode
● Only one per cluster “master node”
● Stores meta information of “filesystem” such
as Filename, permission, directories, blocks
● Keep in RAM for fast access
● Persisted to disk
● The namenode is the brain of the outfit
22. DataNode
● Many per cluster, “slave node”
● Stores individual file “blocks” but knows
nothing about them, accept the block name
● Reports regularly to NameNode
“Hey I am alive, and I have these blocks”
25. HDFS Properties
● Files are immutable
No updates, no appends
● Disk access is optimized for sequential
reads
Store data in large “blocks” 128 MB default
● Avoid Corruption
“blocks” are verified with checksum when
stored and read
26. Cont...
● High throughput
Avoid contention, have system share as
little information and resources as possible
● Fault Tolerant
Loss of a disk, or machine, or rack of
machines should not lead to data loss
33. MapReduce
● A programming model for processing large
Data in Distributed fashion over cluster of
commodity machines
● Introduced by Google
● Uses two key steps: mapping and reducing
34. Cont...
● Almost all data can be mapped into <key,
value> pairs somehow
● Your keys and values may be of any type:
string, integers, dummy types, and <K,V>
pairs themselves and so on
● Scale-free programming
❏ If a program works for a 1KB file, it can
work for any file size
35. see spot run
run spot run
see the cat
run spot run
see spot run
see the cat
see,1
spot,1
run,1
see,1
see,1
spot,1
spot,1
run,1
run,1
run,1
the,1
cat,1
Input
Split
Map
Shuffle
see,1
spot,1
run,1
see,1
the,1
cat,1
see,2
spot,2
run,3
the,1
cat,1
Reduce
see,2
spot,2
run,3
the,1
cat,1
Output
Data Flow
MapReduce Word Count Data Flow
38. How to run job in Cluster?
● Using Streaming Interface
❏ hadoop jar /opt/hadoop/hadoop-2.6.0
/share/hadoop/tools/lib/hadoop-streaming-
2.6.0.jar -file ./mapper.py -mapper .
/mapper.py -file ./reducer.py -input
/in/input.txt -output /output/run1
48. References
● Apache Hadoop http://hadoop.apache.org/
● Hortonworks http://hortonworks.com/
● Cloudera http://www.cloudera.com/content/cloudera/en/downloads.
html
● MAPR https://www.mapr.com/
● The Google File System http://static.googleusercontent.
com/media/research.google.com/en/us/archive/gfs-sosp2003.pdf
49. References (1)
● MapReduce: Simplified Data Processing on
Large Clusters http://static.googleusercontent.
com/media/research.google.com/en/us/archive/mapreduce-osdi04.pdf