SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Outline
Basic Idea
Architecture
Closer Look
Demo
Project Plan
What is Hadoop?
Apache top level project, open-source
implementation of frameworks for
reliable, scalable, distributed computing and
data storage.
It is a flexible and highly-available architecture
for large scale computation and data processing
on a network of commodity hardware.
Hadoop Highlights
Distributed File System
Fault Tolerance
Open Data Format
Flexible Schema
Queryable Database
Why use Hadoop?
Need to process Multi Petabyte Datasets
Data may not have strict schema
Expensive to build reliability in each application
Nodes fails everyday
Need common infrastructure
Who uses Hadoop?
Amazon
Facebook
Google
Yahoo!
…
Goal of HDFS
Very Large Distributed File System
Assumes Commodity Hardware
Optimized for Batch Processing
Runs on heterogeneous OS
HDFS Architecture
NameNode
Meta-data in Memory
The entire metadata is in main memory
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, deletions, etc
DataNode
A Block Sever
Stores data in local file system
Stores meta-data of a block - checksum
Serves data and meta-data to clients
Block Report
Periodically sends a report of all existing blocks to NameNode
Facilitate Pipelining of Data
Forwards data to other specified DataNodes
Block Placement
Replication 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
Data Correctness
Use Checksums to validate data – CRC32
File Creation
Client computes checksum per 512 byte
DataNode stores the checksum
File Access
Client retrieves the data and checksum from DataNode
If validation fails, client tries other replicas
Data Pipelining
Client retrieves a list of DataNodes on which to
place replicas of a block
Client writes block to the first DataNode
The first DataNode forwards the data to the next
DataNode in the Pipeline
When all replicas are written, the client moves
on to write the next block in file
Hadoop MapReduce
MapReduce programming model
Framework for distributed processing of large data
sets
Pluggable user code runs in generic framework
Common design pattern in data processing
cat * | grep | sort | uniq -c | cat > file
input | map | shuffle | reduce | output
MapReduce Usage
Log processing
Web search indexing
Ad-hoc queries
MapReduce Architecture
Closer Look
MapReduce Component
JobClient
JobTracker
TaskTracker
Child
Job Creation/Execution Process
MapReduce Process
(org.apache.hadoop.mapred)
JobClient
Submit job
JobTracker
Manage and schedule job, split job into tasks
TaskTracker
Start and monitor the task execution
Child
The process that really execute the task
Inter Process Communication
IPC/RPC (org.apache.hadoop.ipc)
Protocol
JobClient <-------------> JobTracker
TaskTracker <------------> JobTracker
TaskTracker <-------------> Child
JobTracker impliments both protocol and works as server
in both IPC
TaskTracker implements the TaskUmbilicalProtocol; Child
gets task information and reports task status through it.
JobSubmissionProtocol
InterTrackerProtocol
TaskUmbilicalProtocol
JobClient.submitJob - 1
Check input and output, e.g. check if the output
directory is already existing
job.getInputFormat().validateInput(job);
job.getOutputFormat().checkOutputSpecs(fs, job);
Get InputSplits, sort, and write output to HDFS
InputSplit[] splits = job.getInputFormat().
getSplits(job, job.getNumMapTasks());
writeSplitsFile(splits, out); // out is
$SYSTEMDIR/$JOBID/job.split
JobClient.submitJob - 2
The jar file and configuration file will be
uploaded to HDFS system directory
job.write(out); // out is $SYSTEMDIR/$JOBID/job.xml
JobStatus status =
jobSubmitClient.submitJob(jobId);
This is an RPC invocation, jobSubmitClient is a
proxy created in the initialization
Job initialization on
JobTracker - 1
JobTracker.submitJob(jobID) <-- receive RPC
invocation request
JobInProgress job = new JobInProgress(jobId, this,
this.conf)
Add the job into Job Queue
jobs.put(job.getProfile().getJobId(), job);
jobsByPriority.add(job);
jobInitQueue.add(job);
Job initialization on
JobTracker - 2
Sort by priority
resortPriority();
compare the JobPrioity first, then compare the
JobSubmissionTime
Wake JobInitThread
jobInitQueue.notifyall();
job = jobInitQueue.remove(0);
job.initTasks();
JobInProgress - 1
JobInProgress(String jobid, JobTracker
jobtracker, JobConf default_conf);
JobInProgress.initTasks()
DataInputStream splitFile = fs.open(new
Path(conf.get(“mapred.job.split.file”)));
// mapred.job.split.file -->
$SYSTEMDIR/$JOBID/job.split
JobInProgress - 2
splits = JobClient.readSplitFile(splitFile);
numMapTasks = splits.length;
maps[i] = new
TaskInProgress(jobId, jobFile, splits[i], jobtracker, co
nf, this, i);
reduces[i] = new
TaskInProgress(jobId, jobFile, splits[i], jobtracker, co
nf, this, i);
JobStatus --> JobStatus.RUNNING
JobTracker Task
Scheduling - 1
Task getNewTaskForTaskTracker(String
taskTracker)
Compute the maximum tasks that can be running
on taskTracker
int maxCurrentMap Tasks = tts.getMaxMapTasks();
int maxMapLoad = Math.min(maxCurrentMapTasks,
(int)Math.ceil(double)
remainingMapLoad/numTaskTrackers));
JobTracker Task
Scheduling - 2
int numMaps = tts.countMapTasks(); // running
tasks number
If numMaps < maxMapLoad, then more tasks can
be allocated, then based on priority, pick the
first job from the jobsByPriority Queue, create a
task, and return to TaskTracker
Task t = job.obtainNewMapTask(tts,
numTaskTrackers);
Start TaskTracker - 1
initialize()
Remove original local directory
RPC initialization
TaskReportServer = RPC.getServer(this,
bindAddress, tmpPort, max, false, this, fConf);
InterTrackerProtocol jobClient =
(InterTrackerProtocol)
RPC.waitForProxy(InterTrackerProtocol.class,
InterTrackerProtocol.versionID, jobTrackAddr,
this.fConf);
Start TaskTracker - 2
run();
offerService();
TaskTracker talks to JobTracker with HeartBeat
message periodically
HeatbeatResponse heartbeatResponse =
transmitHeartBeat();
Run Task on TaskTracker - 1
TaskTracker.localizeJob(TaskInProgress tip);
launchTasksForJob(tip, new
JobConf(rjob.jobFile));
tip.launchTask(); // TaskTracker.TaskInProgress
tip.localizeTask(task); // create folder, symbol link
runner = task.createRunner(TaskTracker.this);
runner.start(); // start TaskRunner thread
Run Task on TaskTracker - 2
TaskRunner.run();
Configure child process’ jvm parameters, i.e.
classpath, taskid, taskReportServer’s address &
port
Start Child Process
runChild(wrappedCommand, workDir, taskid);
Child.main()
Create RPC Proxy, and execute RPC invocation
TaskUmbilicalProtocol umbilical =
(TaskUmbilicalProtocol)
RPC.getProxy(TaskUmbilicalProtocol.class, TaskU
mbilicalProtocol.versionID, address, defaultConf);
Task task = umbilical.getTask(taskid);
task.run(); // mapTask / reduceTask.run
Finish Job - 1
Child
task.done(umilical);
RPC call: umbilical.done(taskId, shouldBePromoted)
TaskTracker
done(taskId, shouldPromote)
TaskInProgress tip = tasks.get(taskid);
tip.reportDone(shouldPromote);
taskStatus.setRunState(TaskStatus.State.SUCCEEDED)
Finish Job - 2
JobTracker
TaskStatus report: status.getTaskReports();
TaskInProgress tip = taskidToTIPMap.get(taskId);
JobInProgress update JobStatus
tip.getJob().updateTaskStatus(tip, report, myMetrics);
One task of current job is finished
completedTask(tip, taskStatus, metrics);
If (this.status.getRunState() == JobStatus.RUNNING &&
allDone) {this.status.setRunState(JobStatus.SUCCEEDED)}
Demo
Word Count
hadoop jar hadoop-0.20.2-examples.jar wordcount
<input dir> <output dir>
Hive
hive -f pagerank.hive
Project Plan
Hadoop Load Balance Enhancement
Static Load Balancing Rules
Dynamic Process Migration
Q & A

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Apache Hadoop Eco-System
Introduction to Apache Hadoop Eco-SystemIntroduction to Apache Hadoop Eco-System
Introduction to Apache Hadoop Eco-SystemMd. Hasan Basri (Angel)
 
