wchevreuil commented on a change in pull request #45: HBASE-23371 [HBCK2] 
Provide client side method for removing ghost regions in meta.
URL: 
https://github.com/apache/hbase-operator-tools/pull/45#discussion_r369757392
 
 

 ##########
 File path: hbase-hbck2/README.md
 ##########
 @@ -148,6 +148,29 @@ Command:
    to finish parent and children. This is SLOW, and dangerous so use
    selectively. Does not always work.
 
+ extraRegionsInMeta <NAMESPACE|NAMESPACE:TABLENAME>...
+   Options:
+    -f, --fix    fix meta by removing all extra regions found.
+   Reports regions present on hbase:meta, but with no related
+   directories on the file system. Needs hbase:meta to be online.
+   For each table name passed as parameter, performs diff
+   between regions available in hbase:meta and region dirs on the given
+   file system. Extra regions would get deleted from Meta
+   if passed the --fix option.
+   NOTE: Before deciding on use the "--fix" option, it's worth check if
+   reported extra regions are overlapping with existing valid regions.
+   If so, then "extraRegionsInMeta --fix" is indeed the optimal solution.
+   Otherwise, "assigns" command is the simpler solution, as it recreates
+   regions dirs in the filesystem, if not existing.
+   An example triggering extra regions report for tables 'table_1'
+   and 'table_2', under default namespace:
+     $ HBCK2 extraRegionsInMeta default:table_1 default:table_2
 
 Review comment:
   Yeah, in the same way as done for the already existing 
_addFsRegionsMissingInMeta_ and _reportMissingRegionsInMeta_ methods. Since we 
allow for passing namespaces as well, if we allow for simply passing the table 
name for tables in default namespace, we would need to do an extra verification 
for the existence of such table in default namespace, and if no such table 
found, then fallback to consider it as namespace. And then there's also 
possibility for a table name in default namespace have same value as a given 
namespace, which would then prohibit this namespace to be passed. All that made 
me thought it was better to require explicitly passing the default namespace 
prefix when operating over specific table.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to