Search icon CANCEL
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
$36.99
Paperback
$60.99
Subscription
Free Trial
Renews at $19.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
$19.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
$199.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
$279.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 $ 154.97
Optimizing Hadoop for MapReduce
$38.99
Mastering Hadoop
$54.99
Cloudera Administration Handbook
$60.99
Total $ 154.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

Top Reviews
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
Top Reviews

Filter reviews by




william El Kaim Sep 22, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The Cloudera Administration Handbook written by Rohit Menon is a fantastic resource for anybody wanting to understand and manage a Cloudera platform.I have to admit that I’m a rookie and that this book was exactly what I was dreaming of. Having all information in the same place, and code example both for Linux and Windows.The book is mainly targeted at bid data expert and system administrator. The first three chapters are giving the minimum background to understand MapReduce, Hadoop and Yarn and the Cloudera's Distribution Including Apache Hadoop (all services are listed and explained).Then, you enter into the “hard part”. Chapter 4 discussing in details HDFS Federation and Its High Availability and chapter 7 describing “Managing an Apache Hadoop Cluster” were for me particularly valuable. The chapter 5 presenting Cloudera Manager, a web-browser-based administration tool to manage Apache Hadoop clusters, will show you how to manage the clusters with point and clicks instead of command lines. Chapter 6 is about configuring access and right using the Kerberos services. It does show you how to implement the security services, but not how to manage user rights, which is a step requiring some planning. Monitoring and backup (using the Hadoop utility DistCp and the Cloudera manager). are also presented in two distinct parts.What I like in this book is that it goes directly to the point, assuming you already know the basics of system administration and distributed architecture. It then shares many “tips” that only an experienced professional will know, and enables the rookie I was to avoid mistakes. With this book, you will gain time. For example, the author told you when a SPOF (single point of failure) exist and the solutions to avoid them.The only part of the book that was missing for me was the cloud deployment. I would have liked a chapter explaining how to setup Cloudera in the cloud, and get the code (puppet or chef) to automate the install.It is clearly a worth buying book for people wanting to setup and deploy correctly a Cloudera platform. I also like the fact that for the same price you can download the PDF, mobi, epub and kindle version.
Amazon Verified review Amazon
A. Zubarev Sep 25, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Cloudera Administration Handbook is just another great what I call 'desk companion' book, especially a must for a beginner Cloudera Administrator.Written in a well balanced volume of material to feature coverage ratio, by a person from "the trenches" Rohit expands exactly on what a Hadoop Admin needs and should be using in retrospect to the Cloudera offerings in this area of expertize to successfully accomplish ones day-to-day tasks.However, it is actually a lot more than just an admin's book, it also teaches how to install most of the Cloudera Hadoop ecosystem components, what components are typically in use by what in a business and how to configure each. That all is done in a thorough, precise and professional manner without any extra fuss or foofaraw.I liked that the author expanded briefly, but nicely on the new features in Hadoop 2.0. For me the coverage on Map-Reduce appeared the most valuable. I admit it is a rough area of Hadoop.The troubleshooting part must be the one to read on and re-read, but also high availability, backup, balancing, and security. Especially the Kerberos setup, I deem it a very necessary, yet rarely covered topic, that also appears very hard to understand, may be at least to me, but it was worth going through that very much. Overall, as an aside, CDH distribution is very extensive and feature rich no wonder a whole book can be dedicated to just this topic. The Cloudera Manager now after reading the book I must say is an awesome tool to have on board, it is just a great helper, but it requires a good book as Cloudera Administration Handbook by Rohit Menon to get acquitted with.Have it beside you, at your desk.
Amazon Verified review Amazon
Robert Rapplean Sep 12, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book provides an excellent overview of how to use the Cloudera Manager to build and maintain an industrial Hadoop cluster. I think its best audience is either someone who is already familiar with Hadoop and will need to start managing a Cloudera cluster, or someone who will mostly just be interacting with the Cloudera Manager interface while a primary system administrator handles the more complicated issues that revolve around unpredictable variations. It starts off with a relatively watered-down overview of the concepts behind Hadoop, but around Chapter 5 it really picks up and provides a great description of how to build and manage your cluster. The techniques provided in this book make use of Cloudera Manager wherever possible, as this is the preferred method of setting up and maintaining a Cloudera Hadoop cluster.One of the strongest points is that it contributes to the amount of published knowledge around Hadoop 2, which has been slow to catch up with the release of the technology.There are a few shortcomings that prevent me from giving it a full five stars. Since it focuses on the Cloudera Manager, it could leave a fledgeling admin in a bad place if things aren't all lined up just right. The education base of the target audience is a little narrow since its tone is aimed at informing, not teaching, so it excludes those who are not familiar with system administration and general. In the other direction, it doesn't provide the in-depth, "under the hood" details that heavy-weight system administrators enjoy wading through (but which would require a much thicker book).
Amazon Verified review Amazon
Si Dunn Sep 17, 2014
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This is a well-organized, well-written and solidly illustrated guide to building and maintaining large Apache Hadoop clusters using Cloudera Manager and CDH5. You can't get everything you need to know in one book, no matter how big it is. And I would have preferred seeing a bit more information about the Cloudera Manager nearer to the front (while not giving up the learn-to-use-the-command-line-first approach). But this book definitely can get you going, and it can show you a lot of what you will need to know as an administrator of Hadoop clusters. I have read and used a few other Hadoop how-to books in recent years. This one will be a keeper. (Thanks to Packt Publishing for providing a review copy).
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.