Return-Path: X-Original-To: apmail-hbase-commits-archive@www.apache.org Delivered-To: apmail-hbase-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7C6291077C for ; Thu, 29 Aug 2013 21:24:03 +0000 (UTC) Received: (qmail 11500 invoked by uid 500); 29 Aug 2013 21:24:03 -0000 Delivered-To: apmail-hbase-commits-archive@hbase.apache.org Received: (qmail 11471 invoked by uid 500); 29 Aug 2013 21:24:03 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 11464 invoked by uid 99); 29 Aug 2013 21:24:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 21:24:03 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 21:24:00 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1DE9323888E7; Thu, 29 Aug 2013 21:23:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1518831 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java Date: Thu, 29 Aug 2013 21:23:39 -0000 To: commits@hbase.apache.org From: enis@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130829212339.1DE9323888E7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: enis Date: Thu Aug 29 21:23:38 2013 New Revision: 1518831 URL: http://svn.apache.org/r1518831 Log: HBASE-9380 StoreFile.Reader is not being closed on memstore flush Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=1518831&r1=1518830&r2=1518831&view=diff ============================================================================== --- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java (original) +++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HStore.java Thu Aug 29 21:23:38 2013 @@ -48,12 +48,12 @@ import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CompoundConfiguration; -import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.RemoteExceptionHandler; +import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.io.compress.Compression; import org.apache.hadoop.hbase.io.hfile.CacheConfig; @@ -273,6 +273,7 @@ public class HStore implements Store { return ttl; } + @Override public String getColumnFamilyName() { return this.family.getNameAsString(); } @@ -308,6 +309,7 @@ public class HStore implements Store { return this.compactionCheckMultiplier; } + @Override public long getBlockingFileCount() { return blockingFileCount; } @@ -344,6 +346,7 @@ public class HStore implements Store { return closeCheckInterval; } + @Override public HColumnDescriptor getFamily() { return this.family; } @@ -419,6 +422,7 @@ public class HStore implements Store { for (final StoreFileInfo storeFileInfo: files) { // open each store file in parallel completionService.submit(new Callable() { + @Override public StoreFile call() throws IOException { StoreFile storeFile = createStoreFileAndReader(storeFileInfo.getPath()); return storeFile; @@ -632,6 +636,7 @@ public class HStore implements Store { new ExecutorCompletionService(storeFileCloserThreadPool); for (final StoreFile f : result) { completionService.submit(new Callable() { + @Override public Void call() throws IOException { f.closeReader(true); return null; @@ -779,6 +784,7 @@ public class HStore implements Store { * @param isCompaction whether we are creating a new file in a compaction * @return Writer for a new StoreFile in the tmp dir. */ + @Override public StoreFile.Writer createWriterInTmp(long maxKeyCount, Compression.Algorithm compression, boolean isCompaction, boolean includeMVCCReadpoint) throws IOException { @@ -944,6 +950,7 @@ public class HStore implements Store { * @throws IOException * @return Storefile we compacted into or null if we failed or opted out early. */ + @Override public List compact(CompactionContext compaction) throws IOException { assert compaction != null && compaction.hasSelection(); CompactionRequest cr = compaction.getRequest(); @@ -1086,6 +1093,7 @@ public class HStore implements Store { * See HBASE-2331. * @param compaction */ + @Override public void completeCompactionMarker(CompactionDescriptor compaction) throws IOException { LOG.debug("Completing compaction from the WAL marker"); @@ -1307,6 +1315,7 @@ public class HStore implements Store { return compaction; } + @Override public void cancelRequestedCompaction(CompactionContext compaction) { finishCompactionRequest(compaction.getRequest()); } @@ -1332,7 +1341,7 @@ public class HStore implements Store { throws IOException { StoreFile storeFile = null; try { - createStoreFileAndReader(path, NoOpDataBlockEncoder.INSTANCE); + storeFile = createStoreFileAndReader(path, NoOpDataBlockEncoder.INSTANCE); } catch (IOException e) { LOG.error("Failed to open store file : " + path + ", keeping it in tmp location", e); @@ -1562,6 +1571,7 @@ public class HStore implements Store { return foundCandidate; } + @Override public boolean canSplit() { this.lock.readLock().lock(); try { @@ -1605,6 +1615,7 @@ public class HStore implements Store { return storeSize; } + @Override public void triggerMajorCompaction() { this.forceMajor = true; } @@ -1783,6 +1794,7 @@ public class HStore implements Store { } } + @Override public StoreFlushContext createFlushContext(long cacheFlushId) { return new StoreFlusherImpl(cacheFlushId); } @@ -1874,6 +1886,7 @@ public class HStore implements Store { return DEEP_OVERHEAD + this.memstore.heapSize(); } + @Override public KeyValue.KVComparator getComparator() { return comparator; }