Resolve “org.apache.hadoop.hbase.TableInfoMissingException: No table descriptor file under” in Hbase

org.apache.hadoop.hbase.TableInfoMissingException: No table descriptor file under

“org.apache.hadoop.hbase.TableInfoMissingException: No table descriptor file under” usually happens if the table descriptor file went missing (which is called an Orphan table)

Symptoms

This issue should not cause any Application/Job failure, These tables are called Orphan tables as there “.tabledesc” file has been missing in the table location (Could have been deleted manually or corrupted).

Also, this issue (missing table descriptor(.tabledesc)) might cause an Hbase procedure to stuck in a hung state

By default, the table descriptor would be available in the below table location 

hdfs dfs -ls /hbase/data/<namespace>/<tablename>/.tabledesc 

Troubleshooting

  • Run the “hbase hbck details” command to get the inconsistency details, Use the below command to collect the information
hbase hbck -details | grep TableInfoMissingException

WARN util.HBaseFsck: Unable to read .tableinfo from hdfs://<Hostname>:8020/hbase

org.apache.hadoop.hbase.TableInfoMissingException: No table descriptor file under hdfs://<Hostname>:8020/hbase/data/ns/tablename

  • Check if there are any hung procedures

Validate any stuck procedure for the orphan table

hbase> list_procedures

If you find any stuck procedures, bypass the procedures before proceeding with the resolution part.

Bypass procedures:

hbase hbck -j <hbck2_jar> bypass -o -r <pid>

Resolution

To resolve the issue, We need to generate the missing table descriptor file, This can be done using “hbck2” utility as below

hbase hbck -j hbase-hbck2-1.2.0-SNAPSHOT.jar generateMissingTableDescriptorFile <namespace>:<tablename>

Example:

hbase hbck -j hbase-hbck2-1.2.0-SNAPSHOT.jar generateMissingTableDescriptorFile <ns>:<tablename>

Once the above command has been executed, We can able to see the below log messages, Which show the table descriptor has been created,

INFO  org.apache.hbase.MissingTableDescriptorGenerator – Table descriptor written successfully. Orphan table <tablename> fixed.

Make sure the issue has been resolved by re-running the “hbase hbck -details” command and validate if you are seeing the messages again.

Good Luck with your Learning !!

Similar Posts