Minor edit to log messages from Nicolas

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1035183 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-11-15 08:51:28 +00:00
parent d8c6ed3be5
commit ba3056bb2d
2 changed files with 10 additions and 3 deletions

View File

@ -865,7 +865,8 @@ public class StoreFile {
int b = this.bloomFilter.getByteSize();
int k = this.bloomFilter.getKeyCount();
int m = this.bloomFilter.getMaxKeys();
StoreFile.LOG.info("Bloom added to HFile. " + b + "B, " +
StoreFile.LOG.info("Bloom added to HFile (" +
getPath() + "): " + StringUtils.humanReadableInt(b) + ", " +
k + "/" + m + " (" + NumberFormat.getPercentInstance().format(
((double)k) / ((double)m)) + ")");
}

View File

@ -1148,8 +1148,14 @@ public class HLog implements Syncable {
writeTime += took;
writeOps++;
if (took > 1000) {
LOG.warn(Thread.currentThread().getName() + " took " + took +
"ms appending an edit to hlog; editcount=" + this.numEntries.get());
long len = 0;
for(KeyValue kv : logEdit.getKeyValues()) {
len += kv.getLength();
}
LOG.warn(String.format(
"%s took %d ms appending an edit to hlog; editcount=%d, len~=%s",
Thread.currentThread().getName(), took, this.numEntries.get(),
StringUtils.humanReadableInt(len)));
}
} catch (IOException e) {
LOG.fatal("Could not append. Requesting close of hlog", e);