You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2020/02/15 00:56:37 UTC

[hbase] 09/16: small findbug fix

This is an automated email from the ASF dual-hosted git repository.

busbey pushed a commit to branch HBASE-22749
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 77091f797e3ce5c72e54e83e885fc79739fa2667
Author: Vladimir Rodionov <vl...@gmail.com>
AuthorDate: Wed Feb 5 13:57:40 2020 -0800

    small findbug fix
---
 .../org/apache/hadoop/hbase/mob/MobFileCleanerChore.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java
index 80f699e..168d8cf 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCleanerChore.java
@@ -191,10 +191,12 @@ public class MobFileCleanerChore extends ScheduledChore {
           Path storePath = new Path(regionPath, family);
           boolean succeed = false;
           Set<String> regionMobs = new HashSet<String>();
+          
           while (!succeed) {
             if (!fs.exists(storePath)) {
               LOG.warn("Directory {} was deleted during cleaner procedure execution,"
-                  +" skipping region {}", storePath, regionPath.getName());
+                  + " skipping region {}",
+                storePath, regionPath.getName());
               continue region;
             }
             RemoteIterator<LocatedFileStatus> rit = fs.listLocatedStatus(storePath);
@@ -244,18 +246,16 @@ public class MobFileCleanerChore extends ScheduledChore {
                 }
               }
             } catch (FileNotFoundException e) {
-              String warnMsg =
-                  String.format("Missing file:%s" +
-                      " Starting MOB cleaning cycle from the beginning due to error",
-                      currentPath);
+              String warnMsg = String.format(
+                "Missing file:%s" + " Starting MOB cleaning cycle from the beginning due to error",
+                currentPath);
               LOG.warn(warnMsg, e);
+              regionMobs.clear();
               continue;
             }
             succeed = true;
           }
-          if (!succeed) {
-            continue; // continue next cf
-          }
+          
           // Add MOB references for current region/family
           allActiveMobFileName.addAll(regionMobs);
         } // END column families