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! 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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Learning YARN
Learning YARN

Learning YARN: Moving beyond MapReduce - learn resource management and big data processing using YARN

Arrow left icon
Profile Icon Akhil Arora Profile Icon Shrey Mehrotra
Arrow right icon
₹800 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (2 Ratings)
Paperback Aug 2015 278 pages 1st Edition
eBook
₹799 ₹2919.99
Paperback
₹3649.99
Subscription
Free Trial
Renews at ₹800p/m
Arrow left icon
Profile Icon Akhil Arora Profile Icon Shrey Mehrotra
Arrow right icon
₹800 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (2 Ratings)
Paperback Aug 2015 278 pages 1st Edition
eBook
₹799 ₹2919.99
Paperback
₹3649.99
Subscription
Free Trial
Renews at ₹800p/m
eBook
₹799 ₹2919.99
Paperback
₹3649.99
Subscription
Free Trial
Renews at ₹800p/m

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Learning YARN

Chapter 2. Setting up a Hadoop-YARN Cluster

YARN is a subproject of Apache Hadoop at the Apache Software Foundation, introduced in the Hadoop 2.0 version. YARN replaces the old MapReduce framework of the Hadoop 1.x version and is shipped with the Hadoop 2.x bundle. This chapter will provide a step-by-step guide for Hadoop-YARN users to install and configure YARN with Hadoop.

A Hadoop-YARN cluster can be configured as a single node as well as a multi-node cluster. This chapter covers both types of installations along with the troubleshooting guidelines. This chapter helps YARN beginners and the cluster administrators easily configure Hadoop-YARN clusters and understand how YARN components interact with each other.

Apache, Hortonworks, and Cloudera are the main distributors of Hadoop. These vendors have their own steps to install and configure Hadoop-YARN clusters. This chapter uses the Apache tar.gz bundles for setting up Hadoop-YARN clusters and gives an overview of Hortonworks...

Starting with the basics

The Apache Hadoop 2.x version consists of three key components:

  • Hadoop Distributed File System (HDFS)
  • Yet Another Resource Negotiator (YARN)
  • The MapReduce API (Job execution, MRApplicationMaster, JobHistoryServer, and so on)

There are two master processes that manage the Hadoop 2.x cluster—the NameNode and the ResourceManager. All the slave nodes in the cluster have DataNode and NodeManager processes running as the worker daemons for the cluster. The NameNode and DataNode daemons are part of HDFS, whereas the ResourceManager and NodeManager belong to YARN.

When we configure Hadoop-YARN on a single node, we need to have all four processes running on the same system. Hadoop single node installation is generally used for learning purposes. If you are a beginner and need to understand the Hadoop-YARN concepts, you can use a single node Hadoop-YARN cluster.

In the production environment, a multi-node cluster is used. It is recommended to have separate nodes for NameNode...

The Hadoop-YARN single node installation

In a single node installation, all the Hadoop-YARN daemons (NameNode, ResourceManager, DataNode, and NodeManager) run on a single node as separate Java processes. You will need only one Linux machine with a minimum of 2 GB RAM and 15 GB free disk space.

Prerequisites

Before starting with the installation steps, make sure that you prepare the node as specified in the above topic.

  • The hostname used in the single node installation is localhost with 127.0.0.1 as the IP address. It is known as the loopback address for a machine. You need to make sure that the /etc/hosts file contains the resolution for the loopback address. The loopback entry will look like this:
    127.0.0.1    localhost
    
  • The passwordless SSH is configured for localhost. To ensure this, execute the following command:
    ssh-copy-id localhost
    

Installation steps

After preparing your node for Hadoop, you need to follow a simple five-step process to install and run Hadoop on your Linux machine.

Installation steps

Step 1...

An overview of web user interfaces

Similar to web interfaces available in the Hadoop 1.x version, the Hadoop 2.x version has web user interfaces for Hadoop services. Instead of the JobTracker service web UI, the web UI for ResourceManager is used to monitor applications and resources. A detailed explanation regarding the configurations related to the web UI's is given in the next chapter.