02.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 201302.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 2013WANdisco Plc
 
Apache Hadoop
Apache HadoopApache Hadoop
Apache HadoopAjit Koti
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology LandscapeShivanandaVSeeri
 
A Basic Introduction to the Hadoop eco system - no animation
A Basic Introduction to the Hadoop eco system - no animationA Basic Introduction to the Hadoop eco system - no animation
A Basic Introduction to the Hadoop eco system - no animationSameer Tiwari
 
سکوهای ابری و مدل های برنامه نویسی در ابر
سکوهای ابری و مدل های برنامه نویسی در ابرسکوهای ابری و مدل های برنامه نویسی در ابر
سکوهای ابری و مدل های برنامه نویسی در ابرdatastack
 
Apache hadoop introduction and architecture
Apache hadoop  introduction and architectureApache hadoop  introduction and architecture
Apache hadoop introduction and architectureHarikrishnan K
 
Hadoop introduction , Why and What is Hadoop ?
Hadoop introduction , Why and What is  Hadoop ?Hadoop introduction , Why and What is  Hadoop ?
Hadoop introduction , Why and What is Hadoop ?sudhakara st
 
Big Data and Hadoop Introduction
 Big Data and Hadoop Introduction Big Data and Hadoop Introduction
Big Data and Hadoop IntroductionDzung Nguyen
 
