Support Questions

Find answers, ask questions, and share your expertise

Hbase tables are not visible through phoenix client

avatar
Explorer

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

1 ACCEPTED SOLUTION

avatar
Super Guru

@Shravan Kumar,

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

View solution in original post

6 REPLIES 6

avatar
Master Mentor

@Shravan Kumar

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?

avatar
Explorer

@Jay Kumar SenSharma,

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

avatar
Master Mentor

@Shravan Kumar

Can you please refer to the following link:

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.3/bk_command-line-upgrade/content/configure-p...

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.

avatar
Explorer

@Jay Kumar SenSharma,

below is the command. Im able to see other tables

/usr/hdp/current/phoenix-client/bin/sqlline.py zookeeper-test-1:2181/hbase-unsecure

avatar
Master Mentor

@Shravan Kumar

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

.

avatar
Super Guru

@Shravan Kumar,

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