HBASE-16469 Several log refactoring/improvement suggestions

Signed-off-by: Sean Busbey <busbey@apache.org>
This commit is contained in:
Nemo Chen 2017-04-05 21:20:40 -04:00 committed by Sean Busbey
parent ec461ac871
commit 4030facc99
5 changed files with 7 additions and 6 deletions

View File

@ -301,7 +301,7 @@ class PreemptiveFastFailInterceptor extends RetryingCallerInterceptor {
// If we were able to connect to the server, reset the failure
// information.
if (couldNotCommunicate == false) {
LOG.info("Clearing out PFFE for server " + server.getServerName());
LOG.info("Clearing out PFFE for server " + server);
repeatedFailuresMap.remove(server);
} else {
// update time of last attempt

View File

@ -84,6 +84,7 @@ public class HBaseClusterManager extends Configured implements ClusterManager {
sshOptions = StringUtils.join(new Object[] { sshOptions, extraSshOptions }, " ");
}
sshOptions = (sshOptions == null) ? "" : sshOptions;
sshUserName = (sshUserName == null) ? "" : sshUserName;
tunnelCmd = conf.get("hbase.it.clustermanager.ssh.cmd", DEFAULT_TUNNEL_CMD);
// Print out ssh special config if any.
if ((sshUserName != null && sshUserName.length() > 0) ||

View File

@ -1366,12 +1366,12 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
*/
public boolean isMergeable() {
if (!isAvailable()) {
LOG.debug("Region " + getRegionInfo().getRegionNameAsString()
LOG.debug("Region " + this
+ " is not mergeable because it is closing or closed");
return false;
}
if (hasReferences()) {
LOG.debug("Region " + getRegionInfo().getRegionNameAsString()
LOG.debug("Region " + this
+ " is not mergeable because it has references");
return false;
}
@ -1518,7 +1518,7 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver, Regi
// the close flag?
if (!abort && worthPreFlushing() && canFlush) {
status.setStatus("Pre-flushing region before close");
LOG.info("Running close preflush of " + getRegionInfo().getRegionNameAsString());
LOG.info("Running close preflush of " + this);
try {
internalFlushcache(status);
} catch (IOException ioe) {

View File

@ -140,7 +140,7 @@ public class CloseRegionHandler extends EventHandler {
// of doing the setClosedState() below, let's just ignore cont
// The split message will clean up the master state.
LOG.warn("Can't close region: was already closed during close(): " +
regionInfo.getRegionNameAsString());
name);
return;
}
} catch (IOException ioe) {

View File

@ -181,7 +181,7 @@ public class MultiThreadedUpdater extends MultiThreadedWriterBase {
LOG.info("Null result expected for the rowkey " + Bytes.toString(rowKey));
} else {
failedKeySet.add(rowKeyBase);
LOG.error("Failed to update the row with key = [" + rowKey
LOG.error("Failed to update the row with key = [" + Bytes.toString(rowKey)
+ "], since we could not get the original row");
}
}