SlideShare a Scribd company logo
Presented
By
Announcements
My office hours: M 2:30—3:30 in CSE 212
Cluster is operational; instructions in assignment 1
heavily rewritten
Eclipse plugin is “deprecated”
Students who already created accounts: let me know
if you have trouble
www.kellytechno.com
Breaking news!
Hadoop tested on 4,000 node cluster
32K cores (8 / node)
16 PB raw storage (4 x 1 TB disk / node)
(about 5 PB usable storage)
http://developer.yahoo.com/blogs/hadoop/2008/09/
scaling_hadoop_to_4000_nodes_a.html
www.kellytechno.com
You Say, “tomato…”
Google calls it: Hadoop equivalent:
MapReduce Hadoop
GFS HDFS
Bigtable HBase
Chubby Zookeeper
www.kellytechno.com
Some MapReduce Terminology
Job – A “full program” - an execution of a Mapper and
Reducer across a data set
Task – An execution of a Mapper or a Reducer on a
slice of data
a.k.a. Task-In-Progress (TIP)
Task Attempt – A particular instance of an attempt to
execute a task on a machine
www.kellytechno.com
Terminology Example
Running “Word Count” across 20 files is one job
20 files to be mapped imply 20 map tasks + some
number of reduce tasks
At least 20 map task attempts will be performed…
more if a machine crashes, etc.
www.kellytechno.com
Task Attempts
A particular task will be attempted at least once,
possibly more times if it crashes
If the same input causes crashes over and over, that
input will eventually be abandoned
Multiple attempts at one task may occur in
parallel with speculative execution turned on
Task ID from TaskInProgress is not a unique identifier;
don’t use it that way
www.kellytechno.com
MapReduce: High Level
www.kellytechno.com
Node-to-Node Communication
Hadoop uses its own RPC protocol
All communication begins in slave nodes
Prevents circular-wait deadlock
Slaves periodically poll for “status” message
Classes must provide explicit serialization
www.kellytechno.com
Nodes, Trackers, Tasks
Master node runs JobTracker instance, which accepts
Job requests from clients
TaskTracker instances run on slave nodes
TaskTracker forks separate Java process for task
instances
www.kellytechno.com
Job Distribution
MapReduce programs are contained in a Java “jar”
file + an XML file containing serialized program
configuration options
Running a MapReduce job places these files into
the HDFS and notifies TaskTrackers where to
retrieve the relevant program code
… Where’s the data distribution?
www.kellytechno.com
Data Distribution
Implicit in design of MapReduce!
All mappers are equivalent; so map whatever data is
local to a particular node in HDFS
If lots of data does happen to pile up on the same
node, nearby nodes will map instead
Data transfer is handled implicitly by HDFS
www.kellytechno.com
Configuring With JobConf
MR Programs have many configurable options
JobConf objects hold (key, value) components
mapping String  ’a
e.g., “mapred.map.tasks”  20
JobConf is serialized and distributed before running the
job
Objects implementing JobConfigurable can
retrieve elements from a JobConf
www.kellytechno.com
www.kellytechno.com
Job Launch Process: Client
Client program creates a JobConf
Identify classes implementing Mapper and Reducer
interfaces
 JobConf.setMapperClass(), setReducerClass()
Specify inputs, outputs
 FileInputFormat.addInputPath(),
 FileOutputFormat.setOutputPath()
Optionally, other options too:
 JobConf.setNumReduceTasks(), JobConf.setOutputFormat()
