hive_client()

Description:

Create a Hive database connection.

Syntax:

hive_client(hdfsUrl,thriftUrl,dbname,hdfsUserName)

Note:

This external library function connects to a Hive database. The format of the parameter hdfsUrl is hdfs://ip:port, which represents the HDFS file’s IP and port number. The format of the parameter thriftUrl is thrift://ip:port, which represents the Thrift file’s IP and port number. The parameter dbname is database name. hdfsUserName is the user name for an HDFS file.

Parameters:

hdfsUrl

HDFS file connection information

thriftUrl

Thrift file connection information

dbname

A database name

hdfsUserName

HDFS file user name

Return value:

Cursor.

Example:

 

A

 

1

=hive_client("hdfs://192.168.0.8:9000","thrift://192.168.0.8:9083","hive","asus")

Connect to the hive database

Related functions:

hive_close()

hive_cursor()

hive_query()