Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (2)
avatar
Contributor

Please log on to the backend database:

mysql> use hive;

Database changed:

mysql> show tables;

The table of importance to us in this scenario is HIVE_LOCKS. (MySQL is sensitive to Upper and Lower Caps)

mysql> describe HIVE_LOCKS;
+---------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------------+--------------+------+-----+---------+-------+
| HL_LOCK_EXT_ID | bigint(20) | NO | PRI | NULL | |
| HL_LOCK_INT_ID | bigint(20) | NO | PRI | NULL | |
| HL_TXNID | bigint(20) | YES | MUL | NULL |
| HL_DB | varchar(128) | NO | | NULL | |
| HL_TABLE | varchar(128) | YES | | NULL | |
| HL_PARTITION | varchar(767) | YES | | NULL | |
| HL_LOCK_STATE | char(1) | NO | | NULL | |
| HL_LOCK_TYPE | char(1) | NO | | NULL | |
| HL_LAST_HEARTBEAT | bigint(20) | NO | | NULL | |
| HL_ACQUIRED_AT | bigint(20) | YES | | NULL | |
| HL_USER | varchar(128) | NO | | NULL | |
| HL_HOST | varchar(128) | NO | | NULL | |
| HL_HEARTBEAT_COUNT | int(11) | YES | | NULL | |
| HL_AGENT_INFO | varchar(128) | YES | | NULL | |
| HL_BLOCKEDBY_EXT_ID | bigint(20) | YES | | NULL | |
| HL_BLOCKEDBY_INT_ID | bigint(20) | YES | | NULL | |

Run the following command:

mysql> select * from HIVE_LOCKS;
Empty set (0.00 sec)

The above result would indicate that the tables do not have any locks. If locks are present, there will be entries in the HIVE_LOCKS table.

919 Views