…
www.kellytechno.com
Job Launch Process: JobClient
Pass JobConf to JobClient.runJob() or submitJob()
runJob() blocks, submitJob() does not
JobClient:
Determines proper division of input into InputSplits
Sends job data to master JobTracker server
www.kellytechno.com
Job Launch Process: JobTracker
JobTracker:
Inserts jar and JobConf (serialized to XML) in shared
location
Posts a JobInProgress to its run queue
www.kellytechno.com
Job Launch Process: TaskTracker
TaskTrackers running on slave nodes periodically
query JobTracker for work
Retrieve job-specific jar and config
Launch task in separate instance of Java
main() is provided by Hadoop
www.kellytechno.com
Job Launch Process: Task
TaskTracker.Child.main():
Sets up the child TaskInProgress attempt
Reads XML configuration
Connects back to necessary MapReduce components
via RPC
Uses TaskRunner to launch user process
www.kellytechno.com
Job Launch Process: TaskRunner
TaskRunner, MapTaskRunner, MapRunner work in a
daisy-chain to launch your Mapper
Task knows ahead of time which InputSplits it should
be mapping
Calls Mapper once for each record retrieved from the
InputSplit
Running the Reducer is much the same
www.kellytechno.com
Creating the Mapper
You provide the instance of Mapper
Should extend MapReduceBase
One instance of your Mapper is initialized by the
MapTaskRunner for a TaskInProgress
Exists in separate process from all other instances of
Mapper – no data sharing!
www.kellytechno.com
Mapper
void map(K1 key,
V1 value,
OutputCollector<K2, V2> output,
Reporter reporter)
K types implement WritableComparable
V types implement Writable
www.kellytechno.com
What is Writable?
Hadoop defines its own “box” classes for strings
(Text), integers (IntWritable), etc.
All values are instances of Writable
All keys are instances of WritableComparable
www.kellytechno.com
Getting Data To The Mapper
www.kellytechno.com
Reading Data
Data sets are specified by InputFormats
Defines input data (e.g., a directory)
Identifies partitions of the data that form an InputSplit
Factory for RecordReader objects to extract (k, v)
records from the input source
www.kellytechno.com
FileInputFormat and Friends
TextInputFormat – Treats each ‘n’-terminated line of
a file as a value
KeyValueTextInputFormat – Maps ‘n’- terminated
text lines of “k SEP v”
SequenceFileInputFormat – Binary file of (k, v) pairs
with some add’l metadata
SequenceFileAsTextInputFormat – Same, but maps
(k.toString(), v.toString())
www.kellytechno.com
Filtering File Inputs
FileInputFormat will read all files out of a specified
directory and send them to the mapper
Delegates filtering this file list to a method subclasses
may override
e.g., Create your own “xyzFileInputFormat” to read
*.xyz from directory list
www.kellytechno.com
Record Readers
Each InputFormat provides its own RecordReader
implementation
Provides (unused?) capability multiplexing
LineRecordReader – Reads a line from a text file
KeyValueRecordReader – Used by
KeyValueTextInputFormat
www.kellytechno.com
Input Split Size
FileInputFormat will divide large files into chunks
Exact size controlled by mapred.min.split.size
RecordReaders receive file, offset, and length of
chunk
Custom InputFormat implementations may override
split size – e.g., “NeverChunkFile”
www.kellytechno.com
Sending Data To Reducers
Map function receives OutputCollector object
OutputCollector.collect() takes (k, v) elements
Any (WritableComparable, Writable) can be used
By default, mapper output type assumed to be same
as reducer output type
www.kellytechno.com
WritableComparator
Compares WritableComparable data
Will call WritableComparable.compare()
Can provide fast path for serialized data
JobConf.setOutputValueGroupingComparator()
www.kellytechno.com
Sending Data To The Client
Reporter object sent to Mapper allows simple
asynchronous feedback
incrCounter(Enum key, long amount)
setStatus(String msg)
Allows self-identification of input
InputSplit getInputSplit()
www.kellytechno.com
Partition And Shuffle
www.kellytechno.com
Partitioner
int getPartition(key, val, numPartitions)
Outputs the partition number for a given key
One partition == values sent to one Reduce task
HashPartitioner used by default
Uses key.hashCode() to return partition num
JobConf sets Partitioner implementation
www.kellytechno.com
Reduction
reduce( K2 key,
Iterator<V2> values,
OutputCollector<K3, V3> output,
Reporter reporter)
Keys & values sent to one partition all go to the same
reduce task
Calls are sorted by key – “earlier” keys are reduced
and output before “later” keys
www.kellytechno.com
Finally: Writing The Output
www.kellytechno.com
OutputFormat
Analogous to InputFormat
TextOutputFormat – Writes “key valn” strings to
output file
SequenceFileOutputFormat – Uses a binary format to
pack (k, v) pairs
NullOutputFormat – Discards output
www.kellytechno.com
Presented
By
www.kellytechno.com

More Related Content

What's hot

SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
Chester Chen
 
whats new in java 8
whats new in java 8 whats new in java 8
whats new in java 8
Dori Waldman
 
Harnessing the power of YARN with Apache Twill
Harnessing the power of YARN with Apache TwillHarnessing the power of YARN with Apache Twill
Harnessing the power of YARN with Apache Twill
Terence Yim
 
