Book Image

Apache Hive Essentials

By : Dayong Du
Book Image

Apache Hive Essentials

By: Dayong Du

Overview of this book

Table of Contents (17 chapters)
Apache Hive Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

With an increasing interest in big data analysis, Hive over Hadoop becomes a cutting-edge data solution for storing, computing, and analyzing big data. The SQL-like syntax makes Hive easier to learn and popularly accepted as a standard for interactive SQL queries over big data. The variety of features available within Hive provides us with the capability of doing complex big data analysis without advanced coding skills. The maturity of Hive lets it gradually merge and share its valuable architecture and functionalities across different computing frameworks beyond Hadoop.

Apache Hive Essentials prepares your journey to big data by covering the introduction of backgrounds and concepts in the big data domain along with the process of setting up and getting familiar with your Hive working environment in the first two chapters. In the next four chapters, the book guides you through discovering and transforming the value behind big data by examples and skills of Hive query languages. In the last four chapters, the book highlights well-selected and advanced topics, such as performance, security, and extensions as exciting adventures for this worthwhile big data journey.

What this book covers

Chapter 1, Overview of Big Data and Hive, introduces the evolution of big data, the Hadoop ecosystem, and Hive. You will also learn the Hive architecture and the advantages of using Hive in big data analysis.

Chapter 2, Setting Up the Hive Environment, describes the Hive environment setup and configuration. It also covers using Hive through the command line and development tools.

Chapter 3, Data Definition and Description, introduces the basic data types and data definition language for tables, partitions, buckets, and views in Hive.

Chapter 4, Data Selection and Scope, shows you ways to discover the data by querying, linking, and scoping the data in Hive.

Chapter 5, Data Manipulation, describes the process of exchanging, moving, sorting, and transforming the data in Hive.

Chapter 6, Data Aggregation and Sampling, explains how to do aggregation and sample using aggregation functions, analytic functions, windowing, and sample clauses.

Chapter 7, Performance Considerations, introduces the best practices of performance considerations in the aspects of design, file format, compression, storage, query, and job.

Chapter 8, Extensibility Considerations, describes how to extend Hive by creating user-defined functions, streaming, serializers, and deserializers.

Chapter 9, Security Considerations, introduces the area of Hive security in terms of authentication, authorization, and encryption.

Chapter 10, Working with Other Tools, discusses how Hive works with other big data tools. It also reviews the key milestones of Hive releases.

What you need for this book

You will need to install both Hadoop and Hive to run the examples in this book. The scripts in this book were written and tested with Cloudera Distributed Hadoop (CDH) v5.3 (contains Hive v0.13.x and Hadoop v2.5.0), Hortonworks Data Platform (HDP) v2.2 (contains Hive v0.14.0 and Hadoop v2.6.0), and Apache Hive 1.0.0 (with Hadoop 1.2.1) in pseudo-distributed mode. However, the majority of the scripts will also run on the previous versions of Hadoop and Hive. The following are the other software applications you may need for a better understanding of the Hive-related tools mentioned in the book. These tools are also available in the CDH or HDP packages.

  • Hue 2.2.0 and above

  • HBase 0.98.4

  • Oozie 4.0.0 and above

  • Zookeeper 3.4.5

  • Tez 0.6.0

Who this book is for

If you are a data analyst, developer, and user who wants to use Hive to explore and analyze data in Hadoop, this is the book for you. Whether you are new to big data or an expert, you will be able to master both the basic and the advanced features of Hive. Since Hive is an SQL-like language, some previous experience with the SQL language and database is useful to have a better understanding of this book.

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: "Aggregate function can be used with other aggregate functions in the same select statement."

A block of code is set as follows:

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:mysql://myhost:3306/hive?createDatabase IfNotExist=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

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

customAuthenticator.java
package com.packtpub.hive.essentials.hiveudf;

import java.util.Hashtable;
import javax.security.sasl.AuthenticationException;
import org.apache.hive.service.auth.PasswdAuthenticationProvider;

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

bash-4.1$ hdfs dfs –mkdir /tmp

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: "Click on the OK button and restart Oracle SQL Developer."

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.

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.