Configuring the Adapter for Hadoop/Hive/Impala

In this section:

How to:

Reference:

Configuring the adapter consists of specifying connection and authentication information for each of the connections you want to establish. The adapter supports both the original Hiveserver and Hiveserver2. Hiveserver2 is available in Hive 0.11.0 and later and is strongly recommended for improved throughput, functionality, and security.


Top of page

x
Procedure: How to Configure the Hadoop/Hive/Impala Adapter

You can configure the adapter from either the Web Console or the Data Management Console.

  1. From the Web Console menu bar, click Adapters.

    or

    From the Data Management Console, expand the Adapters folder.

  2. Expand the Available folder.
  3. Expand the SQL folder.
  4. Expand the Hive folder.
  5. Right-click Hive and click Configure.
  6. In the URL box, enter the URL used to connect to your Hive or Impala server. For more information, see Hive/Impala Adapter Configuration Settings.

    The following image shows an example of the configuration settings used:

  7. In the Driver Name box, enter the following if using the original Hiveserver:
    org.apache.hadoop.hive.jdbc.HiveDriver

    If using Hiveserver2 or Impala, enter the following:

    org.apache.hive.jdbc.HiveDriver
  8. Leave the User and Password blank if using Hiveserver. If using Hiveserver2, enter your Linux user ID and password.
  9. Click Test. You should see a list of data sources on your server.
  10. Click Configure.

Top of page

x
Reference: Hive/Impala Adapter Configuration Settings

The Adapter for Hadoop/Hive/Impala is under the SQL group folder.

Connection name

Logical name used to identify this particular set of connection attributes. The default is CON01.

URL

Is the URL to the location of the data source.

The URL used depends on what type of server you are connecting to.

Server

URL

Hiveserver

jdbc:hive://server:10000/default

Hiveserver2

jdbc:hive2://server:10000/default

Impala

jdbc:hive2://server:21050/;auth=noSasl

where:

server

Is the DNS name or IP address of the system where the Hive or Impala server is running. If it is on the same system, localhost can be used.

default

Is the name of the default database to connect to.

10000

Is the default port number HiveServer or HiveServer2 is listening on if not specified when the Hive server is started.

21050

Is the default port number for an Impala server.

auth=noSasl

Indicates that there is no security on the Impala server.

Driver Name

Is the name of the JDBC driver, for example, org.apache.hadoop.hive.jdbc.HiveDriver.

IBI_CLASSPATH

Defines the additional Java Class directories or full-path jar names which will be available for Java Services. Value may be set by editing the communications file or in the Web Console. Using the Web Console, you can enter one reference per line in the input field. When the file is saved, the entries are converted to a single string using colon (:) delimiters for all platforms. OpenVMS platforms must use UNIX-style conventions for values (for example, /mydisk/myhome/myclasses.jar, rather than mydisk:[myhome]myclasses.jar) when setting values. When editing the file manually, you must maintain the colon delimiter.

Security

There are two methods by which a user can be authenticated when connecting to a database server:

  • Explicit. The user ID and password are explicitly specified for each connection and passed to the database, at connection time, for authentication.
  • Password Passthru. The user ID and password received from the client application are passed to the database, at connection time, for authentication.
User

Primary authorization ID by which you are known to the data source.

Password

Password associated with the primary authorization ID.

Select profile

Select a profile from the drop-down menu to indicate the level of profile in which to store the CONNECTION_ATTRIBUTES command. The global profile, edasprof.prf, is the default.

If you wish to create a new profile, either a user profile (user.prf) or a group profile if available on your platform (using the appropriate naming convention), choose New Profile from the drop-down menu and enter a name in the Profile Name field (the extension is added automatically).

Store the connection attributes in the server profile (edasprof).


Top of page

x
Troubleshooting

If the server is unable to configure the connection, an error message is displayed. An example of the first line in the error message is shown below, where nnnn is the message number returned.

(FOC1400) SQLCODE IS -1 (HEX: FFFFFFFF) XOPEN: nnnn

Some common errors messages are:

[00000] JDBFOC>> makeConnection():  java.lang.IllegalArgumentExcep
: tion: Bad URL format     

There is a mismatch of the JDBC driver name and the URL. They must both be either hive or hive2 and they cannot be mixed.

(FOC1260)  (-1) [00000] JDBFOC>> connectx():  java.lang.ClassNotFoundException: 
   org.apache.hive.jdbc.HiveDriver
(FOC1260) Check for correct JDBC driver name and environment variables.
(FOC1260) JDBC driver name is org.apache.hive.jdbc.HiveDriver
(FOC1263) THE CURRENT ENVIRONMENT VARIABLES FOR SUFFIX SQLHIV ARE :
(FOC1260) IBI_CLASSPATH : ... 
 (FOC1260) CLASSPATH : C:\ibi\srv77\home\etc\flex\lib\xercesImpl.jar 

The JDBC driver name specified cannot be found in the jar files specified in IBI_CLASSPATH or CLASSPATH. The names of the jar files are either not specified, or if specified, do not exist in that location.

[08S0] Could not establish connection to jdbc:hive2://hostname:21050/auth=noSasl:
java.net.UnknownHostException: hostname  

The server hostname could not be reached on the network. Check that the name is spelled correctly and that the system is running. Check that you can ping the server.

[08S01] Could not establish connection to localhost:10000/default:
: java.net.ConnectException: Connection refused

The Hive Thrift server is not listening on the specified port. Start the server if it is not running, and check that the port number is correct.


WebFOCUS