Map reduce prashant
Map reduce prashantMap reduce prashant
Map reduce prashant
Prashant Gupta
 
GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
DataWorks Summit/Hadoop Summit
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internals
Kostas Tzoumas
 
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
Spark Summit
 
Spark and spark streaming internals
Spark and spark streaming internalsSpark and spark streaming internals
Spark and spark streaming internals
Sigmoid
 
Spark Working Environment in Windows OS
Spark Working Environment in Windows OSSpark Working Environment in Windows OS
Spark Working Environment in Windows OS
Universiti Technologi Malaysia (UTM)
 
Apache REEF - stdlib for big data
Apache REEF - stdlib for big dataApache REEF - stdlib for big data
Apache REEF - stdlib for big data
Sergiy Matusevych
 
Think Like Spark: Some Spark Concepts and a Use Case
Think Like Spark: Some Spark Concepts and a Use CaseThink Like Spark: Some Spark Concepts and a Use Case
Think Like Spark: Some Spark Concepts and a Use Case
Rachel Warren
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and how
Petr Zapletal
 
Spark stream - Kafka
Spark stream - Kafka Spark stream - Kafka
Spark stream - Kafka
Dori Waldman
 
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
Spark Summit
 
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S OptimizerDeep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Spark Summit
 
Getting Started Running Apache Spark on Apache Mesos
Getting Started Running Apache Spark on Apache MesosGetting Started Running Apache Spark on Apache Mesos
Getting Started Running Apache Spark on Apache Mesos
Paco Nathan
 
Mantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing SystemMantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing System
C4Media
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013
Samir Bessalah
 
The Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache FlinkThe Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache Flink
DataWorks Summit/Hadoop Summit
 

What's hot (19)

SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
SF Big Analytics 20191112: How to performance-tune Spark applications in larg...
 
whats new in java 8
whats new in java 8 whats new in java 8
whats new in java 8
 
Harnessing the power of YARN with Apache Twill
Harnessing the power of YARN with Apache TwillHarnessing the power of YARN with Apache Twill
Harnessing the power of YARN with Apache Twill
 
Map reduce prashant
Map reduce prashantMap reduce prashant
Map reduce prashant
 
GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
 
Apache Flink internals
Apache Flink internalsApache Flink internals
Apache Flink internals
 
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
A Scalable Hierarchical Clustering Algorithm Using Spark: Spark Summit East t...
 
Spark and spark streaming internals
Spark and spark streaming internalsSpark and spark streaming internals
Spark and spark streaming internals
 
Spark Working Environment in Windows OS
Spark Working Environment in Windows OSSpark Working Environment in Windows OS
Spark Working Environment in Windows OS
 
Apache REEF - stdlib for big data
Apache REEF - stdlib for big dataApache REEF - stdlib for big data
Apache REEF - stdlib for big data
 
Think Like Spark: Some Spark Concepts and a Use Case
Think Like Spark: Some Spark Concepts and a Use CaseThink Like Spark: Some Spark Concepts and a Use Case
Think Like Spark: Some Spark Concepts and a Use Case
 
Distributed real time stream processing- why and how
Distributed real time stream processing- why and howDistributed real time stream processing- why and how
Distributed real time stream processing- why and how
 
Spark stream - Kafka
Spark stream - Kafka Spark stream - Kafka
Spark stream - Kafka
 
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
Spark on Mesos-A Deep Dive-(Dean Wampler and Tim Chen, Typesafe and Mesosphere)
 
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S OptimizerDeep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
Deep Dive Into Catalyst: Apache Spark 2.0'S Optimizer
 
Getting Started Running Apache Spark on Apache Mesos
Getting Started Running Apache Spark on Apache MesosGetting Started Running Apache Spark on Apache Mesos
Getting Started Running Apache Spark on Apache Mesos
 
Mantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing SystemMantis: Netflix's Event Stream Processing System
Mantis: Netflix's Event Stream Processing System
 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013
 
The Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache FlinkThe Stream Processor as a Database Apache Flink
The Stream Processor as a Database Apache Flink
 

Viewers also liked

Talahi Reference letter
Talahi Reference letterTalahi Reference letter
Talahi Reference letterInna Zhuravel
 
Idea market(김경하)
Idea market(김경하)Idea market(김경하)
Idea market(김경하)
김경하
 
