HBASE-3227 Edit of log messages before branching

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1034272 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2010-11-12 06:04:59 +00:00
parent 72d855549a
commit 09e1e1820a
5 changed files with 21 additions and 22 deletions

View File

@ -1150,6 +1150,7 @@ Release 0.90.0 - Unreleased
(Bennett Neale via Stack)
HBASE-3218 Shell help cleanup/cosmetics/edit
HBASE-3079 Shell displaying uninformative exceptions
HBASE-3227 Edit of log messages before branching.
NEW FEATURES

View File

@ -335,7 +335,7 @@ public class HConnectionManager {
// Check if we already have a good master connection
if (master != null) {
if(master.isMasterRunning()) {
if (master.isMasterRunning()) {
return master;
}
}
@ -877,8 +877,8 @@ public class HConnectionManager {
HRegionLocation rl = getCachedLocation(tableName, row);
if (rl != null) {
tableLocations.remove(rl.getRegionInfo().getStartKey());
if (LOG.isInfoEnabled()) {
LOG.info("Removed " +
if (LOG.isDebugEnabled()) {
LOG.debug("Removed " +
rl.getRegionInfo().getRegionNameAsString() +
" for tableName=" + Bytes.toString(tableName) +
" from cache " + "because of " + Bytes.toStringBinary(row));

View File

@ -139,9 +139,9 @@ public class CompactSplitThread extends Thread implements CompactionRequestor {
}
if (compactionQueue.add(r, priority) && LOG.isDebugEnabled()) {
LOG.debug("Compaction " + (force? "(major) ": "") +
"requested for region " + r.getRegionNameAsString() +
(why != null && !why.isEmpty()? " because: " + why: "") +
"; Priority: " + priority + "; Compaction queue size: " + compactionQueue.size());
"requested for " + r.getRegionNameAsString() +
(why != null && !why.isEmpty()? " because " + why: "") +
"; priority=" + priority + ", compaction queue size=" + compactionQueue.size());
}
}

View File

@ -898,8 +898,8 @@ public class HRegion implements HeapSize { // , Writable{
return false;
}
if (LOG.isDebugEnabled()) {
LOG.debug("Started memstore flush for region " + this +
"; current region memstore size " +
LOG.debug("Started memstore flush for " + this +
", current region memstore size " +
StringUtils.humanReadableInt(this.memstoreSize.get()) +
((wal != null)? "": "; wal is null, using passed sequenceid=" + myseqid));
}

View File

@ -503,8 +503,7 @@ public class Store implements HeapSize {
LOG.info("Added " + sf + ", entries=" + r.getEntries() +
", sequenceid=" + logCacheFlushId +
", memsize=" + StringUtils.humanReadableInt(flushed) +
", filesize=" + StringUtils.humanReadableInt(r.length()) +
" to " + this.region.regionInfo.getRegionNameAsString());
", filesize=" + StringUtils.humanReadableInt(r.length()));
}
return sf;
}
@ -579,7 +578,7 @@ public class Store implements HeapSize {
*/
void deleteChangedReaderObserver(ChangedReadersObserver o) {
if (!this.changedReaderObservers.remove(o)) {
LOG.warn("Not in set" + o);
LOG.warn("Not in set (double-remove?) " + o);
}
}
@ -700,9 +699,9 @@ public class Store implements HeapSize {
if (end - start < this.compactionThreshold) {
if (LOG.isDebugEnabled()) {
LOG.debug("Skipped compaction of " + this.storeNameStr
+ ". Only " + (end - start) + " file(s) of size "
+ " because only " + (end - start) + " file(s) of size "
+ StringUtils.humanReadableInt(totalSize)
+ " are meet compaction criteria.");
+ " meet compaction criteria.");
}
return checkSplit(forceSplit);
}
@ -726,8 +725,8 @@ public class Store implements HeapSize {
long maxId = StoreFile.getMaxSequenceIdInList(filesToCompact);
// Ready to go. Have list of files to compact.
LOG.info("Started compaction of " + filesToCompact.size() + " file(s) in " +
this.storeNameStr + " of " + this.region.getRegionInfo().getRegionNameAsString() +
LOG.info("Started compaction of " + filesToCompact.size() + " file(s) in cf=" +
this.storeNameStr +
(references? ", hasReferences=true,": " ") + " into " +
region.getTmpDir() + ", seqid=" + maxId +
", totalSize=" + StringUtils.humanReadableInt(totalSize));
@ -736,9 +735,8 @@ public class Store implements HeapSize {
StoreFile sf = completeCompaction(filesToCompact, writer);
if (LOG.isInfoEnabled()) {
LOG.info("Completed" + (majorcompaction? " major ": " ") +
"compaction of " + filesToCompact.size() + " file(s) in " +
this.storeNameStr + " of " + this.region.getRegionInfo().getRegionNameAsString() +
"; new storefile name=" + (sf == null? "none": sf.toString()) +
"compaction of " + filesToCompact.size() +
" file(s), new file=" + (sf == null? "none": sf.toString()) +
", size=" + (sf == null? "none": StringUtils.humanReadableInt(sf.getReader().length())) +
"; total size for store is " + StringUtils.humanReadableInt(storeSize));
}
@ -897,10 +895,10 @@ public class Store implements HeapSize {
? r.getFilterEntries() : r.getEntries();
maxKeyCount += keyCount;
if (LOG.isDebugEnabled()) {
LOG.debug("Compacting: " + file +
"; keyCount = " + keyCount +
"; Bloom Type = " + r.getBloomFilterType().toString() +
"; Size = " + StringUtils.humanReadableInt(r.length()) );
LOG.debug("Compacting " + file +
", keycount=" + keyCount +
", bloomtype=" + r.getBloomFilterType().toString() +
", size=" + StringUtils.humanReadableInt(r.length()) );
}
}
}