hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1518400 - in /hbase/trunk: hbase-common/src/main/java/org/apache/hadoop/hbase/ hbase-common/src/main/resources/ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserve...
Date Wed, 28 Aug 2013 21:50:24 GMT
Author: stack
Date: Wed Aug 28 21:50:23 2013
New Revision: 1518400

URL: http://svn.apache.org/r1518400
Log:
HBASE-9341 Document hbase.hstore.compaction.kv.max

Modified:
    hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java

Modified: hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1518400&r1=1518399&r2=1518400&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/trunk/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java Wed Aug
28 21:50:23 2013
@@ -254,6 +254,7 @@ public final class HConstants {
 
   /** Parameter name for the maximum batch of KVs to be used in flushes and compactions */
   public static final String COMPACTION_KV_MAX = "hbase.hstore.compaction.kv.max";
+  public static final int COMPACTION_KV_MAX_DEFAULT = 10;
 
   /** Parameter name for HBase instance root directory */
   public static final String HBASE_DIR = "hbase.rootdir";

Modified: hbase/trunk/hbase-common/src/main/resources/hbase-default.xml
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-common/src/main/resources/hbase-default.xml?rev=1518400&r1=1518399&r2=1518400&view=diff
==============================================================================
--- hbase/trunk/hbase-common/src/main/resources/hbase-default.xml (original)
+++ hbase/trunk/hbase-common/src/main/resources/hbase-default.xml Wed Aug 28 21:50:23 2013
@@ -607,6 +607,13 @@ possible configurations would overwhelm 
     <description>Max number of HStoreFiles to compact per 'minor' compaction.</description>
   </property>
   <property>
+    <name>hbase.hstore.compaction.kv.max</name>
+    <value>10</value>
+    <description>How many KeyValues to read and then write in a batch when flushing
+        or compacting.  Do less if big KeyValues and problems with OOME.
+        Do more if wide, small rows.</description>
+  </property>
+  <property>
     <name>hbase.storescanner.parallel.seek.enable</name>
     <value>false</value>
     <description>
@@ -950,7 +957,7 @@ possible configurations would overwhelm 
     <description>
         If set to true, HBase will read data and then verify checksums for
         hfile blocks. Checksum verification inside HDFS will be switched off.
-        If the hbase-checksum verification fails, then it will switch back to 
+        If the hbase-checksum verification fails, then it will switch back to
         using HDFS checksums.
     </description>
   </property>

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java?rev=1518400&r1=1518399&r2=1518400&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
Wed Aug 28 21:50:23 2013
@@ -115,7 +115,8 @@ abstract class StoreFlusher {
 s   */
   protected long performFlush(InternalScanner scanner,
       Compactor.CellSink sink, long smallestReadPoint) throws IOException {
-    int compactionKVMax = conf.getInt(HConstants.COMPACTION_KV_MAX, 10);
+    int compactionKVMax =
+      conf.getInt(HConstants.COMPACTION_KV_MAX, HConstants.COMPACTION_KV_MAX_DEFAULT);
     List<KeyValue> kvs = new ArrayList<KeyValue>();
     boolean hasMore;
     long flushed = 0;

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java?rev=1518400&r1=1518399&r2=1518400&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
Wed Aug 28 21:50:23 2013
@@ -63,7 +63,8 @@ public abstract class Compactor {
   Compactor(final Configuration conf, final Store store) {
     this.conf = conf;
     this.store = store;
-    this.compactionKVMax = this.conf.getInt(HConstants.COMPACTION_KV_MAX, 10);
+    this.compactionKVMax =
+      this.conf.getInt(HConstants.COMPACTION_KV_MAX, HConstants.COMPACTION_KV_MAX_DEFAULT);
     this.compactionCompression = (this.store.getFamily() == null) ?
         Compression.Algorithm.NONE : this.store.getFamily().getCompactionCompression();
   }



Mime
View raw message