hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r645690 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Date Mon, 07 Apr 2008 21:08:50 GMT
Author: jimk
Date: Mon Apr  7 14:08:48 2008
New Revision: 645690

URL: http://svn.apache.org/viewvc?rev=645690&view=rev
Log:
HBASE-564   Don't do a cache flush if there are zero entries in the cache.

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=645690&r1=645689&r2=645690&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Apr  7 14:08:48 2008
@@ -13,6 +13,7 @@
    HBASE-563   TestRowFilterAfterWrite erroneously sets master address to
                0.0.0.0:60100 rather than relying on conf
    HBASE-507   Use Callable pattern to sleep between retries
+   HBASE-564   Don't do a cache flush if there are zero entries in the cache.
 
   NEW FEATURES
    HBASE-548   Tool to online single region

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=645690&r1=645689&r2=645690&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java Mon Apr 
7 14:08:48 2008
@@ -617,6 +617,11 @@
   private void internalFlushCache(SortedMap<HStoreKey, byte []> cache,
       long logCacheFlushId) throws IOException {
     
+    // Don't flush if there are no entries.
+    if (cache.size() == 0) {
+      return;
+    }
+    
     synchronized(flushLock) {
       // A. Write the Maps out to the disk
       HStoreFile flushedFile = new HStoreFile(conf, fs, basedir,



Mime
View raw message