Book description
Need to move a relational database application to Hadoop? This comprehensive guide introduces you to Apache Hive, Hadoop’s data warehouse infrastructure. You’ll quickly learn how to use Hive’s SQL dialect—HiveQL—to summarize, query, and analyze large datasets stored in Hadoop’s distributed filesystem.
This example-driven guide shows you how to set up and configure Hive in your environment, provides a detailed overview of Hadoop and MapReduce, and demonstrates how Hive works within the Hadoop ecosystem. You’ll also find real-world case studies that describe how companies have used Hive to solve unique problems involving petabytes of data.
- Use Hive to create, alter, and drop databases, tables, views, functions, and indexes
- Customize data formats and storage options, from files to external databases
- Load and extract data from tables—and use queries, grouping, filtering, joining, and other conventional query methods
- Gain best practices for creating user defined functions (UDFs)
- Learn Hive patterns you should use and anti-patterns you should avoid
- Integrate Hive with other data processing programs
- Use storage handlers for NoSQL databases and other datastores
- Learn the pros and cons of running Hive on Amazon’s Elastic MapReduce
Table of contents
- Programming Hive
- Preface
- 1. Introduction
- 2. Getting Started
- 3. Data Types and File Formats
- 4. HiveQL: Data Definition
- 5. HiveQL: Data Manipulation
-
6. HiveQL: Queries
- SELECT … FROM Clauses
- WHERE Clauses
- GROUP BY Clauses
- JOIN Statements
- ORDER BY and SORT BY
- DISTRIBUTE BY with SORT BY
- CLUSTER BY
- Casting
- Queries that Sample Data
- UNION ALL
- 7. HiveQL: Views
- 8. HiveQL: Indexes
- 9. Schema Design
- 10. Tuning
- 11. Other File Formats and Compression
- 12. Developing
-
13. Functions
- Discovering and Describing Functions
- Calling Functions
- Standard Functions
- Aggregate Functions
- Table Generating Functions
- A UDF for Finding a Zodiac Sign from a Day
- UDF Versus GenericUDF
- Permanent Functions
- User-Defined Aggregate Functions
- User-Defined Table Generating Functions
- Accessing the Distributed Cache from a UDF
- Annotations for Use with Functions
- Macros
- 14. Streaming
- 15. Customizing Hive File and Record Formats
- 16. Hive Thrift Service
- 17. Storage Handlers and NoSQL
- 18. Security
- 19. Locking
- 20. Hive Integration with Oozie
-
21. Hive and Amazon Web Services (AWS)
- Why Elastic MapReduce?
- Instances
- Before You Start
- Managing Your EMR Hive Cluster
- Thrift Server on EMR Hive
- Instance Groups on EMR
- Configuring Your EMR Cluster
- Persistence and the Metastore on EMR
- HDFS and S3 on EMR Cluster
- Putting Resources, Configs, and Bootstrap Scripts on S3
- Logs on S3
- Spot Instances
- Security Groups
- EMR Versus EC2 and Apache Hive
- Wrapping Up
- 22. HCatalog
- 23. Case Studies
- Glossary
- A. References
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Programming Hive
- Author(s):
- Release date: September 2012
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449326975
You might also like
book
The Enterprise Data Catalog
Combing the web is simple, but how do you search for data at work? It's difficult …
book
SQL for Data Analysis
With the explosion of data, computing power, and cloud data warehouses, SQL has become an even …
book
Designing Machine Learning Systems
Machine learning systems are both complex and unique. Complex because they consist of many different components …
book
Hadoop: The Definitive Guide, 3rd Edition
Ready to unlock the power of your data? With this comprehensive guide, you’ll learn how to …