How Do I View MRS Hive Metadata?
- Hive metadata is stored in the GaussDB database of the MRS cluster. You can perform the following steps to view the metadata:
- Log in to the DBServer active node as user root.
- Log in to the Hive database:
su - omm
source $DBSERVER_HOME/.dbservice_profile
gsql -p 20051 -U USER -W PASSWD -d hivemeta
- View all metadata tables in the Hive metadata database:
\d+
- Run q to exit the page for viewing the metadata table.
- View data in the metadata table:
select * from Table name;
NoteTo query the IP address of the active DBServer node, log in to FusionInsight Manager, choose Cluster > Services > DBService, and click the Instance tab.
- If Hive metadata is stored in an external relational database, perform the following steps:
- On the cluster Dashboard page, click Manage on the right of Data Connection.
- On the displayed page, obtain the value of Data Connection ID.
- On the MRS console, click Data Connections.
- In the data connection list, locate the data connection based on the data connection ID obtained in 2.
- Click Edit in the Operation column of the data connection.
The RDS Instance and Database indicate the relational database in which the Hive metadata is stored.
Parent topic: Metadata Management