Apache9 commented on a change in pull request #3045:
URL: https://github.com/apache/hbase/pull/3045#discussion_r599291017



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALProvider.java
##########
@@ -130,7 +130,12 @@ void init(WALFactory factory, Configuration conf, String 
providerId, Abortable s
   void addWALActionsListener(WALActionsListener listener);
 
   default WALFileLengthProvider getWALFileLengthProvider() {
-    return path -> getWALs().stream().map(w -> 
w.getLogFileSizeIfBeingWritten(path))
-        .filter(o -> o.isPresent()).findAny().orElse(OptionalLong.empty());
+    return path -> getWALs().stream().map(w -> {
+      try {
+        return w.getLogFileSizeIfBeingWritten(path);
+      } catch (IOException e) {
+        return OptionalLong.empty();

Review comment:
       Add some comments here?




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


Reply via email to