Created 01-29-2016 10:46 PM
I'm connecting to Phoenix Query Server via the following:
/usr/hdp/current/phoenix-client/bin/sqlline.py hbasemaster:2181:/hbase-unsecure
I'm able successfully connect. I then create a table using:
create table mytable (id varchar not null primary key, mycolumn varchar);
That command seems to run successfully. However, when I try to verify the table exists via:
!tables
I don't see my table listed. When I try to use sql as a verification via:
select * from mytable;
I get a "TableNotFoundException". If I try to create the table again, I get an error that the table already exists. If I look a the HBase Master UI, I can see the table exists in HBase. I'm confused. What am I missing here?
I'm running HDP 2.3.2
Created 01-29-2016 10:57 PM
Are you using Phoenix query server? Try accessing table using sqlline.py if you are using pqs
I had same issue with PQS
Created 01-29-2016 10:57 PM
Are you using Phoenix query server? Try accessing table using sqlline.py if you are using pqs
I had same issue with PQS
Created 01-29-2016 11:06 PM
Yes, I'm suing Phoenix Query Server. /usr/bin/phoenix-sqlline is a symbolic link to /usr/hdp/current/phoenix-client/bin/sqlline.py. That is what I'm using.
Created 01-29-2016 11:36 PM
Not relevant to your question, but that's the "normal" (thick) Phoenix driver. The "thin" Phoenix driver (with Phoenix QueryServer) is accessed using sqlline-thin.py.
Created 01-29-2016 11:43 PM
What is the difference between the thick and thin driver in terms of what I'm trying to do? When I use phoenix-sqlline-thin it shows the table now which is puzzling to me. Why the difference in behavior?
Created 01-30-2016 12:00 AM
@Michael Young @Josh Elser I think it has to do with zk
shutdown hbase and RS and run this
hbase clean --cleanZk
Created 01-30-2016 12:15 AM
The "thick" Phoenix driver does all the RPC with HBase directly. The "thin" Phoenix driver only communicates with the Phoenix QueryServer over HTTP (the QueryServer communicates to HBase on its behalf). You shouldn't see any differences between the two approaches.
Created 01-30-2016 12:15 AM
Good catch! Running "hbase clean --cleanZk" fixed the problem. Now the thick and thin client are working similarly.
Created 01-30-2016 12:19 AM
@Michael Young Thanks for testing. I believe we have the answer 😉
Thanks @Josh Elser for chiming in ...Really appreciate it!!!! All comments upvote
Created 01-30-2016 12:21 AM