Introduction to Big Data & Hadoop Architecture - Module 1
Introduction to Big Data & Hadoop Architecture - Module 1Introduction to Big Data & Hadoop Architecture - Module 1
Introduction to Big Data & Hadoop Architecture - Module 1Rohit Agrawal
 
Big data architecture on cloud computing infrastructure
Big data architecture on cloud computing infrastructureBig data architecture on cloud computing infrastructure
Big data architecture on cloud computing infrastructuredatastack
 
Hadoop: Distributed Data Processing
Hadoop: Distributed Data ProcessingHadoop: Distributed Data Processing
Hadoop: Distributed Data ProcessingCloudera, Inc.
 
Comparison - RDBMS vs Hadoop vs Apache
Comparison - RDBMS vs Hadoop vs ApacheComparison - RDBMS vs Hadoop vs Apache
Comparison - RDBMS vs Hadoop vs ApacheSandeepTaksande
 
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...Cloudera, Inc.
 

Was ist angesagt? (20)

Hadoop
HadoopHadoop
Hadoop
 
Introduction to Apache Hadoop Eco-System
Introduction to Apache Hadoop Eco-SystemIntroduction to Apache Hadoop Eco-System
Introduction to Apache Hadoop Eco-System
 
Introduction to Hadoop
Introduction to HadoopIntroduction to Hadoop
Introduction to Hadoop
 
HDFS
HDFSHDFS
HDFS
 
02.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 201302.28.13 WANdisco ApacheCon 2013
02.28.13 WANdisco ApacheCon 2013
 
Apache Hadoop
Apache HadoopApache Hadoop
Apache Hadoop
 
Big Data technology Landscape
Big Data technology LandscapeBig Data technology Landscape
Big Data technology Landscape
 
A Basic Introduction to the Hadoop eco system - no animation
A Basic Introduction to the Hadoop eco system - no animationA Basic Introduction to the Hadoop eco system - no animation
A Basic Introduction to the Hadoop eco system - no animation
 
PPT on Hadoop
PPT on HadoopPPT on Hadoop
PPT on Hadoop
 
