hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li...@apache.org
Subject svn commit: r1406786 - /hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
Date Wed, 07 Nov 2012 20:15:20 GMT
Author: liyin
Date: Wed Nov  7 20:15:20 2012
New Revision: 1406786

URL: http://svn.apache.org/viewvc?rev=1406786&view=rev
[HBASE-7105] RS throws NPE on forcing compaction from HBase shell on a single bulk imported

Author: kranganathan

In StoreFile, we have:
private AtomicBoolean majorCompaction = null;

In StoreFile.open(), we do:
b = metadataMap.get(MAJOR_COMPACTION_KEY);
if (b != null) { // init majorCompaction variable }

Because the file was bulk imported, this is never initialized. Any subsequent call to isMajorCompaction()
NPE's. Fix is to initialize it to false.

Test Plan: Ran unit tests, re-ran the test case that broke it.

Reviewers: kannan

Reviewed By: kannan

CC: hbase-eng@

Differential Revision: https://phabricator.fb.com/D622348


Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java?rev=1406786&r1=1406785&r2=1406786&view=diff
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFile.java
Wed Nov  7 20:15:20 2012
@@ -175,7 +175,7 @@ public class StoreFile extends SchemaCon
   // If true, this file was product of a major compaction.  Its then set
   // whenever you get a Reader.
-  private AtomicBoolean majorCompaction = null;
+  private AtomicBoolean majorCompaction = new AtomicBoolean(false);
   /** Meta key set when store file is a result of a bulk load */
   public static final byte[] BULKLOAD_TASK_KEY =

View raw message