Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

HDP Sandbox: New tables and databases not visible in DAS UI

Solved Go to solution

HDP Sandbox: New tables and databases not visible in DAS UI

Explorer

I'm running the latest version of HDP sandbox using Docker. I'm following the instructions here: Getting Started with HDP Sandbox

 

When I create a table using the DAS UI, the operation completes successfully, and I am able to use the query tool to query the database. However, if I go to the "database" tab, is says there are no tables in the database. If I try to create a new database, it also doesn't appear on the database dropdown.

 

Also, only the first query I execute is added to the query log, even though subsequent queries complete successfully.

 

How can I configure sandbox so that I can view tables and databases properly in DAS?

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Explorer

After trying a fresh installation and uploading the tables as the maria_dev user, the tables appeared as expected.

5 REPLIES 5

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Mentor

@jhc 

 

I have downloaded a HDP 3.0 sandbox to try get aroung your problem. After suceesful deployment on Virtual box When you access DAS the default user is hive see screenshot DAS default user and on the beeline too

[root@sandbox-hdp ~]# su - hive
Last login: Sat Sep 21 08:07:40 UTC 2019
[hive@sandbox-hdp ~]$ hive
Connecting to jdbc:hive2://sandbox-hdp.hortonworks.com:2181/default;password=hive;serviceDiscoveryMode=zooKeeper;user=hive;zooKeeperNamespace=hiveserver2
19/09/21 08:38:06 [main]: INFO jdbc.HiveConnection: Connected to sandbox-hdp.hortonworks.com:10000
Connected to: Apache Hive (version 3.1.0.3.0.1.0-187)
Driver: Hive JDBC (version 3.1.0.3.0.1.0-187)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1.0.3.0.1.0-187 by Apache Hive
0: jdbc:hive2://sandbox-hdp.hortonworks.com:2> show databases;
INFO : Completed executing command(queryId=hive_20190921083816_c231488f-8a6f-4fb1-bdfb-48493a3cb98e); Time taken: 0.064 seconds
INFO : OK
+--------------------------+
| database_name            |
+--------------------------+
| default                               |
| foodmart                         |
| information_schema |
| sys                                       |
+-------------------------+
4 rows selected (0.443 seconds)

Now to demonstrate I will create a new database  JHC using DAS as the default user hive [See Create DB with DAS],Create DB in DAS.PNG

 

 You will see warning waiting for the database to be created it should succeed and now it should be available in the drop-down list see   [JHC database]

JHC database.PNG

 Now choose this database to populate it with tables sample table Cloudera [see create_table_cloudera]

create_table_cloudera.PNG

 

The DAS view should update with the table  [cloudera ] in [ jhc] database

Cloudera_table in DAS.PNG

 

While the beeline also proves the successful creation of the database and table therein

0: jdbc:hive2://sandbox-hdp.hortonworks.com:2> show databases;  
INFO : OK
+-------------------------+
| database_name            |
+-------------------------+
| default                               |
| foodmart                          |
| information_schema |
| jhc                                        |
| sys                                       |
+---------------------+
5 rows selected (0.092 seconds)
0: jdbc:hive2://sandbox-hdp.hortonworks.com:2> use jhc;
0: jdbc:hive2://sandbox-hdp.hortonworks.com:2> show tables;
+-----------+
| tab_name |
+-----------+
| cloudera |
+-----------+
0: jdbc:hive2://sandbox-hdp.hortonworks.com:2> describe cloudera;
INFO : OK
+-------------+-------------+------------+
| col_name    | data_type | comment |
+-------------+-------------+------------+
| id                    | tinyint        |                        |
| username | tinyint         |                        |
| position     | tinyint         |                        |
| dept             | tinyint        |                         |
+------------+-------------+-------------+
4 rows selected (0.173 seconds)

DAS view now shows the new table Cloudera in JHC database. Now getting back to your question  "When you query the databases the table doesn't appear in the drop-down list " Are you sure you selected the same DB where you created the table?"
I realized I had to wait for the refresh maybe you should manually refresh
DAS refresh.PNG

 

Hope that helps, please revert

 

 

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Explorer

@Shelton 

 

Thank you for your response.

 

As you suggest, I created a new database called JHC. The query succeeds, and appears in the query log:

 

Screenshot_20190925_091606.png

 

However, when I click the database dropdown, the new database is not listed:

2.png

 

Note that I am using the Docker version of HDP 3.0 sandbox.

 

Please advise.

 

Thank you.

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Explorer

3.png

 

Logging in as hive user on the shell, the new database is listed, but not shown on DAS.

Highlighted

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Mentor

@jhc 

I noted the database refresh took very long , did you manually refresh please do that and update this thread

Happy hadooping

Re: HDP Sandbox: New tables and databases not visible in DAS UI

Explorer

After trying a fresh installation and uploading the tables as the maria_dev user, the tables appeared as expected.