Apache9 commented on code in PR #7105:
URL: https://github.com/apache/hbase/pull/7105#discussion_r2146784076


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncBatchRpcRetryingCaller.java:
##########
@@ -218,8 +223,37 @@ private void logException(int tries, 
Supplier<Stream<RegionRequest>> regionsSupp
       String regions =
         regionsSupplier.get().map(r -> "'" + 
r.loc.getRegion().getRegionNameAsString() + "'")
           .collect(Collectors.joining(",", "[", "]"));
-      LOG.warn("Process batch for " + regions + " in " + tableName + " from " 
+ serverName
-        + " failed, tries=" + tries, error);
+      LOG.warn("Process batch for {} from {} failed, tries={}", regions, 
serverName, tries, error);
+    }
+  }
+
+  @RestrictedApi(explanation = "Should only be called in tests", link = "",
+      allowedOnPath = ".*/(src/test/|AsyncBatchRpcRetryingCaller).*")
+  static void logException(int tries, int startLogErrorsCnt, RegionRequest 
regionReq,
+    IdentityHashMap<Action, Throwable> action2Error, ServerName serverName) {
+    if (tries <= startLogErrorsCnt || action2Error.isEmpty()) {
+      return;
+    }
+    StringWriter sw = new StringWriter();
+    PrintWriter action2ErrorWriter = new PrintWriter(sw);
+    action2ErrorWriter.println();

Review Comment:
   This is intentional, to make the detailed exception information to a new 
line.



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

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to