hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-15425 Failing to write bulk load event marker in the WAL is ignored (Ashish Singhi)
Date Thu, 10 Mar 2016 02:49:49 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 97cce850f -> d14b6c381


HBASE-15425 Failing to write bulk load event marker in the WAL is ignored (Ashish Singhi)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/d14b6c38
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/d14b6c38
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/d14b6c38

Branch: refs/heads/master
Commit: d14b6c3810f193adb658a4052aca9c3c23d74ae9
Parents: 97cce85
Author: tedyu <yuzhihong@gmail.com>
Authored: Wed Mar 9 18:49:41 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Wed Mar 9 18:49:41 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/regionserver/HRegion.java  | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d14b6c38/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
index c090b54..d20b478 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
@@ -5297,6 +5297,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
     Preconditions.checkNotNull(familyPaths);
     // we need writeLock for multi-family bulk load
     startBulkRegionOperation(hasMultipleColumnFamilies(familyPaths));
+    boolean isSuccessful = false;
     try {
       this.writeRequestsCount.increment();
 
@@ -5344,7 +5345,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
         // problem when validating
         LOG.warn("There was a recoverable bulk load failure likely due to a" +
             " split.  These (family, HFile) pairs were not loaded: " + list);
-        return false;
+        return isSuccessful;
       }
 
       // We need to assign a sequential ID that's in between two memstores in order to preserve
@@ -5404,10 +5405,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
         }
       }
 
-      return true;
+      isSuccessful = true;
     } finally {
       if (wal != null && !storeFiles.isEmpty()) {
-        // @rite a bulk load event when not all hfiles are loaded
+        // Write a bulk load event for hfiles that are loaded
         try {
           WALProtos.BulkLoadDescriptor loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(
               this.getRegionInfo().getTable(),
@@ -5418,6 +5419,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
           if (this.rsServices != null) {
             // Have to abort region server because some hfiles has been loaded but we can't
write
             // the event into WAL
+            isSuccessful = false;
             this.rsServices.abort("Failed to write bulk load event into WAL.", ioe);
           }
         }
@@ -5425,6 +5427,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver,
Regi
 
       closeBulkRegionOperation();
     }
+    return isSuccessful;
   }
 
   @Override


Mime
View raw message