saintstack commented on a change in pull request #378: HBASE-22684 The log 
rolling request maybe canceled immediately in Log…
URL: https://github.com/apache/hbase/pull/378#discussion_r303223630
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/LogRoller.java
 ##########
 @@ -247,12 +234,7 @@ private void scheduleFlush(final byte [] 
encodedRegionName) {
    * @return true if all WAL roll finished
    */
   public boolean walRollFinished() {
-    for (boolean needRoll : walNeedsRoll.values()) {
-      if (needRoll) {
-        return false;
-      }
-    }
-    return true;
+    return walNeedsRoll.values().stream().allMatch(needRoll -> !needRoll);
 
 Review comment:
   This does the same thing? (I'm bad on lambda....)

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