سکوهای ابری و مدل های برنامه نویسی در ابر
سکوهای ابری و مدل های برنامه نویسی در ابرسکوهای ابری و مدل های برنامه نویسی در ابر
سکوهای ابری و مدل های برنامه نویسی در ابر
 
Hadoop
Hadoop Hadoop
Hadoop
 
Apache hadoop introduction and architecture
Apache hadoop  introduction and architectureApache hadoop  introduction and architecture
Apache hadoop introduction and architecture
 
Hadoop introduction , Why and What is Hadoop ?
Hadoop introduction , Why and What is  Hadoop ?Hadoop introduction , Why and What is  Hadoop ?
Hadoop introduction , Why and What is Hadoop ?
 
Big Data and Hadoop Introduction
 Big Data and Hadoop Introduction Big Data and Hadoop Introduction
Big Data and Hadoop Introduction
 
Introduction to Big Data & Hadoop Architecture - Module 1
Introduction to Big Data & Hadoop Architecture - Module 1Introduction to Big Data & Hadoop Architecture - Module 1
Introduction to Big Data & Hadoop Architecture - Module 1
 
Big data architecture on cloud computing infrastructure
Big data architecture on cloud computing infrastructureBig data architecture on cloud computing infrastructure
Big data architecture on cloud computing infrastructure
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
Hadoop: Distributed Data Processing
Hadoop: Distributed Data ProcessingHadoop: Distributed Data Processing
Hadoop: Distributed Data Processing
 
Comparison - RDBMS vs Hadoop vs Apache
Comparison - RDBMS vs Hadoop vs ApacheComparison - RDBMS vs Hadoop vs Apache
Comparison - RDBMS vs Hadoop vs Apache
 
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...
Hadoop World 2011: Hadoop and RDBMS with Sqoop and Other Tools - Guy Harrison...
 

Andere mochten auch

20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns
20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns
20131111 - Santa Monica - BigDataCamp - Big Data Design PatternsAllen Day, PhD
 
2013.12.12 - Sydney - Big Data Analytics
2013.12.12 - Sydney - Big Data Analytics2013.12.12 - Sydney - Big Data Analytics
2013.12.12 - Sydney - Big Data AnalyticsAllen Day, PhD
 
Big Data Modeling and Analytic Patterns – Beyond Schema on Read
Big Data Modeling and Analytic Patterns – Beyond Schema on ReadBig Data Modeling and Analytic Patterns – Beyond Schema on Read
Big Data Modeling and Analytic Patterns – Beyond Schema on ReadThink Big, a Teradata Company
 
Habilidades del pensamiento
Habilidades del pensamientoHabilidades del pensamiento
Habilidades del pensamientoDaniHarrison
 
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns   Webinar: Tailored Big Data Solutions using MapReduce Design Patterns
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns Edureka!
 

Andere mochten auch (6)

20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns
20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns
20131111 - Santa Monica - BigDataCamp - Big Data Design Patterns
 
2013.12.12 - Sydney - Big Data Analytics
2013.12.12 - Sydney - Big Data Analytics2013.12.12 - Sydney - Big Data Analytics
2013.12.12 - Sydney - Big Data Analytics
 
Bab 3
Bab 3Bab 3
Bab 3
 
Big Data Modeling and Analytic Patterns – Beyond Schema on Read
Big Data Modeling and Analytic Patterns – Beyond Schema on ReadBig Data Modeling and Analytic Patterns – Beyond Schema on Read
Big Data Modeling and Analytic Patterns – Beyond Schema on Read
 
Habilidades del pensamiento
Habilidades del pensamientoHabilidades del pensamiento
Habilidades del pensamiento
 
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns   Webinar: Tailored Big Data Solutions using MapReduce Design Patterns
Webinar: Tailored Big Data Solutions using MapReduce Design Patterns
 

Ähnlich wie Hadoop Architecture and Components Overview

Hands on Hadoop and pig
Hands on Hadoop and pigHands on Hadoop and pig
Hands on Hadoop and pigSudar Muthu
 