24heures mecredi 21 mai 2008
24heures mecredi 21 mai 200824heures mecredi 21 mai 2008
24heures mecredi 21 mai 2008
Sylvie Villa
 
스테이크소스만들기
스테이크소스만들기스테이크소스만들기
스테이크소스만들기
bwetdf
 
Recommendation - Ling Guan
Recommendation - Ling GuanRecommendation - Ling Guan
Recommendation - Ling GuanLing Guan
 
De Oude Plantage Concept for C to C Devellopping
De Oude Plantage Concept for C to C DevelloppingDe Oude Plantage Concept for C to C Devellopping
De Oude Plantage Concept for C to C DevelloppingAAD KETTING RETAIL B.V.
 
Pace Business Plan
Pace Business PlanPace Business Plan
Pace Business PlanBennett Liss
 
Klausul iso 22000 - food safety certification I call us at +6221. 98567515 /...
Klausul  iso 22000 - food safety certification I call us at +6221. 98567515 /...Klausul  iso 22000 - food safety certification I call us at +6221. 98567515 /...
Klausul iso 22000 - food safety certification I call us at +6221. 98567515 /...
Haliamsah Purba
 
5 Characteristics of Excellent Instructional Designers
5 Characteristics of Excellent Instructional Designers5 Characteristics of Excellent Instructional Designers
5 Characteristics of Excellent Instructional Designers
The International Institute for Innovative Instruction at Franklin University
 
PROPIEDAD INTELECTUAL
PROPIEDAD INTELECTUALPROPIEDAD INTELECTUAL
PROPIEDAD INTELECTUAL
juanclp14
 
Regression Analysis Project
Regression Analysis ProjectRegression Analysis Project
Regression Analysis ProjectMichael Wallace
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
Kelly Technologies
 
Bab vi studi desain epidemiologi
Bab vi studi desain epidemiologiBab vi studi desain epidemiologi
Bab vi studi desain epidemiologi
NajMah Usman
 

Viewers also liked (15)

License 2021
License 2021License 2021
License 2021
 
Talahi Reference letter
Talahi Reference letterTalahi Reference letter
Talahi Reference letter
 
Idea market(김경하)
Idea market(김경하)Idea market(김경하)
Idea market(김경하)
 
24heures mecredi 21 mai 2008
24heures mecredi 21 mai 200824heures mecredi 21 mai 2008
24heures mecredi 21 mai 2008
 
스테이크소스만들기
스테이크소스만들기스테이크소스만들기
스테이크소스만들기
 
RESUME
RESUME RESUME
RESUME
 
Recommendation - Ling Guan
Recommendation - Ling GuanRecommendation - Ling Guan
Recommendation - Ling Guan
 
De Oude Plantage Concept for C to C Devellopping
De Oude Plantage Concept for C to C DevelloppingDe Oude Plantage Concept for C to C Devellopping
De Oude Plantage Concept for C to C Devellopping
 
Pace Business Plan
Pace Business PlanPace Business Plan
Pace Business Plan
 
Klausul iso 22000 - food safety certification I call us at +6221. 98567515 /...
Klausul  iso 22000 - food safety certification I call us at +6221. 98567515 /...Klausul  iso 22000 - food safety certification I call us at +6221. 98567515 /...
Klausul iso 22000 - food safety certification I call us at +6221. 98567515 /...
 
5 Characteristics of Excellent Instructional Designers
5 Characteristics of Excellent Instructional Designers5 Characteristics of Excellent Instructional Designers
5 Characteristics of Excellent Instructional Designers
 
PROPIEDAD INTELECTUAL
PROPIEDAD INTELECTUALPROPIEDAD INTELECTUAL
PROPIEDAD INTELECTUAL
 
Regression Analysis Project
Regression Analysis ProjectRegression Analysis Project
Regression Analysis Project
 
Hadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologiesHadoop trainting in hyderabad@kelly technologies
Hadoop trainting in hyderabad@kelly technologies
 
Bab vi studi desain epidemiologi
Bab vi studi desain epidemiologiBab vi studi desain epidemiologi
Bab vi studi desain epidemiologi
 

Similar to Hadoop institutes in Bangalore

hadoop.ppt
hadoop.ppthadoop.ppt
hadoop.ppt
AnushkaChauhan68
 
Big-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbaiBig-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbai
Unmesh Baile
 
Hadoop - Introduction to mapreduce
Hadoop -  Introduction to mapreduceHadoop -  Introduction to mapreduce
Hadoop - Introduction to mapreduce
Vibrant Technologies & Computers
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
Kelly Technologies
 
