Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Cloudera Administration Handbook
Cloudera Administration Handbook

Cloudera Administration Handbook: A complete, hands-on guide to building and maintaining large Apache Hadoop clusters using Cloudera Manager and CDH5

eBook
€24.99 €36.99
Paperback
€45.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Table of content icon View table of contents Preview book icon Preview Book

Cloudera Administration Handbook

Chapter 2. HDFS and MapReduce

We now have a basic understanding of the Apache Hadoop architecture and its inner workings. In this chapter, we will dive deeper into the two major components of Apache Hadoop—HDFS and MapReduce, and will cover the following topics:

  • Essentials of Hadoop Distributed File System
  • The read/write operational flow in HDFS
  • Exploring HDFS commands
  • Getting acquainted with MapReduce

Essentials of HDFS

HDFS is a distributed filesystem that has been designed to run on top of a cluster of industry standard hardware. The architecture of HDFS is such that there is no specific need for high-end hardware. HDFS is a highly fault-tolerant system and can handle failures of nodes in a cluster without loss of data. The primary goal behind the design of HDFS is to serve large data files efficiently. HDFS achieves this efficiency and high throughput in data transfer by enabling streaming access to the data in the filesystem.

The following are the important features of HDFS:

  • Fault tolerance: Many computers working together as a cluster are bound to have hardware failures. Hardware failures such as disk failures, network connectivity issues, and RAM failures could disrupt processing and cause major downtime. This could lead to data loss as well slippage of critical SLAs. HDFS is designed to withstand such hardware failures by detecting faults and taking recovery actions as required...

The read/write operational flow in HDFS

To get a better understanding of HDFS, we need to understand the flow of operations for the following two scenarios:

  • A file is written to HDFS
  • A file is read from HDFS

HDFS uses a single-write, multiple-read model, where the files are written once and read several times. The data cannot be altered once written. However, data can be appended to the file by reopening it. All files in the HDFS are saved as data blocks.

Writing files in HDFS

The following sequence of steps occur when a client tries to write a file to HDFS:

  1. The client informs the namenode daemon that it wants to write a file. The namenode daemon checks to see whether the file already exists.
  2. If it exists, an appropriate message is sent back to the client. If it does not exist, the namenode daemon makes a metadata entry for the new file.
  3. The file to be written is split into data packets at the client end and a data queue is built. The packets in the queue are then streamed to the datanodes in the...

Understanding the namenode UI

Hadoop provides web interfaces for each of its services. The namenode UI or the namenode web interface is used to monitor the status of the namenode and can be accessed using the following URL:

http://<namenode-server>:50070/

The namenode UI has the following sections:

  • Overview: The general information section provides basic information of the namenode with options to browse the filesystem and the namenode logs.

    The following is the screenshot of the Overview section of the namenode UI:

    Understanding the namenode UI

    The Cluster ID parameter displays the identification number of the cluster. This number is same across all the nodes within the cluster.

    A block pool is a set of blocks that belong to a single namespace. The Block Pool Id parameter is used to segregate the block pools in case there are multiple namespaces configured when using HDFS federation. In HDFS federation, multiple namenodes are configured to scale the name service horizontally. These namenodes are configured to share...

Understanding the secondary namenode UI

The secondary namenode is a checkpoint service for the namenode daemon that performs periodic merging of the edits log and the fsimage file. The secondary namenode UI can be accessed using the following URL:

http://<secondary-namenode-server>:50090/

The following screenshot shows the secondary namenode UI:

Understanding the secondary namenode UI

Just like the namenode UI, the secondary namenode UI also displays the Hadoop version. All checkpoint related information is available in this UI, which are given as follows:

  • Name Node Address: This is the RPC address of the primary namenode daemon. Secondary namenode uses this address to connect to primary namenode.
  • Start Time: This is the start timestamp of the secondary namenode service.
  • Last Checkpoint Time: This the timestamp of the last checkpoint action performed by the secondary namenode daemon.
  • Checkpoint Period: This property defines the schedule to perform the checkpoint. In the preceding screenshot, the value is 3,600 seconds. This...

Exploring HDFS commands

To perform filesystem related tasks, the commands begin with hdfs dfs. The filesystem commands have been designed to behave similarly to the corresponding Unix/Linux filesystem commands.

What is a URI? URI stands for Uniform Resource Identifier. In the commands that are listed as follows, you will observe the use of URI for file locations. The URI syntax to access a file in HDFS is hdfs://namenodehost/parent/child/<file>.

Commonly used HDFS commands

The following are some of the most commonly used HDFS commands:

  • ls: This command lists files in HDFS.

    The syntax of the ls command is hdfs dfs -ls <args>. The following is the screenshot showing an example of the ls command:

    Commonly used HDFS commands
  • cat: This command displays the contents of file/files in the terminal.

    The syntax of the cat command is hdfs dfs -cat URI [URI …]. The following is a sample output of the cat command:

    Commonly used HDFS commands
  • copyFromLocal: This command copies a file/files from the local filesystem to HDFS.

    The syntax of the copyFromLocal...

Essentials of HDFS


HDFS is a distributed filesystem that has been designed to run on top of a cluster of industry standard hardware. The architecture of HDFS is such that there is no specific need for high-end hardware. HDFS is a highly fault-tolerant system and can handle failures of nodes in a cluster without loss of data. The primary goal behind the design of HDFS is to serve large data files efficiently. HDFS achieves this efficiency and high throughput in data transfer by enabling streaming access to the data in the filesystem.

The following are the important features of HDFS:

  • Fault tolerance: Many computers working together as a cluster are bound to have hardware failures. Hardware failures such as disk failures, network connectivity issues, and RAM failures could disrupt processing and cause major downtime. This could lead to data loss as well slippage of critical SLAs. HDFS is designed to withstand such hardware failures by detecting faults and taking recovery actions as required...