Airflow tutorials hands_on
Airflow tutorials hands_onAirflow tutorials hands_on
Airflow tutorials hands_onpko89403
 
Schedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop clusterSchedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop clusterShivraj Raj
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-trainingGeohedrick
 
Hadoop Big Data A big picture
Hadoop Big Data A big pictureHadoop Big Data A big picture
Hadoop Big Data A big pictureJ S Jodha
 
Hadoop and big data training
Hadoop and big data trainingHadoop and big data training
Hadoop and big data trainingagiamas
 
Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015Hao Chen
 
Finding URL pattern with MapReduce and Apache Hadoop
Finding URL pattern with MapReduce and Apache HadoopFinding URL pattern with MapReduce and Apache Hadoop
Finding URL pattern with MapReduce and Apache HadoopNushrat
 
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
 
Meethadoop
MeethadoopMeethadoop
MeethadoopIIIT-H
 
Hw09 Production Deep Dive With High Availability
Hw09   Production Deep Dive With High AvailabilityHw09   Production Deep Dive With High Availability
Hw09 Production Deep Dive With High AvailabilityCloudera, Inc.
 
Recommender.system.presentation.pjug.05.20.2014
Recommender.system.presentation.pjug.05.20.2014Recommender.system.presentation.pjug.05.20.2014
Recommender.system.presentation.pjug.05.20.2014rpbrehm
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabadsreehari orienit
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Yahoo Developer Network
 

Ähnlich wie Hadoop Architecture and Components Overview (20)

Unit 1
Unit 1Unit 1
Unit 1
 
Hands on Hadoop and pig
Hands on Hadoop and pigHands on Hadoop and pig
Hands on Hadoop and pig
 
Hadoop pig
Hadoop pigHadoop pig
Hadoop pig
 
H04502048051
H04502048051H04502048051
H04502048051
 
Airflow tutorials hands_on
Airflow tutorials hands_onAirflow tutorials hands_on
Airflow tutorials hands_on
 
Schedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop clusterSchedulers optimization to handle multiple jobs in hadoop cluster
Schedulers optimization to handle multiple jobs in hadoop cluster
 
Hadoop online-training
Hadoop online-trainingHadoop online-training
Hadoop online-training
 
Hadoop Big Data A big picture
Hadoop Big Data A big pictureHadoop Big Data A big picture
Hadoop Big Data A big picture
 
Hadoop and big data training
Hadoop and big data trainingHadoop and big data training
Hadoop and big data training
 
Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015Eagle from eBay at China Hadoop Summit 2015
Eagle from eBay at China Hadoop Summit 2015
 
hadoop
hadoophadoop
hadoop
 
Finding URL pattern with MapReduce and Apache Hadoop
Finding URL pattern with MapReduce and Apache HadoopFinding URL pattern with MapReduce and Apache Hadoop
Finding URL pattern with MapReduce and Apache Hadoop
 
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...
 
Meethadoop
MeethadoopMeethadoop
Meethadoop
 
Lecture 2 part 1
Lecture 2 part 1Lecture 2 part 1
Lecture 2 part 1
 
Hw09 Production Deep Dive With High Availability
Hw09   Production Deep Dive With High AvailabilityHw09   Production Deep Dive With High Availability
Hw09 Production Deep Dive With High Availability
 
hadoop.ppt
hadoop.ppthadoop.ppt
hadoop.ppt
 
Recommender.system.presentation.pjug.05.20.2014
Recommender.system.presentation.pjug.05.20.2014Recommender.system.presentation.pjug.05.20.2014
Recommender.system.presentation.pjug.05.20.2014
 
Hadoop training-in-hyderabad
Hadoop training-in-hyderabadHadoop training-in-hyderabad
Hadoop training-in-hyderabad
 
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
Apache Hadoop India Summit 2011 talk "Hadoop Map-Reduce Programming & Best Pr...
 

Kürzlich hochgeladen

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 

