wchevreuil commented on a change in pull request #3: Hbase 22567
URL: https://github.com/apache/hbase-operator-tools/pull/3#discussion_r303652806
##########
File path: hbase-hbck2/src/main/java/org/apache/hbase/HBCK2.java
##########
@@ -496,6 +672,51 @@ private static String toString(List<?> things) {
return things.stream().map(i ->
i.toString()).collect(Collectors.joining(", "));
}
+ private String formatMissingRegionsInMetaReport(Map<TableName,List<Path>>
report) {
+ final StringBuilder builder = new StringBuilder();
+ builder.append("Missing Regions for each table:\n\t");
+ report.keySet().stream().forEach(table -> {
+ builder.append(table);
+ if (report.get(table).isEmpty()){
+ builder.append("->\n\t\t");
+ report.get(table).stream().forEach(region ->
builder.append(region.getName())
+ .append(" "));
+ } else {
+ builder.append(" -> No missing regions");
+ }
+ builder.append("\n\t");
+ });
+ return builder.toString();
+ }
+
+ private String formatReAddedRegionsMessage(List<String> readdedRegionNames,
+ List<ExecutionException> executionErrors) {
+ final StringBuilder finalText = new StringBuilder();
+ finalText.append("Regions re-added into Meta:
").append(readdedRegionNames.size());
+ if(readdedRegionNames.isEmpty()){
+ finalText.append("\n")
+ .append("WARNING: \n\t")
+ .append(readdedRegionNames.size()).append(" regions were added ")
+ .append("to META, but these are not yet on Masters cache. \n")
+ .append("You need to restart Masters, then run hbck2 'assigns' command
below:\n\t\t")
+ .append(buildHbck2AssignsCommand(readdedRegionNames));
+ }
+ if(executionErrors.isEmpty()){
Review comment:
Yep, this revealed itself as a bug when I last try to use this command.
Addressed in PR commit d40cfb1b22450b03e6d2d4ff38e5e6ea4cb5857e.
----------------------------------------------------------------
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