- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Phoenix - Create Table Question
- Labels:
-
Apache Phoenix
Created ‎01-29-2016 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