Kürzlich hochgeladen (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Hadoop Architecture and Components Overview

  • 1.
  • 3. What is Hadoop? Apache top level project, open-source implementation of frameworks for reliable, scalable, distributed computing and data storage. It is a flexible and highly-available architecture for large scale computation and data processing on a network of commodity hardware.
  • 4. Hadoop Highlights Distributed File System Fault Tolerance Open Data Format Flexible Schema Queryable Database
  • 5. Why use Hadoop? Need to process Multi Petabyte Datasets Data may not have strict schema Expensive to build reliability in each application Nodes fails everyday Need common infrastructure
  • 7. Goal of HDFS Very Large Distributed File System Assumes Commodity Hardware Optimized for Batch Processing Runs on heterogeneous OS
  • 9. NameNode Meta-data in Memory The entire metadata is in main memory 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, deletions, etc
  • 10. DataNode A Block Sever Stores data in local file system Stores meta-data of a block - checksum Serves data and meta-data to clients Block Report Periodically sends a report of all existing blocks to NameNode Facilitate Pipelining of Data Forwards data to other specified DataNodes
  • 11. Block Placement Replication 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
  • 12. Data Correctness Use Checksums to validate data – CRC32 File Creation Client computes checksum per 512 byte DataNode stores the checksum File Access Client retrieves the data and checksum from DataNode If validation fails, client tries other replicas
  • 13. Data Pipelining Client retrieves a list of DataNodes on which to place replicas of a block Client writes block to the first DataNode The first DataNode forwards the data to the next DataNode in the Pipeline When all replicas are written, the client moves on to write the next block in file
  • 14. Hadoop MapReduce MapReduce programming model Framework for distributed processing of large data sets Pluggable user code runs in generic framework Common design pattern in data processing cat * | grep | sort | uniq -c | cat > file input | map | shuffle | reduce | output
  • 15. MapReduce Usage Log processing Web search indexing Ad-hoc queries
  • 18. MapReduce Process (org.apache.hadoop.mapred) JobClient Submit job JobTracker Manage and schedule job, split job into tasks TaskTracker Start and monitor the task execution Child The process that really execute the task
  • 19. Inter Process Communication IPC/RPC (org.apache.hadoop.ipc) Protocol JobClient <-------------> JobTracker TaskTracker <------------> JobTracker TaskTracker <-------------> Child JobTracker impliments both protocol and works as server in both IPC TaskTracker implements the TaskUmbilicalProtocol; Child gets task information and reports task status through it. JobSubmissionProtocol InterTrackerProtocol TaskUmbilicalProtocol
  • 20. JobClient.submitJob - 1 Check input and output, e.g. check if the output directory is already existing job.getInputFormat().validateInput(job); job.getOutputFormat().checkOutputSpecs(fs, job); Get InputSplits, sort, and write output to HDFS InputSplit[] splits = job.getInputFormat(). getSplits(job, job.getNumMapTasks()); writeSplitsFile(splits, out); // out is $SYSTEMDIR/$JOBID/job.split
  • 21. JobClient.submitJob - 2 The jar file and configuration file will be uploaded to HDFS system directory job.write(out); // out is $SYSTEMDIR/$JOBID/job.xml JobStatus status = jobSubmitClient.submitJob(jobId); This is an RPC invocation, jobSubmitClient is a proxy created in the initialization
  • 22. Job initialization on JobTracker - 1 JobTracker.submitJob(jobID) <-- receive RPC invocation request JobInProgress job = new JobInProgress(jobId, this, this.conf) Add the job into Job Queue jobs.put(job.getProfile().getJobId(), job); jobsByPriority.add(job); jobInitQueue.add(job);
  • 23. Job initialization on JobTracker - 2 Sort by priority resortPriority(); compare the JobPrioity first, then compare the JobSubmissionTime Wake JobInitThread jobInitQueue.notifyall(); job = jobInitQueue.remove(0); job.initTasks();
  • 24. JobInProgress - 1 JobInProgress(String jobid, JobTracker jobtracker, JobConf default_conf); JobInProgress.initTasks() DataInputStream splitFile = fs.open(new Path(conf.get(“mapred.job.split.file”))); // mapred.job.split.file --> $SYSTEMDIR/$JOBID/job.split
  • 25. JobInProgress - 2 splits = JobClient.readSplitFile(splitFile); numMapTasks = splits.length; maps[i] = new TaskInProgress(jobId, jobFile, splits[i], jobtracker, co nf, this, i); reduces[i] = new TaskInProgress(jobId, jobFile, splits[i], jobtracker, co nf, this, i); JobStatus --> JobStatus.RUNNING
  • 26. JobTracker Task Scheduling - 1 Task getNewTaskForTaskTracker(String taskTracker) Compute the maximum tasks that can be running on taskTracker int maxCurrentMap Tasks = tts.getMaxMapTasks(); int maxMapLoad = Math.min(maxCurrentMapTasks, (int)Math.ceil(double) remainingMapLoad/numTaskTrackers));
  • 27. JobTracker Task Scheduling - 2 int numMaps = tts.countMapTasks(); // running tasks number If numMaps < maxMapLoad, then more tasks can be allocated, then based on priority, pick the first job from the jobsByPriority Queue, create a task, and return to TaskTracker Task t = job.obtainNewMapTask(tts, numTaskTrackers);
  • 28. Start TaskTracker - 1 initialize() Remove original local directory RPC initialization TaskReportServer = RPC.getServer(this, bindAddress, tmpPort, max, false, this, fConf); InterTrackerProtocol jobClient = (InterTrackerProtocol) RPC.waitForProxy(InterTrackerProtocol.class, InterTrackerProtocol.versionID, jobTrackAddr, this.fConf);
  • 29. Start TaskTracker - 2 run(); offerService(); TaskTracker talks to JobTracker with HeartBeat message periodically HeatbeatResponse heartbeatResponse = transmitHeartBeat();
  • 30. Run Task on TaskTracker - 1 TaskTracker.localizeJob(TaskInProgress tip); launchTasksForJob(tip, new JobConf(rjob.jobFile)); tip.launchTask(); // TaskTracker.TaskInProgress tip.localizeTask(task); // create folder, symbol link runner = task.createRunner(TaskTracker.this); runner.start(); // start TaskRunner thread
  • 31. Run Task on TaskTracker - 2 TaskRunner.run(); Configure child process’ jvm parameters, i.e. classpath, taskid, taskReportServer’s address & port Start Child Process runChild(wrappedCommand, workDir, taskid);
  • 32. Child.main() Create RPC Proxy, and execute RPC invocation TaskUmbilicalProtocol umbilical = (TaskUmbilicalProtocol) RPC.getProxy(TaskUmbilicalProtocol.class, TaskU mbilicalProtocol.versionID, address, defaultConf); Task task = umbilical.getTask(taskid); task.run(); // mapTask / reduceTask.run
  • 33. Finish Job - 1 Child task.done(umilical); RPC call: umbilical.done(taskId, shouldBePromoted) TaskTracker done(taskId, shouldPromote) TaskInProgress tip = tasks.get(taskid); tip.reportDone(shouldPromote); taskStatus.setRunState(TaskStatus.State.SUCCEEDED)
  • 34. Finish Job - 2 JobTracker TaskStatus report: status.getTaskReports(); TaskInProgress tip = taskidToTIPMap.get(taskId); JobInProgress update JobStatus tip.getJob().updateTaskStatus(tip, report, myMetrics); One task of current job is finished completedTask(tip, taskStatus, metrics); If (this.status.getRunState() == JobStatus.RUNNING && allDone) {this.status.setRunState(JobStatus.SUCCEEDED)}
  • 35. Demo Word Count hadoop jar hadoop-0.20.2-examples.jar wordcount <input dir> <output dir> Hive hive -f pagerank.hive
  • 36. Project Plan Hadoop Load Balance Enhancement Static Load Balancing Rules Dynamic Process Migration
  • 37. Q & A