The following screenshot refers to the web-interface of Hadoop HDFS. Through the HDFS interface, you can:

  • Explore the HDFS metrics
  • View the list of DataNodes connected to the NameNode
  • Browse the file system, and so on
An overview of web user interfaces

The following screenshot refers to the web-interface of YARN ResourceManager. It shows:

  • A summarized view of the cluster resource capabilities
  • A list of applications related to the cluster
  • A list of NodeManager nodes connected
  • The scheduler details, and so on
An overview of web user interfaces

You can refer to the .pid files for the Hadoop daemons that are created in the /tmp folder of your node. These files contain the current...

The Hadoop-YARN multi-node installation

Installing a multi-node Hadoop-YARN cluster is similar to a single node installation. You need to configure the master node, the same as you did during the single node installation. Then, copy the Hadoop installation directory to all the slave nodes and set the Hadoop environment variables for the slave nodes. You can start the Hadoop daemons either directly from the master node, or you can login to each node to run their respective services.

Prerequisites

Before starting with the installation steps, make sure that you prepare all the nodes as specified here:

  • All the nodes in the cluster have a unique hostname and IP address. Each node should be able to identify all other nodes through the hostname. If you are not using the DHCP server, you need to make sure that the /etc/hosts file contains the resolution for all nodes used in the cluster. The entries will look similar to the following:
    192.168.56.101    master
    192.168.56.102    slave1
    192.168.56.103...

An overview of the Hortonworks and Cloudera installations

Hortonworks and Cloudera are two main distributors of Hadoop. These distributors have their own style of installation. The installation is done as a package installation through yum (CentOS) or apt-get (Ubuntu). The directory structure is different for configuration files, log files, .pid files, and so on.

Both these distributors have developed tools to provision, manage, and monitor the Hadoop clusters through a web UI. Cloudera Manager from Cloudera and Apache Ambari are being used by a majority of the companies. Ambari is an open source project that lacks features such as rolling upgrades, managements of third-party libraries, and so on. Cloudera Manager is a mature product and is available in both Express and Enterprise versions.

To read more about Cloudera Manager and Ambari, you can refer to the official website at http://www.cloudera.com/content/cloudera/en/products-and-services/cloudera-enterprise/cloudera-manager.html.

http...

Starting with the basics


The Apache Hadoop 2.x version consists of three key components:

  • Hadoop Distributed File System (HDFS)

  • Yet Another Resource Negotiator (YARN)

  • The MapReduce API (Job execution, MRApplicationMaster, JobHistoryServer, and so on)

There are two master processes that manage the Hadoop 2.x cluster—the NameNode and the ResourceManager. All the slave nodes in the cluster have DataNode and NodeManager processes running as the worker daemons for the cluster. The NameNode and DataNode daemons are part of HDFS, whereas the ResourceManager and NodeManager belong to YARN.

When we configure Hadoop-YARN on a single node, we need to have all four processes running on the same system. Hadoop single node installation is generally used for learning purposes. If you are a beginner and need to understand the Hadoop-YARN concepts, you can use a single node Hadoop-YARN cluster.

In the production environment, a multi-node cluster is used. It is recommended to have separate nodes for NameNode and...

Left arrow icon Right arrow icon

Description

Today enterprises generate huge volumes of data. In order to provide effective services and to make smarter and more intelligent decisions from these huge volumes of data, enterprises use big-data analytics. In recent years, Hadoop has been used for massive data storage and efficient distributed processing of data. The Yet Another Resource Negotiator (YARN) framework solves the design problems related to resource management faced by the Hadoop 1.x framework by providing a more scalable, efficient, flexible, and highly available resource management framework for distributed data processing. This book starts with an overview of the YARN features and explains how YARN provides a business solution for growing big data needs. You will learn to provision and manage single, as well as multi-node, Hadoop-YARN clusters in the easiest way. You will walk through the YARN administration, life cycle management, application execution, REST APIs, schedulers, security framework and so on. You will gain insights about the YARN components and features such as ResourceManager, NodeManager, ApplicationMaster, Container, Timeline Server, High Availability, Resource Localisation and so on. The book explains Hadoop-YARN commands and the configurations of components and explores topics such as High Availability, Resource Localization and Log aggregation. You will then be ready to develop your own ApplicationMaster and execute it over a Hadoop-YARN cluster. Towards the end of the book, you will learn about the security architecture and integration of YARN with big data technologies like Spark and Storm. This book promises conceptual as well as practical knowledge of resource management using YARN.

