Updated on 2024-10-25 GMT+08:00

REFRESH CATALOG

This statement is used to manually refresh the HetuEngine MetaStore cache to synchronize the metadata of tables, partitions, and databases of the Hive data source.

Syntax

REFRESH CATALOG catalog_name

Example

Log in to FusionInsight Manager, choose Services > HetuEngine > Dashboard. On the page that is displayed, click the link next to HSConsole WebUI to go to the compute instance page. On the displayed page, choose Data Source > Hive data source name > Edit. On the Custom Configuration page, click Add to add the following custom configuration items:

Parameter

Value

Description

hive.metastore-cache-ttl

5m

Cache validity period, in minutes

hive.metastore-refresh-interval

5m

Interval for refreshing the metadata cache, in minutes

Use Hive to create a table tb3 and the query result on Hetu-cli is:

 show tables;
 Table 
-------
 tb1   
 tb2   
(2 rows)

Refresh the metadata cache and query again.

 refresh catalog hive;
show tables;
 Table 
-------
 tb1   
 tb2   
 tb3   
(3 rows)