You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2014/08/23 19:58:55 UTC

[2/3] git commit: HBASE-11794 StripeStoreFlusher causes NullPointerException (jeongmin kim)

HBASE-11794 StripeStoreFlusher causes NullPointerException (jeongmin kim)


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

Branch: refs/heads/branch-1
Commit: 01e4f0ed8ae1ccf2fefee395fcc3247f18d61fc3
Parents: 08c14bd
Author: Andrew Purtell <ap...@apache.org>
Authored: Sat Aug 23 10:49:21 2014 -0700
Committer: Andrew Purtell <ap...@apache.org>
Committed: Sat Aug 23 10:49:33 2014 -0700

----------------------------------------------------------------------
 .../apache/hadoop/hbase/regionserver/StripeStoreFlusher.java   | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/01e4f0ed/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFlusher.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFlusher.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFlusher.java
index 768c691..ae34799 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFlusher.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StripeStoreFlusher.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hbase.regionserver;
 import static org.apache.hadoop.hbase.regionserver.StripeStoreFileManager.OPEN_KEY;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.commons.logging.Log;
@@ -54,7 +55,7 @@ public class StripeStoreFlusher extends StoreFlusher {
   @Override
   public List<Path> flushSnapshot(MemStoreSnapshot snapshot, long cacheFlushSeqNum,
       MonitoredTask status) throws IOException {
-    List<Path> result = null;
+    List<Path> result = new ArrayList<Path>();
     int cellsCount = snapshot.getCellsCount();
     if (cellsCount == 0) return result; // don't flush if there are no entries
 
@@ -83,9 +84,6 @@ public class StripeStoreFlusher extends StoreFlusher {
       }
     } finally {
       if (!success && (mw != null)) {
-        if (result != null) {
-          result.clear();
-        }
         for (Path leftoverFile : mw.abortWriters()) {
           try {
             store.getFileSystem().delete(leftoverFile, false);