Who is this book for?

This book is intended for those who want to understand what YARN is and how to efficiently use it for the resource management of large clusters. For cluster administrators, this book gives a detailed explanation of provisioning and managing YARN clusters. If you are a Java developer or an open source contributor, this book will help you to drill down the YARN architecture, write your own YARN applications and understand the application execution phases. This book will also help big data engineers explore YARN integration with real-time analytics technologies such as Spark and Storm.

What you will learn

  • Explore YARN features and offerings
  • Manage big data clusters efficiently using the YARN framework
  • Create single as well as multinode HadoopYARN clusters on Linux machines
  • Understand YARN components and their administration
  • Gain insights into application execution flow over a YARN cluster
  • Write your own distributed application and execute it over YARN cluster
  • Work with schedulers and queues for efficient scheduling of applications
  • Integrate big data projects like Spark and Storm with YARN

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Aug 28, 2015
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781784393960
Vendor :
Apache
Category :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. ₹800 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Aug 28, 2015
Length: 278 pages
Edition : 1st
Language : English
ISBN-13 : 9781784393960
Vendor :
Apache
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
₹800 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
₹4500 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 ₹400 each
Feature tick icon Exclusive print discounts
₹5000 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 ₹400 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 11,843.97
Learning Docker
₹4096.99
Learning Hadoop 2
₹4096.99
Learning YARN
₹3649.99
Total 11,843.97 Stars icon
Banner background image

Table of Contents

13 Chapters
1. Starting with YARN Basics Chevron down icon Chevron up icon
2. Setting up a Hadoop-YARN Cluster Chevron down icon Chevron up icon
3. Administering a Hadoop-YARN Cluster Chevron down icon Chevron up icon
4. Executing Applications Using YARN Chevron down icon Chevron up icon
5. Understanding YARN Life Cycle Management Chevron down icon Chevron up icon
6. Migrating from MRv1 to MRv2 Chevron down icon Chevron up icon
7. Writing Your Own YARN Applications Chevron down icon Chevron up icon
8. Dive Deep into YARN Components Chevron down icon Chevron up icon
9. Exploring YARN REST Services Chevron down icon Chevron up icon
10. Scheduling YARN Applications Chevron down icon Chevron up icon
11. Enabling Security in YARN Chevron down icon Chevron up icon
12. Real-time Data Analytics Using YARN Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(2 Ratings)
5 star 50%
4 star 0%
3 star 50%
2 star 0%
1 star 0%
Xiao Zhang Sep 16, 2015
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I'm one of the technical reviewers of this book. The book is written in a very simple language and very easy to understand. Even you do not know anything about Big Data, Hadoop and Yarn, you will find this book very easy to follow and you will be surprised how much you can learn after reading the book. This book also has very rich content of technical details and sample code. It is very useful for technical practitioners who want to write their own YARN applications. It also has the latest information on YARN integration with Spark and Storm for real-time analytics.This book goes great with another YARN book I reviewed – YARN Essentials . Compared to YARN Essentials, this book has more hands on technical details. But the author did a very good job of explaining the concepts at the beginning of each chapter before going into technical details. You will have a comprehensive understanding of the YARN architecture and also be able to do hands on develop&admin work.I am specifically enjoy the chapter related to YARN integration with Spark and Storm. Hadoop is known for its batch processing power. With the new features such as YARN, Spark, Storm available in Hadoop 2.0, we will be able to solve our challenges related to real-time analytics, which is critical for businesses to be successful in this Big Data era.I'm happy having gotten the opportunity to work on this book and I'm very well pleased with the result. I believe this book is a great asset to any people who are interested in YARN!
Amazon Verified review Amazon
K Hu Mar 08, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
This book is simplified version of online doc. It is a thin book and took me 2 days to read through it, definitely doesn't worth 50+ bucks. 0 depth.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.