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 20:29:49 UTC

[hbase] 15/18: Abort MOB file cleaner chore in case of CF failure

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 f10b4fef52b1fd44cde17064a132caa32d6729d9
Author: Vladimir Rodionov <vl...@gmail.com>
AuthorDate: Fri Feb 14 11:31:40 2020 -0800

    Abort MOB file cleaner chore in case of CF failure
---
 .../org/apache/hadoop/hbase/mob/MobFileCleanerChore.java     | 12 ++++++------
 1 file changed, 6 insertions(+), 6 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 76b6374..6588381 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
@@ -72,7 +72,7 @@ public class MobFileCleanerChore extends ScheduledChore {
   }
 
   public MobFileCleanerChore(HMaster master) {
-    super(master.getServerName() + "-ExpiredMobFileCleanerChore", master,
+    super(master.getServerName() + "-MobFileCleanerChore", master,
         master.getConfiguration().getInt(MobConstants.MOB_CLEANER_PERIOD,
           MobConstants.DEFAULT_MOB_CLEANER_PERIOD),
         master.getConfiguration().getInt(MobConstants.MOB_CLEANER_PERIOD,
@@ -176,7 +176,6 @@ public class MobFileCleanerChore extends ScheduledChore {
       Set<String> allActiveMobFileName = new HashSet<String>();
       FileSystem fs = FileSystem.get(conf);
       for (Path regionPath : regionDirs) {
-        region:
         for (ColumnFamilyDescriptor hcd : list) {
           String family = hcd.getNameAsString();
           Path storePath = new Path(regionPath, family);
@@ -185,10 +184,11 @@ public class MobFileCleanerChore extends ScheduledChore {
 
           while (!succeed) {
             if (!fs.exists(storePath)) {
-              LOG.warn("Directory {} was deleted during cleaner procedure execution,"
-                  + " skipping region {}",
-                storePath, regionPath.getName());
-              continue region;
+              String errMsg = 
+                  String.format("Directory %s was deleted during MOB file cleaner chore"
+                  + " execution, aborting MOB file cleaner chore.",
+                storePath);
+              throw new IOException(errMsg);
             }
             RemoteIterator<LocatedFileStatus> rit = fs.listLocatedStatus(storePath);
             List<Path> storeFiles = new ArrayList<Path>();