hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Rozanec <jose.roza...@mercadolibre.com>
Subject LDAPS jdbc connection string
Date Wed, 22 Jun 2016 19:05:20 GMT
Hi,

We set up a Hive cluster with LDAP and we are able to authenticate and use
if from beeline without issues:


beeline> !connect jdbc:hive2://localhost:10000/default Connecting to
jdbc:hive2://localhost:10000/default Enter username for
jdbc:hive2://localhost:10000/default:
uid=xxxxxxxx,ou=People,ou=Mexico,dc=ms,dc=com Enter password for
jdbc:hive2://localhost:10000/default:

When trying to connect via JDBC, we get rejected ("*Peer indicated failure:
Error validating the login*"). We are not sure where the issue lays, but we
suspect we may not be passing ldap parameters as expected. Did anyone face
a similar issue?

Below the groovy snippet we use to connect against Hive:

@GrabConfig(systemClassLoader= true)
@Grab(group='org.apache.hive', module='hive-jdbc', version='2.0.0')
@Grab(group='org.apache.hadoop', module='hadoop-common', version='2.7.2')
@Grab(group='org.apache.commons', module='commons-csv', version='1.1')
import groovy.sql.Sql;
TimeZone.setDefault(TimeZone.getTimeZone('UTC'))
def master = "masterip"
def port = 10000
def jdbcurl = String.format("jdbc:hive2://%s:%s/default", master, port)
def db = [url:jdbcurl, user:'uid=xxxx,ou=People,ou=Mexicodc=ms,dc=com',
password:'ourpassword!', driver:'org.apache.hive.jdbc.HiveDriver']
def sql = Sql.newInstance(db.url, db.user, db.password, db.driver)
def query = "select * from ourtable limit 10"
sql.execute query

println "thanks! :)"

Mime
View raw message