Hortonworks Data Platform Data Access (November 30, 2016)
Total Page:16
File Type:pdf, Size:1020Kb
Hortonworks Data Platform Data Access (November 30, 2016) docs.cloudera.com Hortonworks Data Platform November 30, 2016 Hortonworks Data Platform: Data Access Copyright © 2012-2016 Hortonworks, Inc. Some rights reserved. The Hortonworks Data Platform, powered by Apache Hadoop, is a massively scalable and 100% open source platform for storing, processing and analyzing large volumes of data. It is designed to deal with data from many sources and formats in a very quick, easy and cost-effective manner. The Hortonworks Data Platform consists of the essential set of Apache Hadoop projects including YARN, Hadoop Distributed File System (HDFS), HCatalog, Pig, Hive, HBase, ZooKeeper and Ambari. Hortonworks is the major contributor of code and patches to many of these projects. These projects have been integrated and tested as part of the Hortonworks Data Platform release process and installation and configuration tools have also been included. Unlike other providers of platforms built using Apache Hadoop, Hortonworks contributes 100% of our code back to the Apache Software Foundation. The Hortonworks Data Platform is Apache-licensed and completely open source. We sell only expert technical support, training and partner-enablement services. All of our technology is, and will remain, free and open source. Please visit the Hortonworks Data Platform page for more information on Hortonworks technology. For more information on Hortonworks services, please visit either the Support or Training page. Feel free to Contact Us directly to discuss your specific needs. Except where otherwise noted, this document is licensed under Creative Commons Attribution ShareAlike 4.0 License. http://creativecommons.org/licenses/by-sa/4.0/legalcode ii Hortonworks Data Platform November 30, 2016 Table of Contents 1. What's New ................................................................................................................. 1 1.1. Apache Hive ...................................................................................................... 1 1.2. Apache HBase ................................................................................................... 2 1.3. Apache Phoenix ................................................................................................ 2 1.4. Content Updates ............................................................................................... 3 2. Data Warehousing with Apache Hive ........................................................................... 4 2.1. Content Roadmap ............................................................................................. 4 2.2. Features Overview ............................................................................................ 6 2.2.1. Temporary Tables ................................................................................... 6 2.2.2. Optimized Row Columnar (ORC) Format ................................................ 7 2.2.3. SQL Optimization ................................................................................... 7 2.2.4. SQL Compliance ................................................................................... 10 2.2.5. Streaming Data Ingestion ..................................................................... 21 2.2.6. Query Vectorization ............................................................................. 21 2.2.7. Beeline versus Hive CLI ......................................................................... 23 2.2.8. Hive JDBC and ODBC Drivers ................................................................ 26 2.3. Moving Data into Apache Hive ....................................................................... 29 2.3.1. Using an External Table ........................................................................ 29 2.3.2. Using Sqoop ......................................................................................... 31 2.3.3. Incrementally Updating a Table ............................................................ 35 2.4. Enabling security through Row-Level Filtering and Column Masking ................. 39 2.5. Configuring HiveServer2 .................................................................................. 39 2.5.1. Configuring HiveServer2 for Transactions (ACID Support) ...................... 40 2.5.2. Configuring HiveServer2 for LDAP and for LDAP over SSL ...................... 41 2.6. Managing and Using Hive ............................................................................... 45 2.6.1. Configuring SQL Standard-based Authorization .................................... 47 2.6.2. Required Privileges for Hive Operations ................................................ 48 2.6.3. Configuring SQL Standard-Based Authorization .................................... 50 2.6.4. Storage-Based Authorization ................................................................ 51 2.6.5. Configuring Storage-based Authorization ............................................. 51 2.7. Configuring authorization for Apache Hive using Apache Ranger ..................... 53 2.7.1. Permissions for Apache Hive Operations ............................................... 54 2.8. Troubleshooting .............................................................................................. 54 2.8.1. JIRAs .................................................................................................... 56 3. Enabling Efficient Execution with Apache Pig and Apache Tez .................................... 57 4. Managing Metadata Services with Apache HCatalog .................................................. 59 4.1. HCatalog Community Information ................................................................... 59 4.2. WebHCat Community Information .................................................................. 60 4.3. Security for WebHCat ...................................................................................... 61 5. Persistent Read/Write Data Access with Apache HBase .............................................. 62 5.1. Content Roadmap ........................................................................................... 62 5.2. Deploying Apache HBase ................................................................................ 64 5.2.1. Installation and Setup .......................................................................... 65 5.2.2. Cluster Capacity and Region Sizing ....................................................... 65 5.2.3. Enabling Multitenancy with Namepaces ............................................... 70 5.2.4. Security Features Available in Technical Preview .................................... 72 5.3. Managing Apache HBase Clusters ................................................................... 72 5.3.1. Monitoring Apache HBase Clusters ....................................................... 72 iii Hortonworks Data Platform November 30, 2016 5.3.2. Optimizing Apache HBase I/O .............................................................. 72 5.3.3. Importing Data into HBase with Bulk Load ........................................... 81 5.3.4. Using Snapshots ................................................................................... 82 5.4. Backing up and Restoring Apache HBase Datasets ........................................... 84 5.4.1. Planning a Backup-and-Restore Strategy for Your Environment ............. 84 5.4.2. Best Practices for Backup-and-Restore ................................................... 86 5.4.3. Running the Backup-and-Restore Utility ................................................ 87 5.5. Medium Object (MOB) Storage Support in Apache HBase ............................... 95 5.5.1. Enabling MOB Storage Support ............................................................ 95 5.5.2. Testing the MOB Storage Support Configuration .................................. 96 5.5.3. Tuning MOB Storage Cache Properties ................................................. 96 6. Orchestrating SQL and APIs with Apache Phoenix ...................................................... 98 6.1. Enabling Phoenix and Interdependent Components ........................................ 98 6.2. Thin Client Connectivity with Phoenix Query Server ......................................... 98 6.2.1. Securing Authentication on the Phoenix Query Server ........................... 99 6.3. Selecting and Obtaining a Client Driver ........................................................... 99 6.4. Mapping Phoenix Schemas to HBase Namespaces .......................................... 100 6.4.1. Enabling Namespace Mapping ............................................................ 100 6.4.2. Creating New Schemas and Tables with Namespace Mapping ............. 101 6.4.3. Associating Tables of a Schema to a Namespace ................................. 101 iv Hortonworks Data Platform November 30, 2016 List of Figures 2.1. Example: Moving .CSV Data into Hive ..................................................................... 29 2.2. Using Sqoop to Move Data into Hive ...................................................................... 32 2.3. Data Ingestion Lifecycle .......................................................................................... 35 2.4. Dataset after the UNION ALL Command Is Run ....................................................... 37 2.5. Dataset in the View ................................................................................................ 37 5.1. HBase Read/Write Operations ................................................................................