Index: hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java
===================================================================
--- hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java (revision 1518379)
+++ hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java (working copy)
@@ -254,6 +254,7 @@
/** 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";
Index: hbase-common/src/main/resources/hbase-default.xml
===================================================================
--- hbase-common/src/main/resources/hbase-default.xml (revision 1518379)
+++ hbase-common/src/main/resources/hbase-default.xml (working copy)
@@ -607,6 +607,13 @@
Max number of HStoreFiles to compact per 'minor' compaction.
+ hbase.hstore.compaction.kv.max
+ 10
+ 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.
+
+
hbase.storescanner.parallel.seek.enable
false
@@ -950,7 +957,7 @@
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.
Index: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java
===================================================================
--- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java (revision 1518379)
+++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreFlusher.java (working copy)
@@ -115,7 +115,8 @@
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 kvs = new ArrayList();
boolean hasMore;
long flushed = 0;
Index: hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java
===================================================================
--- hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java (revision 1518379)
+++ hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/Compactor.java (working copy)
@@ -63,7 +63,8 @@
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();
}