Support Questions

Find answers, ask questions, and share your expertise

hbase hbck unrecognized option -j

avatar
New Contributor

I'm running a HBase-Hadoop cluster with HBase 2.0.1 and Hadoop version 2.7.7. I need to remove a table which has regions in transition (3001 other regions) and I'd like to follow solution described in https://community.cloudera.com/t5/Support-Questions/HBase-Regions-In-Transition/m-p/310513. Unfortunately I cannot run `hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar` since I get following error:

```

Unrecognized option:-j

-----------------------------------------------------------------------
NOTE: As of HBase version 2.0, the hbck tool is significantly changed.
In general, all Read-Only options are supported and can be be used
safely. Most -fix/ -repair options are NOT supported. Please see usage
below for details on which options are not supported.
-----------------------------------------------------------------------

```

I built hbck2 following instructions in https://community.cloudera.com/t5/Community-Articles/HBase-HBCK2-tool-for-HDP-3-x/ta-p/244386.

What could I do in order to run `hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar` or to remove the unneeded table with regions in transition?

Thank you in advance!

1 ACCEPTED SOLUTION

avatar
Expert Contributor

✥ For the Error "Unrecognized option:-j" kindly manually type the keyword -j instead of copy-paste

=> Note: you generally notice such exceptions when you have special character pasted

✥ Kindly make sure you first bypass the stuck procedure and locks

$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar bypass -o -r <pid>

=> For reviewing the stuck procedure kindly navigate to Hmaster ui => Procedure & locks and first bypass the proc id visible in lock section

✥ The you can consider closing the region State before disabling table
$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar setRegionState $i CLOSED
$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar setTableState <tablename> DISABLED

=> Note: Make sure the 3k regions are all part of the same table " " which you wish to disable/remove

✥ Once table is disabled then you can login into hbase shell and then perform drop table operation
$ drop 'tablename'

View solution in original post

2 REPLIES 2

avatar
Community Manager

@TakeshiGitano, Welcome to our community! To help you get the best possible answer, I have tagged in our Hbase experts @smdas @aps @PrathapKumar  who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Expert Contributor

✥ For the Error "Unrecognized option:-j" kindly manually type the keyword -j instead of copy-paste

=> Note: you generally notice such exceptions when you have special character pasted

✥ Kindly make sure you first bypass the stuck procedure and locks

$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar bypass -o -r <pid>

=> For reviewing the stuck procedure kindly navigate to Hmaster ui => Procedure & locks and first bypass the proc id visible in lock section

✥ The you can consider closing the region State before disabling table
$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar setRegionState $i CLOSED
$ hbase hbck -j /tmp/target/hbase-hbck2-1.3.0-SNAPSHOT.jar setTableState <tablename> DISABLED

=> Note: Make sure the 3k regions are all part of the same table " " which you wish to disable/remove

✥ Once table is disabled then you can login into hbase shell and then perform drop table operation
$ drop 'tablename'