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:16:19 GMT
Github user ivakegg commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/93#discussion_r59746126
  
    --- 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);
    --- End diff --
    
    parsing non-table specific configuration changes based on a specific table configuration
observer seems hokey, but it would work of course.......


---
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