Created 11-08-2017 04:58 AM
Hi,
I have created a hbase table 'test_phoenix' using hbase shell. I tried to login to phoenix using sqlline client and done list tables. But I do not see 'test_phoenix'. What is the reason. I do not see any error logs
-Shravan
Created 11-08-2017 06:23 AM
I see that you created tables using hbase shell and trying to access it using phoenix (sqlline.py). When you run using hbase shell, the tables wont be registered in SYSTEM.CATALOG table of phoenix which maintains the table metadata. So you wont be able to see the table in phoenix. If you want to access it via hbase, you can map the hbase table to phoenix . You can create a view in phoenix.
To confirm this , you can run the below query
/usr/hdp/current/phoenix-client/bin/sqlline.py zookeeper-test-1:2181/hbase-unsecure select distinct(TABLE_NAME) from SYSTEM.CATALOG; ---- > This will not return the table name.
One more solution is to create the table via phoenix client . Then you can access it using phoenix and hbase shell.
Thanks,
Aditya
Created 11-08-2017 05:03 AM
Can you please provide more details about how you are connecting via Phoenix And if there is any Ranger or additional security applied on your cluster?
Created 11-08-2017 05:12 AM
I did not enable Ranger and it is non kerberised environment. I'm using sqlline.py in phoenix client bin folder. Also I'm passing zookeeper host as argument to the python file. Do we need any other additional steps
Created 11-08-2017 05:17 AM
Can you please refer to the following link:
Also it will be really good if you can share the exact command that you are using and the output so that we can check if there is anything missing there.
Created 11-08-2017 05:31 AM
below is the command. Im able to see other tables
/usr/hdp/current/phoenix-client/bin/sqlline.py zookeeper-test-1:2181/hbase-unsecure
Created 11-08-2017 06:12 AM
Is it possible if you can try running the Phoenix Client in DEBUG mode:
1) Edit/usr/hdp/current/phoenix-client/bin/log4j.properties
2) Updatepsql.root.loggertoDEBUG,console
3) Updatelog4j.thresholdtoDEBUG
4) Save the file
.
Also can you please add another (:) Colon symbol before the /hbase-unsecure as following and then try again:
# /usr/hdp/current/phoenix-client/bin/sqlline.py zookeeper-test-1:2181:/hbase-unsecure
.
Created 11-08-2017 06:23 AM
I see that you created tables using hbase shell and trying to access it using phoenix (sqlline.py). When you run using hbase shell, the tables wont be registered in SYSTEM.CATALOG table of phoenix which maintains the table metadata. So you wont be able to see the table in phoenix. If you want to access it via hbase, you can map the hbase table to phoenix . You can create a view in phoenix.
To confirm this , you can run the below query
/usr/hdp/current/phoenix-client/bin/sqlline.py zookeeper-test-1:2181/hbase-unsecure select distinct(TABLE_NAME) from SYSTEM.CATALOG; ---- > This will not return the table name.
One more solution is to create the table via phoenix client . Then you can access it using phoenix and hbase shell.
Thanks,
Aditya