HBASE-11994 PutCombiner floods the M/R log with repeated log messages (Aditya Kishore)

This commit is contained in:
Andrew Purtell 2014-09-16 13:55:14 -07:00
parent f249f242be
commit 2c28ea06dc
1 changed files with 7 additions and 2 deletions

View File

@ -80,15 +80,20 @@ public class PutCombiner<K> extends Reducer<K, Put, K, Put> {
}
if (cnt % 10 == 0) context.setStatus("Combine " + cnt);
if (curSize > threshold) {
LOG.info(String.format("Combined %d Put(s) into %d.", cnt, 1));
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("Combined %d Put(s) into %d.", cnt, 1));
}
context.write(row, put);
put = null;
curSize = 0;
cnt = 0;
}
}
}
if (put != null) {
LOG.info(String.format("Combined %d Put(s) into %d.", cnt, 1));
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("Combined %d Put(s) into %d.", cnt, 1));
}
context.write(row, put);
}
}