Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection to Impala with LDAP Authentication #2

Open
amartira opened this issue Sep 15, 2014 · 11 comments
Open

Connection to Impala with LDAP Authentication #2

amartira opened this issue Sep 15, 2014 · 11 comments

Comments

@amartira
Copy link

It is possible to connect to Impala with LDAP Authentication rather than Kerberos Auth???

Principal is a parameter of "connect" function but i cant set a user and password instead. It should look like this:

"jdbc:hive2://:/;user=;password="

Is it possible??

Thank you!

@nagarajjayakumar
Copy link

Yes you can connect R IMPALA using LDAP authentication

@opanito
Copy link

opanito commented Dec 6, 2015

Hi - Nagarajjayakumar,
Can you provide an example how to connect to a secured cloudera cluster that is using LDAP?

Thanks

@nagarajjayakumar
Copy link

Hi

R Impala connector code is a Jdbc based.

Modified the connector code to connect to LDAP authentication enabled
Impala server.

Deploy the jar and modify rimpala Python script to use new library

Please let me know if u need more info

On Saturday, December 5, 2015, opanito notifications@github.com wrote:

Hi - Nagarajjayakumar,
Can you provide an example how to connect to a secured cloudera cluster
that is using LDAP?

Thanks


Reply to this email directly or view it on GitHub
#2 (comment).

@opanito
Copy link

opanito commented Dec 6, 2015

Thanks for the quick response.
I am not too familiar on how this work. I am assuming that i can open one of the downloaded custom Jars for cloudera R impala and change the connection there, then call rimpala.connect() and that should work?

On Dec 6, 2015, at 8:07 AM, nagarajjayakumar notifications@github.com wrote:

Hi

R Impala connector code is a Jdbc based.

Modified the connector code to connect to LDAP authentication enabled
Impala server.

Deploy the jar and modify rimpala Python script to use new library

Please let me know if u need more info

On Saturday, December 5, 2015, opanito notifications@github.com wrote:

Hi - Nagarajjayakumar,
Can you provide an example how to connect to a secured cloudera cluster
that is using LDAP?

Thanks


Reply to this email directly or view it on GitHub
#2 (comment).


Reply to this email directly or view it on GitHub.

@nagarajjayakumar
Copy link

You can use the source code in github....it is a simple Jdbc Java code...

You need to modify r Impala py script to use ur new jar

On Sunday, December 6, 2015, opanito notifications@github.com wrote:

Thanks for the quick response.
I am not too familiar on how this work. I am assuming that i can open one
of the downloaded custom Jars for cloudera R impala and change the
connection there, then call rimpala.connect() and that should work?

On Dec 6, 2015, at 8:07 AM, nagarajjayakumar <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Hi

R Impala connector code is a Jdbc based.

Modified the connector code to connect to LDAP authentication enabled
Impala server.

Deploy the jar and modify rimpala Python script to use new library

Please let me know if u need more info

On Saturday, December 5, 2015, opanito <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

Hi - Nagarajjayakumar,
Can you provide an example how to connect to a secured cloudera cluster
that is using LDAP?

Thanks


Reply to this email directly or view it on GitHub
#2 (comment).


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub
#2 (comment).

@opanito
Copy link

opanito commented Dec 7, 2015

I found this source code: https://github.com/Mu-Sigma/RImpala/tree/master/src/R
line 74-75 shows this:
rimpala.connect <- function(IP="localhost",port="21050",principal="noSasl"){
impalaObj = .jnew("com.musigma.ird.bigdata.RImpala")
You think replacing this with this line would work:
function('jdbc:hive2://ip.localhost.local:21050/; user1@localhost.local; password="" ')
then recompiling?
If not, are you available to show me?

Thanks.

@nagarajjayakumar
Copy link

You need to modify the Java code om.musigma.ird.bigdata.RImpala and build
the jar ,,,

Then you need to repoint the R script to new jar

On Monday, December 7, 2015, opanito notifications@github.com wrote:

I found this source code:
https://github.com/Mu-Sigma/RImpala/tree/master/src/R
line 74-75 shows this:
rimpala.connect <-
function(IP="localhost",port="21050",principal="noSasl"){
impalaObj = .jnew("com.musigma.ird.bigdata.RImpala")
You think replacing this with this line would work:

function('jdbc:hive2://ip.localhost.local:21050/; user1@localhost.local
javascript:_e(%7B%7D,'cvml','user1@localhost.local');; password="" ')
then recompiling?
If not, are you available to show me?

Thanks.


Reply to this email directly or view it on GitHub
#2 (comment).

@opanito
Copy link

opanito commented Dec 7, 2015

This is what i found:

public static boolean connect(String IP, String port, String principal) {

    CONNECTION_URL = "jdbc:hive2://" + IP + ':' + port + "/;" + principal;

    try {
        Class.forName(JDBC_DRIVER_NAME);
        con = DriverManager.getConnection(CONNECTION_URL);
        con.setAutoCommit(false);
        return true;

which line do I need to change to What?
sorry i am new to java.

@opanito
Copy link

opanito commented Dec 7, 2015

Amarita noted: "jdbc:hive2://:/;user=;password="
I am wondering if this worked.

@opanito
Copy link

opanito commented Dec 7, 2015

Here are my changes:

public static boolean connect(String IP, String port, String user, String password) {

    CONNECTION_URL = "jdbc:hive2://" + IP + ':' + port + "/;" + user + "/;" + password;

@opanito
Copy link

opanito commented Dec 9, 2015

HI, I was able to connect to the secured cluster using a 32-bit version of Cloudera ODBC connector and R 32 bit. My next step is to try the option of compiling the Java code.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants