accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-4184) HostRegexTableLoadBalancer fixup
Date Thu, 14 Apr 2016 16:24:25 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-4184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15241445#comment-15241445
] 

ASF GitHub Bot commented on ACCUMULO-4184:
------------------------------------------

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


> HostRegexTableLoadBalancer fixup
> --------------------------------
>
>                 Key: ACCUMULO-4184
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4184
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: master
>            Reporter: Dave Marion
>            Assignee: Dave Marion
>             Fix For: 1.7.2, 1.8.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Ticket to address issues with the new balancer.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message