How Do I Delete Residual Table Names in the table-lock Directory of ZooKeeper?
Symptom
In Kerberos authentication is enabled for the cluster (in security mode), how can I clean up the residual table names created due to table creation failures under the table-lock node in ZooKeeper (the default path is /hbase/table-lock)?
Procedure
- On the client, run the kinit command as the hbase user to obtain a security certificate.
- Run the following command to launch the ZooKeeper Command Line Interface (zkCLI).
hbase zkcli
- Run the following command on the zkCLI to check whether the table name of the table that fails to be created exists.
ls /hbase/table
- If the table name exists, no further operation is required.
- If the table name does not exist, run the following command to check whether the table name of the table fail to be created exist.
ls /hbase/table-lock
If the table name exists, run the following command to delete the table name.delete /hbase/table-lock/<table>
<table> indicates the residual table name.