16. What is NameNode
NameNode-it is also known as Master in Hadoop Cluster. Below Listed Are The Main Function Performed By Namenode:
• Namenode Stores Metadata Of Actual Data. E.G.
Filename, Path, No. Of Blocks, Bolck Ids, Block
Location, No. Of Replicas, And Also Slave Related
Configuration.
• It Manages Filesystem Namespace.
• Namenode Regulates Client Access To Files.
• It Assigns Work To Slaves (Datanode)
• It Executes File System Namespace Operation Like
Opening/Closing Files, Renaming Files/Directory
• As Namenode Keep Metadata In Memory For Fast
Retrieval. So It Requires The Huge Amount Of Memory
For Its Operation.
https://phoenixnap.com/kb/apache-hadoop-architecture-explained
Thinnaphat Borirak
17. What is Secondary NameNode
It as A backup node.
*NameNode Holds the metadate for HDFS like block information, size etc. This
information is stored in main memory as well as disk for persistence storage.
The information is stored in 2 different files.
o Editlogs- It keep track of each and every changes to HDFS.
o Fsimage-It stores the snapshort of the file system
https://www.edureka.co/community/49846/explain-the-difference-between-name-node-secondary-name-node
Thinnaphat Borirak
18. What is DataNode
DataNode is also Known as Slave node.
• In Hadoop HDFS Architecture, DataNode Stores
actual data in HDFS
• DataNode responsible for serving, read and write
requests for the clients.
• DataNode can deploy on Community hardware
• DataNode sends Information to the NameNode
about the files and block stored in that node and
responds to the NameNode for all filesystem
operation.
• When a DataNode starts up it announce itself to
the NameNode along with the list of blocks it is
responsible for.
• DataNode is usually configured with a lot of hard
disk space. Because the actual data is stored in
the DataNode.
Thinnaphat Borirak
20. • HDFS stores the data in form of blocks
• Block size can be configured base on requirements, but the default size of each block is 128 MB in Apache 2.x
(64 MB in Apache Hadoop 1.x)
• Can configure the block size as per our requirement by changing the dfs.block.size property in hdfs-site.xml
HDFS Data Blocks
Fault Tolerance
HDFS Replication
Thinnaphat Borirak
21. HDFS Write Architecture
ตัวอย่าง HDFS Client ต้องการเขียนไฟล์ชือ “example.txt” ขนาด 248 MB ขนาดบล็อกของระบบจะถูกกําหนดค่าเป็น 128 MB (ค่าเริมต้น) ฉะนัน Client จะ
แบ่งไฟล์ “example.txt” ออกเป็น 2 บล็อค โดยอันหนึงมีขนาด 128 MB (บล็อค A)
และอีกอันมีขนาด 120 MB (บล็อค B)
ดังนัน เมือข้อมูลถูกเขียนลงใน HDFS จะมีขันตอนตามนี คือ ในขันตอนแรก HDFS Client จะติดต่อไปยัง NameNode เพือขอบันทึก 2 บล็อก เช่น บล็อก A
และบล็อก B จากนัน NameNode จะให้สิทธิในการเขียนแก่ไคลเอนต์และจะให้ทีอยู่ IP ของ DataNodes ทีบล็อกไฟล์จะถูกคัดลอกลงไป ซึงการเลือกทีอยู่ IP ของ
DataNodes นันจะเป็นการสุ่มตามความพร้อมใช้งาน (Availability, replication factor และ rack awareness) สมมติว่าปัจจัยการจําลองถูกตังค่าเป็นค่าเริมต้น
เป็น 3 ดังนันสําหรับแต่ละบล็อก NameNode จะให้รายการทีอยู่ IP ของ DataNodes แก่ไคลเอ็นต์ รายการจะไม่ซํากันสําหรับแต่ละบล็อก สมมติว่า NameNode
ให้รายการทีอยู่ IP ต่อไปนีแก่ไคลเอ็นต์:
สําหรับบล็อก A รายการ A = {IP ของ DataNode 1, IP ของ DataNode 4, IP ของ DataNode 6} สําหรับ Block B ให้ตังค่า B = {IP ของ DataNode 3, IP
ของ DataNode 7, IP ของ DataNode 9} แต่ละบล็อกจะถูกคัดลอกในโหนดข้อมูลทีแตกต่างกัน 3 โหนด เพือรักษา Replication Factor ทีเป็นการจําลองแบบ
ให้สอดคล้องกันทัวทังคลัสเตอร์ โดยกระบวนการคัดลอกข้อมูลทังหมดจะเกิดขึนในสามขันตอน ดังนี
1. Set up of Pipeline
2. Data streaming and replication
3. Shutdown of Pipeline (Acknowledgement stage)
https://www.edureka.co/blog/apache-hadoop-hdfs-architecture/#rack_awareness
Thinnaphat Borirak
28. Hadoop Ecosystem
Below are the Hadoop components, that together
form a Hadoop ecosystem,
HDFS: Hadoop Distributed File System
YARN: Yet Another Resource Negotiator
MapReduce: Data processing using programming
Spark: In-memory Data Processing
PIG, HIVE: Data Processing Services using Query
(SQL-like)
Hbase: NoSQL Database
Mahout, Spark Mllib: Machine Learning
Apache Drill: SQL on Hadoop
Oozie: Job Scheduling
Solr & Lucene: Searching & Indexing
Zookeeper: Managing Cluster
Ambari: Provision, Monitor and Maintain cluster
Flume, Sqoop: Data Ingesting Services
https://www.edureka.co
Thinnaphat Borirak
38. Workshop
3. LITERATURE REVIEW ON BIG DATA
WITH HADOOP
https://scholar.google.com/
1. Create a Group
2. Think of a Topic
Internet of Things for Human Healthcare Services and Data Analytics with Hadoop
Sentiment Analysis On Twitter Posts Using Hadoop
Thinnaphat Borirak