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

 ##########
 File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
 ##########
 @@ -334,6 +469,51 @@ private static final String getCommandUsage() {
     writer.println("   Returns \"0\" SUCCESS code if it informed region state 
is changed, "
       + "\"1\" FAIL code otherwise.");
     writer.println();
+    writer.println(" " + ADD_MISSING_REGIONS_IN_META_FOR_TABLES + " 
<NAMESPACE|"
+      + "NAMESPACE:TABLENAME>...");
+    writer.println("   To be used in scenarios where some regions may be 
missing in META,");
+    writer.println("   but there's still a valid 'regioninfo metadata file on 
HDFS. ");
+    writer.println("   This is a lighter version of 'OfflineMetaRepair tool 
commonly used for ");
+    writer.println("   similar issues on 1.x release line. ");
+    writer.println("   This command needs META to be online. For each table 
name passed as");
+    writer.println("   parameter, it performs a diff between regions available 
in META, ");
+    writer.println("   against existing regions dirs on HDFS. Then, for region 
dirs with ");
+    writer.println("   no matches in META, it reads regioninfo metadata file 
and ");
+    writer.println("   re-creates given region in META. Regions are re-created 
in 'CLOSED' ");
+    writer.println("   state at META table only, but not in Masters' cache, 
and are not ");
+    writer.println("   assigned either. A rolling Masters restart, followed by 
a ");
+    writer.println("   hbck2 'assigns' command with all re-inserted regions is 
required. ");
+    writer.println("   This hbck2 'assigns' command is printed for user 
convenience.");
+    writer.println("   WARNING: To avoid potential region overlapping problems 
due to ongoing ");
+    writer.println("   splits, this command disables given tables while 
re-inserting regions. ");
+    writer.println("   An example adding missing regions for tables 'table_1' 
and 'table_2':");
+    writer.println("     $ HBCK2 addMissingRegionsInMeta table_1 table_2");
+    writer.println("   Returns hbck2 'assigns' command with all re-inserted 
regions.");
+    writer.println();
+    writer.println(" " + REPORT_MISSING_REGIONS_IN_META + " <NAMESPACE|"
+      + "NAMESPACE:TABLENAME>...");
+    writer.println("   To be used in scenarios where some regions may be 
missing in META,");
+    writer.println("   but there's still a valid 'regioninfo metadata file on 
HDFS. ");
+    writer.println("   This is a checking only method, designed for reporting 
purposes and");
+    writer.println("   doesn't perform any fixes. Operators should react upon 
the reported.");
+    writer.println("   This command needs META to be online. For each 
namespace/table passed");
+    writer.println("   as parameter, it performs a diff between regions 
available in META, ");
+    writer.println("   against existing regions dirs on HDFS. Region dirs with 
no matches");
+    writer.println("   are printed grouped under its related table name. 
Tables with no");
+    writer.println("   missing regions will show a 'no missing regions' 
message. If no");
+    writer.println("   namespace or table is specified, it will verify all 
existing regions.");
+    writer.println("   It accepts a combination of multiple namespace and 
tables. Table names");
+    writer.println("   should include the namespace portion, even for tables 
in the default");
+    writer.println("   namespace, otherwise it will assume as a namespace 
value.");
+    writer.println("   An example triggering missing regions report for tables 
'table_1'");
+    writer.println("   and 'table_2', under default namespace:");
+    writer.println("     $ HBCK2 reportMissingRegionsInMeta default:table_1 
default:table_2");
+    writer.println("   An example triggering missing regions report for table 
'table_1'");
+    writer.println("   under default namespace, and for all tables from 
namespace 'ns1':");
+    writer.println("     $ HBCK2 reportMissingRegionsInMeta default:table_1 
ns1");
+    writer.println("   Returns list of missing regions for each table passed 
as parameter, or ");
+    writer.println("   for each table on namespaces specified as parameter.");
 
 Review comment:
   This came out of previous suggestions to this PR 
[here](https://github.com/apache/hbase-operator-tools/pull/3#discussion_r292981293).
 It's basically a type of dry-run for operators double check on what is going 
to be re-added to meta. Let me emphasise that on this command description.  

----------------------------------------------------------------
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