The read/write operational flow in HDFS


To get a better understanding of HDFS, we need to understand the flow of operations for the following two scenarios:

  • A file is written to HDFS

  • A file is read from HDFS

HDFS uses a single-write, multiple-read model, where the files are written once and read several times. The data cannot be altered once written. However, data can be appended to the file by reopening it. All files in the HDFS are saved as data blocks.

Writing files in HDFS

The following sequence of steps occur when a client tries to write a file to HDFS:

  1. The client informs the namenode daemon that it wants to write a file. The namenode daemon checks to see whether the file already exists.

  2. If it exists, an appropriate message is sent back to the client. If it does not exist, the namenode daemon makes a metadata entry for the new file.

  3. The file to be written is split into data packets at the client end and a data queue is built. The packets in the queue are then streamed to the datanodes in the...

Left arrow icon Right arrow icon
Download code icon Download Code

Description

An easy-to-follow Apache Hadoop administrator’s guide filled with practical screenshots and explanations for each step and configuration. This book is great for administrators interested in setting up and managing a large Hadoop cluster. If you are an administrator, or want to be an administrator, and you are ready to build and maintain a production-level cluster running CDH5, then this book is for you.

What you will learn

  • Understand the Apache Hadoop architecture and the future of distributed processing frameworks
  • Use HDFS and MapReduce for all filerelated operations
  • Install and configure CDH to bring up an Apache Hadoop cluster
  • Configure HDFS High Availability and HDFS Federation to prevent single points of failure
  • Install and configure Cloudera Manager to perform administrator operations
  • Implement security by installing and configuring Kerberos for all services in the cluster
  • Add, remove, and rebalance nodes in a cluster using cluster management tools
  • Understand and configure the different backup options to back up your HDFS

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 18, 2014
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781783558971
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want

Product Details

Publication date : Jul 18, 2014
Length: 254 pages
Edition : 1st
Language : English
ISBN-13 : 9781783558971
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 116.97
Optimizing Hadoop for MapReduce
€28.99
Mastering Hadoop
€41.99
Cloudera Administration Handbook
€45.99
Total 116.97 Stars icon

Table of Contents

10 Chapters
1. Getting Started with Apache Hadoop Chevron down icon Chevron up icon
2. HDFS and MapReduce Chevron down icon Chevron up icon
3. Cloudera's Distribution Including Apache Hadoop Chevron down icon Chevron up icon
4. Exploring HDFS Federation and Its High Availability Chevron down icon Chevron up icon
5. Using Cloudera Manager Chevron down icon Chevron up icon
6. Implementing Security Using Kerberos Chevron down icon Chevron up icon
7. Managing an Apache Hadoop Cluster Chevron down icon Chevron up icon
8. Cluster Monitoring Using Events and Alerts Chevron down icon Chevron up icon
9. Configuring Backups Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Most Recent
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.5
(10 Ratings)
5 star 20%
4 star 50%
3 star 10%
2 star 0%
1 star 20%
Filter icon Filter
Most Recent

Filter reviews by




SC Dec 18, 2019
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Basic information - no insight and non advanced topics.
Amazon Verified review Amazon
Amazon Customer Dec 01, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
The book describes most of the procedures needed for a cluster manager/DBA to install and maintain a CDH5 cluster.However, it gives the detailed steps for how to do things with Cloudera manager, without getting any deeper and trying to explain what happens behind the scenes.If you're already familiar with Hadoop internals and want a quick reference about maintaining CDH5 cluster then this book is for you. If you want to really learn about Hadoop and how it works then you should search somewhere else.
Amazon Verified review Amazon
Sketch Nov 07, 2015
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
While it is pretty good at the bulk of the Cloudera management suite, it does miss the mark on some key factors - specifically Kerberos. Granted, official Cloudera documentation is woefully inadequate, this book only brings up other issues with nothing to bridge the two. It gives simple instructions which are accurate (i.e. Hive, etc...), however it gives no detail as to how the given service works - which may not be the point of the book, but it would help.
Amazon Verified review Amazon
SA Jan 15, 2015
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Not really a deep in to subject.. you better of reading cloudera manual. that is what this is basically.
Amazon Verified review Amazon
Ganapathy Kokkeshwara Oct 09, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a must read book for anyone who is in the process of learning the administration of Cloudera distribution of hadoop. Other than learning, the book can also be used for reference. In the first 2 chapters , the author talks about Apache Hadoop, its various components, HDFS and Mapreduce. These chapters provides a very informative introduction to Apache Hadoop and the ecosystem associated with it. These chapters are useful for anyone interested in learning hadoop technology let alone for Cloudera administrators.In the 3rd chapter author talks about Cloudera distribution of Apache Hadoop and the other components that are distributed with Cloudera Hadoop Distribution ( CDH) such as Flume ,Sqoop, Pig, Hive, Zookeeper etc. The components are explained in simple terms that can be understood by most of the technical persons. I liked the 'screenshots' of the UI for each of the components that made it little bit easier to understand and comprehend. This chapter also covers the installation of CDH and the various components. I liked the fact that author covers the installation from Cloudera Manager as well as from Operating System’s package manager , thus providing more options for the administrator.Rest of the chapters cover administrating the high availability , implementing security using Kerberos , managing cluster and monitoring. Chapter 9 talks about backing up the Hadoop cluster. I liked the fact that author took time to explain the various types of backup and storage media for backups before actually getting into technical nitty-gritty of back up of big data.Throughout the book , author also writes briefly about the impact on administering the CDH when deployed on cloud and provides the relevant web links for further reference.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.