joshelser commented on a change in pull request #3: Hbase 22567
URL: https://github.com/apache/hbase-operator-tools/pull/3#discussion_r292981293
 
 

 ##########
 File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
 ##########
 @@ -164,6 +171,86 @@ int setRegionState(String region, RegionState.State 
newState)
     return EXIT_FAILURE;
   }
 
+  int addMissingRegionsInMeta(String... tableNames) throws  IOException {
 
 Review comment:
   Could we break this apart into two steps?
   
   1. Report missing regions in meta
   2. Add a region to meta
   
   We would be able to compose this higher-level tool then, in something like:
   ```bash
   REGIONS=$(hbase hbck2 report_missing_regions)
   for region in REGIONS; do
     hbase hbck2 add_region "region"
   done
   ```
   
   I think this would help keep the complexity of this method down, making it 
easier to test as a by-product. It would also let an admin inspect the output 
from the first step (making sure we want to re-create all of those regions, 
maybe doing some external validation) before trying to re-create them all in 
one step.
   
   I think the tricky part would be coming up with the "format" to take the 
output from step1 and pass it to step2 with minimal "massaging".
   
   WDYT about that, Wellington?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to