Learn R Programming

RImpala (version 0.1.6)

rimpala.connect: Establishes a JDBC connection to a machine running Impala

Description

This function creates a connection to the impalad daemon running on a machine in a Hadoop Cluster. The IP of the machine and the port on which the impalad daemon is running is passed as an argument.

Usage

rimpala.connect(IP="localhost",port="21050",principal="noSasl")

Arguments

IP
The IP of the machine to which the connection needs to be established. Default value is localhost
port
The port on the machine where the Impala daemon is running. Default value is 21050
principal
The principal to use if you require Kerberos authentication.The principal must be the same user principal you used when starting Impala. For example: "impala/myhost.example.com@H2.EXAMPLE.COM". Default value is "noSasl"

Value

"Connection Established" is displayed on the console upon successful connection.

Examples

Run this code
## Not run: 
# library("RImpala")
# rimpala.init()
# rimpala.connect(IP="127.0.0.1",port="21050")
# rimpala.close()
# rimpala.connect(IP="localhost",port="21050",principal="impala/myhost.example.com@H2.EXAMPLE.COM")
# ## End(Not run)

Run the code above in your browser using DataLab