Repository: hbase Updated Branches: refs/heads/master 1b2e80389 -> ba02a8664
HBASE-20384 [AMv2] Logging format improvements; use encoded name rather than full region name marking transitions Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ba02a866 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ba02a866 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ba02a866 Branch: refs/heads/master Commit: ba02a8664b23c1d4942fad357b0ef02ec88ec8b5 Parents: 1b2e803 Author: Michael Stack <st...@apache.org> Authored: Mon Apr 9 20:23:05 2018 -0700 Committer: Michael Stack <st...@apache.org> Committed: Wed Apr 11 08:35:54 2018 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hbase/master/RegionPlan.java | 2 +- .../hadoop/hbase/master/assignment/AssignmentManager.java | 2 +- .../hadoop/hbase/master/assignment/RegionStateStore.java | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/ba02a866/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlan.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlan.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlan.java index 6c91a52..f4d6e63 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlan.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/RegionPlan.java @@ -189,7 +189,7 @@ public class RegionPlan implements Comparable<RegionPlan> { @Override public String toString() { - return "hri=" + this.hri.getRegionNameAsString() + ", source=" + + return "hri=" + this.hri.getEncodedName() + ", source=" + (this.source == null? "": this.source.toString()) + ", destination=" + (this.dest == null? "": this.dest.toString()); } http://git-wip-us.apache.org/repos/asf/hbase/blob/ba02a866/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java index 0e47065..6f18d68 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/AssignmentManager.java @@ -864,7 +864,7 @@ public class AssignmentManager implements ServerListener { final ServerStateNode serverNode = regionStates.getOrCreateServer(serverName); if (!reportTransition(regionNode, serverNode, state, seqId)) { // Don't log if shutting down cluster; during shutdown. - LOG.warn("No matchin procedure found for {} to transition to {}", regionNode, state); + LOG.warn("No matching procedure found for {} transition to {}", regionNode, state); } } http://git-wip-us.apache.org/repos/asf/hbase/blob/ba02a866/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java index 207ce86..aa14b58 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment/RegionStateStore.java @@ -118,9 +118,8 @@ public class RegionStateStore { final long openSeqNum = -1; // TODO: move under trace, now is visible for debugging - LOG.info(String.format("Load hbase:meta entry region=%s regionState=%s lastHost=%s regionLocation=%s", - regionInfo, state, lastHost, regionLocation)); - + LOG.info("Load hbase:meta entry region={}, regionState={}, lastHost={}, " + + "regionLocation={}", regionInfo.getEncodedName(), state, lastHost, regionLocation); visitor.visitRegionState(regionInfo, state, regionLocation, lastHost, openSeqNum); } } @@ -158,7 +157,7 @@ public class RegionStateStore { MetaTableAccessor.addRegionInfo(put, regionInfo); final StringBuilder info = new StringBuilder("pid=").append(pid).append(" updating hbase:meta row=") - .append(regionInfo.getRegionNameAsString()).append(", regionState=").append(state); + .append(regionInfo.getEncodedName()).append(", regionState=").append(state); if (openSeqNum >= 0) { Preconditions.checkArgument(state == State.OPEN && regionLocation != null, "Open region should be on a server");