Hadoop_Pennonsoft
Hadoop_PennonsoftHadoop_Pennonsoft
Hadoop_PennonsoftPennonSoft
 
Hadoop first mr job - inverted index construction
Hadoop first mr job - inverted index constructionHadoop first mr job - inverted index construction
Hadoop first mr job - inverted index construction
Subhas Kumar Ghosh
 
Spark training-in-bangalore
Spark training-in-bangaloreSpark training-in-bangalore
Spark training-in-bangalore
Kelly Technologies
 
Hadoop ecosystem
Hadoop ecosystemHadoop ecosystem
Hadoop ecosystem
Ran Silberman
 
Airflow tutorials hands_on
Airflow tutorials hands_onAirflow tutorials hands_on
Airflow tutorials hands_on
pko89403
 
Hadoop Introduction
Hadoop IntroductionHadoop Introduction
Hadoop Introduction
SNEHAL MASNE
 
Processing massive amount of data with Map Reduce using Apache Hadoop - Indi...
Processing massive amount of data with Map Reduce using Apache Hadoop  - Indi...Processing massive amount of data with Map Reduce using Apache Hadoop  - Indi...
Processing massive amount of data with Map Reduce using Apache Hadoop - Indi...
IndicThreads
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
Prashant Gupta
 
MAP REDUCE IN DATA SCIENCE.pptx
MAP REDUCE IN DATA SCIENCE.pptxMAP REDUCE IN DATA SCIENCE.pptx
MAP REDUCE IN DATA SCIENCE.pptx
HARIKRISHNANU13
 
Productionizing your Streaming Jobs
Productionizing your Streaming JobsProductionizing your Streaming Jobs
Productionizing your Streaming Jobs
Databricks
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-training
Geohedrick
 
Big data unit iv and v lecture notes qb model exam
Big data unit iv and v lecture notes   qb model examBig data unit iv and v lecture notes   qb model exam
Big data unit iv and v lecture notes qb model exam
Indhujeni
 
Mapreduce by examples
Mapreduce by examplesMapreduce by examples
Mapreduce by examples
Andrea Iacono
 
Hadoop pig
Hadoop pigHadoop pig
Hadoop pig
Sean Murphy
 
Technical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques NadeauTechnical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques Nadeau
MapR Technologies
 

Similar to Hadoop institutes in Bangalore (20)

Hadoop 2
Hadoop 2Hadoop 2
Hadoop 2
 
hadoop.ppt
hadoop.ppthadoop.ppt
hadoop.ppt
 
Big-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbaiBig-data-analysis-training-in-mumbai
Big-data-analysis-training-in-mumbai
 
Hadoop - Introduction to mapreduce
Hadoop -  Introduction to mapreduceHadoop -  Introduction to mapreduce
Hadoop - Introduction to mapreduce
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
 
Hadoop_Pennonsoft
Hadoop_PennonsoftHadoop_Pennonsoft
Hadoop_Pennonsoft
 
Hadoop first mr job - inverted index construction
Hadoop first mr job - inverted index constructionHadoop first mr job - inverted index construction
Hadoop first mr job - inverted index construction
 
Spark training-in-bangalore
Spark training-in-bangaloreSpark training-in-bangalore
Spark training-in-bangalore
 
Hadoop ecosystem
Hadoop ecosystemHadoop ecosystem
Hadoop ecosystem
 
Airflow tutorials hands_on
Airflow tutorials hands_onAirflow tutorials hands_on
Airflow tutorials hands_on
 
Hadoop Introduction
Hadoop IntroductionHadoop Introduction
Hadoop Introduction
 
Processing massive amount of data with Map Reduce using Apache Hadoop - Indi...
Processing massive amount of data with Map Reduce using Apache Hadoop  - Indi...Processing massive amount of data with Map Reduce using Apache Hadoop  - Indi...
Processing massive amount of data with Map Reduce using Apache Hadoop - Indi...
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
 
MAP REDUCE IN DATA SCIENCE.pptx
MAP REDUCE IN DATA SCIENCE.pptxMAP REDUCE IN DATA SCIENCE.pptx
MAP REDUCE IN DATA SCIENCE.pptx
 
Productionizing your Streaming Jobs
Productionizing your Streaming JobsProductionizing your Streaming Jobs
Productionizing your Streaming Jobs
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-training
 
