Book Image

Elasticsearch for Hadoop

By : Vishal Shukla
Book Image

Elasticsearch for Hadoop

By: Vishal Shukla

Overview of this book

Table of Contents (15 chapters)
Elasticsearch for Hadoop
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

The core components of Hadoop have been around from 2004-2006 as MapReduce. Hadoop's ability to scale and process data in a distributed manner has resulted in its broad acceptance across industries. Very large organizations are able to realize the value that Hadoop brings in: crunching terabytes and petabytes of data, ingesting social data, and utilizing commodity hardware to store huge volume of data. However, big data solutions must fulfill its appetite for the speed, especially when you query across unstructured data.

This book will introduce you to Elasticsearch, a powerful distributed search and analytics engine, which can make sense of your massive data in real time. Its rich querying capabilities can help in performing complex full-text search, geospatial analysis, and detect anomalies in your data. Elasticsearch-Hadoop, also widely known as ES-Hadoop, is a two-way connector between Elasticsearch and Hadoop. It opens the doors to flow your data easily to and from the Hadoop ecosystem and Elasticsearch. It can flow the streaming data from Apache Storm or Apache Spark to Elasticsearch and let you analyze it in real time.

The aim of the book is to give you practical skills on how you can harness the power of Elasticsearch and Hadoop. I will walk you through the step-by-step process of how to discover your data and find interesting insights out of massive amount of data. You will learn how to integrate Elasticsearch seamlessly with Hadoop ecosystem tools, such as Pig, Hive, Cascading, Apache Storm, and Apache Spark. This book will enable you to use Elasticsearch to build your own analytics dashboard. It will also enable you to use powerful analytics and the visualization platform, Kibana, to give different shapes, size, and colors to your data.

I have chosen interesting datasets to give you the real-world data exploration experience. So, you can quickly use these tools and techniques to build your domain-specific solutions. I hope that reading this book turns out to be fun and a great learning experience for you.

What this book covers

Chapter 1, Setting Up Environment, serves as a step-by-step guide to set up your environment, including Java, Hadoop, Elasticsearch, and useful plugins. Test the environment setup by running a WordCount job to import the results to Elasticsearch.

Chapter 2, Getting Started With ES-Hadoop, walks you through how the WordCount job was developed. We will take a look at the real-world problem to solve it better by introducing Elasticsearch to the Hadoop ecosystem.

Chapter 3, Understanding Elasticsearch, provides you detailed understanding on how to use Elasticsearch for full text search and analytics. With practical examples, you will learn indexing, search, and aggregation APIs.

Chapter 4, Visualizing Big Data Using Kibana, introduces Kibana with real-world examples to show how you can give different shapes and colors to your big data. It demonstrates how to discover your data and visualize it in dynamic dashboards.

Chapter 5, Real-Time Analytics, shows how Elasticsearch and Apache Storm can solve your real-time analytics requirements by classifying and streaming tweets data. We will see how to harness Elasticsearch to solve the data mining problem of anomaly detection.

Chapter 6, ES-Hadoop In Production, explains how Elasticsearch and the ES-Hadoop library works in distributed deployments and how to make the best out of it for your needs. It provides you practical skills to tweak configurations for your specific deployment needs. We will have a configuration checklist for production and skills to administer the cluster.

Chapter 7, Integrating with the Hadoop Ecosystem, takes practical examples to show how you can integrate Elasticsearch with Hadoop ecosystem technologies, such as Pig, Hive, Cascading, and Apache Spark.

Appendix, Configurations, contains a list of configuration options for any of the Hadoop ecosystem integrations.

What you need for this book

A major part of the book is focused on practical examples. You can get the maximum out of this book by actually trying out the examples in this book. Throughout the book, you will have specific instructions on how to set up the software and tools required whenever it is needed.

A Linux-based physical or virtualized machine is all you need to for this book. All instructions and examples of the book are tested for the Ubuntu 14.04 distribution. However, these examples should run fine on other Linux flavors and operating systems as well with relevant changes in OS-specific commands. For Windows users, the easiest way would be to set up Ubuntu VM with virtualization tools (such as VirtualBox or VMware).

Who this book is for

This book is targeted at Java developers who have a basic knowledge of Hadoop. No prior Elasticsearch experience is expected.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "We can include other contexts through the use of the include directive."

A block of code is set as follows:

{
  "properties": {
    "skills": {
      "type": "string",
      "analyzer": "simple"
    }
  }
}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

        StatusListener listener = new StatusListener() {
        public void onStatus(Status status) {
                queue.offer(status);
            }
        … 
    …

Any command-line input or output is written as follows:

SELECT c.city, s.skill, avg(c.experience)

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/8999OS_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.