-
Notifications
You must be signed in to change notification settings - Fork 227
Query a Secure HBase cluster through Phoenix #382
Comments
On Thu, Aug 22, 2013 at 12:03 PM, anil gupta anilgupta84@gmail.com wrote:
|
Hello Anil, Please define following: -Djava.security.auth.login.config + -Djava.security.krb5.realm + -Djava.security.krb5.kdc + -Djava.security.krb5.conf + update classpath to contain < HBase Conf + Hadoop Conf + Hadoop Common Jar + HBase Jar > Have < phoenix-2.0-SNAPSHOT.20130805.jar > in your class path before any other phoenix jars you may be having. Also ensure to run < kinit -k -t {your key tab} {your principal} > Cheers, |
What about the hadoop auth jar too? On Fri, Aug 23, 2013 at 1:56 AM, saket-srivastava
|
Hello Ron, Yes - thanks for pointing this. Cheers, On Fri, Aug 23, 2013 at 8:00 PM, Ron Yang notifications@github.com wrote:
|
Hi Saket and Ron, Thanks for the details. I could not understand which auth jar you guys were talking about. |
Hello Anil, < hadoop-auth-2.0.0-cdh4.3.0.jar > - we use CDH 4.3.0 Hadoop release. Cheers, On Mon, Aug 26, 2013 at 3:03 AM, anilgupta84 notifications@github.comwrote:
|
Thanks Saket. I will try out your recommendation this week. Hopefully, i wont get too many hiccups. |
Hi All, As per your suggestion, I modified the sqlline.sh and added additional parameters in invocation of Phoenix. Following is my final command in sqlline.sh: Above error message is different from the error message i used to get before(so additional parameters made some impact). We are also using cdh4.3. It seems like we are hitting #286 . Is that correct? Thanks, |
Hi Anil, Thanks, On Wed, Aug 28, 2013 at 6:02 PM, anilgupta84 notifications@github.comwrote:
|
Hi James, I removed $phoenix_client_jar from classpath. But, now i get following error when running sqlline.sh: Are you suggesting me that i should not use sqlline.sh to invoke phoenix? If yes, then how would i invoke Phoenix without sqlline.sh ? Thanks for your guidance, |
If you want to use SqlLine, you'll need to add the SqlLine jar and its Thanks, On Wed, Aug 28, 2013 at 7:06 PM, anilgupta84 notifications@github.comwrote:
|
Hi James, I invoked sqlline.sh with following command: sqlline.sh Thanks, |
Hi Anil,
If you type "help" at the sqlline command prompt, you get a list of possible commands, one of which is "!connect", so that's another way. Another option is using google. I searched for "Phoenix sqlline" and the first link was this one:
Thanks, |
Hi James, I did use sqlline.sh command. Sorry, In my last email, due to a typo i gave you wrong information while i mean to say that "I invoked sqlline.sh with following command: sqlline.sh ". I went through the documentation link that you suggested. Thanks, |
I just realized one thing.. Github suppressed my word which are put under angular brackets! This is bad and confusing. In the above message also, my sqlline invocation command is wrong due to this. |
Please confirm that you can use the HBase shell with the identical class path. Thanks, James |
Hi James, Soon i'll get back to you with hbase shell information. Thanks, On Thu, Aug 29, 2013 at 8:51 AM, James Taylor notifications@github.comwrote:
Thanks & Regards, |
sqlline.sh also uses log4j.properties. Just remove this properties file from sqline path and HBase connection log would be written to console. |
Hi Mujtaba, I deleted log4j.properties file from bin folder. Still, no logs on the On a side note, i am connected Phoenix to a non-scure cluster. It connected What does the above message means? With secure cluster, it seems like, Thanks, On Thu, Aug 29, 2013 at 10:08 AM, mujtabachohan notifications@github.comwrote:
Thanks & Regards, |
Hi Anil, On Thu, Aug 29, 2013 at 3:30 PM, anilgupta84 notifications@github.comwrote:
|
@saket-srivastava: I am curious to know how do you use Phoenix with your secure cluster. Do you use sqlline or Squirrel? Thanks, |
Hi Anil, Following is the output without log4j.properties on my machine. 36/36 100% done means the number of tables+columns loaded by sqlline. Also turn --silent=false command line argument for more info in Squirrel. 13/08/29 15:56:23 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=myzookeeper:2181 sessionTimeout=180000 watcher=hconnection |
Hi James, I tried invoking "hbase shell" after modifying the classpath to following Parts highlighted in Bold Italics are extra from sqlline cp. These were Strange thing is that, hbase shell didnt even read the cluster However, if i invoke "hbase shell" without modification to Classpath then Also, i identified that "hbase shell" is invoked by using only I hope i provided you the information you asked for. Thanks, On Thu, Aug 29, 2013 at 4:05 PM, mujtabachohan notifications@github.comwrote:
Thanks & Regards, |
Hey Anil, |
Hi James, Agree with you. I need to see why hadoop/hbase config is not getting picked Thanks, On Fri, Aug 30, 2013 at 1:21 AM, James Taylor notifications@github.comwrote:
Thanks & Regards, |
Ask for help on the HBase mailing list for that - they'll be able to James On Aug 30, 2013, at 7:32 AM, anilgupta84 notifications@github.com wrote: Hi James, Agree with you. I need to see why hadoop/hbase config is not getting picked Thanks, On Fri, Aug 30, 2013 at 1:21 AM, James Taylor notifications@github.comwrote:
Thanks & Regards, — |
@saket-srivastava and @jtaylor-sfdc : Since you are able to use sqlline.sh with cdh4.3 to connect to a secure cluster. Would you mind sharing the script that invokes sqlline. It would tremendously help me to figure out the difference between yours and mine. |
Script in-line: <SCRIPT> current_dir=$(cd $(dirname $0);pwd) phoenix_jar_path="$current_dir/../target" phoenix_client_jar=$(find $phoenix_jar_path/phoenix-*-client.jar) #phoenix_client_jar=../target/phoenix-2.0-SNAPSHOT.jar if [ -z "$1" ] then echo -e "Zookeeper not specified. \nUsage: sqlline.sh \nExample: \n 1. sqlline.sh localhost \n 2. sqlline.sh localhost ../examples/stock_symbol.sql"; exit; fi if [ "$2" ] then sqlfile="--run=$2"; fi /root/dev/current//bigdata-util/tools//Linux/jdk/jdk1.7.0_21_x64/bin/java -Djava.security.auth.login.config=/root/dev/current//bigdata-hbase/hbase/hbase//conf/zk-jaas.conf -Djava.security.krb5.realm=RHELMSGSERVICE.NET-Djava.security.krb5.kdc=rhelmsgservice.internal.salesforce.com: rhelmsgservice.internal.salesforce.com-Djava.security.krb5.conf=/home/sfdc/.keytab//krb5.conf -Dsun.security.krb5.debug=true -cp ".:/root/dev/current/bigdata-hadoop/hadoop/hadoop/etc/hadoop:/root/dev/current/bigdata-hbase/hbase/hbase/conf:/root/dev/current/bigdata-hbase/hbase/hbase/hbase-0.94.10-security.jar:/root/dev/current/bigdata-hadoop/hadoop/hadoop/share/hadoop/common/hadoop-common-2.0.0-cdh4.3.0.jar:/root/dev/current/bigdata-zookeeper/zookeeper/zookeeper/zookeeper-3.4.5.jar:/root/dev/current/bigdata-hbase/hbase/hbase/lib/hadoop-auth-2.0.0-cdh4.3.0.jar:../target/phoenix-2.0-SNAPSHOT.20130805.jar:$phoenix_client_jar" -Dlog4j.configuration=file:$current_dir/log4j.properties sqlline.SqlLine -d com.salesforce.phoenix.jdbc.PhoenixDriver -u jdbc:phoenix:$1 -n none -p none --color=true --fastConnect=false --silent=true --isolation=TRANSACTION_READ_COMMITTED $sqlfile </SCRIPT>Cheers, On Tue, Sep 3, 2013 at 9:15 AM, anilgupta84 notifications@github.comwrote:
|
@saket-srivastava: Thanks a lot. Really appreciate your help. |
Hi Saket, We are using parcels in CDH, so our directory structure for Hadoop is different from yours. I was able to map all jars in the above script to my Hadoop installation. But, i am unable to determine what is the purpose of adding "/root/dev/current/bigdata-hadoop/hadoop/hadoop/etc/hadoop" in classpath. Can you tell me what jars are used from this folder? Also, these are some other differences between our set-up:
Thanks, |
< "/root/dev/current/bigdata-hadoop/hadoop/hadoop/etc/hadoop" > < We are using jdk1.6 while you are using jdk1.7 > < Before, we were not adding zookeeper-3.4.5-cdh4.3.0.jar in Classpath. It < Even though, we are using cdh4.3. It seems like there is a lot of < We are using cdh4.3 HBase i.e. HBase0.94.6 while you are using Cheers, On Tue, Sep 3, 2013 at 11:23 AM, anilgupta84 notifications@github.comwrote:
|
There we GOOOO!! After modifying your script and putting our values, Phoenix has connected to the cluster. I also ran a create table statement and it created the table. :) |
Closing, as @anilgupta84 was able to get this working. |
Hi James and Team,
I would like to use Phoenix for sql-like querying purpose. But, our Hadoop/HBase are secured. So, it seems like we need to enable users to login to a secure HBase cluster and query tables through Phoenix. I am willing to work with the community and provide the patch for adding support in Phoenix to connect to a secure cluster.
Thanks,
Anil Gupta
Software Engineer, Intuit, Inc.
The text was updated successfully, but these errors were encountered: