Repository: accumulo
Updated Branches:
  refs/heads/1.7 d1591f048 -> ede9daee0


ACCUMULO-4658: Cache call to ZooKeeper to get table id map for the duration of 
the method


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/ede9daee
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/ede9daee
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/ede9daee

Branch: refs/heads/1.7
Commit: ede9daee085940234cd057c46217529fcfcafb69
Parents: d1591f0
Author: Dave Marion <dlmar...@apache.org>
Authored: Mon Jun 19 15:13:59 2017 -0400
Committer: Dave Marion <dlmar...@apache.org>
Committed: Mon Jun 19 15:13:59 2017 -0400

----------------------------------------------------------------------
 .../server/master/balancer/HostRegexTableLoadBalancer.java      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/ede9daee/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
----------------------------------------------------------------------
diff --git 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
index 3a8017a..d7702f2 100644
--- 
a/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
+++ 
b/server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
@@ -300,6 +300,7 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer implements Con
     if (t == null)
       return minBalanceTime;
 
+    Map<String,String> tableIdMap = t.tableIdMap();
     Map<String,SortedMap<TServerInstance,TabletServerStatus>> currentGrouped = 
splitCurrentByRegex(current);
     if ((System.currentTimeMillis() - this.lastOOBCheck) > 
this.oobCheckMillis) {
       try {
@@ -314,7 +315,7 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer implements Con
             if (hostPools.contains(tablePoolName)) {
               continue;
             }
-            String tid = t.tableIdMap().get(table);
+            String tid = tableIdMap.get(table);
             if (null == tid) {
               LOG.warn("Unable to check for out of bounds tablets for table 
{}, it may have been deleted or renamed.", table);
               continue;
@@ -370,7 +371,7 @@ public class HostRegexTableLoadBalancer extends 
TableLoadBalancer implements Con
       return minBalanceTime;
     }
 
-    for (String s : t.tableIdMap().values()) {
+    for (String s : tableIdMap.values()) {
       String tableName = tableIdToTableName.get(s);
       String regexTableName = getPoolNameForTable(tableName);
       SortedMap<TServerInstance,TabletServerStatus> currentView = 
currentGrouped.get(regexTableName);

Reply via email to