DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. Killing the HBase Zombie Table

Killing the HBase Zombie Table

Arnon Rotem-gal-oz user avatar by
Arnon Rotem-gal-oz
·
Jan. 16, 13 · Interview
Like (0)
Save
Tweet
Share
4.46K Views

Join the DZone community and get the full member experience.

Join For Free

zombie

one of our team leaders approached me in the hall today and asked if i could land a hand in troubleshooting something. he and our qa lead were configuring one of our test hadoop clusters after an upgrade and they had a problem with one table they were trying to set up:

  • when they tried to create the table in hbase shell they got an error that the table exists
  • when they tried to delete the table they got an error that the table does not exist
  • hbase ships with a health-check and fix util called hbck (use: hbase hbck to run. see here for details) – they’ve run hbase reports everything is fine and dandy

hmm, the first thing i tied to do is to look at the .meta. table. this is where hbase keeps the tables and the regions they use. i thought maybe there was some just there. but it didn’t look like that. i tried to do a major compaction for it and that didn’t help either.

the next thing i tried actually found the problem. i ran the zookeeper client (i used hbase zkcli but you can also run it via zookeeper scripts) and looked at /hbase/table ( ls /hbase table ) -the zombie table was listed right there with all the legit tables. hbase stores some data schema and state of each table in zookeeper to be able to coordinate between all the regionservers and it seems that during the upgrade process the system was restarted a few times. one of these restarts coincided with a removal of the table and caught it in the middle.

ok, so that is the problem – what’s the solution? simple just remove the offending znode from zookeeper ( rmr /hbase/table/table_name ) and restart the cluster (since the data is cached in the regionservers/hbase master to save trips to zookeeper). also be careful not to remove any other node or you’d cause problems to other tables.

the role of zookeeper in hbase is not documented very well. the only online account of zookeeper’s role with hbase i found (save looking at the code itself of course) is really outdated. hopefully this post will save some head scratching and time for others who find themselves with the same problem.

anyway, i hope the next post i’ll do on zookeeper will be about something much nicer :)

Database

Published at DZone with permission of Arnon Rotem-gal-oz, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Bye Bye, Regular Dev [Comic]
  • How to Create a Real-Time Scalable Streaming App Using Apache NiFi, Apache Pulsar, and Apache Flink SQL
  • Kubernetes vs Docker: Differences Explained
  • Better Performance and Security by Monitoring Logs, Metrics, and More

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: