Click here to load reader

Simba Apache Hive JDBC Driver with SQL Connector Installation

  • View
    252

  • Download
    3

Embed Size (px)

Text of Simba Apache Hive JDBC Driver with SQL Connector Installation

  • Simba Apache Hive JDBC Driver with SQL Connector

    Installation and Configuration Guide

    Simba Technologies Inc.

    Version 1.0.36March 24, 2016

  • Copyright 2016 Simba Technologies Inc. All Rights Reserved.

    Information in this document is subject to change without notice. Companies, namesand data used in examples herein are fictitious unless otherwise noted. No part of thispublication, or the software it describes, may be reproduced, transmitted, transcribed,stored in a retrieval system, decompiled, disassembled, reverse-engineered, ortranslated into any language in any form by any means for any purpose without theexpress written permission of Simba Technologies Inc.

    Trademarks

    Simba, the Simba logo, SimbaEngine, and Simba Technologies are registeredtrademarks of Simba Technologies Inc. in Canada, United States and/or othercountries. All other trademarks and/or servicemarks are the property of their respectiveowners.

    Contact Us

    Simba Technologies Inc.938 West 8th AvenueVancouver, BC CanadaV5Z 1E5

    Tel: +1 (604) 633-0008

    Fax: +1 (604) 633-0004

    www.simba.com

    www.simba.com 2

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

    http://www.simba.com/

  • About This Guide

    PurposeThe Simba Apache Hive JDBC Driver with SQL Connector Installation andConfiguration Guide explains how to install and configure the Simba Apache HiveJDBC Driver with SQL Connector on all supported platforms. The guide also providesdetails related to features of the driver.

    AudienceThe guide is intended for end users of the Simba Apache Hive JDBC Driver with SQLConnector.

    Knowledge PrerequisitesTo use the Simba Apache Hive JDBC Driver with SQL Connector, the followingknowledge is helpful:

    l Familiarity with the platform on which you are using the Simba Apache HiveJDBC Driver with SQL Connector

    l Ability to use the data store to which the Simba Apache Hive JDBC Driver withSQL Connector is connecting

    l An understanding of the role of JDBCtechnologies in connecting to a data storel Experience creating and configuring JDBCconnectionsl Exposure to SQL

    Document ConventionsItalics are used when referring to book and document titles.

    Bold is used in procedures for graphical user interface elements that a user clicks andtext that a user types.

    Monospace font indicates commands, source code or contents of text files.Underline is not used.

    The pencil icon indicates a short note appended to a paragraph.

    The star icon indicates an important comment related to the preceding paragraph.

    www.simba.com 3

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

  • Table of Contents

    Introduction 6

    System Requirements 7

    Simba Apache Hive JDBC Driver with SQL Connector Files 8

    Using the Simba Apache Hive JDBC Driver with SQL Connector 9Setting the Class Path 9Initializing the Driver Class 9Building the Connection URL 11

    Configuring Authentication 12Using No Authentication 12Using Kerberos 12Using User Name 13Using User Name And Password 13Authentication Options 14Configuring Kerberos Authentication for Windows 16Kerberos Encryption Strength and the JCE Policy Files Extension 21

    Configuring SSL 23

    Configuring Server-Side Properties 24

    Configuring Logging 25

    Features 27SQL Query versus HiveQL Query 27Data Types 27Catalog and Schema Support 28

    Contact Us 29

    Driver Configuration Options 30AllowAllHostNames 30AllowSelfSignedCerts 30AuthMech 31CAIssuedCertNamesMismatch 31CatalogSchemaSwitch 31DecimalColumnScale 32DefaultStringColumnLength 32

    www.simba.com 4

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

  • DelegationUID 32httpPath 33KrbHostFQDN 33KrbRealm 33KrbServiceName 34LogLevel 34LogPath 35PreparedMetaLimitZero 35PWD 35RowsFetchedPerBlock 36SocketTimeout 36SSL 36SSLKeyStore 37SSLKeyStorePwd 37SSLTrustStore 37SSLTrustStorePwd 38transportMode 38UID 39UseNativeQuery 39zk 39

    Third-Party Trademarks 41

    Third-Party Licenses 42

    www.simba.com 5

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

  • Introduction

    The Simba Apache Hive JDBC Driver with SQL Connector is used for direct SQL andHiveQL access to Apache Hadoop / Hive distributions, enabling Business Intelligence(BI), analytics, and reporting on Hadoop / Hive-based data. The driver efficientlytransforms an applications SQL query into the equivalent form in HiveQL, which is asubset of SQL-92. If an application is Hive-aware, then the driver is configurable topass the query through to the database for processing. The driver interrogates Hive toobtain schema information to present to a SQL-based application. Queries, includingjoins, are translated from SQL to HiveQL. For more information about the differencesbetween HiveQL and SQL, see Features on page 27.

    The Simba Apache Hive JDBC Driver with SQL Connector complies with the JDBC3.0, 4.0 and 4.1 data standards. JDBC is one of the most established and widelysupported APIs for connecting to and working with databases. At the heart of thetechnology is the JDBC driver, which connects an application to the database. Formore information about JDBC, see the Data Access Standards Glossary:http://www.simba.com/resources/data-access-standards-library.

    This guide is suitable for users who want to access data residing within Hive from theirdesktop environment. Application developers might also find the information helpful.Refer to your application for details on connecting via JDBC.

    www.simba.com 6

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

    http://www.simba.com/resources/data-access-standards-library

  • System Requirements

    Each machine where you use the Simba Apache Hive JDBC Driver with SQLConnector must have Java Runtime Environment (JRE) installed. The version of JREthat must be installed depends on the version of the JDBC API you are using with thedriver. The following table lists the required version of JRE for each version of theJDBC API.

    JDBC API Version JRE Version

    3.0 4.0 or 5.0

    4.0 6.0 or later

    4.1 7.0 or later

    The driver supports Apache Hive versions 0.11 through 1.1.

    www.simba.com 7

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

  • Simba Apache Hive JDBC Driver with SQL ConnectorFiles

    The Simba Apache Hive JDBC Driver with SQL Connector is delivered in the followingZIP archives, where [Version] is the version number of the driver:

    l Simba_HiveJDBC3_[Version].zipl Simba_HiveJDBC4_[Version].zipl Simba_HiveJDBC41_[Version].zip

    Each archive contains the driver supporting the JDBC API version indicated in thearchive name.

    The archives contain the following file and folder structure, where [LibVersion] is theversion number of the library and [APIVersion] is the JDBC APIversion that the driversupports:

    l HiveJDBC[APIVersion]o hive_metastore.jaro hive_service.jaro HiveJDBC[APIVersion].jaro libfb303-[LibVersion].jaro libthrift-[LibVersion].jaro log4j-[LibVersion].jaro ql.jaro Simba JDBC Driver for Hive Install Guide.pdfo slf4j-api-[LibVersion].jaro slf4j-log4j12-[LibVersion].jaro TCLIServiceClient.jaro zookeeper-[LibVersion].jar

    www.simba.com 8

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

  • Using the Simba Apache Hive JDBC Driver with SQLConnector

    Before you can use the Simba Apache Hive JDBC Driver with SQL Connector, youmust place the SimbaApacheHiveJDBCDriver.lic file in the same directory asthe HiveJDBC3.jar, HiveJDBC4.jar, or HiveJDBC41.jar file.To access a Hive data store using the Simba Apache Hive JDBC Driver with SQLConnector, you need to configure the following:

    l The class pathl The Driver or DataSource classl The connection URL for the driver

    The Simba Apache Hive JDBC Driver with SQL Connector provides read-onlyaccess to Hive data.

    Setting the Class PathTo use the Simba Apache Hive JDBC Driver with SQL Connector, you must set theclass path to include all the JAR files from the ZIP archive containing the driver thatyou are using.

    The class path is the path that the Java Runtime Environment searches for classesand other resource files. For more information, see "Setting the Class Path" in the JavaSE Documentation:http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html.

    Initializing the Driver ClassBefore connecting to the data store, you must initialize the appropriate class for theHive server and your application.

    The following is a list of the classes used to connect the Simba Apache Hive JDBCDriver with SQL Connector to Hive Server 1 and Hive Server 2 instances. The Driverclasses extend java.sql.Driver, and the DataSource classes extendjavax.sql.DataSource and javax.sql.ConnectionPoolDataSource.To support JDBC 3.0, classes with the following fully-qualified class names (FQCNs)are available:

    l com.simba.hive.jdbc3.HS1Driverl com.simba.hive.jdbc3.HS2Driverl com.simba.hive.jdbc3.HS1DataSourcel com.simba.hive.jdbc3.HS2DataSource

    www.simba.com 9

    Simba Apache Hive JDBC Driver with SQLConnector Installation and Configuration Guide

    http://docs.oracle.com/javase/7/docs/technotes/tools/windows/classpath.html

  • To support JDBC 4.0, classes with the following FQCNs are available:

    l com.simba.hive.jdbc4.HS1Driverl com.simba.hive.jdbc4.HS2Driverl com.simba.hive.jdbc4.HS1DataSourcel com.simba.hive.jdbc4.HS2DataSource

    To support JDBC 4.1, classes with the following FQCNs are available:

    l com.simba.hive.jdbc41.HS1Driverl com.simba.hive.

Search related