accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ivakegg <...@git.apache.org>
Subject [GitHub] accumulo pull request: ACCUMULO-4184: Fixed issues with the HostRe...
Date Thu, 14 Apr 2016 16:24:21 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/93#discussion_r59747455
  
    --- Diff: server/base/src/main/java/org/apache/accumulo/server/master/balancer/HostRegexTableLoadBalancer.java
---
    @@ -171,29 +183,50 @@ protected void parseConfiguration(ServerConfiguration conf) {
         poolNameToRegexPattern = new HashMap<>();
         for (Entry<String,String> table : t.tableIdMap().entrySet()) {
           tableIdToTableName.put(table.getValue(), table.getKey());
    +      conf.getTableConfiguration(table.getValue()).addObserver(this);
           Map<String,String> customProps = conf.getTableConfiguration(table.getValue()).getAllPropertiesWithPrefix(Property.TABLE_ARBITRARY_PROP_PREFIX);
           if (null != customProps && customProps.size() > 0) {
             for (Entry<String,String> customProp : customProps.entrySet()) {
               if (customProp.getKey().startsWith(HOST_BALANCER_PREFIX)) {
    +            if (customProp.getKey().equals(HOST_BALANCER_OOB_CHECK_KEY) || customProp.getKey().equals(HOST_BALANCER_POOL_RECHECK_KEY)
    +                || customProp.getKey().equals(HOST_BALANCER_REGEX_USING_IPS_KEY) || customProp.getKey().equals(HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY))
{
    +              continue;
    +            }
                 String tableName = customProp.getKey().substring(HOST_BALANCER_PREFIX.length());
                 String regex = customProp.getValue();
                 poolNameToRegexPattern.put(tableName, Pattern.compile(regex));
               }
             }
           }
         }
    -    String oobProperty = conf.getConfiguration().get(HOST_BALANCER_OOB_CHECK);
    +    String oobProperty = conf.getConfiguration().get(HOST_BALANCER_OOB_CHECK_KEY);
         if (null != oobProperty) {
           oobCheckMillis = AccumuloConfiguration.getTimeInMillis(oobProperty);
         }
         String poolRecheckProperty = conf.getConfiguration().get(HOST_BALANCER_POOL_RECHECK_KEY);
         if (null != poolRecheckProperty) {
           poolRecheckMillis = AccumuloConfiguration.getTimeInMillis(poolRecheckProperty);
         }
    -    String ipBased = conf.getConfiguration().get(HOST_BALANCER_REGEX_USING_IPS);
    +    String ipBased = conf.getConfiguration().get(HOST_BALANCER_REGEX_USING_IPS_KEY);
         if (null != ipBased) {
           isIpBasedRegex = Boolean.parseBoolean(ipBased);
         }
    +    String migrations = conf.getConfiguration().get(HOST_BALANCER_REGEX_MAX_MIGRATIONS_KEY);
    +    if (null != migrations) {
    +      maxTServerMigrations = Integer.parseInt(migrations);
    +    }
    +    LOG.info("{}", this);
    --- End diff --
    
    good info.....but instead of relying on toString use something like this.dumpConfiguration


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message