HBASE-7798 ZKAssign logs the wrong server if the transition fails (Sergey Shelukhin)

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1446106 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nkeywal 2013-02-14 10:34:20 +00:00
parent 7aa994de3b
commit 164b3a4959
1 changed files with 5 additions and 4 deletions

View File

@ -759,10 +759,11 @@ public class ZKAssign {
// Verify it is in expected state // Verify it is in expected state
EventType et = rt.getEventType(); EventType et = rt.getEventType();
if (!et.equals(beginState)) { if (!et.equals(beginState)) {
LOG.warn(zkw.prefix("Attempt to transition the " + String existingServer = (rt.getServerName() == null)
"unassigned node for " + encoded + ? "<unknown>" : rt.getServerName().toString();
" from " + beginState + " to " + endState + " failed, " + LOG.warn(zkw.prefix("Attempt to transition the unassigned node for " + encoded
"the node existed but was in the state " + et + " set by the server " + serverName)); + " from " + beginState + " to " + endState + " failed, the node existed but"
+ " was in the state " + et + " set by the server " + existingServer));
return -1; return -1;
} }