Community Articles
Find and share helpful community-sourced technical articles
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.
Labels (1)

The limitation of display of 5000 tables is due to dbms.py script under Hue, below is the snippet of the script:

def get_tables(self, database='default', table_names='*'):
hql = "SHOW TABLES IN %s '%s'" % (database, table_names) # self.client.get_tables(database, table_names) is too slow
query = hql_query(hql)
handle = self.execute_and_wait(query, timeout_sec=15.0)

if handle:
result = self.fetch(handle, rows=5000)
self.close(handle)
return [name for table in result.rows() for name in table]
else:
return []

To increase the number of the tables displayed in Hue. Please do the following:

1. cp /usr/lib/hue/apps/beeswax/src/beeswax/server/dbms.py /tmp

2. Stop Hue service as 'service hue stop'.

3. Edit /usr/lib/hue/apps/beeswax/src/beeswax/server/dbms.py to change the rows value to 8000.

if handle:
result = self.fetch(handle, rows=8000) --> This value needs to be changed.
self.close(handle)
return [name for table in result.rows() for name in table]
else:
return []
4. Restart hue as 'service hue restart'.
675 Views
0 Kudos
Don't have an account?
Coming from Hortonworks? Activate your account here
Version history
Revision #:
1 of 1
Last update:
‎01-03-2017 05:33 PM
Updated by:
 
Contributors
Top Kudoed Authors