Big data unit iv and v lecture notes qb model exam
Big data unit iv and v lecture notes   qb model examBig data unit iv and v lecture notes   qb model exam
Big data unit iv and v lecture notes qb model exam
 
Mapreduce by examples
Mapreduce by examplesMapreduce by examples
Mapreduce by examples
 
Hadoop pig
Hadoop pigHadoop pig
Hadoop pig
 
Technical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques NadeauTechnical Overview of Apache Drill by Jacques Nadeau
Technical Overview of Apache Drill by Jacques Nadeau
 

Recently uploaded

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
Celine George
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 

Recently uploaded (20)

The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 

Hadoop institutes in Bangalore

  • 2. Announcements My office hours: M 2:30—3:30 in CSE 212 Cluster is operational; instructions in assignment 1 heavily rewritten Eclipse plugin is “deprecated” Students who already created accounts: let me know if you have trouble www.kellytechno.com
  • 3. Breaking news! Hadoop tested on 4,000 node cluster 32K cores (8 / node) 16 PB raw storage (4 x 1 TB disk / node) (about 5 PB usable storage) http://developer.yahoo.com/blogs/hadoop/2008/09/ scaling_hadoop_to_4000_nodes_a.html www.kellytechno.com
  • 4. You Say, “tomato…” Google calls it: Hadoop equivalent: MapReduce Hadoop GFS HDFS Bigtable HBase Chubby Zookeeper www.kellytechno.com
  • 5. Some MapReduce Terminology Job – A “full program” - an execution of a Mapper and Reducer across a data set Task – An execution of a Mapper or a Reducer on a slice of data a.k.a. Task-In-Progress (TIP) Task Attempt – A particular instance of an attempt to execute a task on a machine www.kellytechno.com
  • 6. Terminology Example Running “Word Count” across 20 files is one job 20 files to be mapped imply 20 map tasks + some number of reduce tasks At least 20 map task attempts will be performed… more if a machine crashes, etc. www.kellytechno.com
  • 7. Task Attempts A particular task will be attempted at least once, possibly more times if it crashes If the same input causes crashes over and over, that input will eventually be abandoned Multiple attempts at one task may occur in parallel with speculative execution turned on Task ID from TaskInProgress is not a unique identifier; don’t use it that way www.kellytechno.com
  • 9. Node-to-Node Communication Hadoop uses its own RPC protocol All communication begins in slave nodes Prevents circular-wait deadlock Slaves periodically poll for “status” message Classes must provide explicit serialization www.kellytechno.com
  • 10. Nodes, Trackers, Tasks Master node runs JobTracker instance, which accepts Job requests from clients TaskTracker instances run on slave nodes TaskTracker forks separate Java process for task instances www.kellytechno.com
  • 11. Job Distribution MapReduce programs are contained in a Java “jar” file + an XML file containing serialized program configuration options Running a MapReduce job places these files into the HDFS and notifies TaskTrackers where to retrieve the relevant program code … Where’s the data distribution? www.kellytechno.com
  • 12. Data Distribution Implicit in design of MapReduce! All mappers are equivalent; so map whatever data is local to a particular node in HDFS If lots of data does happen to pile up on the same node, nearby nodes will map instead Data transfer is handled implicitly by HDFS www.kellytechno.com
  • 13. Configuring With JobConf MR Programs have many configurable options JobConf objects hold (key, value) components mapping String  ’a e.g., “mapred.map.tasks”  20 JobConf is serialized and distributed before running the job Objects implementing JobConfigurable can retrieve elements from a JobConf www.kellytechno.com
  • 15. Job Launch Process: Client Client program creates a JobConf Identify classes implementing Mapper and Reducer interfaces  JobConf.setMapperClass(), setReducerClass() Specify inputs, outputs  FileInputFormat.addInputPath(),  FileOutputFormat.setOutputPath() Optionally, other options too:  JobConf.setNumReduceTasks(), JobConf.setOutputFormat() … www.kellytechno.com
  • 16. Job Launch Process: JobClient Pass JobConf to JobClient.runJob() or submitJob() runJob() blocks, submitJob() does not JobClient: Determines proper division of input into InputSplits Sends job data to master JobTracker server www.kellytechno.com
  • 17. Job Launch Process: JobTracker JobTracker: Inserts jar and JobConf (serialized to XML) in shared location Posts a JobInProgress to its run queue www.kellytechno.com
  • 18. Job Launch Process: TaskTracker TaskTrackers running on slave nodes periodically query JobTracker for work Retrieve job-specific jar and config Launch task in separate instance of Java main() is provided by Hadoop www.kellytechno.com
  • 19. Job Launch Process: Task TaskTracker.Child.main(): Sets up the child TaskInProgress attempt Reads XML configuration Connects back to necessary MapReduce components via RPC Uses TaskRunner to launch user process www.kellytechno.com
  • 20. Job Launch Process: TaskRunner TaskRunner, MapTaskRunner, MapRunner work in a daisy-chain to launch your Mapper Task knows ahead of time which InputSplits it should be mapping Calls Mapper once for each record retrieved from the InputSplit Running the Reducer is much the same www.kellytechno.com
  • 21. Creating the Mapper You provide the instance of Mapper Should extend MapReduceBase One instance of your Mapper is initialized by the MapTaskRunner for a TaskInProgress Exists in separate process from all other instances of Mapper – no data sharing! www.kellytechno.com
  • 22. Mapper void map(K1 key, V1 value, OutputCollector<K2, V2> output, Reporter reporter) K types implement WritableComparable V types implement Writable www.kellytechno.com
  • 23. What is Writable? Hadoop defines its own “box” classes for strings (Text), integers (IntWritable), etc. All values are instances of Writable All keys are instances of WritableComparable www.kellytechno.com
  • 24. Getting Data To The Mapper www.kellytechno.com
  • 25. Reading Data Data sets are specified by InputFormats Defines input data (e.g., a directory) Identifies partitions of the data that form an InputSplit Factory for RecordReader objects to extract (k, v) records from the input source www.kellytechno.com
  • 26. FileInputFormat and Friends TextInputFormat – Treats each ‘n’-terminated line of a file as a value KeyValueTextInputFormat – Maps ‘n’- terminated text lines of “k SEP v” SequenceFileInputFormat – Binary file of (k, v) pairs with some add’l metadata SequenceFileAsTextInputFormat – Same, but maps (k.toString(), v.toString()) www.kellytechno.com
  • 27. Filtering File Inputs FileInputFormat will read all files out of a specified directory and send them to the mapper Delegates filtering this file list to a method subclasses may override e.g., Create your own “xyzFileInputFormat” to read *.xyz from directory list www.kellytechno.com
  • 28. Record Readers Each InputFormat provides its own RecordReader implementation Provides (unused?) capability multiplexing LineRecordReader – Reads a line from a text file KeyValueRecordReader – Used by KeyValueTextInputFormat www.kellytechno.com
  • 29. Input Split Size FileInputFormat will divide large files into chunks Exact size controlled by mapred.min.split.size RecordReaders receive file, offset, and length of chunk Custom InputFormat implementations may override split size – e.g., “NeverChunkFile” www.kellytechno.com
  • 30. Sending Data To Reducers Map function receives OutputCollector object OutputCollector.collect() takes (k, v) elements Any (WritableComparable, Writable) can be used By default, mapper output type assumed to be same as reducer output type www.kellytechno.com
  • 31. WritableComparator Compares WritableComparable data Will call WritableComparable.compare() Can provide fast path for serialized data JobConf.setOutputValueGroupingComparator() www.kellytechno.com
  • 32. Sending Data To The Client Reporter object sent to Mapper allows simple asynchronous feedback incrCounter(Enum key, long amount) setStatus(String msg) Allows self-identification of input InputSplit getInputSplit() www.kellytechno.com
  • 34. Partitioner int getPartition(key, val, numPartitions) Outputs the partition number for a given key One partition == values sent to one Reduce task HashPartitioner used by default Uses key.hashCode() to return partition num JobConf sets Partitioner implementation www.kellytechno.com
  • 35. Reduction reduce( K2 key, Iterator<V2> values, OutputCollector<K3, V3> output, Reporter reporter) Keys & values sent to one partition all go to the same reduce task Calls are sorted by key – “earlier” keys are reduced and output before “later” keys www.kellytechno.com
  • 36. Finally: Writing The Output www.kellytechno.com
  • 37. OutputFormat Analogous to InputFormat TextOutputFormat – Writes “key valn” strings to output file SequenceFileOutputFormat – Uses a binary format to pack (k, v) pairs NullOutputFormat – Discards output www.kellytechno.com